When using the SI unit in the sinunitx package on the astronomy StackExchange page, it cannot display the correct unit I was hoping for: $1\mathrm{kg}$ instead of $\SI{1}{kg}$
-
1$\begingroup$ you can't use latex packages, because this isn't latex. it is mathjax. $\endgroup$– James KNov 20, 2020 at 4:37
-
1$\begingroup$ @JamesK It said that ``Astronomy Meta Stack Exchange uses MathJax to render LaTeX syntax'', so its not LaTeX? Isn't it like pfdTeX or XeLaTex? So the only way to type SI unit is by using \mathrm command? Thank you. $\endgroup$– Jack the RangerNov 20, 2020 at 8:26
1 Answer
you can't use latex packages, because this isn't latex. it is mathjax
Astronomy Meta Stack Exchange uses MathJax to render LaTeX syntax.
So its not LaTeX. It is MathJax which renders mathematical equations written in a TeX-like format to the screen. In particular there is documentclass, no latex header (everything before begin{document}, so no \usepackage and no siuntix.
If you need it very much you can do
$$\newcommand{\kg}{\,\mathrm{kg}} 59\kg$$
That only has to be done once per page
$$78\kg$$
$$\newcommand{\kg}{\,\mathrm{kg}} 59\kg$$ That only has to be done once per page $$78\kg$$