Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > e8b7ce893d130f732758286a15c74b5e > files > 23

hevea-1.10-4mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
            "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>

<META http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<META name="GENERATOR" content="hevea 1.10">
<META name="Author" content="Luc Maranget">
<LINK rel="stylesheet" type="text/css" href="manual.css">
<TITLE>A note on style</TITLE>
</HEAD>
<BODY >
<A HREF="manual004.html"><IMG SRC="previous_motif.gif" ALT="Previous"></A>
<A HREF="manual002.html"><IMG SRC="contents_motif.gif" ALT="Up"></A>
<A HREF="manual006.html"><IMG SRC="next_motif.gif" ALT="Next"></A>
<HR>
<H2 CLASS="section"><A NAME="htoc7">3</A>&#XA0;&#XA0;A note on style</H2><UL>
<LI><A HREF="manual005.html#toc4">Spacing, Paragraphs</A>
</LI><LI><A HREF="manual005.html#toc5">Math mode</A>
</LI><LI><A HREF="manual005.html#toc6">Warnings</A>
</LI><LI><A HREF="manual005.html#toc7">Commands</A>
</LI><LI><A HREF="manual005.html#toc8">Style choices</A>
</LI></UL>
<H3 CLASS="subsection"><A NAME="toc4"></A><A NAME="htoc8">3.1</A>&#XA0;&#XA0;Spacing, Paragraphs</H3><P>
Sequence of spaces normally are translated into one single space.
Newlines in the input document undergo a special treatement.
A newline triggers a special scanning mode that reads all following
spaces and newlines. In case at least one additional newline character
is read, then H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A executes the <CODE>\par</CODE> command.
Otherwise, H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A outputs a single newline character.
This process approximates T<sub>E</sub>X process for introducting paragraph
breaks and, as a result, empty lines produce paragraph breaks.</P><P>Space after commands with no argument is skipped (as in L<sup>A</sup>T<sub>E</sub>X) &#X2014;
however this is not true in math mode, as explained in
section&#XA0;<A HREF="#spacemath">3.2.1</A>.</P><P>The following two subsections describe management of paragraphs and
spaces after command sequences in greater detail.
They can be skipped in first reading.</P><H4 CLASS="subsubsection">3.1.1&#XA0;&#XA0;Spurious<A NAME="spurious:par"></A> Paragraphs</H4><P>
Paragraphs are rendered by the means of <CODE>P</CODE> elements.
H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A is a bit simplistic in breaking paragraphs and spurious paragraphs
may be present in the final HTML document.
Normally, as H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A never outputs <CODE>P</CODE> elements whose contents is
made of spaces only, this should not happen very often.
Unfortunately, some commands do not produce any output in L<sup>A</sup>T<sub>E</sub>X,
while they do produce output in H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A: those commands
are <CODE>\label</CODE>, <CODE>\index</CODE> etc.
H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A translates
<CODE>\label{</CODE><I>name</I><CODE>}</CODE> into the anchor
<CODE>&lt;A NAME="</CODE><I>name</I><CODE>"&gt;&lt;/A&gt;</CODE>. As a result, the following
source fragment will introduce a spurious paragraph.
</P><PRE CLASS="verbatim">This a first paragraph.

\label{label}

This is another paragraph.
</PRE><P>Indeed, whe have the following translation:
</P><PRE CLASS="verbatim">&lt;P&gt;This a first paragraph.&lt;/P&gt;
&lt;P&gt;&lt;A NAME="label"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;This is another paragraph.&lt;/P&gt;
</PRE><P>Which your browser renders as follows &#X2014; with additional borders
emphasizing <CODE>P</CODE> elements.
</P><BLOCKQUOTE CLASS="quote"><HR NOSHADE SIZE=1 ALIGN=center>
<P STYLE="border:1px solid black;">This a first paragraph.</P>
<P STYLE="border:1px solid black;"><A NAME="label"></A></P>
<P STYLE="border:1px solid black;">This is another paragraph.</P>
<HR NOSHADE SIZE=1 ALIGN=center></BLOCKQUOTE><P>Most of the time, such extra paragraphs remain unnoticed.
Of course, they can be supressed by erasing one of the empty
lines. For instance:
</P><PRE CLASS="verbatim">This a first paragraph.

