--- loncom/html/adm/help/tex/Authoring_Output_Tags.tex 2005/11/14 23:34:31 1.6
+++ loncom/html/adm/help/tex/Authoring_Output_Tags.tex 2009/10/15 03:40:45 1.10
@@ -6,30 +6,36 @@ This group of tags generates useful outp
\begin{itemize}
\item \textbf{algebra}\index{algebra}: Typesets algebraic expressions
\begin{verbatim}
- 2x^y+sqrt(3/x^2)
+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}: Typesets chemical equation
\begin{verbatim}
- 02 + 2H2 -> 2H20
+ O2 + 2H2 -> 2H2O
\end{verbatim}
-\item \textbf{num}\index{num}: Typesets a number
+\item \textbf{num}\index{num}: 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
+ 31454678
+ 31454678
+ 31454678
+ 31454678
+ 31454678
+ 31454678
\end{verbatim}
\item \textbf{parse}\index{parse}: to display the parsed view of a variable's
contents
\begin{verbatim}
-
- \$table
+ $table
\end{verbatim}
-\item \textbf{standalone}\index{standalone}: Everything inbetween the
+\item \textbf{standalone}\index{standalone}: Everything in between the
start and end tag is shown only on the web and only if the resource
is not part of a course.
\item \textbf{displayduedate}\index{displayduedate}: This will insert the
@@ -100,18 +106,46 @@ The following attributes:
\item \textbf{displaytitle}\index{displaytitle}: This will insert the title
of the problem from the metadata of the problem. Only the first \textbf{displaytitle}
in a problem will show the title; this allows clean usage of \textbf{displaytitle}
-in stylesheets.
-\item \textbf{window}\index{window}: The text inbetween is put in a pop-up
-javascript window.
+in LON-CAPA style files.
+
+\item \textbf{window}\index{window}: This creates a link that when clicked shows the intervening information in a pop-up window. By default the window will be 500 pixels wide and 200 pixels tall, and the link text will be a superscript * (so as to look like a footnote). These can be changed using the attributes
+
+\begin{itemize}
+\item \textbf{width} controls the starting width of the popup window
+\item \textbf{height} controls the starting height of the popup window
+\item \textbf{linktext} the text that should appear as the link that causes the creation of the window
+\end{itemize}
+
+When printing, this included text will get turned into a real footnote.
+
\item \textbf{m}\index{m}: The inside text is \LaTeX{}, and is converted
-to HTML (or MathML) on the fly. If the attribute \textbf{eval} is set
-to {}``\textbf{on}'' the intervening text will have a perl variable
-expansion done to it before being converted. The default is to convert
-to the display mechanism that the user has selected. This can 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{jsMath}'' or ``\textbf{mimetex}''which
-will force a specfic display mechanism.
+will force a specfic display mechanism. Note, however, that setting the attribute \textbf{diplay} to \textbf{jsmath} is generally discouraged as it requires users to have installed jsmath software on their computer.
+
+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''$>$\textbackslash{}[\$eqn\textbackslash{}]$<$/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,
+you will want to set eval to on.
+
+For example, put the following in a script in the resource:
+
+\texttt{\$eqn = "\$a+\$b";}
+
+\texttt{\$eqn =~ s/\textbackslash{}+-/-/g;}
+
+and in a text area, you can type:
+
+\texttt{\$eqn}
+
+You will get the equation rendered with no +-, no matter what value
+\$b may take on.
+
\item \textbf{randomlabel}\index{randomlabel}: This shows a specified image
with images or text labels randomly assigned to a set of specific