Chapter 4: Macros and Document types

The macro package distributed with Yodl is described in this chapter. The macro package consists of a number of definition files, which convert a Yodl document that follows a certain syntax to an output format. The main output formats, currently supported, are:

The following conversion format is in an experimental stage:

Currently discontinued conversion formats are:

Other formats may be available, but maybe in an unstable state. Contact the the maintainer if you have a new format to add, or want to reanimate formates that were previously available.

4.1: General structure of a Yodl document

This section describes the general format of a Yodl document.

First of all, a Yodl document needs a preamble. This part of the document must be at the top, and must define the modifiers and the document type. Modifiers, when present, must appear first.

Modifiers are often specific for a particular target document type (e.g., latexoptions or mailto), but may also have a general nature (e.g., affiliation or abstract). All modifiers are used to modify parameters of document types. Therefore, they must be specified before the document type is defined.

All modifiers are listed in section 4.3.8. In general, you should use as many modifiers as appropriate. E.g., you should define a mailto even when you're not planning to convert your document to HTML. The reason is twofold: first, you might later decide that a HTML version isn't a bad idea after all. Second, later versions of the converters might use mailto even for non-HTML output formats.

Following the modifiers, the document type is defined. The document type is either article, report, book, plainhtml or manpage. Except for the manpage document type, which is a highly specialized document type, described in section 4.1.2, the following rules apply:

A decision about the document type to use should be based on its complexity. If the document's organization becomes too complex, it is probably a good idea to use a document type supporting a more complex organization. E.g., a complex article might be written as an accessible report, combining related sections into chapters. Similarly, the structure of a report having 30 chapters might improve when it's re-organized as a book having parts. To offer a rule of thumb: a document should have no more than approximately ten top-level sections, and each top-level sectioning should have no more than approximately ten subsections, etc..

The document type influences the way Yodl formats the output. An article (or plainhtml) results in one output file. E.g., one final document when converting to HTML. If your article is way too long, then the loading of the HTML document will also take much time. When converting to HTML, Yodl splits reports and books into files each holding a chapter. These can be accessed through the table of contents. So, the document length can also be relevant when you contemplate switching to a report or book.

Documents using special macros, must have defined these macros before they are used. An appropriate location for these macros is immediately beyond the preamble. E.g., see the file Documentation/manual/manual.yo distributed with the Yodl package. This is the main file of this manual, showing the preferred organization of Yodl files.

To answer yes-but-what-if oriented minds, here are two results of the wrong order of text, preamble and modifiers:

4.1.1: Document types

As distributed, Yodl supports four document types: article, report, book and the manual page. Note that document types have nothing in common with output formats; a book can be converted to each of the output formats, and a manual page can be converted to a .dvi file. Nevertheless, some formats are particularly usefule for some document types. A book converted to the man output format to be processed later with groff won't look too good. Its looks would greatly improve when the document would be converted to ASCII using the ms output format.

Following the preamble and the definition of specialized macros symbols and counters, documents start by specifying the document type. The available macros are:

These macros provide, globally, three functions: First, the macros generate any commands that need to appear before `real' text is sent to the output file. E.g., the LaTeX output needs a \documentstyle preamble, HTML output needs <html> and <body> tags.

Second, the macros define appropriate document-dependent settings. E.g., the LaTeX converter defines the title, author and date using \title etc..

Third, the actual document is started. E.g., for LaTeX this means a \begin{type}, followed by the appropriate commands to generate a the document title and the table of contents. The title setting in the above macros defines the document title which always appears on the front page of the document. For HTML output, this is also the title of the HTML file (or files), as appearing in the HTML <title> tag.

The fact that the macros defining the document type perform many functions means that once the macro is started, nothing `extra' can be inserted between, e.g., the generated title and the table of contents. Sometimes this is not what you'd like; as is the case with an abstract. Yodl therefore uses modifiers, appearing before the document type macros, to insert information between the various elements of a document definition.

4.1.2: The manpage document type

The manpage document type was implemented to simplify the construction of Unix-style manual pages. A manpage document must be organized as follows:
  1. The manual page itself is defined, using the macro
    manpage(short title)
                (section)
                (date)
                (source)
                (manual)
            
    
    Its arguments are:
    Short title:
    This should be the program name or something similar; i.e., whatever the manpage is describing.
    Section:
    A number, stating the manpage section. The Linux man (7) page recognizes the following manpage sections:
    • Section 1 is for commands, like ls;
    • Section 2 is for system calls, like fork();
    • Section 3 is for library calls, like strdup();
    • Section 4 is for special files (like devices);
    • Section 5 is for file formats, (like syslog.conf);
    • Section 6 is for games;
    • Section 7 is for macro packages and conventions;
    • Section 8 is for system management commands;
    • Section 9 is for other types of manpages, such as kernel commands.
    Date:
    The date of release.
    Source:
    The package where the manpage belongs to.
    Manual:
    The manual to which the package belongs.
    The arguments of the manpage macro define, e.g., the headers and footers of the manual page. The date, source and manual arguments can be empty.
  2. The subject of the manpage is defined using
        manpagename(name)(short description)
            
    
    The name argument should be a short name (e.g., the program name), and the short description should state the function. The descriptive argument is used by, e.g., the whatis database.
  3. The synopsis starts after:
        manpagesynopsis()
            
    
    Following this, an abbreviated usage information is presented. This information should show, e.g., the possible program flags and required arguments; but no more.
  4. The description is given after:
        manpagedescription()
            
    
    This is followed by some descriptive text. The descriptive text can e.g. show what the program (function, file, game, etc.) is supposed to do.
  5. Options are expected after:
        manpageoptions()
            
    
    The options are typically a descriptive list of possible flags and their meaning. This section lists the information of the synopsis, but also gives an in-depth description. The manpageoptions() section is optional.
  6. Necessary files are listed after:
        manpagefiles()
            
    
  7. The `see also' entry is defined by:
        manpageseealso()
            
    
    This is then followed by a list of related manual pages. Here, use the format bf(topic)(sectionnr), e.g., Yodl(1).
  8. Diagnostics are described after:
        manpagediagnostics()
            
    
    Diagnostics can state, e.g., what error messages are produced by the program and what the cure is.
  9. Known bugs should be mentioned after:
        manpagebugs()
            
    
    This section is optional.
  10. Finally, the author is stated after:
        manpageauthor()
            
    
The manpage document type requires you to follow the above order of commands strictly and to state all the necessary sections (and optionally, to state the not required sections but in their proper sequence). Furthermore, sectioning commands that are available in other document types (sect, subsect etc.) are not allowed in a manpage. You can however insert other sections in the manual page with the macro manpagesection. This macro takes one argument: the title of the extra section. It is suggested that you type the section name in upper case, to conform to the standard.

As an example, the manual page for the yodl program follows (the actual manual page may differ):

    manpage(yodl)
           (1)
           (1996)
           (The Yodl Package)
           (Yet oneOther Document Language)

    manpagename(yodl)(main Yodl convertor)
    
    manpagesynopsis()
    tt(Yodl) [-DNAME] [-IDIR] [-oFILE] [-PCMD] [-pPASS] [-t] [-v] [-w] [-h]
    [-?]  inputfile [inputfile...]

    manpagedescription()
    This manual page describes the tt(Yodl) program, the main converter of the
    Yodl package. This program is used by the bf(yodl2....) shell scripts,
    e.g., bf(yodl2tex) or bf(yodl2html).

    manpageoptions()
    description(
    dit(-DNAME) Defines symbol em(NAME).
    dit(-IDIR) Overrules the standard include directory (default 
em(/usr/local/lib/yodl)) with em(DIR).
    dit(-oFILE) Specifies em(FILE) as the output file (default is stdout).
    dit(-PCMD) `Preloads' command em(CMD), as if em(CMD) was the first line 
