File:  [LON-CAPA] / loncom / html / adm / help / tex / Authoring_Output_Tags.tex
Revision 1.5: download - view: text, annotated - select for diffs
Thu Sep 29 21:13:07 2005 UTC (18 years, 9 months ago) by albertel
Branches: MAIN
CVS tags: version_2_0_X, version_2_0_2, HEAD
- correcting tex errors

\label{Authoring_Output_Tags}


This group of tags generates useful output. 

\begin{itemize}
\item \textbf{algebra}\index{algebra}: Typesets algebraic expressions
\begin{verbatim}
  <algebra>2x^y+sqrt(3/x^2)</algebra>
\end{verbatim}
\item \textbf{chem}\index{chem}: Typesets chemical equation 
\begin{verbatim}
  <chem>02 + 2H2 -> 2H20</chem>
\end{verbatim}
\item \textbf{num}\index{num}: Typesets a number 
\begin{verbatim}
  <num format=''2E''>31454678</num>
\end{verbatim}
\item \textbf{parse}\index{parse}: to display the parsed view of a variable's
contents
\begin{verbatim}
  <script type=''loncapa/perl''>
   $table='<table>';
   for ($i=1;$i<=10;$i++) {
      $table.='<tr><td>'.$i.'</td><td>'.&random(1,10,1).'</td></tr>';
   }
   $table.='</table>';
  </script>
  <parse>\$table</parse>
\end{verbatim}

\item \textbf{standalone}\index{standalone}: Everything inbetween 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
current due date if one is set in the document. It is generated to
be inside a table of 1x1 elements.
\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.

\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
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.

\item \textbf{randomlabel}\index{randomlabel}: This shows a specified image
with images or text labels randomly assigned to a set of specific
locations. Those locations may also have values assigned to them.
A hash is generated that contains the mapping of labels to locations,
labels to values, and locations to values. Example: \begin{verbatim}

 <randomlabel bgimg="URL" width="12" height="45" texwidth="50">
    <labelgroup name="GroupOne" type="image">
      <location x="123" y="456" value="10" />
      <location x="321" y="654" value="20" />
      <location x="213" y="546" value="13" />
      <label description="TEXT-1">IMG-URL</label>
      <label description="TEXT-2">IMG-URL</label>
      <label description="TEXT-3">IMG-URL</label>
    </labelgroup>
    <labelgroup name="GroupTwo" type="text">
      <location x="12" y="45" />
      <location x="32" y="65" />
      <location x="21" y="54" />
      <label>TEXT-1</label>
      <label>TEXT-2</label>
      <label>TEXT-3</label>
    </labelgroup>
   </randomlabel>
    
\end{verbatim}

 Possible attributes are:

\begin{itemize}
\item \textbf{bgimg}\index{bgimg}: Either a fully qualified URL for an
external image or a LON-CAPA resource. It supports relative references
(../images/apicture.gif). The image must either be a GIF or JPEG.
\item \textbf{width}\index{width}: The width of the image in pixels.
\item \textbf{height}\index{height}: The height of the image in pixels.
\item \textbf{texwidth}\index{texwidth}: The width of the image in millimeters.
\end{itemize}
\end{itemize}

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>