[LON-CAPA-cvs] cvs: loncom /html/adm/help/tex Print_Tricks.tex

foxr lon-capa-cvs@mail.lon-capa.org
Tue, 27 Sep 2005 10:26:46 -0000


foxr		Tue Sep 27 06:26:46 2005 EDT

  Modified files:              
    /loncom/html/adm/help/tex	Print_Tricks.tex 
  Log:
  Add a bit more about which functions don't print right and update
  the wrapping text.
  
  
Index: loncom/html/adm/help/tex/Print_Tricks.tex
diff -u loncom/html/adm/help/tex/Print_Tricks.tex:1.4 loncom/html/adm/help/tex/Print_Tricks.tex:1.5
--- loncom/html/adm/help/tex/Print_Tricks.tex:1.4	Fri Sep 16 18:13:57 2005
+++ loncom/html/adm/help/tex/Print_Tricks.tex	Tue Sep 27 06:26:46 2005
@@ -14,7 +14,16 @@
 General information about printing within LonCAPA is also available: 
 \ref{Print_Resource}
 
-\emph{\&prettyprint and \&dollarformat look ugly}
+\emph{The print rendition  of some Perl functions looks ugly }
+
+In particular these functions are:
+\begin{itemize}
+   \item \&prettyprint
+   \item \&dollarformat
+   \item \&xmlparse
+   \item \&chemparse
+\end{itemize}
+
 
 To make these two functions work correctly within the print translator, it is
 necessary to wrap them within a <display> tag.  For example:
@@ -26,22 +35,45 @@
 \end{verbatim}
 
 Note that the \texttt{<display>} tags must be tightly wrapped around the function call or
-you will get a syntax error in web presentation mode.
+you will get a syntax error in web presentation mode.  For additional information
+about cases where you must use \texttt{<display>}, see ``Variables with tags don't print
+correctly'' below.
 
 
-\emph{Image placement and alignment is wrong}
+\emph{Image placement and alignment and text wrapping 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}.
+In LaTeX, images are considered {\em floats}, which LaTeX will place for you.  
+Some of the common html tricks, using tables e.g. to control text wrapping around
+figures, will not always work in print mode; especially if the text is to the
+right side of the figure in the table.
+
+The alignment choice 
+affects whether or not the print rendering engine attempts to get text to wrap around the 
+image.  With \texttt{align=``right''} or \texttt{align=``left''}, the print rendering engine
+attempts to use the {\em wrapfigure} 
+environment to place text around the figure at the
+appropriate side.  If a figure is in a table, then the print engine, by default, 
+the print engine will use wrapfigure, set the alignment to ``right'' 
+unless you override it.  Otherwise, the default alignment is ``bottom'' as it 
+is for html, and no wrapping will occur.  
+
+\\parpic style wrapping is also available by specifying \texttt{TeXwrap=``parpic''}
+ in the <img> tag.  In some limited casese this gives a better result.
+
+
+Other print specific <img> tag attributes are available. \ref{Print_Options}.
+
+
 
 \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:
+the section of the resource that contains that substitution. When output,
+those variables must be bracketed inside of \texttt{<display> </display>} tags.
+ For example:
 
 \begin{verbatim}
 <problem>