.TH "Yodl macros" "7" "1996\-2021" "yodl_4\&.03\&.03" "Your Own Document Language" .PP .SH "NAME" yodlmacros \- Macros for the Yodl converters .PP .SH "SYNOPSIS" This manual page lists the standard macros of the Yodl package\&. .PP .SH "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\&. .PP The following list shows all macros of the package in alphabetical order\&. .PP .IP "`abstract(text)\(cq\&" Defines an abstract for an article or report type of document\&. Abstracts are not implemented for books or manpages\&. Must appear \fBbefore\fP starting the document using the `article\(cq\& or `report\(cq\& macro\&. .IP .IP "`addntosymbol(symbol)(n)(text)\(cq\&" Adds `text\(cq\& `n\(cq\& times to `symbol\(cq\&\&. The value `n\(cq\& may also be the name of a defined counter (which is not modified)\&. .IP .IP "`affiliation(site)\(cq\&" Defines an affiliation, to appear in the document titlepage below the author field\&. Must appear \fBbefore\fP starting the document with `article\(cq\&, `report\(cq\& or `book\(cq\&\&. 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=\(dq\&affiliation\(dq\&\(cq\&\&. .IP .IP "`AfourEnlarged()\(cq\&" 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\&. .IP .IP "`appendix()\(cq\&" Starts appendices .IP .IP "`article(title)(author)(date)\(cq\&" Starts an article\&. The top\-level sectioning command is `(n)sect\(cq\&\&. 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=\(dq\&title\(dq\&\(cq\&, the author `id=\(dq\&author\(dq\&\(cq\&, and the date `id=\(dq\&date\(dq\&\(cq\&\&.) .IP .IP "`attrib(text)\(cq\&" In html, pushes `text\(cq\& as an attribute for the next html tag supporting `attrib\(cq\&\&. E\&.g, to set a blue color and 30 pixel left\-hand side margin for a section use .nf attrib(style=\(dq\&color:blue;margin\-left:30px;\(dq\&)\e sect(Section name) .fi This results in the html markup .br .nf

Section name

.fi This macro is only effective with html conversions\&. It is applied in a stack\-wise fashion: when multiple `attrib\(cq\& calls are used, then the topmost attrib\-string is added to the first macro calling the `attribinsert\(cq\& macro, with subsequent macros using subsequent elements on the attrib\-stack\&. .IP Commonly used attributes are `id=\(dq\&idname\(dq\&\(cq\&, expecting a `#idname\(cq\& CSS label in either internal or external CSS specifications, or `style=\(dq\&spec\(dq\&\(cq\& (as shown in the example)\&. .IP Example: when using .nf attrib(width = \(dq\&100\(dq\& height = \(dq\&100\(dq\&) attrib(id = \(dq\&#fig\(dq\&) figure(imgfile)(Caption)(IMG) .fi then the `#id\(cq\& attribute is applied to `
\(cq\&, and the `width\(cq\& and `height\(cq\& attributes are applied to `\(cq\&, which html markup is inserted by the `figure\(cq\& macro\&. .IP The `attrib\(cq\& 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): .IP `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\(cq\&\&. .IP .IP "`attribclear()\(cq\&" Removes any existing contents from the attrib\-stack\&. This macro is only active when converting to html .IP .IP "`attribinsert()\(cq\&" 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\&. .IP .IP "`bf(text)\(cq\&" Sets `text\(cq\& in boldface\&. .IP .IP "`bind(text)\(cq\&" Generate a binding character (non\-breaking space) after text\&. .IP .IP "`book(title)(author)(date)\(cq\&" Starts a book document\&. The top\-level sectioning command is `(n)chapter\(cq\&, `(n)part\(cq\& 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=\(dq\&title\(dq\&\(cq\&, the author `id=\(dq\&author\(dq\&\(cq\&, and the date `id=\(dq\&date\(dq\&\(cq\&\&.) .IP .IP "`cell(contents)\(cq\&" Sets a table cell, i\&.e\&., one element in a row\&. With the man/ms converters multiple blanks between `cell()\(cq\& macro calls are merged into a single blank character\&. .IP Instead of using `cell\(cq\& in `table\(cq\&, consider using `tc\(cq\& in `tbl\(cq\&\&. .IP .IP "`cells(nColumns)(contents)\(cq\&" Set a table cell over `nColumns\(cq\& columns\&. With LaTeX and xml the information in the combined cells is centered\&. .IP With man/ms conversions the `cells()\(cq\& macro simply calls the `cell()\(cq\& macro, but here the `setmanalign()\(cq\& macro can be used to determine the alignment of multiple cells\&. .IP With html the macro `attrib\(cq\& can be used, but when it contains a `style\(cq\& specification the macro\(cq\&s default `style=\(dq\&text\-align: center\(dq\&\(cq\& is ignored (but it can optionally be specified using the `attrib\(cq\& macro)\&. .IP Instead of using `cells\(cq\& in `table\(cq\&, consider using `tnc\(cq\& in `tbl\(cq\&\&. .IP .IP "`cellsline(from)(count)\(cq\&" Sets a horizontal line starting at column number `from\(cq\& over `count\(cq\& columns in a row\&. If `from\(cq\& is less then the number of columns already added to a row then it is ignored\&. This macro must be embedded in a `row\(cq\& macro defining a table row\&. To put a line across the table\(cq\&s full width use `rowline\(cq\&\&. To set horizontal lines across columns 1 until 2 and columns 4 until 5 table of a table use: .nf row(cellsline(1)(2)cellsline(4)(2)) .fi Combining `cellsline\(cq\& and `cell\(cq\& or `cells\(cq\& calls in one row produces undefined results\&. .IP Instead of using `cellsline\(cq\& in `table\(cq\&, consider using `tline\(cq\& in `tbl\(cq\&\&. .IP .IP "`center(text)\(cq\&" Centers `text\(cq\&\&. Use `nl()\(cq\& in the text to break lines\&. In html the `attrib\(cq\& macro is not supported, but a division (`div\(cq\&) with style definition `text\-align: center\(cq\& is used\&. To center a table in html use the `tableatt\(cq\& macro\&. If a `table\(cq\& or `tableatt\(cq\& macro is used inside a `center\(cq\& macro then the contents of columns are column\-wise centered\&. .IP Inside a `center(\&.\&.\&.)\(cq\& context the counter `XXcenter\(cq\& is unequal 0\&. .IP .IP "`chapter(title)\(cq\&" Starts a new chapter in books or reports\&. .IP .IP "`cindex()\(cq\&" Generate an index entry for LaTex() or texinfo c\-indices\&. Its argument is the index entry\&. See also the `[fptv]index\(cq\& macro\&. .IP .IP "`cite(text)\(cq\&" Sets `text\(cq\& as a citation or quotation .IP .IP "`clearpage()\(cq\&" Starts a new page, when the output format permits\&. Under HTML a horizontal line is drawn\&. .IP .IP "`code(text)\(cq\&" Sets `text\(cq\& in code font, and prevents it from being expanded\&. For unbalanced parameter lists, use `CHAR(40)\(cq\& to get `(\(cq\& and `CHAR(41)\(cq\& to get `)\(cq\&\&. .IP .IP "`columnline(from)(through)\(cq\&" Sets a horizontal line over some columns in a row\&. Note that `columnline\(cq\& defines a row by itself, consisting of just a horizontal line spanning some of its columns, rather than the table\(cq\&s full width, like `rowline\(cq\&\&. The two arguments represent column numbers\&. It is the responsibility of the author to make sure that the `from\(cq\& and `through\(cq\& values are sensible\&. I\&.e\&., .nf 1 <= from <= through <= ncolumns .fi To set a horizontal line in just one column select `through\(cq\& equal to `from\(cq\&\&. .IP \fBNote\fP: this macro cannot be used if multiple lines must be set in one row\&. In those cases the macros `tline, tskip\(cq\&, and `tendline\(cq\& should be used\&. .IP Instead of using `columnline\(cq\& in `table\(cq\&, consider using `tline\(cq\& in `tbl\(cq\&\&. .IP .IP "`dashes()\(cq\&" Inserts two dashes in teletype font, and prevents them from being expanded\&. .IP In html the `attrib\(cq\& macro is recognized by the `\(cq\& tag that is used to embed the two dashes\&. .IP .IP "`def(macroname)(nrofargs)(redefinition)\(cq\&" Defines `macroname\(cq\& as a macro, having `nrofargs\(cq\& arguments, and expanding to `redefinition\(cq\&\&. This macro is a shorthand for `DEFINEMACRO\(cq\&\&. An error occurs when the macro is already defined\&. Use `redef()\(cq\& to unconditionally define or redefine a macro\&. .IP .IP "`description(list)\(cq\&" Sets `list\(cq\& as a description list\&. Use `dit(item)\(cq\& to indicate items in the list\&. .IP .IP "`dit(itemname)\(cq\&" Starts an item named `itemname\(cq\& in a description list\&. The list should be used in `description\(cq\& macros\&. With `html\(cq\& conversions the contents of a description item is separated from the item itself\&. The `dit\(cq\& macro only defines the item, and not the description itself\&. This macro sets the item in bold\-face (`strong\(cq\& font)\&. The macro `itdesc\(cq\&, available since Yodl 3\&.05, can be used to defines an item \fIand\fP its description, using its suggested format (i\&.e\&., indenting the description relative to the item)\&. .IP .IP "`eit()\(cq\&" Indicates an item in an enumerated list\&. The `eit\(cq\& macro should be used as an argument in `enumeration\(cq\& macros\&. .IP .IP "`ellipsis()\(cq\&" Sets ellipsis (\&.\&.\&.)\&. .IP .IP "`em(text)\(cq\&" Sets `text\(cq\& as emphasized, usually italics\&. .IP .IP "`email(address)\(cq\&" In HTML, this macro sets the `address\(cq\& in a `\(cq\& locator\&. In other output formats, the `address\(cq\& is sent to the output\&. The `email\(cq\& macro is a special case of `url\(cq\&\&. .IP .IP "`enumeration(list)\(cq\&" `enumeration()\(cq\& starts an enumerated list\&. Use `eit()\(cq\& in the list to indicate items in the list\&. .IP .IP "`euro()\(cq\&" 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)\&. .IP .IP "`evalsymbol(symbol)(expression)\(cq\&" Symbol \fIsymbol\fP receives the value resulting from evaluating \fIexpression\fP\&. E\&.g\&., if `sym\(cq\& is a defined symbol, then .nf evalsymbol(sym)(SUBSTR(hello world)(3)(2)) .fi assigns the value `lo\(cq\& to `sym\(cq\&\&. .IP .IP "`fig(label)\(cq\&" This macro is a shorthand for `figure ref(label)\(cq\& and just makes the typing shorter, as in `see fig(schematic) for \&.\&.\(cq\& See `getfigurestring()\(cq\& and `setfigurestring()\(cq\& for the `figure\(cq\& text\&. .IP .IP "`figure(file)(caption)(label)\(cq\&" Sets the picture in `file\(cq\& as a figure in the current document, using the descriptive text `caption\(cq\&\&. The `label\(cq\& is defined as a placeholder for the figure number and can be used in a corresponding `ref\(cq\& statement\&. Note that the `file\(cq\& must be the filename without extension: By default, Yodl will supply `\&.gif\(cq\& when in HTML mode, or `\&.ps\(cq\& when in LaTeX mode\&. Figures in other modes may not (yet) haven been implemented\&. .IP 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 `
\(cq\& html\-markup; the string pushed next defines the attributes for its `\(cq\& html\-markup; the string pushed last defines the attributes for its `
\(cq\& html\-markup\&. The `figure\(cq\& macro\(cq\&s html output is organized like this: .nf
\&.\&.\&.
.fi Starting with Yodl 3\&.07\&.00 no `alt=\(dq\&Figure # is shown here\&.\&.\&.\(dq\&\(cq\& attribute is defined anymore for the `img\(cq\& markup: an `alt\(cq\&\-attribute can easily be defined at the last attrib\-call, using `getfigurestring()\(cq\& to obtain `Figure\(cq\& or its language\-specific translation, and `COUNTERVALUE(XXfigurecounter)\(cq\& to obtain the order\-number of the figure shown in the next `figure\(cq\&\-macro call\&. .IP .IP "`file(text)\(cq\&" Sets `text\(cq\& as filename, usually boldface\&. In html `attrib\(cq\& macro applies to the `\(cq\& tag\&. .IP .IP "`findex()\(cq\&" Generate an index entry for LaTex() or texinfo f\-indices\&. Its argument is the index entry\&. See also the `[cptv]index\(cq\& macro\&. .IP .IP "`footnote(text)\(cq\&" Sets `text\(cq\& as a footnote, or between parentheses when the output format does not allow footnotes\&. .IP .IP "`gagmacrowarning(name name \&.\&.\&.)\(cq\&" Prevents the `yodl\(cq\& program from printing \fIcannot expand possible user macro\fP\&. E\&.g\&., if you have in your document `the file(s) are \&.\&.\(cq\& then you might want to put before that: `gagmacrowarning(file)\(cq\&\&. Calls `NOUSERMACRO\(cq\&\&. .IP .IP "`getaffilstring()\(cq\&" Expands to the string that defines the name of \fIAffiliation Information\fP, by default \fIAFFILIATION INFORMATION\fP\&. Can be redefined for national language support by `setaffilstring()\(cq\&\&. Currently, it is relevant only for txt\&. .IP .IP "`getauthorstring()\(cq\&" Expands to the string that defines the name of \fIAuthor Information\fP, by default \fIAUTHOR INFORMATION\fP\&. Can be redefined for national language support by `setauthorstring()\(cq\&\&. Currently, it is relevant only for txt\&. .IP .IP "`getchapterstring()\(cq\&" Expands to the string that defines a `chapter\(cq\& entry, by default \fIChapter\fP\&. Can be redefined for national language support by `setchapterstring()\(cq\&\&. .IP .IP "`getdatestring()\(cq\&" Expands to the string that defines the name of \fIDate Information\fP, by default \fIDATE INFORMATION\fP\&. Can be redefined for national language support by `setdatestring()\(cq\&\&. Currently, it is relevant only for txt\&. .IP .IP "`getfigurestring()\(cq\&" Returns the string that defines a `figure\(cq\& text, in captions or in the `fig()\(cq\& macro\&. The string can be redefined using the `setfiguretext()\(cq\& macro\&. .IP .IP "`getpartstring()\(cq\&" Expands to the string that defines a `part\(cq\& entry, by default \fIPart\fP\&. Can be redefined for national language support by `setpartstring()\(cq\&\&. .IP .IP "`gettitlestring()\(cq\&" Expands to the string that defines the name of \fITitle Information\fP, by default \fITITLE INFORMATION\fP\&. Can be redefined for national language support by `settitlestring()\(cq\&\&. Currently, it is relevant only for txt\&. .IP .IP "`gettocstring()\(cq\&" Expands to the string that defines the name of the table of contents, by default \fITable of Contents\fP\&. Can be redefined for national language support by `settocstring()\(cq\&\&. .IP .IP "`htmlcommand(cmd)\(cq\&" Writes `cmd\(cq\& to the output when converting to html\&. The `cmd\(cq\& is not further expanded by Yodl\&. .IP .IP "`htmlheadfile(file)\(cq\&" Adds the contents of `file\(cq\& to the `head\(cq\& 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 `