File:
[LON-CAPA] /
loncom /
html /
adm /
help /
tex /
Authoring_Output_Tags.tex
Revision
1.7:
download - view:
text,
annotated -
select for diffs
Mon May 21 16:43:17 2007 UTC (17 years, 3 months ago) by
albertel
Branches:
MAIN
CVS tags:
version_2_6_X,
version_2_6_99_1,
version_2_6_99_0,
version_2_6_3,
version_2_6_2,
version_2_6_1,
version_2_6_0,
version_2_5_X,
version_2_5_99_1,
version_2_5_99_0,
version_2_5_2,
version_2_5_1,
version_2_5_0,
version_2_4_X,
version_2_4_99_0,
version_2_4_2,
version_2_4_1,
version_2_4_0,
HEAD
- add info about window's attrs
1: \label{Authoring_Output_Tags}
2:
3:
4: This group of tags generates useful output.
5:
6: \begin{itemize}
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:
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
34: is not part of a course.
35: \item \textbf{displayduedate}\index{displayduedate}: This will insert the
36: current due date if one is set in the document. It is generated to
37: be inside a table of 1x1 elements. The displayduedate tag accepts
38: The following attributes:
39: \begin{description}
40: \item{style=``plain'' } Makes the due date appear without any boxing.
41: If the parameter value is other than ``\emph{plain}'',
42: or if the \textbf{style} parameter is omitted, the
43: due date will be displayed within a box.
44: \item{format=``fmt\_string''}
45: Allows you to control the format of the due date.
46: ``\emph{fmt\_string}'' is an arbitrary string that
47: can contain any of the following formatting items:
48: \begin{description}
49: \item{\%a} Replaced by the abbreviated weekday
50: name according to the current locale.
51: \item{\%A} Replaced by the full weekday name
52: according to the current locale.
53: \item{\%b} The abbreviated month name according to the
54: current locale.
55: \item{\%B} The full month name according to the
56: current locale.
57: \item{\%c} The preferred date and time representation
58: for the current locale (the default format
59: string is just this).
60: \item{\%C} The century number as a two digit integer
61: \item{\%d} The day of the month as a decimal number.
62: Leading zeroes are shown for single digit day numbers.
63: \item{\%D} Equivalent to \%m/\%d/\%y
64: \item{\%e} Like \%d but a leadnig zero is replaced by a space.
65: \item{\%F} Equivalent to \%Y-\%m-\%d
66: \item{\%G} The four digit year number.
67: \item{\%g} The two digit year numbger.
68: \item{\%H} The hour as a two digit number in the range 00 thorugh 23.
69: \item{\%I} The hour as a two digit number in the range 00 through 12.
70: \item{\%j} The day your the year in the range 001 through 366.
71: \item{\%k} The hour (24 hour clock), single digits are preceded by a blank.
72: \item{\%l} Like \%k but using a 12 hour clock.
73: \item{\%m} The month as a two digit decimal number in the range 01 through 12.
74: \item{\%M} The minute as a two digit decimal number in the range 00 through 59.
75: \item{\%n} A newline character.
76: \item{\%p} AM or PM depending on the time value.
77: \item{\%P} am or pm.
78: \item{\%r} The time in am or pm notation.
79: \item{\%R} Time in 24 hour notatinon (\%H:\%M). See also \%T below.
80: \item{\%s} Number of seconds since midnight of January 1, 1970.
81: \item{\%S} The second as a decimal number int the range 00 through 59.
82: \item{\%t} A horizontal tab character.
83: \item{\%T} The time in 24 hour notation (\%H:\%M:\%S).
84: \item{\%u} Day of the week as a decimal number with Monday as 1.
85: \item{\%U} The week number of the current year in the range 00 through 53.
86: Week 1 is the week containing the first Sunday of the year.
87: \item{\%V} Same as \%U but week 1 is the first week with at least 4 days,
88: with Monday being the first day of a week.
89: \item{\%w} Day of the week as a decimal integer in the range 0 through 7, Sunday is 0.
90: \item{\%W} Week number of the current year in the range 00 through 53, where
91: the first Monday of the year is the first day of week 01.
92: \item{\%x} The preferred date notation in the current locale without the time.
93: \item{\%X} The preferred time notation in the current locale without the date.
94: \item{\%y} The year as a decimal number without the century (range 00 through 99).
95: \item{\%Y} The year as a decimal number including the century.
96: \item{\%\%} A \% character.
97: \item{\%+} Date and time in the form returned by the Unix date command.
98: \end{description}
99: \end{description}
100: \item \textbf{displaytitle}\index{displaytitle}: This will insert the title
101: of the problem from the metadata of the problem. Only the first \textbf{displaytitle}
102: in a problem will show the title; this allows clean usage of \textbf{displaytitle}
103: in LON-CAPA style files.
104:
105: \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
106:
107: \begin{itemize}
108: \item[width] controls the starting width of the popup window
109: \item[height] controls the starting height of the popup window
110: \item[linktext] the text that should appear as the link that causes the creation of the window
111: \end{itemize}
112:
113: When printing this included text will get turned into a real footnote.
114:
115:
116: \item \textbf{m}\index{m}: The inside text is \LaTeX{}, and is converted
117: to HTML (or MathML) on the fly. If the attribute \textbf{eval} is set
118: to {}``\textbf{on}'' the intervening text will have a perl variable
119: expansion done to it before being converted. The default is to convert
120: to the display mechanism that the user has selected. This can be
121: overriden by setting the attribute \textbf{display} to one of
122: ``\textbf{tth}'' or ``\textbf{jsMath}'' or ``\textbf{mimetex}''which
123: will force a specfic display mechanism.
124:
125: \item \textbf{randomlabel}\index{randomlabel}: This shows a specified image
126: with images or text labels randomly assigned to a set of specific
127: locations. Those locations may also have values assigned to them.
128: A hash is generated that contains the mapping of labels to locations,
129: labels to values, and locations to values. Example: \begin{verbatim}
130:
131: <randomlabel bgimg="URL" width="12" height="45" texwidth="50">
132: <labelgroup name="GroupOne" type="image">
133: <location x="123" y="456" value="10" />
134: <location x="321" y="654" value="20" />
135: <location x="213" y="546" value="13" />
136: <label description="TEXT-1">IMG-URL</label>
137: <label description="TEXT-2">IMG-URL</label>
138: <label description="TEXT-3">IMG-URL</label>
139: </labelgroup>
140: <labelgroup name="GroupTwo" type="text">
141: <location x="12" y="45" />
142: <location x="32" y="65" />
143: <location x="21" y="54" />
144: <label>TEXT-1</label>
145: <label>TEXT-2</label>
146: <label>TEXT-3</label>
147: </labelgroup>
148: </randomlabel>
149:
150: \end{verbatim}
151:
152: Possible attributes are:
153:
154: \begin{itemize}
155: \item \textbf{bgimg}\index{bgimg}: Either a fully qualified URL for an
156: external image or a LON-CAPA resource. It supports relative references
157: (../images/apicture.gif). The image must either be a GIF or JPEG.
158: \item \textbf{width}\index{width}: The width of the image in pixels.
159: \item \textbf{height}\index{height}: The height of the image in pixels.
160: \item \textbf{texwidth}\index{texwidth}: The width of the image in millimeters.
161: \end{itemize}
162: \end{itemize}
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>