Making an HTML string from a React component in background, how to use the string by dangerouslySetInnerHTML in another React component

This seems to work just fine if you want to render any component to a HTML string: import { renderToStaticMarkup } from ‘react-dom/server’ function componentToString() { return renderToStaticMarkup(<MyAwesomeComponent some=”props” or=”whatever” />) }

Can I add LaTeX packages to MathJax?

Is there a way of using LaTeX packages with MathJax? No. MathJax isn’t LaTeX; it processes input that is LaTeX-like (as close as it reasonably can be to true LaTeX), but the way it works under the hood is very different. One difference in particular is that MathJax only implements the math-mode macros, not all … Read more

What’s the best way to write Mathematical Equations on the Web?

The jsMath package is an option that uses LaTeX markup and native fonts. Quoting from their webpage http://www.math.union.edu/~dpvc/jsMath/: The jsMath package provides a method of including mathematics in HTML pages that works across multiple browsers under Windows, Macintosh OS X, Linux and other flavors of unix. It overcomes a number of the shortcomings of the … Read more

using element’s own (not parent’s) width for calculation or percentage in css, without javascript

One pure CSS solution is to use transform. element { position: relative; top: 50%; transform: translateY(-50%); } Notes: You can use top: 50%; for vertical and left: 50%; for horizontal. You would then use translateY(-50%) for vertical and translateX(-50%) for horizontal centering. You can also use this trick to align elements to the bottom or … Read more