YODLMACROS(7)

✨ YODLMACROS ✨

part of the Yodl macros(7) manual, section 7 of the Your Own Document Language pages πŸ’–


🌸 NAME 🌸

yodlmacros β€” Macros for the Yodl converters


πŸ¦‹ SYNOPSIS πŸ¦‹

Bestie, this manual page lists the standard macros of the Yodl package. That's it, that's the whole synopsis. Short queen energy.


πŸ’– DESCRIPTION πŸ’–

Okay so. The list below shows the macros that the Yodl converters define, and which you can use in your Yodl documents. For the full tea, go read the Yodl user guide that ships with the Yodl package.

And the list below shows all the macros of the package, in alphabetical order. Not skipping a single one, no cap. πŸ‘‘

  • abstract(text) β€” Defines an abstract for an article or report type of document. Abstracts are not implemented for books or manpages. Has to appear before you start 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 β€” and that counter does not get modified, just saying.
  • affiliation(site) β€” Defines an affiliation, which shows up in the document titlepage below the author field. Must appear before starting the document with article, report or book. The affiliation only gets printed when the author field is not empty (so, no author, no affiliation, rude but okay). 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. Only available for LaTeX conversions. Also this macro is somewhat obsolete β€” instead, using PageEnlarged is advised.
  • appendix() β€” Starts appendices.
  • article(title)(author)(date) β€” Starts an article. The top-level sectioning command is (n)sect. In HTML conversions only one output file is written, while the way the headings are displayed can be tuned using CSS id selector specifications: the title has id="title", the author id="author", and the date id="date".
  • attrib(text) β€” In html, pushes text as an attribute for the next html tag supporting attrib. E.g, to set a blue color and 30 pixel left-hand side margin for a section use
attrib(style="color:blue;margin-left:30px;")\
sect(Section name)

This results in the html markup

<h1 style="color:blue;margin-left:30px;">Section name</h1>

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 <figure>, and the width and height attributes are applied to <img>, 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. Peaceful.
  • bf(text) β€” Sets text in boldface.
  • bind(text) β€” Generate a binding character (non-breaking space) after text. Keeping those words glued together fr fr.
  • 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. iykyk

  • 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. Do not do this bestie, it's giving chaos.

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. Noted πŸ“

  • 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. Different format, different vibe.
  • 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 <code> 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 <a href="mailto=.."> 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.

okay bestie that's part 1, more coming, don't go anywhere 🫢

euro() πŸ’Ά

Okay so this one sets the euro currency symbol in latex, html, (and possibly sgml and xml too, no promises bestie). But in all other conversions, it just writes EUR, which is the official textual abbreviation (cf. http://ec.europa.eu/euro/entry.html). Heads up tho: LaTeX might need latexpackage()(eurosym). Slay. πŸ’…


evalsymbol(symbol)(expression)

Symbol symbol gets handed the value that comes out of evaluating expression. So like, if sym is a defined symbol, then:

evalsymbol(sym)(SUBSTR(hello world)(3)(2))

assigns the value lo to sym. Obsessed with how tidy that is. ✨


fig(label)

This macro is literally just shorthand for figure ref(label) β€” it exists to make your typing shorter, as in see fig(schematic) for ... For the actual figure text, go peek at getfigurestring() and setfigurestring(). πŸŽ€


figure(file)(caption)(label)

Sets the picture living in file as a figure in the current document, using the descriptive text caption. The label gets defined as a placeholder for the figure number, and you can use it in a corresponding ref statement. πŸ–ΌοΈ

Note that 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) have been implemented. (iykyk 😭)

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 <figcaption> html-markup; the string pushed next defines the attributes for its <img> html-markup; the string pushed last defines the attributes for its <figure> html-markup. The figure macro's html output is organized like this:

<figure -attrib-string pushed last (if any)>
    <img ... -attrib-string pushed last but one>
    <figcaption -attrib-string pushed 2nd to last>
        ...
    </figcaption>
</figure>

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 in boldface. In html, the attrib macro applies to the <strong> tag. 🌈


findex()

Generates 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, if the output format refuses to do footnotes, it just gets shoved between parentheses instead. πŸ™ˆ


gagmacrowarning(name name ...)

Stops the yodl program from printing cannot expand possible user macro. E.g., if you've got the file(s) are .. somewhere in your document, you might wanna put this right before it: gagmacrowarning(file). Calls NOUSERMACRO. Petty but effective πŸ’…


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. You can redefine that string 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. And no, Yodl does not further expand the cmd. It goes in exactly as-is, bestie. πŸ’…


htmlheadfile(file)

Adds the contents of file to the head section of an HTML document. The contents of the 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 be specified once, and is only interpreted for html conversions.

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 used soooo frequently, it got its own dedicated macro: htmlstylesheet. And when big bodies of html-text must be added to html documents, you should reach for the htmlheadfile macro instead. ✨

This macro is only active in the preamble and is only interpreted for html conversions.

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 before 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. 🌈


htmlstyle(tag)(definition)

Adds a <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 that 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. And psst β€” 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. 🧚


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.

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 just 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)

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). You can use this macro to prevent outputting multiple blank lines. ✨


includefile(file)

Includes file. The default extension .yo is supplied if necessary. πŸ“