of the input.
    dit(-pPASS) Defines em(PASS) as the maximum number of `passes'; when this 
number is exceeded, tt(Yodl) aborts.
    dit(-t) Enables tracing mode. Useful for debugging.
    dit(-v) Raises the verbosity mode. Useful for debugging.
    dit(-w) Enables warning. When enabled, tt(Yodl) will warn when it sees
inconsistencies.
    dit(-h, -?) Shows usage information.
    dit(inputfile) File to process, use em(-) to instruct tt(Yodl) to read 
from stdin.
    )

    manpagefiles()
    The tt(Yodl) program requires no files, but `normal' usage of the Yodl package
requires macro files installed (usually in bf(/usr/local/share/yodl)). The
files in this directory are included by the converters bf(yodl2txt) etc..

    manpageseealso()
    bf(yodl2tex), bf(yodl2html), bf(yodl2man), etc..

    manpagediagnostics()
    Warnings and errors of tt(Yodl) are too many to enumerate, but all errors
are printed to em(stderr) after which tt(Yodl) exits with a non-zero
status.

    manpagebugs()
    There may be bugs in the tt(Yodl) program, but that's not very likely.
More likely you'll encounter bugs or omissions in the macro package
itself.

    manpageauthor()
    Karel Kubat
        

4.2: Predefined macros

This section describes all macros defined by default. Altering or removing these macros may produce unexpected results when converting Yodl documents to other formats. Furthermore, these macros often depend on macros or other symbols defined for internal use.

Many predefined macros depend on symbols start with XX. Therefore, it is strongly advised not to start any locally defined symbol with XX as doing so, or undefining existing symbols starting with XX, may also produce unexpected results.

Here are the default macros, alphabetically ordered:

4.2.1: abstract(text)

Defines an abstract for an article or report document. Abstracts are not implemented for books or manpages. Must appear before starting the document with the article or report macro.

4.2.2: addntosymbol(symbol)(n)(text)

Adds text n times to symbol. The value n may also be the name of a defined counter (which itself will not be modified).

4.2.3: 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.

4.2.4: 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.

4.2.5: appendix()

Starts appendices

4.2.6: article(title)(author)(date)

Starts an article. The top-level sectioning command is (n)sect. In HTML conversions only one output file is written.

4.2.7: attrib(text)

In html, adds text as an attribute to the next html tag. 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), resulting in the html markup
<h1 style="color:blue;margin-left:30px;">Section name</h1>.
This macro is only effective with html conversions, and is only applied to the next macro defining a html tag. E.g., when using attrib(id="x")em(a)tt(b) only the em-macro is given the id="x" attribute.

Commonly used attributes are id="idname", expecting a #idname CSS label in either internal or external CSS specifications, or style="spec" (as shown in the example).

When a series of attrib macro calls are specified only the last one will be used, as each attrib call redefines the contents of Yodl's attribute string. (e.g., attrib(x)attrib(y)sect(z) ignores x, and adds attrib="y" to sect(z)).

The attrib macro is supported by the following macros: bf cell cells center chapter code dit em figure file htmltag itdesc lchapter link lref lsect lsubsect lsubsubsect nchapter npart nsect nsubsect nsubsubsect paragraph part quote row sc sect strong subs subsect subsubsect subsubsubsect sups tt url verb verbinclude.

4.2.8: bf(text)

Sets text in boldface.

4.2.9: bind(text)

Generate a binding character after text.

4.2.10: book(title)(author)(date)

Starts a book document. The top-level sectioning command is (n)chapter, (n)part being optional. In HTML output files are created for each chapter.

4.2.11: cell(contents)

Sets a table cell, i.e., one element in a row. With the man/ms converters multiple blanks between cell() macro calls are merged into a single blank character.

4.2.12: cells(nColumns)(contents)

Set a table cell over nColumns columns. With LaTeX and xml the information in the combined cells is centered.

With man/ms conversions the cells() macro simply calls the cell() macro, but here the setmanalign() macro can be used to determine the alignment of multiple cells.

With html the macro attrib can be used, but when it contains a style specification the macro's default style="text-align: center" is ignored (but it can optionally be specified using the attrib macro).

4.2.13: cellsline(from)(count)

Sets a horizontal line starting at column number from over count columns in a row. If from is less then the number of columns already added to a row then it is ignored. This macro must be embedded in a row macro defining a table row. To put a line across the table's full width use rowline. To set horizontal lines across columns 1 until 2 and columns 4 until 5 table of a table use:

    row(cellsline(1)(2)cellsline(4)(2))
        
Combining cellsline and cell or cells calls in one row produces undefined results.

4.2.14: center(text)

Centers text. Use nl() in the text to break lines. In html the attrib macro is not supported.

4.2.15: chapter(title)

Starts a new chapter in books or reports.

4.2.16: cindex()

Generate an index entry for index c.

4.2.17: cite(1)

Sets a citation or quotation

4.2.18: clearpage()

Starts a new page, when the output format permits. Under HTML a horizontal line is drawn.

4.2.19: code(text)

Sets text in code font, and prevents it from being expanded. For unbalanced parameter lists, use CHAR(40) to get ( and CHAR(41) to get ).

4.2.20: columnline(from)(to)

Sets a horizontal line over some columns in a row. Note that columnline defines a row by itself, consisting of just a horizontal line spanning some of its columns, rather than the table's full width, like rowline. The two arguments represent column numbers. It is the responsibility of the author to make sure that the from and to values are sensible. I.e.,

    1 <= from <= to <= ncolumns
        
Note: this macro cannot be used if multiple lines must be set in one row. In those cases the macro colsline should be used.

4.2.21: 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.

4.2.22: description(list)

Sets list as a description list. Use dit(item) to indicate items in the list.

4.2.23: dit(itemname)

Starts an item named itemname in a descriptive list. The list should be defined as contents of a description(). 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).

4.2.24: eit()

Indicates an item in an enumerated list. The eit() macro should be an argument in enumerate().

4.2.25: ellipsis()

Sets ellipsis (...).

4.2.26: em(text)

Sets text as emphasized, usually italics.

4.2.27: email(address)

In HTML, this macro sets the address in a <a href="mailto=.."> locator. In other output formats, the address is sent to the output. The email macro is a special case of url.

4.2.28: endcenter()

DEPRECATED. Use center().

4.2.29: enddit()

DEPRECATED. Use description().

4.2.30: endeit()

DEPRECATED. Use enumeration().

4.2.31: endit()

DEPRECATED. Use itemization().

4.2.32: endmenu()

DEPRECATED. Use menu().

4.2.33: endtable()

DEPRECATED. Use table().

4.2.34: enumerate(list)

DEPRECATED. Use enumeration().

4.2.35: enumeration(list)

enumeration() starts an enumerated list. Use eit() in the list to indicate items in the list.

4.2.36: 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).

