Annotation of loncom/html/adm/help/tex/Authoring_Output_Tags.tex, revision 1.3
1.1 bowersj2 1: \label{Authoring_Output_Tags}
2:
3:
1.2 vandui11 4: This group of tags generates useful output.
1.1 bowersj2 5:
6: \begin{itemize}
1.3 ! albertel 7: \item \textbf{algebra}\index{algebra}: Typesets algebraic expressions
! 8: \begin{verbatim}
! 9: <algebra>2x^y+sqrt(3/x^2)</algebra>
! 10: \end{verbatim}
! 11: \item \textbf{chem}\index{chem}: Typesets chemical equation
! 12: \begin{verbatim}
! 13: <chem>02 + 2H2 -> 2H20</chem>
! 14: \end{verbatim}
! 15: \item \textbf{num}\index{num}: Typesets a number
! 16: \begin{verbatim}
! 17: <num format=''2E''>31454678</num>
! 18: \end{verbatim}
! 19: \item \textbf{parse}\index{parse}: to display the parsed view of a variable's
! 20: contents
! 21: \begin{verbatim}
! 22: <script type=''loncapa/perl''>
! 23: $table='<table>';
! 24: for ($i=1;$i<=10;$i++) {
! 25: $table.='<tr><td>'.$i.'</td><td>'.&random(1,10,1).'</td></tr>';
! 26: }
! 27: $table.='</table>';
! 28: </script>
! 29: <parse>\$table</parse>
! 30: \end{verbatim}
! 31:
1.2 vandui11 32: \item \textbf{standalone}\index{standalone}: Everything inbetween the
33: start and end tag is shown only on the web and only if the resource
1.1 bowersj2 34: is not part of a course.
35: \item \textbf{displayduedate}\index{displayduedate}: This will insert the
1.2 vandui11 36: current due date if one is set in the document. It is generated to
1.1 bowersj2 37: be inside a table of 1x1 elements.
38: \item \textbf{displaytitle}\index{displaytitle}: This will insert the title
39: of the problem from the metadata of the problem. Only the first \textbf{displaytitle}
40: in a problem will show the title; this allows clean usage of \textbf{displaytitle}
41: in stylesheets.
1.2 vandui11 42: \item \textbf{window}\index{window}: The text inbetween is put in a pop-up
1.1 bowersj2 43: javascript window.
44: \item \textbf{m}\index{m}: The inside text is \LaTeX{}, and is converted
45: to HTML (or MathML) on the fly. If the attribute \textbf{eval} is
46: set to {}``\textbf{on}'' the intervening text will have a perl variable
47: expansion done to it before being converted.
1.2 vandui11 48: \item \textbf{randomlabel}\index{randomlabel}: This shows a specified image
1.1 bowersj2 49: with images or text labels randomly assigned to a set of specific
50: locations. Those locations may also have values assigned to them.
1.2 vandui11 51: A hash is generated that contains the mapping of labels to locations,
1.1 bowersj2 52: labels to values, and locations to values. Example: \begin{verbatim}
53:
54: <randomlabel bgimg="URL" width="12" height="45" texwidth="50">
55: <labelgroup name="GroupOne" type="image">
56: <location x="123" y="456" value="10" />
57: <location x="321" y="654" value="20" />
58: <location x="213" y="546" value="13" />
59: <label description="TEXT-1">IMG-URL</label>
60: <label description="TEXT-2">IMG-URL</label>
61: <label description="TEXT-3">IMG-URL</label>
62: </labelgroup>
63: <labelgroup name="GroupTwo" type="text">
64: <location x="12" y="45" />
65: <location x="32" y="65" />
66: <location x="21" y="54" />
67: <label>TEXT-1</label>
68: <label>TEXT-2</label>
69: <label>TEXT-3</label>
70: </labelgroup>
71: </randomlabel>
72:
73: \end{verbatim} Possible attributes are:
74:
75: \begin{itemize}
76: \item \textbf{bgimg}\index{bgimg}: Either a fully qualified URL for an
1.2 vandui11 77: external image or a LON-CAPA resource. It supports relative references
1.1 bowersj2 78: (../images/apicture.gif). The image must either be a GIF or JPEG.
79: \item \textbf{width}\index{width}: The width of the image in pixels.
80: \item \textbf{height}\index{height}: The height of the image in pixels.
1.2 vandui11 81: \item \textbf{texwidth}\index{texwidth}: The width of the image in millimeters.
1.1 bowersj2 82: \end{itemize}
83: \end{itemize}
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>