--- loncom/html/adm/help/tex/Authoring_Output_Tags.tex 2017/01/17 02:58:48 1.22
+++ loncom/html/adm/help/tex/Authoring_Output_Tags.tex 2017/01/19 21:12:45 1.23
@@ -8,11 +8,17 @@ This group of tags generates useful outp
\begin{verbatim}
2x^y+sqrt(3/x^2)
\end{verbatim}
-Expressions are displayed using the math expression display mechanism defined in the user's preferences. The default is tth. See the section below concerning the $<$m$>$ tag for more information on that as well as on the attribute \textbf{display}.
-\item \textbf{chem}\index{chem}\index{format reaction}: Typesets chemical equation
+Expressions are displayed using the math expression display mechanism defined in the user's preferences. See the section below concerning the $<$m$>$ tag for more information on that as well as on the \textbf{display} attribute.
+
+Recognized functions are all trigonometric functions, and the following:
+exp, abs, logten, log, ln, sqrt, sgn, step, fact, int, lim, funX.
+\item \textbf{chem}\index{chem}\index{format reaction}: Typesets chemical equation :
\begin{verbatim}
O2 + 2H2 -> 2H2O
\end{verbatim}
+will be rendered:
+
+$\mathrm{O_2} + 2\,\mathrm{H_2} \to 2\,\mathrm{H_2O}$
\item \textbf{num}\index{num}\index{format number}: Typesets a number formatted in scientific notation, fixed point, fixed point with commas, fixed point with commas and dollar sign, or in significant digits.
\begin{verbatim}
31454678 results in 3.15 x 10^7
@@ -146,15 +152,16 @@ When printing, the included text will be
to HTML (or MathML) on the fly. The default is to convert
to the display mechanism that the user has selected in preferences. This can be
overriden by setting the attribute \textbf{display} to one of
-``\textbf{tth}'' or ``\textbf{mimetex}''which
-will force a specfic display mechanism. Note, however, that setting the attribute \textbf{display} to \textbf{jsmath} is generally discouraged as it works best if users have installed jsmath fonts on their computer.
-See \\ \texttt{http://www.math.union.edu/\char`~ dpvc/jsmath/} .
+``\textbf{tth}'', ``\textbf{mimetex}'' or ``\textbf{mathjax}'' which
+will force a specific display mechanism. Note that the ``\textbf{jsmath}'' display is deprecated today, and MathJax is used instead when it is specified.
+
+The contents of \texttt{ } are interpreted as LaTeX outside math environment, which is why using \texttt{\$ \$} is needed to switch to the LaTeX math environment. However, the ``\textbf{mathjax}'' display (which is used by default in recent versions of LON-CAPA) interprets all the contents of \texttt{ } as math, and does not support non-math LaTeX. For content to work well with all the display mechanisms, it is therefore important to never use non-math LaTeX for web targets. Even purely for printing, it is better to avoid using non-math LaTeX, as the printing mechanism might use HTML instead of LaTeX in the future.
If you want variables inside of this tag to be evaluated before the
tex gets converted, then use eval=``on'' \index{eval=on}. For
-example, $<$m eval=``on''$>$\$ \$eqn \$$<$/m$>$,
-will evaluate the variable \$eqn first and then run it through the
-TTH\index{TTH} converter. Anytime you use a variable inside of the m tag,
+example, \texttt{\$ \$eqn \$},
+will evaluate the variable \$eqn first and then use the
+display mechanism. Anytime you use a variable inside of the m tag,
you will want to set eval to on.
For example, put the following in a script in the resource:
@@ -165,7 +172,7 @@ For example, put the following in a scri
and in a text area, you can type:
-\texttt{$<$m eval=``on''$>$\$ \$eqn \$$<$/m$>$}
+\texttt{\$ \$eqn \$}
You will get the equation rendered with no +-, no matter what value
\$b may take on.