[LON-CAPA-cvs] cvs: loncom /html/adm/help/tex Print_Options.tex Print_Resource.tex Print_Tricks.tex doc/loncapafiles loncapafiles.lpml

foxr lon-capa-cvs@mail.lon-capa.org
Wed, 07 Sep 2005 10:43:35 -0000


foxr		Wed Sep  7 06:43:35 2005 EDT

  Added files:                 
    /loncom/html/adm/help/tex	Print_Tricks.tex 

  Modified files:              
    /doc/loncapafiles	loncapafiles.lpml 
    /loncom/html/adm/help/tex	Print_Options.tex Print_Resource.tex 
  Log:
  Add some documentation about printing tricks and link some
  of the print documents together.
  
  
Index: doc/loncapafiles/loncapafiles.lpml
diff -u doc/loncapafiles/loncapafiles.lpml:1.452 doc/loncapafiles/loncapafiles.lpml:1.453
--- doc/loncapafiles/loncapafiles.lpml:1.452	Thu Sep  1 13:51:49 2005
+++ doc/loncapafiles/loncapafiles.lpml	Wed Sep  7 06:43:32 2005
@@ -2,7 +2,7 @@
  "http://lpml.sourceforge.net/DTD/lpml.dtd">
 <!-- loncapafiles.lpml -->
 
-<!-- $Id: loncapafiles.lpml,v 1.452 2005/09/01 17:51:49 albertel Exp $ -->
+<!-- $Id: loncapafiles.lpml,v 1.453 2005/09/07 10:43:32 foxr Exp $ -->
 
 <!--
 
@@ -2682,6 +2682,7 @@
 Prefs_Screen_Name_Nickname.tex;
 Print_Options.tex;
 Print_Resource.tex;
+Print_Tricks.tex;
 Problem_Editor_Testing_Area.tex;
 Problem_Editor_XML_Index.tex;
 Problem_LON-CAPA_Functions.tex;
@@ -2788,6 +2789,7 @@
 Other_Symbols.tex;
 Physical_Units.tex;
 Print_Resource.tex;
+Print_Tricks.tex;
 Authoring_Adding_Pictures.tex;
 </filenames>
 </fileglob>
Index: loncom/html/adm/help/tex/Print_Options.tex
diff -u loncom/html/adm/help/tex/Print_Options.tex:1.3 loncom/html/adm/help/tex/Print_Options.tex:1.4
--- loncom/html/adm/help/tex/Print_Options.tex:1.3	Tue Dec 28 06:02:11 2004
+++ loncom/html/adm/help/tex/Print_Options.tex	Wed Sep  7 06:43:33 2005
@@ -24,12 +24,12 @@
 			 not really built to do this and there are no known perfect
 			 solutions.  This attribute has two possible values:
 	\begin{itemize}
-	   \item{parbox} - (the default) uses \newline and \parbox to position the
+	   \item{parbox} - (the default) uses \\newline and \\parbox to position the
 	     image.  This positioning method ensures that the image is placed at
 	     the appropriate side of the page, however very little or no text wrapping
 	     is attempted.  On the other hand, this method will never place text
 	     on top of the image.
-	   \item{parpic} - uses the picins package \parpic to attempt to get text to
+	   \item{parpic} - uses the picins package \\parpic to attempt to get text to
 	     wrap around the image.  This method places the remainder of the text of
 	     the paragraph containing the picture to the left or right of the picture.
 	     This scheme has two drawbacks:  If the remainder of the paragraph text is
Index: loncom/html/adm/help/tex/Print_Resource.tex
diff -u loncom/html/adm/help/tex/Print_Resource.tex:1.3 loncom/html/adm/help/tex/Print_Resource.tex:1.4
--- loncom/html/adm/help/tex/Print_Resource.tex:1.3	Thu Jun 16 19:08:13 2005
+++ loncom/html/adm/help/tex/Print_Resource.tex	Wed Sep  7 06:43:33 2005
@@ -9,4 +9,11 @@
 \end{enumerate}
 
 The Print helper will guide you through the process of preparing a PDF
-document of the resource. If you see error message when trying to prepare a PDF file, then you will need to contact the author of the problem which has the printing error.
+document of the resource. If you see error message when trying to prepare a PDF file, 
+then you will need to contact the author of the problem which has the printing error.
+
+
+Printing involves a translation of your XML file into LaTeX and from there to PDF.   
+Some of the XML tags have a set of special print options. \ref{Print_Options}
+The translation requires some special considerations on your part as well.
+\ref{Print_Tricks}

Index: loncom/html/adm/help/tex/Print_Tricks.tex
+++ loncom/html/adm/help/tex/Print_Tricks.tex
\label{Print_Tricks}

When you print a LonCAPA 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.

There are several problems that crop up both due to limitations in the XML to LaTeX
translation and due to differences in the model used by web browsers to render
HTML and LaTeX to compose print pages.  This document provides information
about some of these problems and, where possible, solutions, and tricks to work 
around them.  If you have a printing trick or a problem and would like to report 
it, please go to  http://bugs.lon-capa.org and register a bug report.

General information about printing within LonCAPA is also available: 
\ref{Print_Resource}

\section{\&prettyprint and \&dollarformat look ugly}
To make these two functions work correctly within the print translator, it is
necessary to wrap them within a <DISPLAY> tag.  For example:

\begin{verbatim}
<p>
If I had <display>&dollarformat(100)</display>
</p>
\end{verbatim}

Note that the <display> 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}
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}
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}

\end{verbatim}