Sophie

Sophie

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

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>The Structure of the Document</TITLE>
</HEAD>
<BODY >
<A HREF="manual023.html"><IMG SRC="previous_motif.gif" ALT="Previous"></A>
<A HREF="manual022.html"><IMG SRC="contents_motif.gif" ALT="Up"></A>
<A HREF="manual025.html"><IMG SRC="next_motif.gif" ALT="Next"></A>
<HR>
<H2 CLASS="section"><A NAME="htoc63">B.2</A>&#XA0;&#XA0;The Structure of the Document</H2><P><A NAME="structure"></A>
Document structure is a bit simplified with respect to L<sup>A</sup>T<sub>E</sub>X, since
documents consist of only two parts.
The <EM>preamble</EM> starts as soon as H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A starts to operate and
ends with the <CODE>\begin{document}</CODE> construct.
Then, any input occurring before
<CODE>\end{document}</CODE> is translated to HTML.
However, the preamble is processed
and the preamble comprises the content of the files given as command-line
arguments to H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A, see section&#XA0;<A HREF="manual041.html#comline">C.1.1.1</A>).
As a consequence, command and environment definitions that
occur before <CODE>\begin{document}</CODE> are performed.
and they remain
valid during all the processing.</P><P><A NAME="@default144"></A>
<A NAME="@default145"></A>
In particular one can define a <EM>header</EM> and a <EM>footer</EM>, by using the
<CODE>\htmlhead</CODE> and <CODE>\htmlfoot</CODE> commands in the preamble.
Those commands register their argument as the header and the footer of
the final HTML document. The header appears first while the footer
appears last in (visible) HTML output.
This is mostly useful when H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A output is later cut into pieces by
H<FONT SIZE=2><sup>A</sup></FONT>C<FONT SIZE=2><sup>H</sup></FONT>A, since both header and footer are replicated
at the start and end of any file generated by H<FONT SIZE=2><sup>A</sup></FONT>C<FONT SIZE=2><sup>H</sup></FONT>A.
For instance, to append a copyright notice at the end of all the HTML
pages, it suffices to invoke the <CODE>\htmlfoot</CODE> command as follows
in the document preamble:
</P><PRE CLASS="verbatim">\htmlfoot{\copyright to me}
</PRE><P><A NAME="@default146"></A>
<A NAME="@default147"></A>
<A NAME="@default148"></A><A NAME="metadef"></A>
The <CODE>\htmlhead</CODE> command cannot be used for changing anything outside of
the HTML document body, there are specific commands for doing this.
Those command must be used in the document preamble.
One can
change H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A default (empty) attribute for
the opening <CODE>&lt;BODY ...&gt;</CODE> tag by redefining
<CODE>\@bodyargs</CODE>.
For instance, you get black text on a white background, when the
following declaration occurs before <CODE>\begin{document}</CODE>:
</P><PRE CLASS="verbatim">\renewcommand{\@bodyargs}{TEXT=black BGCOLOR=white}
</PRE><P>Since version 1.08, a recommended alternative is to use style sheets:
</P><PRE CLASS="verbatim">\newstyle{BODY}{color:black; background:white;}
</PRE><P><A NAME="@default149"></A><A NAME="@default150"></A>
<A NAME="exlet"></A>Similarly, some elements can be inserted into the output file
<CODE>HEAD</CODE> element by redefining the <CODE>\@meta</CODE> command
(Such elements typically are <CODE>META</CODE>, <CODE>LINK</CODE>, etc.).
As such text is pure HTML, it should be included in a
<CODE>rawhtml</CODE> environment. For instance, you can specify
author information as follows:
</P><PRE CLASS="verbatim">\let\oldmeta=\@meta
\renewcommand{\@meta}{%
\oldmeta
\begin{rawhtml}
&lt;META name="Author" content="Luc Maranget"&gt;
\end{rawhtml}}
</PRE><P>Note how <CODE>\@meta</CODE> is first bound to
<CODE>\oldmeta</CODE> before being redefined and how <CODE>\oldmeta</CODE> is
invoked in the new definition of <CODE>\@meta</CODE>.
Namely, simply overriding the old definition of <CODE>\@meta</CODE> would
imply not outputting default meta-information.</P><P><A NAME="@default151"></A>
The <CODE>\@charset</CODE> command holds the value of the (HTML) document character
set. By default, this value is <TT>US-ASCII</TT>.
In previous versions of H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A, one could change the
value of the document character set by simply redefining
<CODE>\@charset</CODE>. Then, it was users responsability to provide a
(L<sup>A</sup>T<sub>E</sub>X) document in the correspounding encoding.
This is no longer so, and users should <EM>not</EM> redefine
<CODE>\@charset</CODE> directly. Please, see Section&#XA0;<A HREF="manual018.html#encodings">8.6</A> for details.</P><HR>
<A HREF="manual023.html"><IMG SRC="previous_motif.gif" ALT="Previous"></A>
<A HREF="manual022.html"><IMG SRC="contents_motif.gif" ALT="Up"></A>
<A HREF="manual025.html"><IMG SRC="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>