\label{label}
This is another paragraph.
</PRE><P>A similar situation occurs when a sectioning command is followed by
<CODE>\label</CODE> and a paragraph break:
</P><PRE CLASS="verbatim">\section*{A section}\label{section:label}

First paragraph. 
</PRE><P>Produced HTML is, after a few cosmetic simplifications:
</P><PRE CLASS="verbatim">&lt;H2 CLASS="section"&gt;A section&lt;/H2&gt;
&lt;P&gt;&lt;A NAME="section:label"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;First paragraph.&lt;/P&gt;
</PRE><P>Output is so, because closing the element <CODE>H2</CODE> implies re-opening
a new paragraph.
Your browser renders the above HTML fragment as follows:
</P><BLOCKQUOTE CLASS="quote"><HR NOSHADE SIZE=1 ALIGN=center>
<H2 CLASS="section">A section</H2>
<P STYLE="border:1px solid black;"><A NAME="section:label"></A></P>
<P STYLE="border:1px solid black;">First paragraph.</P>
<HR NOSHADE SIZE=1 ALIGN=center></BLOCKQUOTE><P>Here, two possible re-writing of source are:
</P><DIV CLASS="center">
<TABLE CELLSPACING=6 CELLPADDING=0><TR><TD VALIGN=top ALIGN=left><PRE CLASS="verbatim">\section*{A\label{section:label} section}

First paragraph.
</PRE></TD><TD VALIGN=top ALIGN=left><PRE CLASS="verbatim">\section*{A section}

\label{section:label}First paragraph.
</PRE></TD></TR>
</TABLE>
</DIV><P>
In all cases, this amounts to avoiding a paragraph whose contents
consists in a sole <CODE>\label</CODE>&#XA0;command.</P><P>Spurious paragraphs are more easily seen by running <TT>hevea</TT>
with the command-line option&#XA0;<A NAME="@default0"></A><TT>-dv</TT>, which instructs
<TT>hevea</TT> to add border on some of the elements it produces,
including <CODE>P</CODE> elements.</P><H4 CLASS="subsubsection">3.1.2&#XA0;&#XA0;Spaces after Commands</H4><P>
<A NAME="@default1"></A>
Space after commands with no argument is skipped.
Consider the following example:
</P><PRE CLASS="verbatim">\newcommand{\open}{(}
\newcommand{\close}{)}
\open text opened by ``\verb+\open+''
and closed by ``\verb+\close+''\close.
</PRE><P>We get:
</P><BLOCKQUOTE CLASS="quote"><HR NOSHADE SIZE=1 ALIGN=center>


