[LON-CAPA-cvs] cvs: loncom /html/adm/help/tex Authoring_Output_Tags.tex Problem_LON-CAPA_Functions.tex

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 29 Jun 2005 18:07:16 -0000


albertel		Wed Jun 29 14:07:16 2005 EDT

  Modified files:              
    /loncom/html/adm/help/tex	Authoring_Output_Tags.tex 
                             	Problem_LON-CAPA_Functions.tex 
  Log:
  - adding documentation on the new tags <algebra> <chem> <num> <parse>
  
  
Index: loncom/html/adm/help/tex/Authoring_Output_Tags.tex
diff -u loncom/html/adm/help/tex/Authoring_Output_Tags.tex:1.2 loncom/html/adm/help/tex/Authoring_Output_Tags.tex:1.3
--- loncom/html/adm/help/tex/Authoring_Output_Tags.tex:1.2	Thu Feb 24 17:22:39 2005
+++ loncom/html/adm/help/tex/Authoring_Output_Tags.tex	Wed Jun 29 14:07:15 2005
@@ -4,6 +4,31 @@
 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. 
Index: loncom/html/adm/help/tex/Problem_LON-CAPA_Functions.tex
diff -u loncom/html/adm/help/tex/Problem_LON-CAPA_Functions.tex:1.6 loncom/html/adm/help/tex/Problem_LON-CAPA_Functions.tex:1.7
--- loncom/html/adm/help/tex/Problem_LON-CAPA_Functions.tex:1.6	Wed Jun  1 17:55:28 2005
+++ loncom/html/adm/help/tex/Problem_LON-CAPA_Functions.tex	Wed Jun 29 14:07:15 2005
@@ -48,7 +48,7 @@
 \&format(\$x,'nn')  & Display or format \$x as nn where nn is nF or nE or nS and n is an integer. \\
 \hline
  
-\&prettyprint(\$x,'nn','optional target') &Display or format \$x as nn where nn is nF or nE or nS and n is an integer. Also supports the first character being a \$, it then will format the result with a a call to \&dollarformat() described below. If the first character is a , it will format it with commas grouping the thousands. In S mode it will fromat the number to the specified number of significant figures and display it in F mode. In E mode it will attempt to generate a pretty x10\^{}3 rather than a E3 following the number, the 'optional target' argument is optional but can be used to force \&prettyprint to generate either 'tex' output, or 'web' output, most people do not need to specify this argument and can leave it blank.\\
+\&prettyprint(\$x,'nn','optional target') & Note that that tag $<$num$>$ can be used to do the same thing. Display or format \$x as nn where nn is nF or nE or nS and n is an integer. Also supports the first character being a \$, it then will format the result with a a call to \&dollarformat() described below. If the first character is a , it will format it with commas grouping the thousands. In S mode it will fromat the number to the specified number of significant figures and display it in F mode. In E mode it will attempt to generate a pretty x10\^{}3 rather than a E3 following the number, the 'optional target' argument is optional but can be used to force \&prettyprint to generate either 'tex' output, or 'web' output, most people do not need to specify this argument and can leave it blank.\\
 \hline
  
 \&dollarformat(\$x,'optional target')  & Reformats \$x to have a \$ (or $\backslash$\$ if in tex mode) and to have , grouping thousands. The 'optional target' argument is optional but can be used to force \&prettyprint to generate either 'tex' output, or 'web' output, most people do not need to specify this argument and can leave it blank.\\
@@ -100,7 +100,7 @@
  \$w, \$x, \$y, and \$z are variables }  & The rmap functions does the reverse action of map if the same seed is used in calling map and rmap.  \\
 \hline
  
-\$a=\&xmlparse(\$string)   & Runs the internal parser over the argument parsing for display. \textbf{Warning}
+\$a=\&xmlparse(\$string)   & You probably should use the tag $<$parse$>$ instead of this function. Runs the internal parser over the argument parsing for display. \textbf{Warning}
  This will result in different strings in different targets. Don't use the results of this function as an answer. \\
 \hline