Yodl macros(7) Your Own Document Language Yodl macros(7) NAME yodlmacros - Macros for the Yodl converters SYNOPSIS This manual page lists the standard macros of the Yodl package. DESCRIPTION The following list shows the macros defined by the Yodl converters define and which can be used in Yodl documents. Refer to the Yodl user guide, distributed with the Yodl package, for a full description. The following list shows all macros of the package in alphabetical order. `abstract(text)' Defines an abstract for an article or report type of document. Abstracts are not implemented for books or manpages. Must appear before starting the document using the `article' or `report' macro. `addntosymbol(symbol)(n)(text)' Adds `text' `n' times to `symbol'. The value `n' may also be the name of a defined counter (which is not modified). `affiliation(site)' Defines an affiliation, to appear in the document titlepage below the author field. Must appear before starting the document with `article', `report' or `book'. The affiliation is only printed when the author field is not empty. When converting to html the way the affiliation is displayed can be tuned using CSS id selector specifications. The affiliation has `id="affiliation"'. `AfourEnlarged()' Enlarges the usable height of A4 paper by 2 cm.: the top margin is reduced by 2 cm. This macro should be called in the preamble. The macro is available only for LaTeX conversions. This macros is somewhat obsolete. Instead, using `PageEnlarged' is advised `appendix()' Starts appendices `article(title)(author)(date)' Starts an article. The top-level sectioning command is `(n)sect'. In HTML conversions only one output file is written, while the way the headings are displayed can be tuned using CSS id selector specifications: the title has `id="title"', the author `id="author"', and the date `id="date"'.) `attrib(text)' In html, pushes `text' as an attribute for the next html tag supporting `attrib'. E.g, to set a blue color and 30 pixel left-hand side margin for a section use attrib(style="color:blue;margin-left:30px;")\ sect(Section name) This results in the html markup
' tag
that is used to embed the two dashes.
`def(macroname)(nrofargs)(redefinition)'
Defines `macroname' as a macro, having `nrofargs' arguments, and
expanding to `redefinition'. This macro is a shorthand for
`DEFINEMACRO'. An error occurs when the macro is already
defined. Use `redef()' to unconditionally define or redefine a
macro.
`description(list)'
Sets `list' as a description list. Use `dit(item)' to indicate
items in the list.
`dit(itemname)'
Starts an item named `itemname' in a description list. The list
should be used in `description' macros. With `html' conversions
the contents of a description item is separated from the item
itself. The `dit' macro only defines the item, and not the
description itself. This macro sets the item in bold-face
(`strong' font). The macro `itdesc', available since Yodl 3.05,
can be used to defines an item and its description, using its
suggested format (i.e., indenting the description relative to
the item).
`eit()'
Indicates an item in an enumerated list. The `eit' macro should
be used as an argument in `enumeration' macros.
`ellipsis()'
Sets ellipsis (...).
`em(text)'
Sets `text' as emphasized, usually italics.
`email(address)'
In HTML, this macro sets the `address' in a `' locator. In other output formats, the
`address' is sent to the output. The `email' macro is a special
case of `url'.
`enumeration(list)'
`enumeration()' starts an enumerated list. Use `eit()' in the
list to indicate items in the list.
`euro()'
Sets the euro currency symbol in latex, html, (and possibly sgml
and xml). In all other conversions EUR which is the official
textual abbreviation (cf. http://ec.europa.eu/euro/entry.html)
is written. Note that LaTeX may require latexpackage()(eurosym).
`evalsymbol(symbol)(expression)'
Symbol symbol receives the value resulting from evaluating
expression. E.g., if `sym' is a defined symbol, then
evalsymbol(sym)(SUBSTR(hello world)(3)(2))
assigns the value `lo' to `sym'.
`fig(label)'
This macro is a shorthand for `figure ref(label)' and just makes
the typing shorter, as in `see fig(schematic) for ..' See
`getfigurestring()' and `setfigurestring()' for the `figure'
text.
`figure(file)(caption)(label)'
Sets the picture in `file' as a figure in the current document,
using the descriptive text `caption'. The `label' is defined as
a placeholder for the figure number and can be used in a
corresponding `ref' statement. Note that the `file' must be the
filename without extension: By default, Yodl will supply `.gif'
when in HTML mode, or `.ps' when in LaTeX mode. Figures in other
modes may not (yet) haven been implemented.
When converting to html, this macro uses three attribute-strings
(if available). The string pushed first using an attrib-call
defines the attributes for its `' html-markup; the
string pushed next defines the attributes for its `
'
html-markup; the string pushed last defines the attributes for
its `' html-markup. The `figure' macro's html output is
organized like this:
...
Starting with Yodl 3.07.00 no `alt="Figure # is shown here..."'
attribute is defined anymore for the `img' markup: an
`alt'-attribute can easily be defined at the last attrib-call,
using `getfigurestring()' to obtain `Figure' or its
language-specific translation, and
`COUNTERVALUE(XXfigurecounter)' to obtain the order-number of
the figure shown in the next `figure'-macro call.
`file(text)'
Sets `text' as filename, usually boldface. In html `attrib'
macro applies to the `' tag.
`findex()'
Generate an index entry for LaTex() or texinfo f-indices. Its
argument is the index entry. See also the `[cptv]index' macro.
`footnote(text)'
Sets `text' as a footnote, or between parentheses when the
output format does not allow footnotes.
`gagmacrowarning(name name ...)'
Prevents the `yodl' program from printing cannot expand possible
user macro. E.g., if you have in your document `the file(s) are
..' then you might want to put before that:
`gagmacrowarning(file)'. Calls `NOUSERMACRO'.
`getaffilstring()'
Expands to the string that defines the name of Affiliation
Information, by default AFFILIATION INFORMATION. Can be
redefined for national language support by `setaffilstring()'.
Currently, it is relevant only for txt.
`getauthorstring()'
Expands to the string that defines the name of Author
Information, by default AUTHOR INFORMATION. Can be redefined for
national language support by `setauthorstring()'. Currently, it
is relevant only for txt.
`getchapterstring()'
Expands to the string that defines a `chapter' entry, by default
Chapter. Can be redefined for national language support by
`setchapterstring()'.
`getdatestring()'
Expands to the string that defines the name of Date Information,
by default DATE INFORMATION. Can be redefined for national
language support by `setdatestring()'. Currently, it is relevant
only for txt.
`getfigurestring()'
Returns the string that defines a `figure' text, in captions or
in the `fig()' macro. The string can be redefined using the
`setfiguretext()' macro.
`getpartstring()'
Expands to the string that defines a `part' entry, by default
Part. Can be redefined for national language support by
`setpartstring()'.
`gettitlestring()'
Expands to the string that defines the name of Title
Information, by default TITLE INFORMATION. Can be redefined for
national language support by `settitlestring()'. Currently, it
is relevant only for txt.
`gettocstring()'
Expands to the string that defines the name of the table of
contents, by default Table of Contents. Can be redefined for
national language support by `settocstring()'.
`htmlcommand(cmd)'
Writes `cmd' to the output when converting to html. The `cmd' is
not further expanded by Yodl.
`htmlheadfile(file)'
Adds the contents of `file' to the `head' section of an HTML
document. The contents of file are not interpreted and should
contain plain html text. This option can be useful when large
bodies of text, like the contents of `