(text opened by &#X201C;<CODE>\open</CODE>&#X201D; and closed by
&#X201C;<CODE>\close</CODE>&#X201D;).
<HR NOSHADE SIZE=1 ALIGN=center></BLOCKQUOTE><P>
In the output above, the space after <CODE>\open</CODE> does not
find its way to the output.</P><P>More generally,
H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A tries to emulate L<sup>A</sup>T<sub>E</sub>X behavior in all situations, but
discrepancies probably exist.
Thus, users are invited to make explicit what they want.
This is good practice anyway, because L<sup>A</sup>T<sub>E</sub>X is mysterious
here. Consider the following example, where the <CODE>\tryspace</CODE>
macro is first applied and then expansed by hand:
</P><PRE CLASS="verbatim">\newcommand{\bfsymbol}{\textbf{symbol}}
\newcommand{\tryspace}[1]{#1 XXX}

Some space: \tryspace{\bfsymbol}\\
No space: \bfsymbol XXX
</PRE><P>Spacing is a bit chaotic here,
the space after <B>symbol</B> remains when <CODE>#1</CODE> is substituted for it
by L<sup>A</sup>T<sub>E</sub>X (or H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A).</P><BLOCKQUOTE CLASS="quote"><HR NOSHADE SIZE=1 ALIGN=center>


<TABLE CELLSPACING=6 CELLPADDING=0><TR><TD ALIGN=left NOWRAP>Some space</TD><TD VALIGN=top ALIGN=center NOWRAP>&#XA0;:&#XA0;</TD><TD ALIGN=left NOWRAP><B>symbol</B> XXX</TD></TR>
<TR><TD ALIGN=left NOWRAP>No space</TD><TD VALIGN=top ALIGN=center NOWRAP>&#XA0;:&#XA0;</TD><TD ALIGN=left NOWRAP><B>symbol</B>XXX</TD></TR>
</TABLE><HR NOSHADE SIZE=1 ALIGN=center></BLOCKQUOTE><P>
Note that, if a space before &#X201C;XXX&#X201D; is wanted, then
one should probably write:
</P><PRE CLASS="verbatim">\newcommand{\tryspace}[1]{#1{} XXX}
</PRE><P>Finally, <A NAME="@default2"></A>whether the tabulation character is a space or not 
is random, so avoid tabs in your source document.</P><H3 CLASS="subsection"><A NAME="toc5"></A><A NAME="htoc9">3.2</A>&#XA0;&#XA0;Math mode</H3><P>
H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A math mode is not very far from normal text mode, except that
all letters are shown in italics and that space after macros
is echoed.</P><P>However, typesetting math formulas in HTML rises two difficulties.
First, formulas contain symbols, such as Greek letters; second,
even simple formulas do not follow the simple basic typesetting model of&#XA0;HTML.</P><H4 CLASS="subsubsection">3.2.1&#XA0;&#XA0;Spacing<A NAME="spacemath"></A> in math mode</H4><P>
<A NAME="@default3"></A>
By contrast with L<sup>A</sup>T<sub>E</sub>X, spaces from the input are significant in
math mode, this
feature allows users to instruct H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A
on how to put space in their formulas.
For instance, <CODE>\alpha\rightarrow\beta</CODE> is typeset without spaces between
symbols, whereas <CODE>\alpha \rightarrow \beta</CODE> produces these spaces.

</P><TABLE CLASS="display dcenter"><TR VALIGN="middle"><TD CLASS="dcell"><TABLE CELLSPACING=6 CELLPADDING=0><TR><TD ALIGN=left NOWRAP><CODE>\alpha\rightarrow\beta</CODE></TD><TD VALIGN=top ALIGN=center NOWRAP> : </TD><TD ALIGN=left NOWRAP>&#X3B1;&#X2192;&#X3B2;</TD></TR>
<TR><TD ALIGN=left NOWRAP><CODE>\alpha \rightarrow \beta</CODE></TD><TD VALIGN=top ALIGN=center NOWRAP> : </TD><TD ALIGN=left NOWRAP>&#X3B1;&#XA0;&#X2192;&#XA0;&#X3B2;</TD></TR>
</TABLE></TD></TR>
</TABLE><P>

Note that L<sup>A</sup>T<sub>E</sub>X ignores spaces in math mode, so that users can
freely adjust H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A output without changing anything to L<sup>A</sup>T<sub>E</sub>X
output.</P><H4 CLASS="subsubsection">3.2.2&#XA0;&#XA0;Symbols</H4><P><A NAME="symbols"></A>
</P><BLOCKQUOTE CLASS="figure"><DIV CLASS="center"><HR WIDTH="80%" SIZE=2></DIV>
<DIV CLASS="caption"><TABLE CELLSPACING=6 CELLPADDING=0><TR><TD VALIGN=top ALIGN=left>Figure 1: <A NAME="symbol:fig"></A>Some symbols</TD></TR>
</TABLE></DIV>

<DIV CLASS="center">
<TABLE CELLSPACING=6 CELLPADDING=0><TR><TD ALIGN=right NOWRAP><TT>\in</TT>:&#XA0;&#XA0;</TD><TD ALIGN=left NOWRAP><FONT SIZE=5>&#X2208;</FONT></TD><TD VALIGN=top ALIGN=center NOWRAP>&#XA0;&#XA0;&#XA0;&#XA0;</TD><TD ALIGN=right NOWRAP><TT>\notin</TT>:&#XA0;&#XA0;</TD><TD ALIGN=left NOWRAP><FONT SIZE=5>&#X2209;</FONT></TD></TR>
<TR><TD ALIGN=right NOWRAP><TT>\int</TT>:&#XA0;&#XA0;</TD><TD ALIGN=left NOWRAP><FONT SIZE=5>&#X222B;</FONT></TD><TD VALIGN=top ALIGN=center NOWRAP>&#XA0;&#XA0;&#XA0;&#XA0;</TD><TD ALIGN=right NOWRAP><TT>\prod</TT>:&#XA0;&#XA0;</TD><TD ALIGN=left NOWRAP><FONT SIZE=5>&#X220F;</FONT></TD></TR>
<TR><TD ALIGN=right NOWRAP><TT>\preceq</TT>:&#XA0;&#XA0;</TD><TD ALIGN=left NOWRAP><FONT SIZE=5>&#X227C;</FONT></TD><TD VALIGN=top ALIGN=center NOWRAP>&#XA0;&#XA0;&#XA0;&#XA0;</TD><TD ALIGN=right NOWRAP><TT>\prec</TT>:&#XA0;&#XA0;</TD><TD ALIGN=left NOWRAP><FONT SIZE=5>&#X227A;</FONT></TD></TR>
<TR><TD ALIGN=right NOWRAP><TT>\leq</TT>:&#XA0;&#XA0;</TD><TD ALIGN=left NOWRAP><FONT SIZE=5>&#X2264;</FONT></TD><TD VALIGN=top ALIGN=center NOWRAP>&#XA0;&#XA0;&#XA0;&#XA0;</TD><TD ALIGN=right NOWRAP><TT>\geq</TT>:&#XA0;&#XA0;</TD><TD ALIGN=left NOWRAP><FONT SIZE=5>&#X2265;</FONT></TD></TR>
<TR><TD ALIGN=right NOWRAP><TT>\cup</TT>:&#XA0;&#XA0;</TD><TD ALIGN=left NOWRAP><FONT SIZE=5>&#X222A;</FONT></TD><TD VALIGN=top ALIGN=center NOWRAP>&#XA0;&#XA0;&#XA0;&#XA0;</TD><TD ALIGN=right NOWRAP><TT>\cap</TT>:&#XA0;&#XA0;</TD><TD ALIGN=left NOWRAP><FONT SIZE=5>&#X2229;</FONT></TD></TR>
<TR><TD ALIGN=right NOWRAP><TT>\supset</TT>:&#XA0;&#XA0;</TD><TD ALIGN=left NOWRAP><FONT SIZE=5>&#X2283;</FONT></TD><TD VALIGN=top ALIGN=center NOWRAP>&#XA0;&#XA0;&#XA0;&#XA0;</TD><TD ALIGN=right NOWRAP><TT>\subset</TT>:&#XA0;&#XA0;</TD><TD ALIGN=left NOWRAP><FONT SIZE=5>&#X2282;</FONT></TD></TR>
<TR><TD ALIGN=right NOWRAP><TT>\supseteq</TT>:&#XA0;&#XA0;</TD><TD ALIGN=left NOWRAP><FONT SIZE=5>&#X2287;</FONT></TD><TD VALIGN=top ALIGN=center NOWRAP>&#XA0;&#XA0;&#XA0;&#XA0;</TD><TD ALIGN=right NOWRAP><TT>\subseteq</TT>:&#XA0;&#XA0;</TD><TD ALIGN=left NOWRAP><FONT SIZE=5>&#X2286;</FONT></TD></TR>
</TABLE>
</DIV>
<DIV CLASS="center"><HR WIDTH="80%" SIZE=2></DIV></BLOCKQUOTE><P>
With respect to previous versions of&#XA0;H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A since the begining, the
treatment of symbols has significantly evolved. Outputting symbols is
now performed by using Unicode character references, an option that
much more complies whith standards than the previous option of
selecting a &#X201C;symbol&#X201D; font. Observe that this choice is now
possible, because more and more browsers correctly display such
references. See&#XA0;Figure&#XA0;<A HREF="#symbol:fig">1</A> for a few such symbols.</P><P>However, this means that ancient or purposely limited browsers (such as
text-oriented browsers) cannot display maths, as translated by H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A.
For authors that insist on avoiding symbols that cannot be shown
by any browser, H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A offers a degraded mode that outputs text
in place of symbols.
H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A operates in this mode when given the <A NAME="@default4"></A><TT>-textsymbols</TT>
command-line option. Replacement text is in English.
For instance. the &#X201C;&#X2208;&#X201D; symbol is replace by &#X201C;in&#X201D;.
This is far from being satisfactory, but degraded mode may be
appropriate for documents than contain few symbols.</P><H4 CLASS="subsubsection">3.2.3&#XA0;&#XA0;Displays</H4><P>
Apart from containing symbols, formulas specify strong typesetting
constraints: sub-elements must be combined together following patterns
that departs from normal text typesetting. For instance, fractions
numerators and denominators must be placed one above the other.
H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A handles such constraints in display mode only.</P><P>The main two operating modes of H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A are <EM>text</EM> mode and
<EM>display</EM> mode.
Text mode is the mode for typesetting normal text,
when in this mode, text items are echoed one following the other and
paragraph breaks are just blank lines, both in input and output.
The so called <EM>displayed-paragraph environments</EM> of L<sup>A</sup>T<sub>E</sub>X (such as
<TT>center</TT> or <TT>quote</TT>) are rendered by HTML block-level
elements (such as <TT>DIV</TT> or <TT>BLOCKQUOTE</TT>).
Rendering is correct becauses both L<sup>A</sup>T<sub>E</sub>X displayed environments and
HTML block-level elements start a new line.
Conversly, since opening a HTML block-level elements means starting
a new line, any text that sould appear inside a paragraph must be
translated using only HTML text-level elements.
H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A chooses to translate in-text formulas that way.</P><P>H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A display mode allows more control on text placement, since
entering display mode means opening
a HTML <CODE>TABLE</CODE> element and that tables allow to control the
relative position of their sub-elements.
Displays come in two flavor, horizontal displays and vertical
displays.
An horizontal display is a one-row table, while a vertical display is
a one-column table. These tables holds display sub-elements, displays
sub-elements being centered vertically in horizontal display mode and
horizontally in vertical display mode.</P><P>Display mode is first opened by opening a <CODE>displaymath</CODE> environment
(e.g. by <CODE>$$</CODE>
or <CODE>\[</CODE>).
Then, sub-displays are opened by L<sup>A</sup>T<sub>E</sub>X constructs which require
them.
For instance, a displayed fraction (<CODE>\frac</CODE>) opens a vertical display.</P><P>The distinction between text and display modes clearly appears while
typesetting math formulas.
An in-text formula such as
<CODE>$\int_1^2 xdx = \frac{3}{2}$</CODE> appears as:
&#X222B;<SUB>1</SUB><SUP>2</SUP> <I>xdx</I> =3/2,
while the same formula has a better aspect in display mode:
</P><TABLE CLASS="display dcenter"><TR VALIGN="middle"><TD CLASS="dcell"><FONT SIZE=6>&#X222B;</FONT></TD><TD CLASS="dcell"><TABLE CLASS="display"><TR><TD CLASS="dcell" ALIGN="left">2</TD></TR>
<TR><TD CLASS="dcell" ALIGN="left"><BR>
<BR>
</TD></TR>
<TR><TD CLASS="dcell" ALIGN="left">1</TD></TR>
</TABLE></TD><TD CLASS="dcell"><I>xdx</I>&#XA0;=&#XA0;</TD><TD CLASS="dcell"><TABLE CLASS="display"><TR><TD CLASS="dcell" ALIGN="center">3</TD></TR>
<TR><TD CLASS="hbar"></TD></TR>
<TR><TD CLASS="dcell" ALIGN="center">2</TD></TR>
</TABLE></TD></TR>
</TABLE><P>
As a consequence, H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A is more powerful in display mode and
formulas should be displayed as soon as they get a bit complicated.
This rule is also true in L<sup>A</sup>T<sub>E</sub>X but it is more strict in H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A,
since HTML capabilities to typeset formulas inside text are quite
poor.
In particular, it is not possible to get in-text &#X201C;real&#X201D; fractions or
in-text limit-like subscripts.</P><P>Users should remember that H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A is not T<sub>E</sub>X or L<sup>A</sup>T<sub>E</sub>X and that
H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A author neither is D.&#XA0;E.&#XA0;Knuth nor L.&#XA0;Lamport.
Thus, some formulas may be rendered poorly.
For instance, two fractions with different denominator and numerator
height look strange.

</P><TABLE CLASS="display dcenter"><TR VALIGN="middle"><TD CLASS="dcell"><TABLE CLASS="display"><TR><TD CLASS="dcell" ALIGN="center">1</TD></TR>
<TR><TD CLASS="hbar"></TD></TR>
<TR><TD CLASS="dcell" ALIGN="center"><TABLE CLASS="display"><TR VALIGN="middle"><TD CLASS="dcell"><TABLE CLASS="display"><TR><TD CLASS="dcell" ALIGN="center"><I>N</I></TD></TR>
<TR><TD CLASS="dcell" ALIGN="center"><FONT SIZE=6>&#X2211;</FONT></TD></TR>
<TR><TD CLASS="dcell" ALIGN="center"><I>i</I>=0</TD></TR>
</TABLE></TD><TD CLASS="dcell"><I>U<SUB>i</SUB></I></TD></TR>
</TABLE></TD></TR>
</TABLE></TD><TD CLASS="dcell">&#XA0;=&#XA0;</TD><TD CLASS="dcell"><TABLE CLASS="display"><TR><TD CLASS="dcell" ALIGN="center"><TABLE CLASS="display"><TR VALIGN="middle"><TD CLASS="dcell"><TABLE CLASS="display"><TR><TD CLASS="dcell" ALIGN="center"><I>N</I></TD></TR>
<TR><TD CLASS="dcell" ALIGN="center"><FONT SIZE=6>&#X2211;</FONT></TD></TR>
<TR><TD CLASS="dcell" ALIGN="center"><I>i</I>=0</TD></TR>
</TABLE></TD><TD CLASS="dcell"><I>U<SUB>i</SUB></I></TD></TR>
</TABLE></TD></TR>
<TR><TD CLASS="hbar"></TD></TR>
<TR><TD CLASS="dcell" ALIGN="center">1</TD></TR>
</TABLE></TD></TR>
</TABLE><P>

The reason is that vertical displays in an horizontal display are
HTML tables
that always get centered in the vertical direction.
Such a crude model cannot faithfully emulate any T<sub>E</sub>X box placement.</P><P>Users can get an idea on how H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A combines elements in display mode
by giving the <A NAME="@default5"></A><TT>-dv</TT> command-line option, which
instructs H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A to add
borders to the <CODE>TABLE</CODE> elements introduced by displays.</P><H4 CLASS="subsubsection">3.2.4&#XA0;&#XA0;Arrays and display mode</H4><P>By contrast with formulas, which H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A attempts to render with
text-level elements only when they appear inside paragraphs, L<sup>A</sup>T<sub>E</sub>X arrays
always translate to the
block-level element <CODE>TABLE</CODE>, thereby introducing non-desired line
breaks before and after in-text arrays.
As a consequence, in-text arrays yield an acceptable output, only while
alone in a paragraph.</P><P>
Consider the following source:
</P><PRE CLASS="verbatim">This is a small array:
\begin{tabular}{|cc|}
\hline item-1 &amp; item-2 \\
\hline\end{tabular}. Next sentence.
</PRE><P>We get:
</P><BLOCKQUOTE CLASS="quote"><HR NOSHADE SIZE=1 ALIGN=center>
This is a small array:
<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=1><TR><TD ALIGN=center NOWRAP>item-1</TD><TD ALIGN=center NOWRAP>item-2</TD></TR>
</TABLE>. Next sentence.
<HR NOSHADE SIZE=1 ALIGN=center></BLOCKQUOTE><P>However, since in some sense, all HTML tables are displayed, the
<CODE>array</CODE> and <CODE>tabular</CODE> environments implicitly open display
mode, thus allowing a satisfactory typesetting of formulas in
arrays. More precisely, array elements whose column format
specification is <CODE>l</CODE>, <CODE>c</CODE> or <CODE>r</CODE> are typeset in display
mode (see section&#XA0;<A HREF="manual032.html#arraydef">B.10.2</A>).</P><H3 CLASS="subsection"><A NAME="toc6"></A><A NAME="htoc10">3.3</A>&#XA0;&#XA0;Warnings</H3><P>
When H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A thinks it cannot translate a symbol or construct
properly, it issues a warning. This draws user attention onto a
potential problem. However, rendering may be correct.</P><P>
In the following (silly) example, H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A gets nervous because of
the complicated length given as argument to <CODE>\hspace</CODE>:
</P><PRE CLASS="verbatim">\newlength{\mylength}\setlength{\mylength}{5pt}
\begin{tabular}{c@{\hspace{\mylength}}c}
Before &amp; After
\end{tabular}
</PRE><P>Running H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A on this input produces a warning:
</P><PRE CLASS="verbatim"># hevea manual.tex
...
manual.tex:507: Warning: \hspace with arg '\mylength'
...
</PRE><P>However the final rendering is correct:
</P><BLOCKQUOTE CLASS="quote"><HR NOSHADE SIZE=1 ALIGN=center>

<TABLE CELLSPACING=6 CELLPADDING=0><TR><TD ALIGN=center NOWRAP>Before</TD><TD VALIGN=top ALIGN=center NOWRAP></TD><TD ALIGN=center NOWRAP>After</TD></TR>
</TABLE>
<HR NOSHADE SIZE=1 ALIGN=center></BLOCKQUOTE><P>Note that all warnings can be suppressed with the <CODE>-s</CODE> (silent)
option.
When a warning reveals a real problem, it can often be cured by
writing a specific macro. The next two sections introduce H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A
macros, then section&#XA0;<A HREF="manual006.html#trouble">4</A> describes how to proceed with
greater detail.</P><H3 CLASS="subsection"><A NAME="toc7"></A><A NAME="htoc11">3.4</A>&#XA0;&#XA0;Commands</H3><P>
Just like L<sup>A</sup>T<sub>E</sub>X, H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A can be seen as a macro language, macros
are rewritten until no more expansion is possible. Then, either some
characters (such as letters, integers&#X2026;) are outputed or some
internal operation (such as changing font attributes, or arranging
text items in a certain manner) are performed.</P><P>This scheme favors easy extension of program capabilities
by users. However, predicting program behavior and correcting errors
may prove difficult, since final output or errors
may occur after several levels of macro expansion.
As a consequence, users can tailor H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A to their needs, but it
remains a subtle task.
Nevertheless, happy L<sup>A</sup>T<sub>E</sub>X users should enjoy customizing
H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A, since this is done by writing L<sup>A</sup>T<sub>E</sub>X code.</P><H3 CLASS="subsection"><A NAME="toc8"></A><A NAME="htoc12">3.5</A>&#XA0;&#XA0;Style choices</H3><P><A NAME="stylechoice"></A>
L<sup>A</sup>T<sub>E</sub>X and HTML differ in many aspects. For instance, L<sup>A</sup>T<sub>E</sub>X allows
fine control over text placement, whereas
HTML does not.
More symbols and font attributes are available in L<sup>A</sup>T<sub>E</sub>X than in
HTML. Conversely, HTML has font attributes, such as color, which
standard L<sup>A</sup>T<sub>E</sub>X has not.</P><P>Therefore, there are many situations where H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A just cannot
render the visual effect of L<sup>A</sup>T<sub>E</sub>X constructions. Here some choices
have to be made. For instance, calligraphic letters (<CODE>\mathcal</CODE>)
are rendered in red (<CODE>&lt;FONT COLOR=red&gt;</CODE>).</P><P>If you are not satisfied with H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A rendering of text style
declarations, then you
can choose your own, by redefining the <CODE>\cal</CODE>
macros, using <CODE>\renewcommand</CODE>, the macro redefinition operator of
L<sup>A</sup>T<sub>E</sub>X. The key point is that you need not worry about H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A
internals: just redefine the old-L<sup>A</sup>T<sub>E</sub>X style text-style
declarations (<EM>i.e.</EM> <CODE>\it</CODE>, <CODE>\sc</CODE>, etc.) and everything should
get fine:
</P><PRE CLASS="verbatim">\renewcommand{\sc}{\Huge}
\renewcommand{\cal}{\em}
</PRE><P>(See sections&#XA0;<A HREF="manual006.html#trouble">4</A> and&#XA0;<A HREF="manual007.html#both">5</A> on how to make such
changes while leaving your file processable by L<sup>A</sup>T<sub>E</sub>X, and
section&#XA0;<A HREF="manual020.html#customize-style">10.2</A> for a more thorough descripton of
customizing type styles).</P><P>
With such redefinitions, we get:


</P><BLOCKQUOTE CLASS="quote"><HR NOSHADE SIZE=1 ALIGN=center>
This is <FONT SIZE=7>small caps</FONT> and this is  <I><EM>CALLIGRAPHIC LETTERS</EM></I>
<HR NOSHADE SIZE=1 ALIGN=center></BLOCKQUOTE><P>Note that many of L<sup>A</sup>T<sub>E</sub>X commands and environments are defined in the 
<TT>hevea.hva</TT> file that H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A loads before processing any
input.
These constructs are written using L<sup>A</sup>T<sub>E</sub>X source code, in the end they
invoke H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A internal commands.</P><P>Other L<sup>A</sup>T<sub>E</sub>X constructs, such as
L<sup>A</sup>T<sub>E</sub>X key constructs or H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A internal commands (see section&#XA0;<A HREF="manual018.html#internal">8.3</A>),
that require special processing are defined
in H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A source code.
However, the vast majority of these definitions can be overridden by a
redefinition.
This may prove useless, since there is little point in
redefining core constructs such as <CODE>\newcommand</CODE> for instance.</P><HR>
<A HREF="manual004.html"><IMG SRC="previous_motif.gif" ALT="Previous"></A>
<A HREF="manual002.html"><IMG SRC="contents_motif.gif" ALT="Up"></A>
<A HREF="manual006.html"><IMG SRC="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>