4.2.37: 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.

4.2.38: 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.

4.2.39: file(text)

Sets text as filename, usually boldface. In html attrib macro applies to the <strong> tag.

4.2.40: findex()

Generate an index entry for index f.

4.2.41: footnote(text)

Sets text as a footnote, or between parentheses when the output format does not allow footnotes.

4.2.42: 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.

4.2.43: 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.

4.2.44: 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.

4.2.45: getchapterstring()

Expands to the string that defines a `chapter' entry, by default Chapter. Can be redefined for national language support by setchapterstring().

4.2.46: 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.

4.2.47: 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.

4.2.48: getpartstring()

Expands to the string that defines a `part' entry, by default Part. Can be redefined for national language support by setpartstring().

4.2.49: 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.

4.2.50: 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().

4.2.51: htmlbodyopt(option)(value)

DEPRECATED. Use htmlstyle().

4.2.52: htmlcommand(cmd)

Writes cmd to the output when converting to html. The cmd is not further expanded by Yodl.

4.2.53: 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 <script> sections, must be included into the head section of html documents. This macro is only active in the preamble, should only specified once, and is only interpreted for html conversions.

4.2.54: htmlheadopt(option)

Adds the literal text option to the current information in the head section of an HTML document. Option may (or: should) contain plain html text. A commonly occurring head option is link, defining, e.g., a style sheet. Since that option is frequently used, it has received a dedicated macro: htmlstylesheet. When large bodies of html-text must be added to html documents the macro htmlheadfile should be used. This macro is only active in the preamble and is only interpreted for html conversions.

4.2.55: htmlnewfile()

In HTML output, starts a new file. All other formats are not affected. Note that you must take your own provisions to access the new file; say via links. Also, it's safe to start a new file just befoore opening a new section, since sections are accessible from the clickable table of contents. The HTML converter normally only starts new files prior to a chapter definition.

4.2.56: htmlstyle(tag)(definition)

