|
"http://www.w3.org/TR/REC-html40/loose.dtd">
Extra Features
\hat , \tilde ,...), see Section B.7.4.
\def construct for defining commands is supported.
It is important to
notice that HEVEA semantics for \def
follows TeX semantics.
That is, defining a command that already
exists with \def succeeds.
This is an important change with respect to previous versions of
HEVEA, where \def had the same semantics as
\newcommand .Delimiting characters in command definition are supported. Consider the following example from the TeX Book: \def\Look{\textsc{Look}} \def\x{\textsc{x}} \def\cs AB#1#2C$#3\$ {#3{ab#1}#1 c\x #2} \cs AB {\Look}{}C${And \$}{look}\$ 5.It yields: And $lookabLookLook cx5. Please note that delimiting characters are supported as far as I could, problems are likely with delimiting characters which include spaces or command names, in particular the command name \{ .
One can include \{ in a command argument by using the grouping
characters { ... } :
\def\frenchquote(#1){«~\emph{#1}~» (in French)} He said \frenchquote(Alors cette accolade ouvrante {``\{''}~?).Yields:
He said « Alors cette accolade ouvrante ``{'' ? » (in French).
Another source of incompatibilty with TeX is that substitution of macros parameters is not performed at the same moment by HEVEA and TeX. However, things should go smoothly at the first level of macro expansion, that is when the delimiters appear in source code at the same level as the macro that is to parse them. For instance, the following source will give different results in LATEX and in HEVEA: \def\cs#1A{``#1''} \def\othercs#1{\cs#1A} \othercs{coucouA}LATEX output is ``coucou''A, while HEVEA output is ``coucouA''. Here is HEVEA output: ``coucouA'' Please note that in most situations this discrepancy will make HEVEA crash.
\let :
\let macro-name1 = macro-name2
\let is processed. This construct may
prove very useful in situations where
one whishes to slightly modify basic commands.
See sections 9.3 and B.2 for examples of using
\let in such a situation.
\global .
The \global construct is significant before
\def and \let constructs.Also note that \gdef is equivalent to \global\def .
\newif\if name, where name is made of letters
only, creates three macros:
\if name, \ nametrue and
\ namefalse .
The latter two set the name condition to true and
false, respectively.
The \if name command tests the condition name:
\if nametext1 \else text2 \fi \else keyword can be
omitted.Note that HEVEA also implements LATEX ifthen package and that TeX simple conditional macros are fully compatible with LATEX boolean registers. More precisely, we have the following correspondences:
\unskip and \endinput .
It also supports the \csname ... \endcsname
construct.
# n) occurring inside command bodies
refer to the outer definition, even when they appear in nested
command definitions.
That is, the following source:
\newcommand{\outercom}[1]{\newcommand{\insidecom}{#1}\insidecom} \outercom{outer}yields this output:
outer
Nevertheless, nested commands with arguments are allowed. Standard parameters # n still refer to the outer
definition, while nested parameters ## n refer to the
inner definition.
That is, the source:
\newcommand{\outercom}[1]{\newcommand{\insidecom}[1]{##1}\insidecom{inner}} \outercom{outer}yields this output:
inner
However, HEVEA source distribution includes a simple (sh) shell script xxdate.exe that activates date and time support. The hevea command, should be invoked as : # hevea -exec xxdate.exe ...This will execute the script xxdate.exe, whose output is then read by HEVEA. As a consequence, standard TeX counters \year ,
\month , \day and
\time are defined and
LATEX command \today works properly.
Additionnally the following counters and commands are defined :
Note that I choosed to add an extra option (and not an extra `` \@exec '' primitive) for security reasons. You certainly do
not want to enable HEVEA to execute silently an arbitrary program
without being conscious of that fact.
Moreover, the hevea program does not execute
xxdate.exe by default since it is difficult to write such
a script in a portable manner.Windows users should enjoy the same features with the version of xxdate.exe included in the Win32 distribution.
The fancysection.hva file is intended to be loaded after the document base style. Thus, to use fancy section style in doc.tex whose base style is article you should issue the command: # hevea article.hva fancysection.hva doc.texYou can also make a doc.hva file that contains the two lines: \input{article.hva} \input{fancysection.hva}And then launch hevea as: # hevea doc.hva doc.texSectioning command background colors can be changed by redefining the corresponding colors (part, chapter, section,...). For instance, you get various mixes of red and orange by: \input{article.hva} \input{fancysection.hva} \definecolor{part}{named}{BrickRed} \definecolor{section}{named}{RedOrange} \definecolor{subsection}{named}{BurntOrange}(See section B.14.2 for details on the named color model that is used above.) Another choice is issuing the command \colorsection{ hue} , where
hue is a hue value to be interpreted in the HSV model.
For instance,
\input{article.hva} \input{fancysection.hva} \colorsections{20}will yield sectionnal headers on a red-orange background.
VideoC translates LATEX source into a variety of formats, including HTML. VideoC source may contain some special constructs for typesetting source code or to annotate text in sophisticated ways. HEVEA internal engine implements some of the core constructs needed by VideoC. The rest of VideoC constructs are implemented by the .hva files from VideoC distribution.
|