\usepackage{a4} \usepackage{fullpage} \usepackage{makeidx} \usepackage{texnames} \usepackage{url} \usepackage{hevea} \usepackage{isolatin1} \usepackage{ifthen} \usepackage{array} \usepackage{graphics} %HEVEA\usepackage{color} smaller files, using the companion program \hacha. is achieved by issuing the command: ``\texttt{a.html}'', which you can visualize through a {\html} browser. \LaTeX{} style files are files that are not intended to produce output, but More generally, most base styles that are neither the commands \verb+\input+ or \verb+\usepackage+ or \verb+\input+. \subsubsection{Files loaded with \texttt{\char92 input}} As it is often the case, assume that the document \texttt{mydoc.tex} has a \subsubsection{Files loaded with \texttt{\char92 usepackage}} \verb+\usepackage{+\textit{name}\verb+}+ by loading the file implementations of famous packages (see section~\ref{implemented:package}). When a given package (say \texttt{zorglob}) is not implemented, the Hopefully, you are only using a few commands from package and \hevea{} will react to \verb+\usepackage{zorglub}+ by loading See section~\ref{usepackage} for the full story on \verb+\usepackage+. \index{tabulation}Whether the tabulation character is a space or not Spacing is a bit chaotic here, freely adjust \hevea{} output without changing anything to \LaTeX{} Then, sub-displays are opened by \LaTeX{} constructs which require while the same formula has a better aspect in display mode: that always get centered in the vertical direction. by giving the \verb+-v+ option comand line option twice, which By contrast with formulas, which \hevea{} attempts to render with Note that all warnings can be suppressed with the \verb+-s+ (silent) characters (such as letters, integers\ldots) are outputed or some internal operation (such as changing font attributes, or arranging {\html}. Conversely, {\html} has font attributes, such as color, which have to be made. For instance, the calligraphic letters (\verb+\mathcal+) changes while leaving your file processable by \LaTeX{}, and seen by \LaTeX. Even better, \verb+trouble.tex+ is not changed Note that this style is recommended anyway, since it eases the changing To correct this, you should provide a macro that has more or less the effect of Which \LaTeX{} renders as follows: Which \LaTeX{} typesets as follows: \latexsection{Making \hevea{} and \LaTeX{} both happy} \pdfsection{Making HeVeA and LaTeX both happy} processor, file loading, the \texttt{hevea} package \verb+\documentstyle+ and as arguments to \verb+\usepackage+, Finally, if one has an \hevea{} equivalent \textit{style}\texttt{.hva} \verb+\usepackage{+\textit{style}\verb+}+ \verb+\usepackage{+\textit{file}\verb+}+ from inside the document. Which method is better depends In the \verb+\usepackage+ case, \hevea{} loads \textit{file}\texttt{.hva} \subsection{The \protect\texttt{hevea} package}\label{heveastyle} the distribution is a \emph{package} in \LaTeXe{} terms and that it package loads the \texttt{comment} package which must be present. constructs and macro characters are processed (see section~\ref{imagen}) & This extra spaces comes from the newline character that follows can be achieved Also note that environments define a scope and that style changes Boolean registers are provided by the \texttt{ifthen} package \texttt{ifthen} packages are loaded, the ``purple rain'' example can \texttt{hevea} package. For user convenience, comment equivalents to Additionally, \verb+\usepackage+ commands, top-level and global Output to the image file builds up a current page, which is flushed \texttt{dvips}, \texttt{ghostscript} and a few others tools, which must all be This time, we would like \verb+\blob+ to produce a small black square, which is generally bad, fine placement is ignored and font style changes are \texttt{graphics} package (see section~\ref{graphics}), which provides a more standard manner to include Postcript images in Let \texttt{round.ps} be a Postscript file, which is included as an image in the source file \texttt{round.tex} (which must load the \filename{epsf} package): \verb+\usepackage{epsf}+ command gets echoed to the packages or define the right macros. A first run of the program on \LaTeX{} source changes these fragments document production chain, such as \texttt{dvips}) can handle. \latexsection{Cutting your document into pieces with \hacha{}} \label{hacha} cut into pieces at various sectional units by {\hacha} \texttt{\# hacha }\filename{mydoc}\texttt{.html} \filename{article} style and {\em chapter} in the \filename{book} \hevea{} are changed into remote links. The name of the root file can be changed using the \texttt{\# hacha -o root.html }\filename{mydoc}\texttt{.html} \hacha{}. Users can supply a header and a footer, which will appear at the begining and end of every page generated by \hacha{}. It suffices to \hacha{} also makes every page it generates a clone of its input as \hacha{} behavior can be altered from the document source, by using An alternative to loading the \texttt{hevea} package is to put {\hacha} recognizes all sectional units, ordered as follows, from part}, {\em chapter}, At document start, the root file and the output file are {\hacha} \item[{\tt\char92 cuttingunit}] This is a macro that holds the document cutting unit. You can change the default (which is {\em section} in the \filename{article} style and {\em chapter} in the \filename{book} style) by doing: \item[{\tt\char92 tocnumber}] Instruct \hevea{} to put section numbers \item[{\tt\char92 notocnumber}] Instruct \hevea{} \emph{not} to put You can change the default value of 1 by doing These comments then act as instructions to {\hacha}. \item[{\tt\char92 cuthere\{}{\it secname}{\tt\}\{}{\it itemtitle}{\tt\}}] \item[{\tt\char92 cutdef[}{\it depth}{\tt]\{}{\it secname}{\tt \}}] the cutting depth does not change. \item[{\tt\char92 cutend}] Consider, for instance, a \filename{book} document with a long chapter \chapter{A long chapter} \chapter{The next chapter} Then, you should insert a \verb+\cutdef+ at chapter start and a \verb+\cutend+ at chapter end: \chapter{A long chapter} \chapter{The next chapter} that would otherwise contain the long chapter now contains the chapter No other change is needed, since the macro \verb+section+ already which were ignored by default. \usepackage{hevea} \texttt{hevea} package is loaded). In this section we show how to alter some details of \hacha{} When invoked as \texttt{hacha \textit{doc}.html}, \hacha{} produces a \texttt{index.html} table of links file that Consider a document cut at the section level, which contains the When \hacha{} creates a web page from a given sectional unit, ``Cutting your document into pieces with \hacha''. ``\hevea{} Manual: Cutting your document into pieces with \hacha'' The command \verb+\toplinks{+\textit{prev}\verb+}{+\textit{up}\verb+}{+\textit{next}\verb+}+ instructs \hacha{} to put links to a relate documents that are generated independantly by \hevea{} and \hacha{}. package (see section~\ref{heveastyle}). package. \label{urlareprocessed}It is important to notice that all arguments Fortunately, the \texttt{url} package provides a very convenient \verb+\url+ command that acts like \verb+\verb+ and can appear in (unfortunately, this is not the full story, see section~\ref{urlpackage}). Hence, provided the \texttt{url} package is loaded, Moreover, \hevea{} (optionnaly) depends on only one third party package: \texttt{url}, which as correct as it can be and well-written. \hevea{} should be done using the \texttt{color} package (see section~\ref{color:package}). define no equivalent for these declarations, which therefore are for changed by the declaration \verb+\htmlcolor{+{\it number}\verb+}+, change font color to dark gray:%HEVEA{\htmlcolor{404040}% command from the \texttt{epsf} package. mechanism (see section~\ref{imagen}), which will translate the image back from their behavior may change from one version of \hevea{} to another and get translated into \html{} \emph{groups}, which are shadow block-level \index{"@print@\texttt{\char92"@print}|defocc} \index{"@getprint@\texttt{\char92"@getprint}|defocc} \index{"@hr@\texttt{\char92"@hr}|defocc} \index{"@open@\texttt{\char92"@open}|defocc} \index{"@close@\texttt{\char92"@close}|defocc} \index{"@style@\texttt{\char92"@style}|defocc} \index{"@nostyle@\texttt{\char92"@nostyle}|defocc} \index{"@fontsize@\texttt{\char92"@fontsize}|defocc} \index{"@fontcolor@\texttt{\char92"@fontcolor}|defocc} some characters cannot be given directly (e.g. \verb+#+ and \item[{\tt\char92 @print\char123}{\it text}{\tt\char125}] \item[{\tt\char92 @getprint\char123}{\it text}{\tt\char125}] \item[{\tt\char92 @hr[}{\it attr}{\tt]\char123}{\it width}{\tt\char125\char123}{\it height}{\tt\char125}] \item[{\tt\char92 @open\char123}{\it BLOCK}{\tt\char125\char123}{\it attributes}{\tt\char125}] \item[{\tt\char92 @close\char123}{\it BLOCK}{\tt\char125}] \item[{\tt\char92 @style\char123}{\it SHAPE}{\tt\char125}] Declare the text shape \textit{SHAPE} (which must be uppercase) \item[{\tt\char92 @fontsize\char123}{\it int}{\tt\char125}] \item[{\tt\char92 @fontcolor\char123}{\it color}{\tt\char125}] \item[{\tt\char92 @nostyle}] \index{"@open@\texttt{\char92"@open}} \index{"@close@\texttt{\char92"@close}} \index{"@print@\texttt{\char92"@print}} \index{"@getprint@\texttt{\char92"@getprint}} \index{"@nostyle@\texttt{\char92"@nostyle}} \index{"@nostyle@\texttt{\char92"@nostyle}} which \hevea{} uses internaly to output \texttt{A} elements. \index{"@open@\texttt{\char92"@open}} \index{"@close@\texttt{\char92"@close}} The \texttt{bgcolor} environment from the \texttt{color} package locally changes background color (see section~\ref{bgcolor}). \index{"@getcolor@\texttt{\char92"@getcolor}} background color expressed as a high-level color, which therefore \verb+\@getcolor+ internal macro from the \texttt{color} package. we examine how users can change \hevea{} default behavior or add functionalities. In all this section we assume that a document \subsection{Simple changes} Users can easily change the rendering of some constructs. For The same effect can be achieved without using any of the internal \verb+\em+ can be changed elsewhere. \hevea{} default rendering of type style changes is described in All shapes are mutually exclusive, this means that each shape If one wishes to change the rendering of some of the shapes (say small mechanism, redefining \verb+\scshape+ is not. Anyway, you might have not noticed it if I had not told you. style, but for a few commands whose calling interface is changed. takes an extra optional argument (which \hevea{} should ignore The effect is to replace \verb+\title+ by a new command which This can be achieved as follows~: command, which calls the \verb+\imgsrc+ command~: This does not harm as long as the final \html{} document has a white 72~characters wide. Most style changes are ignored, because it is hardly bold fonts, underlinings, nor size change or colors\ldots{} The only way to correct this (apart from changing the tables the nodes in the others files, which are named \texttt{myfile.info-1}, ``\verb+\+'' followed by a single non-letter character or and ``\verb+ +'', character or behavior, which \hevea{} does not handle. invisible commands is a static property attached to command name. \subsection{The \texttt{\char92\char92} Command} \hacha{}, since both header and footer are replicated at the start and end of any file generated by \hacha. \index{color!of background|see{\texttt{\char92"@bodyargs}}} \index{"@bodyargs@\texttt{\char92"@bodyargs}} \index{"@meta@\texttt{\char92"@meta}}\label{metadef} The \verb+\htmlhead+ command cannot be used for changing anything outside of change \hevea{} default (empty) atribute for Generally speaking, spaces (and single newline characters) in the at every chapter end in the \filename{book} style. If the document is then cut into smaller files by \hacha{} (see section~\ref{hacha}) footnotes may go to a separate file. the iso-latin1 and symbol character sets, then \hevea{} \html{} pages that show these character sets can be found \verb+\'+, work when then produce letters from the iso-latin1 character set. \LaTeX{} can process such documents by loading the package numbers can be changed by redefining \verb+\the+{\it secname}. chapters into alphabetic (uppercase) style: \renewcommand{\thechapter}{\Alph{chapter}} \subsection*{\aname{no:number}{Use \hacha{}}} \addcontentsline{toc}{subsection}{\ahrefloc{no:number}{Use \hacha{}}} \subsection*{\aname{no:number}{Use \hacha{}}} \addcontentsline{toc}{subsection}{\ahrefloc{no:number}{Use \hacha{}}} However, \hevea{} has a more sophisticated way of producing A later run of {\hacha} on \hevea{} output file splits it argument. Section~\ref{hacha} explains how to control {\hacha}. \section{Classes, Packages and Page Styles} If one of the reckognized styles has already been loaded at the time when \subsection{Packages and Page Styles}\label{usepackage} \verb+\usepackage[+\textit{options}\verb+]{+\textit{pkg}\verb+}+ in \verb+\usepackage+ command with its arguments gets echoed to the The \hevea{} distribution contains implementations of some packages, implement a package, for instance \hevea{} does not provide an implementation for the packages \texttt{isolatin1} or Users needing an implementation of a package that is widely used and Experienced users may find it fun to attempt to write package \item[\texttt{\char92 usecounter\{}\textit{counter}\texttt{\}}] \item[\texttt{\char92 renewcommand\{\char92 Thus, users can change label formatting by redefining When occurring outside math mode, characters \verb+_+ and \verb+^+ act as ordinary characters and get echoed to the output. However, a warning Subscript and superscript placement can be changed using the These macros perform the following default actions, which can be changed by redefining them: \item[\texttt{\char92 textstackrel}] Performs ordinary superscripting. \item[\texttt{\char92 textunderline}] Underlines its argument, using the \item[\texttt{\char92 textoverline}] Sends a warning message to the handled\label{mathaccents} by default. However, the distribution includes a \texttt{mathaccents.hva} file Rendering is far from perfect and changes from display to text mode. \ifhevea{\input{mathaccents.hva}For instance, given the formula one should not load the \texttt{mathaccents.hva} file and write issue color changes: changed. The appearance of other symbols can be changed using \LaTeXe{} style changing commands (\verb+\mathbf+, etc.). by style changes or not is browser dependent. The \verb+\cal+ declaration and the \verb+\mathcal+ command (that in math mode and that, in fact, style cannot really change in math mode. Math style changing declarations \verb+\displaystyle+ and which require to be both opened and closed and introduce line breaks perform type size changes. name}. In both cases, \LaTeX{} would crash, \hevea{} just issues Conversely, changes of base macros (i.e., the ones that \hevea{} the \textit{calc} package that makes using \TeX{} style for counters \subsection{The \texttt{ifthen} Package}\label{ifthen} The \texttt{ifthen} package is partially supported. \verb+\lengthtest+ test expression, which is with the boolean registers of the \texttt{ifthen} package, as it is By default, \hevea{} implements the \texttt{array} package document), which significantly extends the The \LaTeX{} \verb+\label+ and \verb+\ref+ are changed by \hevea{} recognized, it loads the \texttt{.bbl} file which should thus \index{argument!of input@of \texttt{\char92 input}} By default indexes are formated in two columns, one may change the Note that two packages for multiple indexes are implemented which are null macros). Stretchable lengths do not exist, thus the \verb+\hfill+ and command, which issues a warning and typesets its argument Package} In the case of the commands from the \texttt{graphics} package, In both cases, the \texttt{imagen} script has to be run by hand. All commands from the graphics package are implemented using the loads the \texttt{graphics} package and that includes some (scaled) \subsection{The \texttt{color} Package}\label{color}\index{color}\label{color:package} \hevea{} partly implements the \texttt{color} package. \verb+\textcolor+. Other commands from the \texttt{color} package do \verb+\textcolor{+\textit{name}\verb+}{+\textit{text}\verb+}+, which change text color. The \verb+\textcolor+ command has a similar feature. \textcolor[named]{Peach}{Peach}, (\hevea{} implements the \texttt{color} package with \ifhevea Which yields: the \verb+\colorbox+ command for changing the background color inside \texttt{bgcolor} environment, for changing the backgroud color of some \index{"@getcolor@\texttt{\char92"@getcolor}|defocc} One changes the high-level \emph{high-color} into a low-level color by All \LaTeXe{} declarations and environments for changing type style \emph{shape}, \emph{series} and \emph{family}. For instance consider the following source, that exhibits shape changes: Users need probably not worry about this. However this has an important practical consequence: to change the default rendering of benefit from the cancelation mechanism. See The \verb+\symbol{+{\it num}\verb+}+ outputs character number {\it num} from the iso-latin1 character set. This departs from \LaTeX{}, which output symbol number \textit{num} in Loading the \texttt{mathaccents.hva} style files enables (\verb+\hat+, \verb+\tilde+,\ldots), see Section~\ref{mathaccents}. Normally, \hevea{} does not recognize constructs that are specific to That is, defining a command that already This is an important change with respect to previous versions of Delimiting characters in command definition are supported. Please note that delimiting characters are supported as far as I could, problems are likely with delimiting characters which include characters \verb+{+\ldots{} \verb+}+: \subsubsection{The \texttt{\char92 let} construct} \subsubsection{The \texttt{\char92 global} construct} Note that \hevea{} also implements \LaTeX{} \texttt{ifthen} package \texttt{xxdate.exe} that activates date and time support. Loading the \texttt{fancysection.hva} file will radically change the Sectioning command background colors can be changed by redefining the corresponding colors (\texttt{part}, \texttt{chapter}, (See section~\ref{color:package} for details on the \texttt{named} educational CDROM to teach programming languages. \section{Implemented Packages}\label{implemented:package} \hevea{} distribution includes ``.hva'' packages that are implementations of \LaTeX{} packages. Packages described in the ``\emph{Blue Book}'' (\texttt{makeidx}, few extra packages are provided. I provide no full documentation for these packages, users should refer to the first pages of the package documentation, which can usually be found in the book~\cite{latexbis}, At the moment, package options are ignored. \hevea{} \texttt{amsmath} package defines some of the constructs of the \texttt{amsmath} package. At the moment, supported constructs are Packages}\label{arraypack} package is described in \texttt{array} package} do not specify vertical alignment, which therefore becomes browser double definition, which is not performed and induces a warning package~\cite[Section~5.3.5]{latexbis} provides a new tabular subtle array formatting that the \texttt{tabularx} package performs, \subsection{The \texttt{calc} Package}\label{calc} This package enables using traditional, infix, notation for The \texttt{calc} package provides a similar extension of the syntax \subsection{The \texttt{comment} Package} The implementation for this package provides two commands, \subsection{Multiple Indexes with the \texttt{index} and \texttt{multind} package}\label{multind} \footahref{ftp://theory.lcs.mit.edu/pub/tex/index/}{\texttt{index}} package, which is present in modern \LaTeX{} distributions. \item[{\tt\char92 newindex\{}{\it tag}{\tt \}\{}{\it \item[{\tt\char92 makeindex}] Perform z\item[{\tt\char92 index[}{\it tag}{\tt]\{}{\it arg}{\tt\}}] \item[{\tt\char92 printindex[}{\it tag}{\tt]}] Compute, format and The \footahref{\ctanold/contrib/misc/multind.sty}{\texttt{multind}} package provides another scheme the ``\texttt{index}'' package. \subsection{Multiple Bibliographies with the \texttt{multibib} package} \ttindex{multibib}{package}\comindex{newcites}. \texttt{multibib} package. The one non-implemented feature is the \subsection{The \texttt{url} package}\label{urlpackage} \comindex{url}\index{hyperlinks}\ttindex{url}{package} This package in fact provides a enhanced \verb+\verb+ command that \LaTeX{} active characters~: which gets typeset as: ``This is a complicated url: \url{http://foo.com/~user#label%coucou}.'' The \texttt{url} package solves this problem by providing the style file (which is an \hevea{} style file and not a \LaTeX{} which often use \verb+\url+ for its typesetting power. \texttt{verbatim} Packages} These two packages provide new commands and environments for \subsection{Typesetting Computer Languages: the \texttt{listings} Package} the original package documentation. \html{} in case you use this package. packages are partly implemented. searched along \texttt{hevea} search path, which consist in: If the last argument has an extension that is different from changed, using the \verb+-o+ option (see the section on options below). \item[{\tt -noiso}] Do not output (iso-latin1) characters whose code These characters are replaced by \html{} entities. This option is definition. In particular, this option disable size and color changes inside \verb+
+\ldots{} \verb+
+, which are otherwise performed. \subsection{\hacha{} usage} \index{hacha@\texttt{hacha} command} The \texttt{hacha} command interprets its argument \item[{\tt -o} {\it filename}] Make \hacha{} output go into file in which output files are the anchors from the input file gone. \noindent Section~\ref{hacha} of the user manual explains how to alter \hacha{} default behavior. is left unchanged. It may yield challenging input for other \html~optimizers. It is a companion program of \hevea{}, which must have been previously run as: (In both cases, \textit{base} is \hevea{} output basename.) outputs \texttt{ppm} images, which are then fed into a series of transformations that change them into \texttt{.gif} files. stage in \texttt{imagen} \texttt{ppm} to \texttt{gif} production chain. \texttt{netpbm} package or several such commands piped together. in \texttt{imagen} \texttt{ppm} image production chain, where image production chain. It can also help in limiting image files size. in old versions of the \texttt{netpbm} package. Sometimes \texttt{imagen} crashes because the PPM transformation chain which also reads Then, \texttt{hacha} cuts \texttt{doc.html} into several, HACHA=hacha \texttt{doc002.html}, etc. files produced by \texttt{hacha}. HACHA=hacha Netscape*documentFonts.charset*adobe-fontspecific: iso-8859-1 does not contain iso-latin1 characters above 127. That is, this will work only with documents that are generated by \hevea{} with the runtime system, which is distributed under the Gnu Library General The programs \commandname{hevea} and \commandname{hacha} are written in \LaTeX{} source is changed into \verb+.gif+ images by the \verb+imagen+ script, which basically calls, \LaTeX, \texttt{dvips}, and a few tools from the image processing package \footahref{ftp://wuarchive.wustl.edu/graphics/graphics/packages/NetPBM}{\texttt{netpbm}}. whereas \hacha{} can cut the output of \hevea{} into several files. M.~Gooseens, F.~Mittelbach, A.~Samarin.