39
14 AUTHORING MAPS: SEQUENCES AND PAGES
86
images are considered 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 align="right" or align="left", the print rendering
engine attempts to use the 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 TeXwrap="parpic" in the ¡img¿
tag. In some limited casese this gives a better result.
Other print specific <img> tag attributes are available (see section 13.3).
Variables with tags don’t print correctly
If a variable contains XML, in general it is necessary to force the XML parser to make
apass over the contents of the contents of the variable prior to rendering the section of the
resource that contains that substitution. When output, those variables must be bracketed
inside of <display> </display> tags. For example:
<problem>
<script type="loncapa/perl">
$a = &xmlparse(’<br />’);
</script>
<startouttext />
<p>This is a break <display>$a</display> and then some more text</p>
<endouttext />
</problem>
Without the xmlparse call and the display tag bracketing the variable, this problem will
display on the web just fine, but print incorrectly.
14 Authoring Maps: Sequences and Pages
In order to create a useful course, we need to arrange our raw materials so that students can
use them.
14.1 Authoring Sequences
Asequence is a series of resources that can be navigated using the NAV remote control
button, or by using the arrow keys on the remote control.
To create a Sequence resource, create a new resource as described in the ’Authoring
Content in LON-CAPA’ section (5). This is a “sequence” resource so the URL must end in
“.sequence”. After you enter in the URL ending in “.sequence”, you should see a screen as
in figure 23. You can use either the advanced editor or the simplified editor.