--- loncom/html/adm/help/tex/Print_Tricks.tex 2005/09/07 10:43:33 1.1 +++ loncom/html/adm/help/tex/Print_Tricks.tex 2005/09/16 22:13:57 1.4 @@ -1,6 +1,6 @@ \label{Print_Tricks} -When you print a LonCAPA resource, the XML of your resource is translated into +When you print a LON-CAPA resource, the XML of your resource is translated into LaTeX. The LaTeX is then processed and turned into a PDF document which can be displayed with your browser's Acrobat plugin and subsequently printed. @@ -14,35 +14,48 @@ it, please go to http://bugs.lon-capa.o General information about printing within LonCAPA is also available: \ref{Print_Resource} -\section{\&prettyprint and \&dollarformat look ugly} +\emph{\&prettyprint and \&dollarformat look ugly} + To make these two functions work correctly within the print translator, it is -necessary to wrap them within a tag. For example: +necessary to wrap them within a tag. For example: \begin{verbatim}

-If I had &dollarformat(100) +If I had &prettyprint(100,'$2f')

\end{verbatim} -Note that the tags must be tightly wrapped around the function call or +Note that the \texttt{} tags must be tightly wrapped around the function call or you will get a syntax error in web presentation mode. -\section{Image placement and alignment is wrong} +\emph{Image placement and alignment is wrong} + Unfortunately this is due to a large difference between the LaTeX and HTML page layout model. In HTML images are placed exactly where you ask them to be placed. In LaTeX, images are considered {\em floats}, which LaTeX will place for you. There are a few print options you can try to place images approximately where you want them relative to sorrounding text \ref{Print_Options}. -\section{Variables with tags don't print correctly} +\emph{Variables with tags don't print correctly} + If a variable contains XML, in general it is necessary to force the XML parser to make a pass over the contents of the contents of the variable prior to rendering the section of the resource that contains that substitution. For example: \begin{verbatim} - + + + +

This is a break $a and then some more text

+ +
\end{verbatim} +Without the xmlparse call and the display tag bracketing the variable, this +problem will display on the web just fine, but print incorrectly. +