File:  [LON-CAPA] / loncom / html / adm / help / tex / Authoring_Output_Tags.tex
Revision 1.6: download - view: text, annotated - select for diffs
Mon Nov 14 23:34:31 2005 UTC (18 years, 8 months ago) by foxr
Branches: MAIN
CVS tags: version_2_3_X, version_2_3_99_0, version_2_3_2, version_2_3_1, version_2_3_0, version_2_2_X, version_2_2_99_1, version_2_2_99_0, version_2_2_2, version_2_2_1, version_2_2_0, version_2_1_X, version_2_1_99_3, version_2_1_99_2, version_2_1_99_1, version_2_1_99_0, version_2_1_3, version_2_1_2, version_2_1_1, version_2_1_0, version_2_0_99_1, HEAD
Add documentation for the attributes accepted by <displayduedate>  with possibly
too much detail on the format parameter.

    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 stylesheets.
  104: \item \textbf{window}\index{window}: The text inbetween is put in a pop-up
  105: javascript window.
  106: 
  107: \item \textbf{m}\index{m}: The inside text is \LaTeX{}, and is converted
  108: to HTML (or MathML) on the fly. If the attribute \textbf{eval} is set
  109: to {}``\textbf{on}'' the intervening text will have a perl variable
  110: expansion done to it before being converted. The default is to convert
  111: to the display mechanism that the user has selected. This can be
  112: overriden by setting the attribute \textbf{display} to one of
  113: ``\textbf{tth}'' or ``\textbf{jsMath}'' or ``\textbf{mimetex}''which
  114: will force a specfic display mechanism.
  115: 
  116: \item \textbf{randomlabel}\index{randomlabel}: This shows a specified image
  117: with images or text labels randomly assigned to a set of specific
  118: locations. Those locations may also have values assigned to them.
  119: A hash is generated that contains the mapping of labels to locations,
  120: labels to values, and locations to values. Example: \begin{verbatim}
  121: 
  122:  <randomlabel bgimg="URL" width="12" height="45" texwidth="50">
  123:     <labelgroup name="GroupOne" type="image">
  124:       <location x="123" y="456" value="10" />
  125:       <location x="321" y="654" value="20" />
  126:       <location x="213" y="546" value="13" />
  127:       <label description="TEXT-1">IMG-URL</label>
  128:       <label description="TEXT-2">IMG-URL</label>
  129:       <label description="TEXT-3">IMG-URL</label>
  130:     </labelgroup>
  131:     <labelgroup name="GroupTwo" type="text">
  132:       <location x="12" y="45" />
  133:       <location x="32" y="65" />
  134:       <location x="21" y="54" />
  135:       <label>TEXT-1</label>
  136:       <label>TEXT-2</label>
  137:       <label>TEXT-3</label>
  138:     </labelgroup>
  139:    </randomlabel>
  140:     
  141: \end{verbatim}
  142: 
  143:  Possible attributes are:
  144: 
  145: \begin{itemize}
  146: \item \textbf{bgimg}\index{bgimg}: Either a fully qualified URL for an
  147: external image or a LON-CAPA resource. It supports relative references
  148: (../images/apicture.gif). The image must either be a GIF or JPEG.
  149: \item \textbf{width}\index{width}: The width of the image in pixels.
  150: \item \textbf{height}\index{height}: The height of the image in pixels.
  151: \item \textbf{texwidth}\index{texwidth}: The width of the image in millimeters.
  152: \end{itemize}
  153: \end{itemize}

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