File: manual017.html

package info (click to toggle)
hevea-doc 1.07-1
  • links: PTS
  • area: non-free
  • in suites: sarge
  • size: 632 kB
  • ctags: 449
  • sloc: makefile: 32
file content (112 lines) | stat: -rw-r--r-- 5,439 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<!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=ISO-8859-1">
<META name="GENERATOR" content="hevea 1.07">
<META name="Author" content="Luc Maranget">
<TITLE>
The Structure of the Document
</TITLE>
</HEAD>
<BODY TEXT=black BGCOLOR=white>
<A HREF="manual016.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="manual015.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="manual018.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<HR>
<TABLE CELLPADDING=0 CELLSPACING=0 WIDTH="100%">
<TR><TD BGCOLOR="#2de52d"><DIV ALIGN=center><TABLE>
<TR><TD><FONT SIZE=5><B><A NAME="htoc53">B.2</A></B></FONT></TD>
<TD WIDTH="100%" ALIGN=center><FONT SIZE=5><B>The Structure of the Document</B></FONT></TD>
</TR></TABLE></DIV></TD>
</TR></TABLE><A NAME="structure"></A><BR>
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&nbsp;<A HREF="manual044.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.<BR>
<BR>
<A NAME="@default90"></A>
<A NAME="@default91"></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:
<PRE>
\htmlfoot{\copyright to me}
</PRE>
<A NAME="@default92"></A>
<A NAME="@default93"></A>
<A NAME="@default94"></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.
One can
change H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A default (empty) atribute 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>:
<PRE>
\renewcommand{\@bodyargs}{TEXT=black BGCOLOR=white}
</PRE>
<A NAME="@default95"></A><A NAME="@default96"></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:
<PRE>
\let\oldmeta=\@meta
\renewcommand{\@meta}{%
\oldmeta
\begin{rawhtml}
&lt;META name="Author" content="Luc Maranget"&gt;
\end{rawhtml}}
</PRE>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.<BR>
<BR>
<A NAME="@default97"></A><A NAME="@default98"></A>
The <CODE>\@charset</CODE> command holds the value of the document character
set. By default, this value is <TT>ISO-8859-1</TT>.
To change this value, there are basically two techniques.
<UL><LI>
You can set the charset by extracting its value from the current
locale environment.
This operation is performed by a companion script: <TT>xxcharset.exe</TT>.
It thus suffices to lauch H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A as:
<DIV ALIGN=left>
<TT># hevea -exec xxcharset.exe</TT>&nbsp;<I>other arguments</I> 
</DIV>
<LI>You can more directly redefine <CODE>\@charset</CODE> in the document preamble.
The suggested technique is to include the redefinition in a
``<TT>.hva</TT>'' file, loaded as a package.
</UL>
Notice though, that just changing <CODE>\@charset</CODE> will not turn
H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A into a multi-lingual tool.<BR>
<BR>
<HR>
<A HREF="manual016.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="manual015.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="manual018.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>