Adds <style type="text/css"> ... </style> element to the head section of an HTML document.
Use htmlstyle to specify one or more CSS definitions which are eventually inserted at the ellipsis (...) in the generic style definition shown above. E.g., (using #rrggbb to specify a color, where rr are two hexadecimal digits specifying the color's red component, gg two hexadecimal digits specifying the color's green component, and bb two hexadecimal digits specifying the color's blue component) specifying

    htmlstyle(body)(color: #rrggbb; background-color: #rrggbb)
    htmlstyle(h1)(color: blue; text-align: center)
    htmlstyle(h2)(color: green)
    
results in the element
    <style type="text/css">
        body {color: #rrggbb; background-color: #rrggbb;}
        h1 {color: blue; text-align: center;} 
        h2 {color: green;}
    </style>
    
The macros htmlheadopt and htmlstylesheet could also be used to put information into the head-section of an HTML document, but htmlheadopt is of a much more general nature, while htmlstylesheet refers to CSS elements stored in an external file. The macro attrib can be used to define inline styles.

The htmlstyle macro is only active in the preamble and is only interpreted for html conversions.
Refer to available CSS specifications (cf., http://www.w3schools.com/cssref/ for an overview of how CSS specifications are used, and which CSS specifications are available).

By default the internal style specification
figure {text-align: center;} img {vertical-align: center;}
is used. If this is not appropriate, specify nohtmlimgstyle() in the preamble.

4.2.57: htmlstylesheet(url)

Adds a <link rel="stylesheet" type="text/css" ...> element to the head section of an HTML document, using url in its href field. The argument url is not expanded, and should be plain HTML text, without surrounding quotes. The macro htmlheadopt can also be used to put information in the head-section of an HTML document, but htmlheadopt is of a much more general nature. This macro is only active in the preamble and is only interpreted for html conversions.

4.2.58: htmltag(tagname)(start)

Sets tagname as a HTML tag, enclosed by < and >. When start is zero, the tagname is prefixed with /. As not all html tags are available through predefined Yodl-macros (there are too many of them, some are used very infrequently, and you can easily define macros for the tags for which Yodl doesn't offer predefined ones), the htmltag macro can be used to handle your own set of macros. In html the attrib macro is supported. E.g.,

    attrib(title="World Health Organization")htmltag(abbr)()WHO+htmltag(abbr)(0)
    

4.2.59: ifnewparagraph(truelist)(falselist)

The macro ifnewparagraph should be called from the PARAGRAPH macro, if defined. It will insert truelist if a new paragraph is inserted, otherwise falselist is inserted (e.g., following two consecutive calls of PARAGRAPH). This macro can be used to prevent the output of multiple blank lines.

4.2.60: includefile(file)

Includes file. The default extension .yo is supplied if necessary.

NOTE: Starting with Yodl version 3.00.0 Yodl's default file inclusion behavior has changed. The current working directory no longer remains fixed at the directory in which Yodl is called, but is volatile, changing to the directory in which a yodl-file is located. This has the advantage that Yodl's file inclusion behavior now matches the way C's #include directive operates; it has the disadvantage that it may break some current documents. Conversion, however is simple but can be avoided altogether if Yodl's -L (--legacy-include) option is used.

Furthermore, the includefile macro no longer defines a label. To define a label just before the file's inclusion use lincludefile.

4.2.61: includeverbatim(file)

Include file into the output. No processing is done, file should be in preformatted form, e.g.:

whenhtml(includeverbatim(foo.html))

NOTE: Starting with Yodl version 3.00.0 Yodl's default file inclusion behavior has changed. The current working directory no longer remains fixed at the directory in which Yodl is called, but is volatile, changing to the directory in which a yodl-file is located. This has the advantage that Yodl's file inclusion behavior now matches the way C's #include directive operates; it has the disadvantage that it may break some current documents. Conversion, however is simple but can be avoided altogether if Yodl's -L (--legacy-include) option is used.

4.2.62: it()

Indicates an item in an itemized list. The list is either surrounded by startit() and endit(), or it is an argument to itemize().

4.2.63: itdesc(itemname)(contents)

Starts an item and its description in a description list. Its name is itemname, the contents of the item is defined by contents. The itemname is defined by using the dit macro.

With html conversions the contents are surrounded by <dd> and </dd> tags, resulting in contents which are indented relative to the itemname. When the attrib macro is used it is applied to the itemname (dt-tags).

With other conversions the contents are quoted (as if using quote(contents)).

4.2.64: itemization(list)

Sets list as an itemizationd list. Use it() to indicate items in the list.

4.2.65: itemize(list)

DEPRECATED. Use itemization().

4.2.66: kindex()

Generate an index entry for index k.

4.2.67: label(labelname)

Defines labelname as an anchor for a link command, or to stand for the last numbering of a section or figure in a ref command.

4.2.68: langle()

Character <

4.2.69: languagedutch()

Defines the Dutch-language specific headers. Active this macro via setlanguage(dutch).

4.2.70: languageenglish()

Defines the English-language specific headers. Active this macro via setlanguage(english).

4.2.71: languageportugese()

Defines the Portugese-language specific headers. Active this macro via setlanguage(portugese).

4.2.72: LaTeX()

The LaTeX symbol.

4.2.73: latexaddlayout(arg)

This macro is provided to add Yodl-interpreted text to your own LaTeX layout commands. The command is terminated with an end-of-line. See also the macro latexlayoutcmds()

4.2.74: latexcommand(cmd)

Writes cmd plus a white space to the output when converting to LaTeX. The cmd is not further expanded by Yodl.

4.2.75: latexdocumentclass(class)

Forces the LaTeX \documentclass{...} setting to class. Normally the class is defined by the macros article, report or book. This macro is an escape route incase you need to specify your own document class for LaTeX. This option is a modifier and must appear before the article, report or book macros.

4.2.76: latexlayoutcmds(NOTRANSs)

This macro is provided in case you want to put your own LaTeX layout commands into LaTeX output. The NOTRANSs are pasted right after the \documentclass stanza. The default is, of course, no local LaTeX commands. Note that this macro does not overrule my favorite LaTeX layout. Use nosloppyhfuzz() and standardlayout() to disable my favorite LaTeX layout.

4.2.77: latexoptions(options)

Set latex options: documentclass[options]. This command must appear before the document type is stated by article, report, etc..

4.2.78: latexpackage(options)(name)

Include latex package(s), a useful package is, e.g., epsf. This command must appear before the document type is stated by article, report, etc..

4.2.79: lchapter(label)(title)

Starts a new chapter in books or reports, setting a label at the beginning of the chapter.

4.2.80: letter(language)(date)(subject)(opening)(salutation)(author)

Starts a letter written in the indicated language. The date of the letter is set to `date', the subject of the letter will be `subject'. The letter starts with `opening'. It is based on the `letter.cls' document class definition. The macro is available for LaTeX only. Preamble command suggestions:

4.2.81: letteraddenda(type)(value)

Adds an addendum at the end of a letter. `type' should be `bijlagen', `cc' or `ps'.

4.2.82: letteradmin(yourdate)(yourref)

Puts `yourletterfrom' and `yourreference' elements in the letter. If left empty, two dashes are inserted.

4.2.83: letterfootitem(name)(value)

Puts a footer at the bottom of letter-pages. Up to three will usually fit. LaTeX only.

4.2.84: letterreplyto(name)(address)(zip city)

Defines the `reply to' address in LaTeX or txt-letters.

4.2.85: letterto(element)

Adds `element' as an additional line to the address in LaTeX letters.

4.2.86: link(description)(labelname)

In HTML output a clickable link with the text description is created that points to the place where labelname is defined using the label macro, and attrib macro applies to the <a> tag. Using link is similar to url, except that a hyperlink is set pointing to a location in the same document. For output formats other than HTML, only the description appears.

4.2.87: lref(description)(labelname)

This macro is a combination of the ref and link macros. In HTML output a clickable link with the text description and the label value is created that points to the place where labelname is defined using the label macro, and attrib macro applies to the <a> tag. For output formats other than HTML, only the description and the label value appears.

4.2.88: lsect(label)(title)

Starts a new section, setting a label at the beginning of the section. In html attrib macro applies to the <h2> tag.

4.2.89: lsubsect(label)(title)

Starts a new subsection. Other sectioning commands are subsubsect and subsubsubsect. A label is added just before the subsection. In html attrib macro applies to the <h3> tag.

4.2.90: lsubsubsect(label)(title)

Starts a sub-subsection, a label is added just before the section In html attrib macro applies to the <h4> tag.

4.2.91: lsubsubsubsect(label)(title)

Starts a sub-sub-sub section. This level of sectioning is not numbered, in contrast to `higher' sectionings. A label is added just before the subsubsubection.

4.2.92: lurl(locator)

An url described by its Locator. For small urls with readable addresses.

4.2.93: mailto(address)

Defines the default mailto address for HTML output. Must appear before the document type is stated by article, report, etc..

4.2.94: makeindex()

Make index for latex.

4.2.95: mancommand(cmd)

Writes cmd to the output when converting to man. The cmd is not further expanded by Yodl.

4.2.96: manpage(title)(section)(date)(source)(manual)

Starts a manual page document. The section argument must be a number, stating to which section the manpage belongs to. Most often used are commands (1), file formats (5) and macro packages (7). The sectioning commands in a manpage are not (n)sect etc., but manpage...(). The first section must be the manpagename, the last section must be the manpageauthor. The standard manpage for section 1 contains the following sections (in the given order): manpagename, manpagesynopsis, manpagedescription, manpageoptions, manpagefiles, manpageseealso, manpagediagnostics, manpagebugs, manpageauthor. Optional extra sections can be added with manpagesection. Standard manpageframes for several manpagesections are provided in /usr/local/share/yodl/manframes.

4.2.97: manpageauthor()

Starts the AUTHOR entry in a manpage document. Must be the last section of a manpage.

4.2.98: manpagebugs()

Starts the BUGS entry in a manpage document.

4.2.99: manpagedescription()

Starts the DESCRIPTION entry in a manpage document.

4.2.100: manpagediagnostics()

Starts the DIAGNOSTICS entry in a manpage document.

4.2.101: manpagefiles()

Starts the FILES entry in a manpage document.

4.2.102: manpagename(name)(short description)

Starts the NAME entry in a manpage document. The short description is used by, e.g., the whatis database.

4.2.103: manpageoptions()

Starts the OPTIONS entry in a manpage document.

4.2.104: manpagesection(SECTIONNAME)

Inserts a non-required section named SECTIONNAME in a manpage document. This macro can be used to augment `standard' manual pages with extra sections, e.g., EXAMPLES. Note that the name of the extra section should appear in upper case, which is consistent with the normal typesetting of manual pages.

4.2.105: manpageseealso()

Starts the SEE ALSO entry in a manpage document.

4.2.106: manpagesynopsis()

Starts the SYNOPSIS entry in a manpage document.

4.2.107: mbox()

Unbreakable box in LaTeX. Other formats may have different opitions on our unbreakable boxex.

4.2.108: menu(list)

DEPRECATED.

4.2.109: metaC(text)

Put a line comment in the output.

4.2.110: metaCOMMENT(text)

Write format-specific comment to the output.

4.2.111: mit()

DEPRECATED.

4.2.112: mscommand(cmd)

Writes cmd to the output when converting to ms. The cmd is not further expanded by Yodl.

4.2.113: nchapter(title)

Starts a chapter (in a book or report) without generating a number before the title and without placing an entry for the chapter in the table of contents. In html attrib macro applies to the <h1> tag.

4.2.114: nemail(name)(address)

Named email. A more consistent naming for url, lurl, email and nemail would be nice.

4.2.115: nl()

Forces a newline; i.e., breaks the current line in two.

4.2.116: node(previous)(this)(next)(up)

DEPRECATED Defines a node with name this, and links to nodes previous, next and (up), for the node command.

4.2.117: nodeprefix(text)

Prepend text to node names, e.g.

nodeprefix(LilyPond) sect(Overview)
Currently used in texinfo descriptions only.

4.2.118: nodeprefix(text)

Prepend text to node names, e.g.

nodeprefix(LilyPond) sect(Overview)
Currently used in texinfo descriptions only.

4.2.119: nodetext(text)

Use text as description for the next node, e.g.

nodetext(The GNU Music Typesetter)chapter(LilyPond)
Currently used in texinfo descriptions only.

4.2.120: nohtmlfive()

Starting yodl 3.05 html-conversions by default use html5. This can be suppressed (in favor of using html4) by calling this macro. This macro merely suppresses writing the initial <!DOCTYPE html> to generated html files; it is only active in the preamble and is only interpreted for html conversions.

4.2.121: nohtmlimgstyle()

By default html-pages specify
(<style type="text/css" img {vertical-align: bottom;}></style>)
This macro suppresses this img CSS style specification. This macro is only active in the preamble and is only interpreted for html conversions.

4.2.122: nop(text)

Expand to text, to avoid spaces before macros e.g.: a2. Although a+sups(2) should have the same effect.

4.2.123: nosloppyhfuzz()

By default, LaTeX output contains commands that cause it to shut up about hboxes that are less than 4pt overfull. When nosloppyhfuzz() appears before stating the document type, LaTeX complaints are `vanilla'.

4.2.124: notableofcontents()

Prevents the generation of a table of contents. This is default in, e.g., manpage and plainhtml documents. When present, this option must appear before stating the document type with article, report etc..

4.2.125: notitleclearpage()

Prevents the generation of a clearpage() instruction after the typesetting of title information. This instruction is default in all non article documents. When present, must appear before stating the document type with article, book or report.

4.2.126: notocclearpage()

With the LaTeX convertor, no clearpage() instruction is inserted immediately beyond the document's table of contents. The clearpage() instruction is default in all but the article document type. When present, must appear before stating the document type with article, book or report. With other convertors than the LaTeX convertor, it is ignored.

4.2.127: notransinclude(filename)

Reads filename and inserts it literally in the text not subject to macro expansion or character translation. No information is written either before or after the file's contents, not even a newline.

NOTE: Starting with Yodl version 3.00.0 Yodl's default file inclusion behavior has changed. The current working directory no longer remains fixed at the directory in which Yodl is called, but is volatile, changing to the directory in which a yodl-file is located. This has the advantage that Yodl's file inclusion behavior now matches the way C's #include directive operates; it has the disadvantage that it may break some current documents. Conversion, however is simple but can be avoided altogether if Yodl's -L (--legacy-include) option is used.

4.2.128: noxlatin()

When used in the preamble, the LaTeX converter disables the inclusion of the file xlatin1.tex. Normally this file gets included in the LateX output files to ensure the conversion of high ASCII characters (like é) to LaTeX-understandable codes. (The file xlatin1.tex comes with the Yodl distribution.)

4.2.129: nparagraph(title)

Starts a non-numbered paragraph (duh, corresponds to subparagraph in latex).

4.2.130: npart(title)

Starts a part in a book document, but without numbering it and without entering the title of the part in the table of contents. In html attrib macro applies to the <h1> tag.

4.2.131: nsect(title)

Starts a section, but does not generate a number before the title nor an entry in the table of contents. Further sectioning commands are nsubsect, nsubsubsect and nsubsubsubsect. In html attrib macro applies to the <h2> tag.

4.2.132: nsubsect(title)

Starts a non-numbered subsection. In html the attrib macro applies to the <h3> tag.

4.2.133: nsubsubsect(title)

Starts a non-numbered sub-sub section. In html attrib macro applies to the <p> tag.

4.2.134: nsubsubsect(title)

Starts a non-numbered sub-subsection.

4.2.135: paragraph(title)

Starts a paragraph. This level of sectioning is not numbered, in contrast to `higher' sectionings (duh, corresponds to subparagraph in latex). In html attrib macro applies to the <p> tag.

4.2.136: part(title)

Starts a new part in a book document. In html attrib macro applies to the <h1> tag.

4.2.137: pindex()

Generate an index entry for index p.

4.2.138: plainhtml(title)

Starts a document for only a plain HTML conversion. Not available in other output formats. Similar to article, except that an author- and date field are not needed.

4.2.139: printindex()

Make index for texinfo (?).

4.2.140: quote(text)

Sets the text as a quotation. Usually, the text is indented, depending on the output format. In html attrib macro applies to the <blockquote> tag.

4.2.141: rangle()

Inserts the right angle character (>).

4.2.142: redef(macro)(nrofargs)(redefinition)

Defines macro macro to expand to redefinition. Similar to def, but any pre-existing definition is overruled. Use ARGx in the redefinition part to indicate where the arguments should be pasted. E.g., ARG1 places the first argument, ARG2 the second argument, etc...

4.2.143: redefinemacro(macro)(nrofargs)(redefinition)

Defines macro macro to expand to redefinition. Similar to def, but any pre-existing definition is overruled. Use ARGx in the redefinition part to indicate where the arguments should be pasted. E.g., ARG1 places the first argument, ARG2 the second argument, etc... This commands is actually calling redef().

4.2.144: ref(labelname)

Sets the reference for labelname. Use label to define a label.

4.2.145: report(title)(author)(date)

Starts a report type document. The top-level sectioning command in a report is chapter.

4.2.146: roffcmd(dotcmd)(sameline)(secondline)(thirdline)

Sets a t/nroff command that starts with a dot, on its own line. The arguments are: dotcmd - the command itself, e.g., .IP; sameline - when not empty, set following the dotcmd on the same line; secondline - when not empty, set on the next line; thirdline - when not empty, set on the third line. Note that dotcmd and thirdline are not further expanded by Yodl, the other arguments are.

4.2.147: row(contents)

The argument contents may contain a man-page alignment specification (only one specification can be entered per row), using setmanalign(). If omitted, the standard alignment is used. Furthermore it contains the contents of the elements of the row, using cell() or cells() macros. If cells() is used, setmanalign() should have been used too. In this macro call only the cell(), cells() and setmanalign() macros should be called. Any other macro call may produce unexpected results.

The row macro defines a counter XXcellnr that can be inspected and is incremented by predefined macros adding columns to a row. The counter is initially 0. Predefined macros adding columns to a row add the number of columns they add to the row inserting the contents of those columns. These macros rely on the correct value of this counter and any user-defined macros adding columns to table rows should correctly update XXcellnr. In html attrib macro applies to the <tr> tag.

4.2.148: rowline()

Sets a horizontal line over the full width of the table. See also columnline(). Use rowline() instead of a row() macro call to obtain a horizontal line-separator.

4.2.149: sc(text)

Set text in the tt (code) font, using small caps. In html the attrib macro is not supported, while the code section is embedded in a <div style="font-size: 90%"> section.

4.2.150: sect(title)

Starts a new section. In html attrib macro applies to the <h2> tag.

4.2.151: setaffilstring(name)

Defines name as the `affiliation information' string, by default AFFILIATION INFORMATION. E.g., after setaffilstring(AFILIACION), Yodl outputs this Spanish string to describe the affiliation information. Currently, it is relevant only for txt.

4.2.152: setauthorstring(name)

Defines name as the `Author information' string, by default AUTHOR INFORMATION. E.g., after setauthorstring(AUTOR), Yodl outputs this portuguese string to describe the author information. Currently, it is relevant only for txt.

4.2.153: setchapterstring(name)

Defines name as the `chapter' string, by default Chapter. E.g., after setchapterstring(Hoofdstuk), Yodl gains some measure of national language support for Dutch. Note that LaTeX support has its own NLS, this macro doesn't affect the way LaTeX output looks.

4.2.154: setdatestring(name)

Defines name as the `date information' string, by default DATE INFORMATION. E.g., after setdatestring(DATA), Yodl outputs this portuguese string to describe the date information. Currently, it is relevant only for txt.

4.2.155: setfigureext(name)

Defines the name as the `figure' extension. The extension should include the period, if used. E.g., use setfigureext(.ps) if the extensions of the figure-images should end in .ps

4.2.156: setfigurestring(name)

Defines the name as the `figure' text, used e.g. in figure captions. E.g., after setfigurestring(Figuur), Yodl uses Dutch names for figures.

4.2.157: sethtmlfigureext(ext)

Defines the filename extension for HTML figures, defaults to .jpg. Note that a leading dot must be included in ext. The new extension takes effect starting with the following usage of the figure macro. It is only active in html, but otherwise acts identically as setfigureext().

4.2.158: htmlmetacharset(meta-charset)

Adds <meta charset="meta-charset"> to the head of html documents. By default <meta charset="UTF-8"> is used. This macro is only active in the preamble and is only interpreted for html conversions.

4.2.159: setincludepath(name)

Sets a new value of the include-path specification used when opening .yo files. A warning is issued when the path specification does not include a .: element. Note that the local directory may still be an element of the new include path, as the local directory may be the only or the last element of the specification. For these eventualities the new path specification is not checked.

4.2.160: setlanguage(name)

Installs the headers specific to a language. The argument must be the name of a language, whose headers have been set by a corresponding languageXXX() call. For example: languagedutch(). The language macros should set the names of the headers of the following elements: table of contents, affiliation, author, chapter, date, figure, part and title

4.2.161: setlatexalign(alignment)

This macro defines the table alignment used when setting tables in LaTeX. Use as many l (for left-alignment), r (for right alignment), and c (for centered-alignment) characters as there are columns in the table. See also table()

4.2.162: setlatexfigureext(ext)

Defines the filename extension for encapsulated PostScript figures in LaTeX, defaults to .ps. The dot must be included in t new extension ext. The new extension takes effect starting with a following usage of the figure macro. It is only active in LaTeX, but otherwise acts identically as setfigureext().

4.2.163: setlatexverbchar(char)

Set the char used to quote LaTeX \verb sequences

4.2.164: setmanalign(alignment)

This macro defines the table alignment used when setting tables used in man-pages (see tbl(1)). Use as many l (for left-alignment), r (for right alignment), and c (for centered-alignment) characters as there are columns in the table. Furthermore, s can be used to indicate that the column to its left is combined (spans into) the current column. Use this specification when cells spanning multiple columns are defined. Each row in a table which must be convertable to a manpage may contain a separate setmanalign() call. Note that neither rowline nor columnline requires setmanalign() specifications, as these macros define rows by themselves. It is the responsibility of the author to ensure that the number of alignment characters is equal to the number of columns of the table.

4.2.165: setpartstring(name)

Defines name as the `part' string, by default Part. E.g., after setpartstring(Teil), Yodl identifies parts in the German way. Note that LaTeX output does its own national language support; this macro doesn't affect the way LaTeX output looks.

4.2.166: setrofftab(x)

Sets the character separating items in a line of input data of a roff (manpage) table. By default it is set to ~. This separator is used internally, and needs only be changed (into some unique character) if the table elements themselves contain ~ characters.

4.2.167: setrofftableoptions(optionlist)

Set the options for tbl table, default: none. Multiple options should be separated by blanks, by default no option is used. From the tbl(1) manpage, the following options are selected for consideration:

Note that starting with Yodl V 2.00 no default option is used anymore. See also setrofftab() which is used to set the character separating items in a line of input data.

4.2.168: settitlestring(name)

Defines name as the `title information' string, by default TITLE INFORMATION. E.g., after settitlestring(TITEL), Yodl outputs this Dutch string to describe the title information. Currently, it is relevant only for txt.

4.2.169: settocstring(name)

Defines name as the `table of contents' string, by default Table of Contents. E.g., after settocstring(Inhalt), Yodl identifies the table of contents in the German way. Note that LaTeX output does its own national language support; this macro doesn't affect the way LaTeX output looks.

4.2.170: sgmlcommand(cmd)

Writes cmd to the output when converting to sgml. The cmd is not further expanded by Yodl.

4.2.171: sgmltag(tag)(onoff)

Similar to htmltag, but used in the SGML converter.

4.2.172: sloppyhfuzz(points)

By default, LaTeX output contains commands that cause it to shut up about hboxes that are less than 4pt overfull. When sloppyhfuzz() appears before stating the document type, LaTeX complaints occur only if hboxes are overfull by more than points.

4.2.173: standardlayout()

Enables the default LaTeX layout. When this macro is absent, then the first lines of paragraphs are not indented and the space between paragraphs is somewhat larger. The standardlayout() directive must appear before stating the document type as article, report, etc..

4.2.174: startcenter()

DEPRECATED. Use center().

4.2.175: startdit()

DEPRECATED. Use description().

4.2.176: starteit()

DEPRECATED. Use enumeration().

4.2.177: startit()

DEPRECATED. Use itemization().

4.2.178: startmenu()

DEPRECATED. Use menu().

4.2.179: starttable()

DEPRECATED. Use table().

4.2.180: strong(contents)

In html and xml the contents are set between <strong> and </strong> tags. In html attrib macro applies to the <strong> tag.

4.2.181: subs(text)

Sets text in subscript in supporting formats. In html attrib macro applies to the <sub> tag.

4.2.182: subsect(title)

Starts a new subsection. Other sectioning commands are subsubsect and subsubsubsect. In html attrib macro applies to the <h3> tag.

4.2.183: subsubsect(title)

Starts a sub-subsection. In html attrib macro applies to the <h4> tag.

4.2.184: subsubsubsect(title)

Starts a sub-sub-sub-subsection. This level of sectioning is not numbered, in contrast to `higher' sectionings.

4.2.185: sups(text)

Sets text in superscript in supporting formats In html attrib macro applies to the <sup> tag.

4.2.186: table(nColumns)(alignment)(Contents)

The table()-macro defines a table. Its first argument specifies the number of columns in the table. Its second argument specifies the (standard) alignment of the information within the cells as used by LaTeX or man/ms. Use l for left-alignment, c for centered-alignment and r for right alignment. Its third argument defines the contents of the table which are the rows, each containing column-specifications and optionally man/ms alignment definitions for this row.

See also the specialized setmanalign() macro.

4.2.187: tcell(text)

Roff helper to set a table textcell, i.e., a paragraph. For LaTeX special table formatting p{} should be used.

4.2.188: telycommand(cmd)

Writes cmd to the output when converting to tely. The cmd is not further expanded by Yodl.

4.2.189: TeX()

The TeX symbol.

4.2.190: texinfocommand(cmd)

Writes cmd to the output when converting to texinfo. The cmd is not further expanded by Yodl.

4.2.191: tindex()

Generate an index entry for index t.

4.2.192: titleclearpage()

Forces the generation of a clearpage() directive following the title of a document. This is already the default in books and reports, but can be overruled with notitleclearpage(). When present, must appear in the preamble; i.e., before the document type is stated with article, book or report.

4.2.193: tocclearpage()

With the LaTeX convertor, a clearpage() directive if inserted, immediately following the document's table of contents. This is already the default in all but the article document type, but it can be overruled by notocclearpage(). When present, it must appear in the preamble; i.e., before the document type is stated with article, book or report. With other convertors than the LaTeX convertor, it is ignored.

4.2.194: tt(text)

Sets text in teletype font, and prevents it from being expanded. For unbalanced parameter lists, use CHAR(40) to get ( and CHAR(41) to get ). In html attrib macro applies to the <code> tag.

4.2.195: txtcommand(cmd)

Writes cmd to the output when converting to txt. The cmd is not further expanded by Yodl.

4.2.196: url(description)(locator)

In LaTeX documents the description is sent to the output. For HTML, a link is created with the descriptive text description and pointing to locator. The locator should be the full URL, including service; e.g, http://www.icce.rug.nl, but excluding the double quotes that are necessary in plain HTML. Use the macro link to create links within the same document. For other formats, something like description [locator] will appear. In html attrib macro applies to the <a> tag.

4.2.197: verb(text)

Sets text in verbatim mode: not subject to macro expansion or character table expansion. The text appears literally on the output, usually in a teletype font (that depends on the output format). This macro is for larger chunks, e.g., listings. For unbalanced parameter lists, use CHAR(40) to get ( and CHAR(41) to get ).

4.2.198: verbinclude(filename)

Reads filename and inserts it literally in the text, set in verbatim mode. not subject to macro expansion. The text appears literally on the output, usually in a teletype font (that depends on the output format). This macro is an alternative to verb(...), when the text to set in verbatim mode is better kept in a separate file.

NOTE: Starting with Yodl version 3.00.0 Yodl's default file inclusion behavior has changed. The current working directory no longer remains fixed at the directory in which Yodl is called, but is volatile, changing to the directory in which a yodl-file is located. This has the advantage that Yodl's file inclusion behavior now matches the way C's #include directive operates; it has the disadvantage that it may break some current documents. Conversion, however is simple but can be avoided altogether if Yodl's -L (--legacy-include) option is used. In html attrib macro applies to the <pre> tag.

4.2.199: verbpipe(command)(text)

Pipe text through command, but don't expand the output.

4.2.200: vindex()

Generate an index entry for index v.

4.2.201: whenhtml(text)

Sends text to the output when in HTML conversion mode. The text is further expanded if necessary.

4.2.202: whenlatex(text)

Sends text to the output when in LATEX conversion mode. The text is further expanded if necessary.

4.2.203: whenman(text)

Sends text to the output when in MAN conversion mode. The text is further expanded if necessary.

4.2.204: whenms(text)

Sends text to the output when in MS conversion mode. The text is further expanded if necessary.

4.2.205: whensgml(text)

Sends text to the output when in SGML conversion mode. The text is further expanded if necessary.

4.2.206: whentely(text)

Sends text to the output when in TELY conversion mode. The text is further expanded if necessary.

4.2.207: whentexinfo(text)

Sends text to the output when in TEXINFO conversion mode. The text is further expanded if necessary.

4.2.208: whentxt(text)

Sends text to the output when in TXT conversion mode. The text is further expanded if necessary.

4.2.209: whenxml(text)

Sends text to the output when in XML conversion mode. The text is further expanded if necessary.

4.2.210: xit(itemname)

Starts an xml menu item where the file to which the menu refers to is the argument of the xit() macro. It should be used as argument to xmlmenu(), which has a 3rd argument: the default path prefixed to the xit() elements.

This macro is only available within the xml-conversion mode. The argument must be a full filename, including .xml extension, if applicable.

No .xml extension indicates a subdirectory, containing another sub-menu.

4.2.211: xmlcommand(cmd)

Writes cmd to the output when converting to xml. The cmd is not further expanded by Yodl.

4.2.212: xmlmenu(order)(title)(menulist)

Starts an xmlmenu. Use itemization() to define the items. Only available in xml conversion. The menutitle appears in the menu as the heading of the menu. The menulist is a series of xit() elements, containing the name of the file to which the menu refers as their argument (including a final /). Prefixed to evert every xit()-element is the value of XXdocumentbase.

Order is the the `order' of the menu. If omitted, no order is defined.

4.2.213: xmlnewfile()

In XML output, starts a new file. All other formats are not affected. Note that you must take your own provisions to access the new file; say via links. Also, it's safe to start a new file just befoore opening a new section, since sections are accessible from the clickable table of contents. The XML converter normally only starts new files prior to a chapter definition.

4.2.214: xmlsetdocumentbase(name)

Defines name as the XML document base. No default. Only interpreted with xml conversions. It is used with the figure and xmlmenu macros.

4.2.215: xmltag(tag)(onoff)

Similar to htmltag, but used in the XML converter.

4.3: Conversion-related topics

4.3.1: Accents

4.3.2: Conversion-type specific literal commands

According to the format of the output file, the macro package defines a given symbol: The defined symbol can be tested in a document to determine the conversion type.

Furthermore, the package defines the following macros to send literal text (commands in the output format) to the output file:

The above commands can be used to quickly implement a macro. E.g., the macro package implements the it macro (which starts an item in a list) as:
    DEFINEMACRO(it)(0)(
        latexcommand(\item )
        htmlcommand(<li> )
        ....
    )
        
Depending on the output format, it() will lead to one of the above expansions.

The above described formatcommand() macros are implemented to send not further expanded strings (i.e., commands) to the output. The macro package also implements whenformat() macros to send any text, which is then subject to further expansion. These when...() macros are:

Once again, note that the difference between the whenformat() macros and the formatcommand() macros is, that the former will expand their argument while the latter will not. As an example, consider the following code fragment:
    You are now reading
        whenlatex(a LaTeX-generated 
                  footnote(LaTeX is a great 
                   document language!)
                  document)
        whenhtml(a HTML document via your
                 favorite browser)
        
The whenformat() macros are used here to make sure that the arguments to the macros are further expanded; this makes sure that the footnote macro in the whenlatex block gets treated as a footnote.

4.3.3: Figures

Figures in format-independent documents are a problem. You cannot avoid contact with the final format (HTML, LaTeX or whatever) if you want to include figures in a text.

Yodl approaches figures as follows:

The macro to include a figure is called, appropriately, figure. It takes three arguments: For example, you might draw a picture or scan a photo and put it in a .jpg file, for usage with HTML documents. The conversion to PostScript could be automated, e.g., using a Yodl macro:
    SYSTEM(xpmtoppm picture.xpm | pnmtops > picture.ps)
        
See section 3.1.67 for details about using the SYSTEM macro.

After this, you would be reasonably safe that the picture is available for both HTML and LaTeX output. The picture would be typeset in a figure using:

    figure(picture)
    (A photo of me.)
    (photo)
        
Note how the first argument, the filename, does not contain an extension. The third argument, which is a label, can be used in, e.g.,
    See figure ref(photo) for a photograph showing me.
        
Yodl has a several auxiliary macros, which are:

4.3.4: Fonts and sizes

Yodl's standard macro package supports the following macros to change fonts: Furthermore, the tt() macro will not expand macros occurring inside its argument. That means that you can safely write:
    In Yodl, you can use tt(includefile(somefile)) to include a file
    in your document.
        
The tt() macro should not be used for long listings of verbatim text; use verb() to set code samples etc..

Yodl's standard macro package has no commands to change font sizes, as the size is changed internally when appropriate (e.g., in section titles), nor is there a default macro to define other font-families.

4.3.5: Labels, links, references and URLs

References such as see ... for more information are very common in documents. Yodl supports three mechanisms to accomplish such references:
Labels and references:
Labels can be defined in a document as a placeholder for the last number used in a sectioning command. At other points in the document, references to those labels are used. The reference expands to the number, as in see section 1.3.

This mechanism is available in all output formats. Furthermore, the numeric reference (1.3 in the example of the previous paragraph) is in HTML a clickable reference that leads to the mentioned section.

Labels and links:
This mechanism can be used to set links in a document without using the number of a sectioning command, as in see the introduction for more information, with the introduction being a clickable link to some label.

This mechanism of course only leads to a clickable link in HTML: in other formats the text see the etc. is just typeset as is.

URLs:
Universal Resource Locators (URLs) are used to create links to other HTML documents or services, like HTML's <a href=..> method. The URLs of course only result in clickable links in HTML output; in other output formats only some descriptive text appears.
The above mechanism is implemented by the following macros: Here are some final thoughts about using labels and references:

4.3.6: Lists and environments

Yodl's default macros support the following lists and environments:

By default, the following lists are available:

Description lists:
A description list consists of a list of elements, where each element starts with a short (usually bold faced) description. The description list is generated by the description() macro. The elements of the list start with dit(). The dit() macro expects a short description of the item.

Example:

    A description list:
    description(
    dit(First this:) One item.
    dit(Then this:) Another item.
    )
        
Enumeraton lists:
An enumeration list consist of sequentially numbered elements. The list is generated by the enumeration() macro. Its elements start with the eit() macro.

Example:

    An enumerated list:    
    enumeration(    
    eit() One item.    
    eit() Another item.    
    )    
        
Itemized lists:
An itemized lists consists of indented items, usually preceded by a bullet.

An itemized list is produced by the itemization() macro, which has one argument: the items themselves. These items must start with it().

Example:

    An itemized list:
    itemization(
    it() One item.
    it() Another item.
    )
        
Specialized environments are:
Centered text:
Centering text may not be available in all output formats. When unavailable, the text is typeset left-flushed.

Centered text is generated by the center() macro. Line brakes within centered text may be obtained using the nl() macro.

Example:

    center(
    Centered text. nl()    
    Another line of centered text.
    )    
        
Verbatim text:
Verbatim text appears on the output exactly in the same layout as it is in the input file. Typesetting text in verbatim mode is useful for, e.g., source files. Depending on the output format, the font of the verbatim text is changed to a teletype font.

The text must either be inside the verb() macro. For example:

    verb(
        This is totally verbatim text.
        It is not further processed by Yodl.
    )
        
The verbatim text is of course not subject to macro expansion by Yodl. Note, however, that SUBST transformations will take place, as these substitutions take place during the lexical scanning phase of Yodl's input, and are not part of the macro-expansion process. See also section 3.1.65.

Furthermore, if a character translation table has been defined, the argument of the verb() macro will also be subject to character table transformations. By temporarily suppressing the active character table (see section PUSHCHARTABLE 3.1.56) this can be prevented.

Quotations:
Quotations are usually indented with respect to their surrounding text. It is for the author to decided whether the quoted text should be typeset normally, or that it should be bold-faced or emphasized. To insert a quotation use the quote() macro:
    Shakespeare once wrote:
    quote(
        ``To be or not to be, that's the question''
    )
        

4.3.6.1: National language support

Yodl includes rudimentary national language support (NLS), in the sense that it allows you to redefine the strings identifying chapters or parts, or the strings identifying figures. E.g., a command chapter(Introduction) will by default result in the text Chapter 1: Introduction.

Using the setchapterstring(text) macro, the Chapter text can be redefined. E.g., in a Dutch text you might put

    setchapterstring(Hoofdstuk)
        
somewhere near the beginning of your document. Similar to setchapterstring, a macro getchapterstring exists returning the text identifying chapters. (Internally, getchapterstring is of course used to actually set the text). To redefine the text to identify a part, use setpartstring(text); to redefine the text to identify a figure, use setfigurestring(text).

The set....string macros only influence how Yodl names chapters or parts in HTML, man, ms or txt output. LaTeX output is not affected, since LaTeX does its own NLS. Usually, NLS is present for LaTeX as a `style file' named, e.g., dutch.sty. Therefore, if you want a Dutch document, you need to:

The setlanguage() macro expects one argument: the name of the language that is used. See section 4.2 for details about this macro. The setlanguage() macro redefines the language-dependent section (and other) headers, and depends on the availability of the corresponding language<name>() macro, where <name> is the name of the language (by convention <name> states the english name of the language). Currently, languagedutch(), languageenglish() (the default), and languageportugese() are available. It's easy to expand this little set with macros for other languages. The setlanguage() macro merely requires the specification of the language. For example:
    setlanguage(english)
        
This macro installs the following defaults (corresponding translations should be defined for other languages):
    settocstring(Table of Contents)
    setaffilstring(Affiliation)
    setauthorstring(Author)
    setchapterstring(Chapter)
    setdatestring(Date)
    setfigurestring(Figure)
    setpartstring(Part)
    settitlestring(Title)
        

4.3.6.2: Pagebreaks after the title and table of contents

Yodl inserts page-breaks in a limited number of cases: So, when a document has both title information and a table of contents then whatever follows next will normally be starting on a separate page. Furthermore, if the document is a book or a report, the title and table of contents will also be separated by a pagebreak.

This behavior can be modified using the (no)titleclearpage() and (no)tocclearpage() directives, further described in section 4.3.8.

4.3.7: Sectioning

This section describes the sectioning commands for articles, reports, books and for plainhtml. The document type manpage defines its own sectioning commands (cf. section 4.1.2: These macros generate entries in the table of contents and use numbering, which means that each section is prefixed with a number (1, 1.1, 1.2, and so on). The macros are also available with an n prefix (npart, nchapter, nsect etc.) which generate neither entries in the table of contents nor numbers. The n-versions can be used in, e.g., an article where the sectioning commands should show their captions, but not any numbers generated by default.

Sectioning should always start at the top level sections of the available document: chapter for reports, sect for articles, etc.. If you start a document with a lower sectioning command (e.g., when you start an article with a subsect), the numbering of sections may go haywire. The only exception to this rule is the part of a book document: parts are optional, in books, chapters may be the top sectioning commands. Summarizing, books or reports should start with chapter. Articles should start with sections.

The sectioning commands have a further function: when label statements appear after the sectioning command, then a label name is used as a placeholder for the last generated number. This is further described in section 4.3.5.

4.3.8: Typesetting modifiers

This section lists various macros that can be used to modify the looks of your document. When used, these macros must appear before stating the document type with article, report, book, manpage or plainhtml. Note again: these modifiers must appear before the document type definition.

4.3.9: Miscellaneous commands

The following is a list of commands that don't fall in one of the above categories.

4.4: Locations of the macros

The files defining the macros are by default installed to the directory /usr/local/share/yodl during Yodl's installation process (Note that this diverts from an earlier default: /usr/local/lib/yodl; furthermore, some systems or some distributions may use other locations).

The files in this directory are organized as follows:

The (binary) Yodl package contains the following programs and support files: The source Yodl package contains all the sources files, installation guides, change-logs etc., that are required to compile the binary programs. Those who want to compile Yodl themselves, must have a C compiler (preferably the Gnu C compiler) available, and preferably the icmake program maintenance utility. Basic support for make is provided as well.