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. `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

Section name

This macro is only effective with html conversions. It is applied in a stack-wise fashion: when multiple `attrib' calls are used, then the topmost attrib-string is added to the first macro calling the `attribinsert' macro, with subsequent macros using subsequent elements on the attrib-stack. 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). Example: when using attrib(width = "100" height = "100") attrib(id = "#fig") figure(imgfile)(Caption)(IMG) then the `#id' attribute is applied to `
', and the `width' and `height' attributes are applied to `', which html markup is inserted by the `figure' macro. The `attrib' macro is supported by the following predefined macros (between parentheses the number of attribute strings that are inserted by these macros; if only 1 attribute string is inserted no number is shown): `bf cell cells center chapter code dashes dit em figure(3) 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 tableatt tbl tac tc tnac tnc tr tt ttbegin url verb verborg verbinclude'. `attribclear()' Removes any existing contents from the attrib-stack. This macro is only active when converting to html `attribinsert()' In html, if the attrib-stack is not empty, inserts the value on top of the attrib-stack and then pops the topmost value. If the attrib-stack is empty, nothing happens. `bf(text)' Sets `text' in boldface. `bind(text)' Generate a binding character (non-breaking space) after text. `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, 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"'.) `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. Instead of using `cell' in `table', consider using `tc' in `tbl'. `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). Instead of using `cells' in `table', consider using `tnc' in `tbl'. `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. Instead of using `cellsline' in `table', consider using `tline' in `tbl'. `center(text)' Centers `text'. Use `nl()' in the text to break lines. In html the `attrib' macro is not supported, but a division (`div') with style definition `text-align: center' is used. To center a table in html use the `tableatt' macro. If a `table' or `tableatt' macro is used inside a `center' macro then the contents of columns are column-wise centered. Inside a `center(...)' context the counter `XXcenter' is unequal 0. `chapter(title)' Starts a new chapter in books or reports. `cindex()' Generate an index entry for LaTex() or texinfo c-indices. Its argument is the index entry. See also the `[fptv]index' macro. `cite(text)' Sets `text' as a citation or quotation `clearpage()' Starts a new page, when the output format permits. Under HTML a horizontal line is drawn. `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 `)'. `columnline(from)(through)' 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 `through' values are sensible. I.e., 1 <= from <= through <= ncolumns To set a horizontal line in just one column select `through' equal to `from'. Note: this macro cannot be used if multiple lines must be set in one row. In those cases the macros `tline, tskip', and `tendline' should be used. Instead of using `columnline' in `table', consider using `tline' in `tbl'. `dashes()' Inserts two dashes in teletype font, and prevents them from being expanded. In html the `attrib' macro is recognized by the `' 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 `