TeX: {
Macros: {
textnormal: ['\\text{#1}', 1]
}
}
--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
This just some normal text, and here is some math:
\begin{eqnarray*}
\int_1^9 x dx & & \textrm{this is textrm}\\
\sum_1^9 y & & \textsf{this is textsf}\\
\prod_1^9 z & & \textnormal{this is textnormal}\\
\prod_1^9 z & & \text{this is text}
\end{eqnarray*}
\end{document}
\documentclass{beamer}
\usepackage{amsmath}
\begin{document}
\begin{frame}
This just some normal text, and here is some math:
\begin{eqnarray*}
\int_1^9 x dx & & \textrm{this is textrm}\\
\sum_1^9 y & & \textsf{this is textsf}\\
\prod_1^9 z & & \textnormal{this is textnormal}\\
\prod_1^9 z & & \text{this is text}
\end{eqnarray*}
\end{frame}
\end{document}
TeX: {
Macros: {
textnormal: ['\\textrm{#1}', 1],
text: null
}
}
Dear Daniel,
> \text also matches the surrounding text.
As I tried to explain, it's more complicated than that.
> Actually, since \textnormal isn't relying on amsmath it has even an edge over \text to be included by default.
Maybe from a "real" (La)TeX point of view. But MathJax is not TeX and disabling \text would break backward compatibility of MathJax because it's actually one of the few cases where MathJax is not strictly faithful to real LaTeX -- \text is a default macro in MathJax (and not even the AMS extensions are needed) . So at the earliest this could occur in MathJax 3.0.
> Is there a difference between \textrm and \text in MathJax?
No, it forces the font to rm. Why not just map \textnormal to \text?
Peter.
> \text also matches the surrounding text.
As I tried to explain, it's more complicated than that.
> Actually, since \textnormal isn't relying on amsmath it has even an edge over \text to be included by default.
Maybe from a "real" (La)TeX point of view. But MathJax is not TeX and disabling \text would break backward compatibility of MathJax because it's actually one of the few cases where MathJax is not strictly faithful to real LaTeX -- \text is a default macro in MathJax (and not even the AMS extensions are needed) . So at the earliest this could occur in MathJax 3.0.
> Is there a difference between \textrm and \text in MathJax?
No, it forces the font to rm. Why not just map \textnormal to \text?