Okay so β€” big glow-up alert πŸ¦‹ β€” since Yodl version 3.00.0, Yodl's default file inclusion behavior changed. The current working directory no longer stays parked in the directory where you called Yodl; it's volatile now, and it moves to the directory where a yodl-file lives. Why is that iconic? Because Yodl's file inclusion now matches how C's #include directive works. ✨ If you want the OG behavior back, just use Yodl's -L (--legacy-include) option. No cap.

  • includeverbatim(file) β€” Drops file straight into the output. No processing at all, so file better already be in preformatted form, like this:
whenhtml(includeverbatim(foo.html))

🫢

  • it() β€” Marks an item in an itemized list. The items in it macros are arguments of itemization macros. That's the whole vibe.
  • itdesc(itemname)(contents) β€” Kicks off an item and its description in a description list. The name is itemname, and the contents of the item is whatever contents says. And where does itemname come from? You define it with the dit macro. πŸ’…
    • With html conversions, the contents get wrapped in <dd> and </dd> tags, so the contents end up indented relative to the itemname. If the attrib macro is in play, it gets applied to the itemname (the dt-tags).
    • With other conversions, the contents get quoted (like you did quote(contents)).
  • itemization(list) β€” Sets list as an itemized list. Use it() to mark the items in the list. Easy.
  • kindex() β€” Generates an index entry for LaTex() or texinfo k-indices. Its argument is the index entry. Also go look at the [cfptv]vindex macro. πŸ‘‘
  • label(labelname) β€” Defines labelname as an anchor for a link command, or so it can stand in for the last numbering of a section or figure in a ref command.
  • langle() β€” The character <. That's it, that's the macro. πŸŽ€
  • languagedutch() β€” Defines the Dutch-language specific headers. Activate this macro via setlanguage(dutch).
  • languageenglish() β€” Defines the English-language specific headers. Activate this macro via setlanguage(english).
  • languageportugese() β€” Defines the Portugese-language specific headers. Activate this macro via setlanguage(portugese).
  • LaTeX() β€” The LaTeX symbol. πŸ’–
  • latexaddlayout(arg) β€” This one exists so you can add Yodl-interpreted text into your own LaTeX layout commands. The command terminates with an end-of-line. Also peek at the latexlayoutcmds() macro. ✨
  • latexcommand(cmd) β€” Writes cmd plus a white space into the output when converting to LaTeX. Heads up: cmd is not further expanded by Yodl.
  • latexdocumentclass(class) β€” Forces the LaTeX \documentclass{...} setting to class. Normally that class is defined by the macros article, report or book. This macro is your escape route in case you need to specify your own document class for LaTeX. It's a modifier, so it must appear before the article, report or book macros. Don't fumble the order bestie 😭
  • latexlayoutcmds(NOTRANSs) β€” Provided in case you want to put your own LaTeX layout commands into LaTeX output. The NOTRANSs get pasted right after the \documentclass stanza. The default is, of course, no local LaTeX commands. Note: this macro does not overrule my favorite LaTeX layout. Use nosloppyhfuzz() and standardlayout() to disable my favorite LaTeX layout. πŸ™ˆ
  • latexoptions(options) β€” Set latex options: documentclass[options]. This command must appear before the document type is stated by article, report, etc..
  • latexpackage(options)(name) β€” Includes latex package(s). A useful package is, e.g., epsf. This command must appear before the document type is stated by article, report, etc..
  • lchapter(label)(title) β€” Starts a new chapter in books or reports, and sets a label at the beginning of the chapter.
  • 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's based on the letter.cls document class definition. This macro is available for LaTeX only. Preamble command suggestions:
    • latexoptions(11pt)
    • PageEnlarged(2cm)(4cm)(2cm)(4cm)
    • letterreplyto(name)(address)(postalcode/city)
    • letterfootitem(phone)(number), maybe e-mail too.
    • letteradmin(yourdate)(yourref)
    • letterto(addressitem). Use a separate letterto() macro call for each new line of the address.
  • letteraddenda(type)(value) β€” Adds an addendum at the end of a letter. type should be bijlagen, cc or ps. πŸ“
  • letteradmin(yourdate)(yourref) β€” Puts yourletterfrom and yourreference elements in the letter. If left empty, two dashes are inserted.
  • letterfootitem(name)(value) β€” Puts a footer at the bottom of letter-pages. Up to three will usually fit. LaTeX only. πŸ’œ
  • letterreplyto(name)(address)(zip city) β€” Defines the reply to address in LaTeX or txt-letters.
  • letterto(element) β€” Adds element as an additional line to the address in LaTeX letters.
  • link(description)(labelname) β€” In HTML output this creates a clickable link with the text description that points to wherever labelname is defined using the label macro, and the attrib macro applies to the <a> tag. Using link is similar to url, except that a hyperlink gets set pointing to a location in the same document. For output formats other than HTML, only the description shows up. πŸ¦‹
  • lref(description)(labelname) β€” This macro is a combo of the ref and link macros. In HTML output a clickable link with the text description and the label value is created, pointing to wherever labelname is defined using the label macro, and the attrib macro applies to the <a> tag. For output formats other than HTML, only the description and the label value appear.
  • lsect(label)(title) β€” Starts a new section, setting a label at the beginning of the section. In html the attrib macro applies to the <h2> tag.
  • lsubsect(label)(title) β€” Starts a new subsection. Other sectioning commands are subsubsect and subsubsubsect. A label is added just before the subsection. In html the attrib macro applies to the <h3> tag.
  • lsubsubsect(label)(title) β€” Starts a sub-subsection, and a label is added just before the section. In html the attrib macro applies to the <h4> tag.
  • lsubsubsubsect(label)(title) β€” Starts a sub-sub-sub section. This level of sectioning is not numbered, unlike higher sectionings. A label is added just before the subsubsubection. (Yes, that spelling. We keep the facts exactly as they are, bestie πŸ’…)
  • lurl(locator) β€” An url described by its Locator. For small urls with readable addresses. πŸŽ€
  • mailto(address) β€” Defines the default mailto address for HTML output. Must appear before the document type is stated by article, report, etc..
  • makeindex() β€” Make index for latex. Slay. πŸ‘‘
  • mancommand(cmd) β€” Writes cmd to the output when converting to man. The cmd is not further expanded by Yodl.
  • manpage(title)(section)(date)(source)(manual) β€” Starts a manual page document. The section argument must be a number, stating which section the manpage belongs to. The most used ones 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, and the last section must be the manpageauthor. The standard manpage for section 1 contains the following sections, in this exact 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. YODL manual pages can be converted to groff, html, or plain ascii text formats. ✨
  • manpageauthor() β€” Starts the AUTHOR entry in a manpage document. Must be the last section of a manpage.
  • manpagebugs() β€” Starts the BUGS entry in a manpage document.
  • manpagedescription() β€” Starts the DESCRIPTION entry in a manpage document.
  • manpagediagnostics() β€” Starts the DIAGNOSTICS entry in a manpage document.
  • manpagefiles() β€” Starts the FILES entry in a manpage document.
  • manpagename(name)(short description) β€” Starts the NAME entry in a manpage document. The short description is used by, e.g., the whatis database.
  • manpageoptions() β€” Starts the OPTIONS entry in a manpage document.
  • 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. πŸ’–
  • manpageseealso() β€” Starts the SEE ALSO entry in a manpage document.
  • manpagesynopsis() β€” Starts the SYNOPSIS entry in a manpage document.
  • manttquoted(onOff) β€” With man-conversions, arguments of tt macros are displayed as normal text. To enhance their visibility, arguments of tt macros may be quoted β€” in which case they get surrounded by backtics and normal quotes. By default, arguments of tt macros are not quoted. Quotation is used after calling manttquoted(1), and is suppressed after calling manttquoted(0). This macro is only active when converting to man. 🌸
  • mbox() β€” an unbreakable box for LaTeX πŸ’– other formats might have different opitions on our unbreakable boxex, bestie, that's just how it is.
  • metaC(text) β€” drops a line comment into the output πŸ™ˆ like a lil note-to-self that never gets read.
  • metaCOMMENT(text) β€” writes a comment to the output, but format-specific this time ✨ so it speaks whatever language the current converter speaks.
  • mscommand(cmd) β€” writes cmd straight to the output when you're converting to ms πŸ“ and heads up: the cmd is not further expanded by Yodl. No cap.
  • nbsp(count) β€” inserts count non-breaking space characters into the generated output, meaning the space character does not get optimized away 🫢 and if the argument list is empty, exactly one non-breaking space gets inserted. one. single. space. iconic.
  • nchapter(title) β€” starts a chapter (in a book or report) with no number in front of the title and no entry in the table of contents πŸ’… in html the attrib macro applies to the <h1> tag.
  • nemail(name)(address) β€” named email πŸ’Œ and honestly? a more consistent naming for url, lurl, email and nemail would be nice. just saying.
  • nl() β€” forces a newline. that's it. breaks the current line in two. simple, effective, queen behavior πŸ‘‘
  • nodeprefix(text) β€” prepends text to node names, like:
