1: \label{Print_Tricks}
2:
3: When you print a LonCAPA resource, the XML of your resource is translated into
4: LaTeX. The LaTeX is then processed and turned into a PDF document which can
5: be displayed with your browser's Acrobat plugin and subsequently printed.
6:
7: There are several problems that crop up both due to limitations in the XML to LaTeX
8: translation and due to differences in the model used by web browsers to render
9: HTML and LaTeX to compose print pages. This document provides information
10: about some of these problems and, where possible, solutions, and tricks to work
11: around them. If you have a printing trick or a problem and would like to report
12: it, please go to http://bugs.lon-capa.org and register a bug report.
13:
14: General information about printing within LonCAPA is also available:
15: \ref{Print_Resource}
16:
17: \section{\&prettyprint and \&dollarformat look ugly}
18: To make these two functions work correctly within the print translator, it is
19: necessary to wrap them within a <DISPLAY> tag. For example:
20:
21: \begin{verbatim}
22: <p>
23: If I had <display>&dollarformat(100)</display>
24: </p>
25: \end{verbatim}
26:
27: Note that the <display> tags must be tightly wrapped around the function call or
28: you will get a syntax error in web presentation mode.
29:
30:
31: \section{Image placement and alignment is wrong}
32: Unfortunately this is due to a large difference between the LaTeX and HTML page
33: layout model. In HTML images are placed exactly where you ask them to be placed.
34: In LaTeX, images are considered {\em floats}, which LaTeX will place for you.
35: There are a few print options you can try to place images approximately where you
36: want them relative to sorrounding text \ref{Print_Options}.
37:
38: \section{Variables with tags don't print correctly}
39: If a variable contains XML, in general it is necessary to force the XML parser
40: to make a pass over the contents of the contents of the variable prior to rendering
41: the section of the resource that contains that substitution. For example:
42:
43: \begin{verbatim}
44:
45: \end{verbatim}
46:
47:
48:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>