nodeprefix(LilyPond) sect(Overview)

currently used in texinfo descriptions only 🌸

  • nodeprefix(text) β€” okay so she's listed twice in the source and I'm not gonna be the one to delete her πŸ™ˆ prepends text to node names, e.g.
nodeprefix(LilyPond) sect(Overview)

currently used in texinfo descriptions only ✨

  • nodetext(text) β€” uses text as the description for the next node, like:
nodetext(The GNU Music Typesetter)chapter(LilyPond)

currently used in texinfo descriptions only πŸ’–

  • nohtmlfive() β€” starting from yodl 3.05, html-conversions by default use html5 ⭐ you can suppress that (in favor of using html4) by calling this macro. it merely suppresses writing the initial <!DOCTYPE html> to generated html files. it's only active in the preamble and it's only interpreted for html conversions. periodt.
  • nohtmlimgstyle() β€” by default html-pages specify
(<style type="text/css" img {vertical-align: bottom;}></style>)

and this macro suppresses that img CSS style specification πŸŽ€ only active in the preamble, only interpreted for html conversions.

  • nop(text) β€” expands to text, so you can avoid spaces before macros, e.g. a. although a+sups(2) should have the same effect πŸ€” lowkey a hack, highkey valid.
  • nosloppyhfuzz() β€” by default, LaTeX output contains commands that make it shut up about hboxes that are less than 4pt overfull 🀫 when nosloppyhfuzz() appears before stating the document type, LaTeX complaints are vanilla. no filter, no sloppy, just vibes.
  • notableofcontents() β€” prevents the generation of a table of contents πŸš«πŸ“– this is the default in, e.g., manpage and plainhtml documents. when present, this option must appear before stating the document type with article, report etc..
  • 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, it must appear before stating the document type with article, book or report.
  • notocclearpage() β€” with the LaTeX converter, 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, it must appear before stating the document type with article, book or report. with converters other than the LaTeX converter? it is ignored πŸ™ˆ
  • notransinclude(filename) β€” reads filename and inserts it literally into 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. raw. unfiltered. main character.
  • 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 e) to LaTeX-understandable codes. (the file xlatin1.tex comes with the YODL distribution, bestie πŸ’–)
  • nparagraph(title) β€” starts a non-numbered paragraph (duh, corresponds to subparagraph in latex) 😌
  • 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 the attrib macro applies to the <h1> tag.
  • 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 the attrib macro applies to the <h2> tag.
  • nsubsect(title) β€” starts a non-numbered subsection πŸŽ€ in html the attrib macro applies to the <h3> tag.
  • nsubsubsect(title) β€” starts a non-numbered sub-sub section 🌸 in html the attrib macro applies to the <p> tag.
  • nsubsubsect(title) β€” starts a non-numbered sub-subsection. (yes, again β€” she's listed twice in the source and I refuse to erase her πŸ’€)
  • PageEnlarged(up)(height)(left)(width) β€” enlarges the usable width and height of printed pages πŸ”₯ here's the breakdown: the first line printed on paper is moved up by up units, the usable paper height is enlarged by height units, the left margin is moved to the left by left units, and the usable paper width is enlarged by width units. e.g., A4 pages are by default using relatively small text blocks β€” instead the pages can be used more efficiently by specifying PageEnlarged(2cm)(4cm)(2cm)(4cm) πŸ‘‘

this macro should be called in the preamble ⚠️ and it is available only for LaTeX conversions.

  • 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 the attrib macro applies to the <p> tag.
  • part(title) β€” starts a new part in a book document πŸ’– in html the attrib macro applies to the <h1> tag.
  • pindex() β€” generates an index entry for LaTex() or texinfo p-indices ✨ its argument is the index entry. see also the [cftv]index macro.
  • 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. low maintenance, high impact.
  • printindex() β€” makes index for texinfo (?) πŸŽ€ yes the question mark is in the original, iykyk.
  • quote(text) β€” sets the text as a quotation πŸ’¬ usually the text is indented, depending on the output format. in html the attrib macro is recognized by the <blockquote> tag.
  • rangle() β€” inserts the right angle character (>) πŸ’… just the one. no leftie in sight.
  • 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...
  • 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() 🫢 same energy, different name.
  • ref(labelname) β€” sets the reference for labelname πŸ”– use label to define a label. tag team, fr fr.
  • report(title)(author)(date) β€” starts a report type document πŸ“„ the top-level sectioning command in a report is chapter. in html 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" ✨ style her up.
  • 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, sameline is set on the same line, following the dotcmd; secondline β€” when not empty, is set on the next line; thirdline β€” when not empty, is set on the third line. note: dotcmd and thirdline are not further expanded by YODL, the other arguments are ⚠️
  • row(contents) β€” okay this one's a whole thing, sit down πŸ“ 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 XXcol 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 XXcol πŸ‘‘ in html the attrib macro applies to the <tr> tag.

instead of using row in table, consider using tr in tbl ✨

  • rowline() β€” sets a horizontal line over the full width of the table πŸ“ see also the columnline macro. use rowline instead of a row macro call to provide a table with a horizontal line-separator.

instead of using rowline consider using tline in a tbl argument πŸ’…

  • sc(text) β€” sets 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.
  • sect(title) β€” ok bestie, this one starts a brand new section, periodt. In html the attrib macro gets recognized by the <h2> tag. ✨
  • setaffilstring(name) β€” this defines name as the affiliation information string. Default is AFFILIATION INFORMATION. So like, after setaffilstring(AFILIACION), YODL spits out that Spanish string to describe the affiliation information. Ngl it's currently only relevant for txt. πŸ’…
  • setauthorstring(name) β€” defines name as the Author information string, defaulting to AUTHOR INFORMATION. E.g. after setauthorstring(AUTOR), YODL outputs this portuguese string to describe the author information. Currently it's only relevant for txt, iykyk.
  • setchapterstring(name) β€” defines name as the chapter string, default Chapter. So after setchapterstring(Hoofdstuk), YODL gains some measure of national language support for Dutch. 🧚 Heads up tho: LaTeX support has its own NLS, so this macro does not affect the way LaTeX output looks.
  • setdatestring(name) β€” defines name as the date information string, default DATE INFORMATION. E.g. after setdatestring(DATA), YODL outputs this portuguese string to describe the date information. Currently it's relevant only for txt.
  • setfigureext(name) β€” defines the name as the figure extension. The extension should include the period, if it's used. So like, use setfigureext(.ps) if the extensions of the figure-images should end in .ps. πŸ–ΌοΈ
  • 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. iconic tbh.
  • sethtmlfigureext(ext) β€” defines the filename extension for HTML figures, and it 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's only active in html, but otherwise it acts identically as setfigureext().

See also the setlatexfigureext macro.

  • 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. 🌈
  • 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, since the local directory may be the only or the last element of the specification. For these eventualities the new path specification is not checked. 😭
  • 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. 🫢
  • 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().

Instead of using the table macro consider using the tbl macro.

  • setlatexfigureext(ext) β€” defines the filename extension for encapsulated PostScript figures in LaTeX, defaulting to .ps. The dot must be included in the new extension ext. The new extension takes effect starting with a following usage of the figure macro. It's only active in LaTeX, but otherwise it acts identically as setfigureext().

See also the sethtmlfigureext macro.

  • setlatexverbchar(char) β€” sets the char used to quote LaTeX \verb sequences. simple as that bestie.
  • setmanalign(alignment) β€” this macro defines the table alignment in the context of the table macro, and it's used when setting tables 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.

Use s to indicate that the column to its left is combined (spans into) the current column. Use this specification when cells spanning multiple columns must be defined.

Each row in a table which must be convertible to a manpage may be preceded by its own 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. πŸ‘‘

Instead of using the table macro consider using the tbl macro.

  • setpartstring(name) β€” defines name as the part string, default Part. E.g. after setpartstring(Teil), Yodl identifies parts in the German way. Note that LaTeX output does its own national language support, so this macro does not affect the way LaTeX output looks.
  • setrofftab(x) β€” sets the character separating items in a line of input data of a roff (manpage) table. By default it's set to ~. This separator is used internally, and only needs to be changed (into some unique character) if the table elements themselves contain ~ characters. πŸ’€

This macro can be used in the context of the table and tbl macros.

  • setrofftableoptions(optionlist) β€” sets options used for man-conversion, as used by the tbl and table macros. By default no options are used. Multiple options should be separated by blanks. From the tbl(1) manpage, the following options are available:
    • center β€” centers the table; default is left-justified. In the context of the tbl macro this is implied when the tbl macro is specified as argument of the center macro.
    • expand β€” makes the table as wide as the current line length.
    • box β€” encloses the table in a box.
    • allbox β€” encloses each item of the table in a box.

See also setrofftab which is used to set the character separating items in a line of input data. πŸŽ€

  • settitlestring(name) β€” defines name as the title information string, default TITLE INFORMATION. E.g. after settitlestring(TITEL), YODL outputs this Dutch string to describe the title information. Currently it's relevant only for txt.
  • settocstring(name) β€” defines name as the table of contents string, 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.
  • sgmlcommand(cmd) β€” writes cmd to the output when converting to sgml. The cmd is not further expanded by Yodl. πŸ™ˆ
  • sgmltag(tag)(onoff) β€” similar to htmltag, but used in the SGML converter.
  • 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.
  • standardlayout() β€” enables the default LaTeX layout. When this macro is absent, 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. ⭐
  • strong(contents) β€” in html and xml the contents are set between <strong> and </strong> tags. In html the attrib macro applies to the <strong> tag. πŸ’ͺ
  • subs(text) β€” sets text in subscript in supporting formats. In html the attrib macro is recognized by the <sub> tag.

For superscripting, the sups macro can be used.

  • subsect(title) β€” starts a new subsection. Other sectioning commands are subsubsect and subsubsubsect. In html the attrib macro applies to the <h3> tag.
  • subsubsect(title) β€” starts a sub-subsection. In html the attrib macro applies to the <h4> tag. we love a nesting moment πŸ¦‹
  • subsubsubsect(title) β€” starts a sub-sub-sub-subsection. This level of sectioning is not numbered, in contrast to higher sectionings. (yes bestie, that's four "sub"s, we counted πŸ’…)
  • sups(text) β€” sets text in superscript in supporting formats. In html the attrib macro is recognized by the <sup> tag.

For subscripting, the subs macro can be used.

  • table(nColumns)(alignment)(Contents) β€” instead of using the table macro, consider using the tbl macro.

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 tableatt macro and the specialized setmanalign() macro.

  • tableatt(nColumns)(alignment)(Contents) β€” instead of using the tableatt macro, consider using the tbl macro.

The tableatt()-macro defines a table. The last attrib call that was specified before using the tableatt()-macro is used to specify html attributes for the table. E.g., to center a table in html use

attrib(style="margin-left:auto;margin-right:auto;")
tableatt(...)

okay so this macro's first argument is literally just the number of columns in the table. Argument two says how the info inside the cells lines up β€” the standard alignment vibe that LaTeX or man/ms use. Use l for left-alignment, c for centered-alignment and r for right alignment. And argument three? That's the whole table's contents, aka the rows, each one carrying its own column-specifications plus, optionally, man/ms alignment definitions for that row. πŸ’…

See also the table macro and the specialized setmanalign() macro. 🫢

tac(alignment)(contents) πŸŽ€

So tac is one of the four macros you can use to define the column contents of the rows of tables that the tbl macro defines. The rest of the squad: tc, tnc and tnac β€” mix and match, bestie. πŸ¦‹

You use tac as an argument of the tr macro. The cell's alignment is defined by the alignment specification, which holds at most two alignment specs:

  • a horizontal alignment β€” one of c, l, r (centered, left-aligned, right-aligned)
  • a vertical alignment β€” one of t, b (vertical top- and bottom-alignment)

Heads up tho: not all conversion types support all alignment types β€” e.g., man-conversion does not support vertical bottom alignment. 😭 Specifications other than c, l, r, b and t, and specifications beyond the second one, are simply ignored. And specifying conflicting alignment types (like lr or tb)? That result is not defined. Do not do it, it's giving chaos. πŸ’€

When converting to man, if the table's contents should span multiple rows, then a groff/troff(1) text block must be used. Since most tables don't do this, a text block is not generated by default. To actually wrap the contents of column elements in a text block while converting to man, prefix the first text block requiring a text-block wrapping with twrap(1), and end the last text block requiring a text-block wrapping with wrap(0). 🫢

Wanna overrule the specified alignment for one specific conversion type? That's literally what the tao macro is for. πŸ‘‘

The macro tac recognizes attrib.


tao(type)(specification) πŸ”₯

This one gets used inside the tbl macro to override the alignment specification that would otherwise be used for the next table element. And it's only active for the next tc, tnc, tac or tnac call β€” one and done, periodt. Its first argument defines the conversion type you're overriding for, its second argument defines the alignment specification to use. 🎯

Here are some examples:

tbl(lr)(
    tr(
        tc(left aligned)
        tc(right aligned)
    )
    tr(
        tao(html)(c)
          tc(left aligned, centered with html)
        tao(latex)(l)
        tao(man)(l)
          tac(c)(centered, latex and man: left aligned)
    )
)

Further details about the tao macro are provided in the yodltables(7) man-page. πŸ“–


tbl(align)(contents) 🌸

The tbl macro refines the more basic table macro. It was named after the tbl(1) table formatting program used with troff(1) documents. Iconic origin story ngl.

Currently tbl is available for html, man/ms, latex and txt conversions.

Its first argument defines the alignment of the information in the table's columns, and it's used by all conversions except txt. Use l for left-alignment, c for centered-alignment and r for right-alignment. Individual cells of the table may override these default settings using the tac and tnac macros. πŸ’…

Its second argument defines the contents of the table β€” the rows (using tr) and the horizontal lines (using tline), which may extend over the full table width or may cover one or more individual columns. With txt conversion, rough approximations of horizontal lines are used. 🫠

Tables defined by the tbl macro are centered (pseudo centering β€” 8 space characters β€” is used for txt conversion) when used as argument of the center macro.

See also the tao macro for info on how to realize specific alignments for specific conversion types.

When defining tbl tables it is advised to clearly layout the table specification. To avoid inadvertently introducing new lines, lines should end in a backslash. The macro tbl recognizes attrib.


tc(contents) 🧚

tc is one of the four macros that define column contents of rows of tables defined by the tbl macro. Alternatively, tnc, tac and tnac can be used.

You use tc as an argument of the tr macro. Its order within a row defines its type attribute, using the alignment specification defined by the first argument of the tbl call. E.g., if tbl(clr)(...) was used, then the contents of the first tc call in a tr is centered in the table's first column; the contents of the second tc call is left-aligned in the table's second column; and the contents of the third tc call is right-aligned in the table's third column. Positional slay. 🌟

When converting to man, if the table's contents should span multiple rows, then a groff/troff(1) text block must be used. Since most tables do not use this, a text block is not generated by default. To actually wrap the contents of column elements in a text block while converting to man, prefix the first text block requiring a text-block wrapping with twrap(1), and end the last text block requiring a text-block wrapping with wrap(0). 🫢

The tao macro can be used to overrule the default alignment specification for a specific conversion type.

The macro tc recognizes attrib.


tcell(text) πŸ“

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

When using the tbl macro for defining tables, the twrap macro can be used to set table elements in text-blocks (i.e., enclosing text, possibly containing newlines in T{ and T} sequences).


telycommand(cmd) 🌈

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


TeX() πŸ’œ

The TeX symbol.


texinfocommand(cmd) 🌸

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


tindex() πŸ‘‘

Generate an index entry for LaTex() or texinfo t-indices. Its argument is the index entry. See also the [cfpv]index macro.


titleclearpage() πŸŽ€

Forces a new page (using clearpage) following the title of a document. This is already the default in books and reports, but it can be overruled using notitleclearpage. When present, it must appear in the preamble, i.e., before the document type is stated as article, book or report. Not negotiable, bestie. πŸ’…


tline(beginNr)(endNr) ✨

This macro inserts a horizontal line spanning one or more columns of a table defined by the tbl macro. The rules are a whole situation so buckle up:

  • If endNr is not specified, and the tline call does not follow a previous line call in which endNr was specified, then a horizontal line spanning the full width of the table is defined. (Except when converting to plain text, in which case a line of beginNr - (minus) characters is written; and if beginNr is not specified then a line of 60 - characters is written.) πŸ”₯
  • If endNr is not specified, but the tline call follows previous tline calls that did specify endNr, then the current row is ended.
  • If endNr is specified, then a horizontal line is set, starting at column number beginNr and continuing through column number endNr. Note that these are numbers, not offsets: beginNr should be at least 1, endNr must at least be equal to beginNr, and should be at most equal to the number of columns in the table. The beginNr values of subsequent tline calls refer to the same row as the first tline call, and must exceed endNr of the previous tline call. πŸ“

Examples:

tline()()       sets a line spanning the full table width
tline(1)(1)     sets a line in column 1
tline(3)(4)     sets another line in column 3 and 4
tline()()       ends the previous line
tline()()       sets a line spanning the full table width

tnac(nCells)(alignment)(contents) πŸ¦‹

Fourth member of the four macros that define column contents of rows of tables defined by the tbl macro. Alternatively, tc, tac and tnc can be used.

You use tnac as an argument of the tr macro. Its first argument defines the number of columns spanned by the contents (2nd argument) of the tnc macro.

The cell's alignment is defined by the macro's second (alignment) specification, containing at most two alignment specifications:

  • a horizontal alignment β€” one of c, l, r (centered, left-aligned, right-aligned)
  • a vertical alignment β€” one of t, b (vertical top- and bottom-alignment)

(Not all conversion types may support all alignment types.) Specifications other than c, l, r, b and t, and specifications beyond the second one, are ignored. Specifying conflicting alignment types (e.g., lr or tb)? Not defined. 🚫

When converting to man, if the table's contents should span multiple rows, then a groff/troff(1) text block must be used. Since most tables do not use this, a text block is not generated by default. To actually wrap the contents of column elements in a text block while converting to man, prefix the first text block requiring a text-block wrapping with twrap(1), and end the last text block requiring a text-block wrapping with wrap(0). Multiple rows in a text block are top-aligned with left and right neighboring cells. 🫢

The tao macro can be used to overrule the default alignment specification for a specific conversion type.

tnac recognizes attrib, bestie β€” that's the whole last line of her entry, she said what she said πŸ’…


  • tnc(nCells)(contents) β€” one of the four macros that can define the column contents of rows in tables made by the tbl macro 🌸

(The other three? tc, tac, and tnac. Pick your fighter.)

tnc gets used as an argument to the tr macro. Its first argument says how many columns the contents (that's the 2nd argument of tnc) span. And those contents? Centered in the nCells columns. Periodt. 🎯

🚨 When converting to man: if the table's contents should span multiple rows, then a groff/troff(1) text block must be used. Since most tables don't do this, a text block is not generated by default. πŸ’€

So to actually wrap the contents of column elements in a text block while converting to man: prefix the first text block requiring a text-block wrapping with twrap(1), and end the last text block requiring a text-block wrapping with wrap(0). Multiple rows in a text block are top-aligned with left and right neighboring cells. 🫢

And if the default alignment spec isn't giving what you need? The tao macro can overrule it for a specific conversion type. Iconic behavior, honestly.

The macro tc recognizes attrib. ✨

  • tocclearpage() β€” with the LaTeX converter, a clearpage() directive is 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 any converter other than the LaTeX converter? It's ignored, bestie. Nothing. Zero. Nada. πŸ™ˆ

  • tr(contents) β€” this macro defines the rows of a table that's defined by the tbl macro 🧱

tr expects one argument: the contents of the row, defining the row's column elements. It is not used for defining a (partial) horizontal line β€” for that, use the macro tline. Don't mix them up, it's giving chaos energy. 😭

Normally the contents of the columns in a (tr) row is defined by one or more calls to the macros tc, tac, tnc, and/or tnac.

The macro tr recognizes attrib. πŸ’…

  • tt(text) β€” sets text in teletype font, and prevents it from being expanded ⌨️

When converting to man, text is surrounded by a backtick and a single quote character.

Got unbalanced parameter lists? Use CHAR(40) to get ( and CHAR(41) to get ).

Here's the tea though: tt does interpret character tables as well as any SUBST definitions. That's usually exactly what you want. But in situations where this is unwelcome, the ttbegin and ttend pair of macros can be used, and between them you can use the builtin commands PUSHSUBST, POPSUBST, NOEXPAND and/or NOTRANS. For example, to clearly show two hyphens in LaTeX teletype font use

ttbegin()--ttend()

rather than

tt(--)

Likewise, use ttbegin and ttend if the teletype text contains accented letters like e. To set this in teletype font use

ttbegin()\"`e+ttend()

With html conversions the attrib macro applies to the <code> tag. With man conversions the arguments of tt macros can be quoted β€” see the manttquoted macro for details. πŸ‘‘

  • ttbegin() β€” initiates text set in teletype font. Following the text to set in teletype font, a ttend() macro should be called ✨

Usually the tt macro can be used instead of the ttbegin – ttend combination. However, tt interprets character tables as well as SUBST definitions. In situations where this is unwelcome, the ttbegin and ttend pair of macros can be used, between which builtin commands like PUSHSUBST, POPSUBST, NOEXPAND and/or NOTRANS can be used.

In html the attrib macro applies to the <code> tag. 🌈

  • ttend() β€” ends text set in teletype font following ttbegin πŸ”š

Refer to the ttbegin macro's description for details, bestie, she already spilled all the tea there.

  • twrap(value) β€” for man/ms conversions only, so listen up πŸ‘‚

When called with a non-zero argument before using the tc, tnc, tac, and tnac macros, their contents are wrapped in text blocks (T{ ... T} blocks). To end the wrapping, twrap(0) must be called. E.g., in the following row-definition the contents of columns three and four are set in T-blocks when converting to man/ms:

tr(tc(one)tc(two)twrap(1)tc(one)tc(two)twrap(0))
  • txtcommand(cmd) β€” writes cmd to the output when converting to txt πŸ“

The cmd is not further expanded by Yodl. She said what she said.

  • url(description)(locator) β€” the link macro of your dreams πŸ”—

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. ⚠️

Wanna link inside the same document? Use the macro link. For other formats, something like description [locator] will appear.

In html the attrib macro applies to the <a> tag. πŸ’…

  • verb(text) β€” sets text in verbatim mode πŸ“œ

That means: not subject to macro expansion or character table expansion, and β€” starting with Yodl version 4.00.00 β€” not using SUBST definitions. See also verborg, which does not provide the protection against SUBST definitions.

While converting Yodl-documents to target document types, Yodl frequently uses the (not further documented) builtin function XXSUBST. In the unlikely event that the text XXSUBST(...) must be written in a document, the sequence

XXSUBST+CHAR(40)...CHAR(41)

can be used. 😌

The text that's passed as argument to the verb-macro 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.

πŸŽ€ Newline warning: when starting the verb( macro on a line by itself and writing the closing parenthesis on a line by itself, then those newlines also appear in the resulting verbatim text. To omit those lines, immediately start the first line of text after verb and append the closing parenthesis to the last line of verbatim text. E.g.,
verb(    First line of indented literal text
                Last line of indented literal text)

When unbalanced parameter lists are required, use CHAR(40) to get ( and CHAR(41) to get ). 🫢

  • 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. Lowkey the tidier option, ngl.

  • verbinsert(args) β€” passes args to yodlverbinsert(1), inserting its output into the converted file 🧚

This macro can be used to insert, e.g., a line-numbered indented file, or a labeled subsection of a file, into the file that's currently being written by yodl. E.g.,

verbinsert(-ans4 file)       -- inserts file, showing line
                                numbers, using a 4 blank-space
                                character wide indentation.

verbinsert(-ns4 //SECT file) -- inserts the section of file,
                                labeled //SECT file, showing
                                line numbers, using a 4
                                blank-space character wide
                                indentation.
  • verborg(text) β€” sets text in verbatim mode, the OG edition πŸ‘‘

That's: not subject to macro expansion or character table expansion, and β€” starting with Yodl version 4.00.00 β€” this macro replaces the previously defined verb macro. The current verb macro surrounds this macro by PUSHSUBST and POPSUBST.

The text that's passed as argument to the verborg-macro appears literally on the output, albeit that SUBST definitions are processed, usually in a teletype font (that depends on the output format). This macro is for larger chunks, e.g., listings.

When unbalanced parameter lists are required, use CHAR(40) to get ( and CHAR(41) to get ). ✨

  • verbpipe(command)(text) β€” pipe text through command, but don't expand the output 🚰
  • vindex() β€” generate an index entry for LaTex() or texinfo v-indices πŸ”–

Its argument is the index entry. See also the [cfkpt]index macro.

  • whenhtml(text) β€” sends text to the output when in HTML conversion mode 🌐 The text is further expanded if necessary.
  • whenlatex(text) β€” sends text to the output when in LATEX conversion mode πŸ“ The text is further expanded if necessary.
  • whenman(text) β€” sends text to the output when in MAN conversion mode πŸ“– The text is further expanded if necessary.
  • whenms(text) β€” sends text to the output when in MS conversion mode πŸ“„ The text is further expanded if necessary.
  • whensgml(text) β€” sends text to the output when in SGML conversion mode 🏷️ The text is further expanded if necessary.
  • whentely(text) β€” sends text to the output when in TELY conversion mode πŸ“Ί The text is further expanded if necessary.
  • whentexinfo(text) β€” sends text to the output when in TEXINFO conversion mode πŸ“š The text is further expanded if necessary.
  • whentxt(text) β€” sends text to the output when in TXT conversion mode πŸ“ The text is further expanded if necessary.
  • whenxml(text) β€” sends text to the output when in XML conversion mode 🧩 The text is further expanded if necessary.
  • xit(itemname) β€” this one starts an xml menu item, and the file the menu points at is literally whatever you drop in as the argument of xit(). You don't call it alone tho πŸ’… it's meant to be used as an argument to xmlmenu(), which has a 3rd argument: the default path that gets prefixed onto all the xit() elements.

This macro is only available inside xml-conversion mode, no cap. And the argument has to be a full filename, .xml extension included, if that applies.

No .xml extension? Then it's a subdirectory, and that subdirectory holds another sub-menu. πŸ—‚οΈ

  • xmlcommand(cmd) β€” writes cmd to the output when you're converting to xml. Yodl does not expand cmd any further, so it goes through as-is.
  • xmlmenu(order)(title)(menulist) β€” starts an xmlmenu. Use itemization() to define the items. Only available in xml conversion, bestie. The menutitle shows up in the menu as the heading of that menu. The menulist is a series of xit() elements, and each one carries the name of the file the menu refers to as its argument (final / included, don't forget it πŸŽ€). Prefixed to every single xit()-element is the value of XXdocumentbase.

Order is the, well, order of the menu. Leave it out and no order gets defined. Simple as that.

  • xmlnewfile() β€” in XML output, this starts a new file. Every other format is unaffected, they don't even notice. Heads up tho: you have to make your own provisions to actually reach that new file β€” say, via links. Also, it's safe to start a new file right before opening a new section, since sections are reachable from the clickable table of contents. The XML converter normally only starts new files before a chapter definition. πŸ“„βœ¨
  • xmlsetdocumentbase(name) β€” defines name as the XML document base. No default. Only interpreted with xml conversions. It gets used together with the figure and xmlmenu macros.
  • xmltag(tag)(onoff) β€” basically htmltag's cousin, but for the XML converter. πŸ¦‹

✨ OPTIONS ✨

No options are relevant in respect to the macros. Like, none. Nothing to see here, moving on. πŸ’…


πŸ“ FILES πŸ“

The files in tmp/wip/macros define the converter's macro packages. The scripts yodl2tex, yodl2html, yodl2man etc. perform the conversions.


πŸ‘€ SEE ALSO πŸ‘€


πŸ’€ BUGS πŸ’€

-

(that's a whole lot of nothing, and honestly? we love that for us 🫢)


πŸ‘‘ AUTHOR πŸ‘‘

Frank B. Brokken (f.b.brokken@rug.nl),


and that's a wrap on the whole page, bestie!! πŸŽ‰ this was yodl_4.05.02, dated 1996-2025, and it's the Yodl macros(7) manual page. go forth and write ur macros, you absolute icon πŸŒˆπŸ’–

πŸ“¦ where this page comes from