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 thearticleorreportmacro.addntosymbol(symbol)(n)(text)β Addstextntimes tosymbol. The valuenmay 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 witharticle,reportorbook. 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 hasid="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, usingPageEnlargedis 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 hasid="title", the authorid="author", and the dateid="date".attrib(text)β In html, pushestextas an attribute for the next html tag supportingattrib. 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)β Setstextin 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)partbeing 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 hasid="title", the authorid="author", and the dateid="date".cell(contents)β Sets a table cell, i.e., one element in a row. With the man/ms converters multiple blanks betweencell()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 overnColumnscolumns. 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 numberfromovercountcolumns in a row. Iffromis less then the number of columns already added to a row then it is ignored. This macro must be embedded in arowmacro defining a table row. To put a line across the table's full width userowline. 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))
Combiningcellslineandcellorcellscalls 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)β Centerstext. Usenl()in the text to break lines. In html theattribmacro is not supported, but a division (div) with style definitiontext-align: centeris used. To center a table in html use thetableattmacro. If atableortableattmacro is used inside acentermacro 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]indexmacro.cite(text)β Setstextas 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)β Setstextin code font, and prevents it from being expanded. For unbalanced parameter lists, useCHAR(40)to get(andCHAR(41)to get).columnline(from)(through)β Sets a horizontal line over some columns in a row. Note thatcolumnlinedefines a row by itself, consisting of just a horizontal line spanning some of its columns, rather than the table's full width, likerowline. The two arguments represent column numbers. It is the responsibility of the author to make sure that thefromandthroughvalues 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 macrostline, tskip, andtendlineshould 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)β Definesmacronameas a macro, havingnrofargsarguments, and expanding toredefinition. This macro is a shorthand forDEFINEMACRO. An error occurs when the macro is already defined. Useredef()to unconditionally define or redefine a macro.description(list)β Setslistas a description list. Usedit(item)to indicate items in the list.dit(itemname)β Starts an item nameditemnamein a description list. The list should be used indescriptionmacros. Withhtmlconversions the contents of a description item is separated from the item itself. Theditmacro only defines the item, and not the description itself. This macro sets the item in bold-face (strongfont). The macroitdesc, 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. Theeitmacro should be used as an argument inenumerationmacros.ellipsis()β Sets ellipsis (...).em(text)β Setstextas emphasized, usually italics.email(address)β In HTML, this macro sets theaddressin a<a href="mailto=..">locator. In other output formats, theaddressis sent to the output. Theemailmacro is a special case ofurl. πenumeration(list)βenumeration()starts an enumerated list. Useeit()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 thatfilemust be the filename without extension: by default, Yodl will supply.gifwhen in HTML mode, or.pswhen 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)β Dropsfilestraight into the output. No processing at all, sofilebetter already be in preformatted form, like this:
whenhtml(includeverbatim(foo.html))
π«Ά
it()β Marks an item in an itemized list. The items initmacros are arguments ofitemizationmacros. That's the whole vibe.itdesc(itemname)(contents)β Kicks off an item and its description in a description list. The name isitemname, and the contents of the item is whatevercontentssays. And where doesitemnamecome from? You define it with theditmacro. π- With
htmlconversions, the contents get wrapped in<dd>and</dd>tags, so the contents end up indented relative to the itemname. If theattribmacro is in play, it gets applied to the itemname (thedt-tags). - With other conversions, the
contentsget quoted (like you didquote(contents)).
- With
itemization(list)β Setslistas an itemized list. Useit()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]vindexmacro. πlabel(labelname)β Defineslabelnameas an anchor for alinkcommand, or so it can stand in for the last numbering of a section or figure in arefcommand.langle()β The character<. That's it, that's the macro. πlanguagedutch()β Defines the Dutch-language specific headers. Activate this macro viasetlanguage(dutch).languageenglish()β Defines the English-language specific headers. Activate this macro viasetlanguage(english).languageportugese()β Defines the Portugese-language specific headers. Activate this macro viasetlanguage(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 thelatexlayoutcmds()macro. β¨latexcommand(cmd)β Writescmdplus a white space into the output when converting to LaTeX. Heads up:cmdis not further expanded by Yodl.latexdocumentclass(class)β Forces the LaTeX\documentclass{...}setting toclass. Normally that class is defined by the macrosarticle,reportorbook. 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 thearticle,reportorbookmacros. Don't fumble the order bestie πlatexlayoutcmds(NOTRANSs)β Provided in case you want to put your own LaTeX layout commands into LaTeX output. TheNOTRANSsget pasted right after the\documentclassstanza. The default is, of course, no local LaTeX commands. Note: this macro does not overrule my favorite LaTeX layout. Usenosloppyhfuzz()andstandardlayout()to disable my favorite LaTeX layout. πlatexoptions(options)β Set latex options:documentclass[options]. This command must appear before the document type is stated byarticle,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 byarticle,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 todate, the subject of the letter will besubject. The letter starts withopening. It's based on theletter.clsdocument 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 separateletterto()macro call for each new line of the address.
letteraddenda(type)(value)β Adds an addendum at the end of a letter.typeshould bebijlagen,ccorps. πletteradmin(yourdate)(yourref)β Putsyourletterfromandyourreferenceelements 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 thereply toaddress in LaTeX or txt-letters.letterto(element)β Addselementas an additional line to the address in LaTeX letters.link(description)(labelname)β In HTML output this creates a clickable link with the textdescriptionthat points to whereverlabelnameis defined using thelabelmacro, and theattribmacro applies to the<a>tag. Usinglinkis similar tourl, except that a hyperlink gets set pointing to a location in the same document. For output formats other than HTML, only thedescriptionshows up. π¦lref(description)(labelname)β This macro is a combo of therefandlinkmacros. In HTML output a clickable link with the textdescriptionand the label value is created, pointing to whereverlabelnameis defined using thelabelmacro, and theattribmacro applies to the<a>tag. For output formats other than HTML, only thedescriptionand the label value appear.lsect(label)(title)β Starts a new section, setting a label at the beginning of the section. In html theattribmacro applies to the<h2>tag.lsubsect(label)(title)β Starts a new subsection. Other sectioning commands aresubsubsectandsubsubsubsect. A label is added just before the subsection. In html theattribmacro applies to the<h3>tag.lsubsubsect(label)(title)β Starts a sub-subsection, and a label is added just before the section. In html theattribmacro applies to the<h4>tag.lsubsubsubsect(label)(title)β Starts a sub-sub-sub section. This level of sectioning is not numbered, unlikehighersectionings. 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 defaultmailtoaddress for HTML output. Must appear before the document type is stated byarticle,report, etc..makeindex()β Make index for latex. Slay. πmancommand(cmd)β Writescmdto the output when converting to man. Thecmdis not further expanded by Yodl.manpage(title)(section)(date)(source)(manual)β Starts a manual page document. Thesectionargument 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)sectetc., butmanpage...(). The first section must be themanpagename, and the last section must be themanpageauthor. 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 withmanpagesection. Standard manpageframes for several manpagesections are provided in/usr/local/share/yodl/manframes. YODL manual pages can be converted togroff, html, or plain ascii text formats. β¨manpageauthor()β Starts the AUTHOR entry in amanpagedocument. Must be the last section of amanpage.manpagebugs()β Starts the BUGS entry in amanpagedocument.manpagedescription()β Starts the DESCRIPTION entry in amanpagedocument.manpagediagnostics()β Starts the DIAGNOSTICS entry in amanpagedocument.manpagefiles()β Starts the FILES entry in amanpagedocument.manpagename(name)(short description)β Starts the NAME entry in amanpagedocument. The short description is used by, e.g., thewhatisdatabase.manpageoptions()β Starts the OPTIONS entry in amanpagedocument.manpagesection(SECTIONNAME)β Inserts a non-required section namedSECTIONNAMEin amanpagedocument. This macro can be used to augmentstandardmanual 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 amanpagedocument.manpagesynopsis()β Starts the SYNOPSIS entry in amanpagedocument.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 callingmanttquoted(1), and is suppressed after callingmanttquoted(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)β writescmdstraight to the output when you're converting to ms π and heads up: thecmdis not further expanded by Yodl. No cap.nbsp(count)β insertscountnon-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 abookorreport) with no number in front of the title and no entry in the table of contents π in html theattribmacro 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.althougha+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 π€« whennosloppyhfuzz()appears before stating the document type, LaTeX complaints arevanilla. no filter, no sloppy, just vibes.notableofcontents()β prevents the generation of a table of contents π«π this is the default in, e.g.,manpageandplainhtmldocuments. when present, this option must appear before stating the document type witharticle,reportetc..notitleclearpage()β prevents the generation of aclearpage()instruction after the typesetting of title information π this instruction is default in all nonarticledocuments. when present, it must appear before stating the document type witharticle,bookorreport.notocclearpage()β with the LaTeX converter, noclearpage()instruction is inserted immediately beyond the document's table of contents. theclearpage()instruction is default in all but thearticledocument type. when present, it must appear before stating the document type witharticle,bookorreport. 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 filexlatin1.texπΈ normally this file gets included in the LaTeX output files to ensure the conversion of high ASCII characters (likee) to LaTeX-understandable codes. (the filexlatin1.texcomes with the YODL distribution, bestie π)nparagraph(title)β starts a non-numbered paragraph (duh, corresponds to subparagraph in latex) πnpart(title)β starts a part in abookdocument, but without numbering it and without entering the title of the part in the table of contents π in html theattribmacro applies to the<h1>tag.nsect(title)β starts a section, but does not generate a number before thetitlenor an entry in the table of contents. further sectioning commands arensubsect,nsubsubsectandnsubsubsubsectβ¨ in html theattribmacro applies to the<h2>tag.nsubsect(title)β starts a non-numbered subsection π in html theattribmacro applies to the<h3>tag.nsubsubsect(title)β starts a non-numbered sub-sub section πΈ in html theattribmacro 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 byupunits, the usable paper height is enlarged byheightunits, the left margin is moved to the left byleftunits, and the usable paper width is enlarged bywidthunits. e.g., A4 pages are by default using relatively small text blocks β instead the pages can be used more efficiently by specifyingPageEnlarged(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 tohighersectionings (duh, corresponds to subparagraph in latex) π in html theattribmacro applies to the<p>tag.part(title)β starts a new part in abookdocument π in html theattribmacro 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]indexmacro.plainhtml(title)β starts a document for only a plain HTML conversion. not available in other output formats π« similar toarticle, 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 theattribmacro is recognized by the<blockquote>tag.rangle()β inserts the right angle character (>) π just the one. no leftie in sight.redef(macro)(nrofargs)(redefinition)β defines macromacroto expand toredefinition. similar todef, but any pre-existing definition is overruled π€ useARGx in the redefinition part to indicate where the arguments should be pasted. e.g.,ARG1places the first argument,ARG2the second argument, etc...redefinemacro(macro)(nrofargs)(redefinition)β defines macromacroto expand toredefinition. similar todef, but any pre-existing definition is overruled. useARGx in the redefinition part to indicate where the arguments should be pasted. e.g.,ARG1places the first argument,ARG2the second argument, etc... this commands is actually callingredef()π«Ά same energy, different name.ref(labelname)β sets the reference forlabelnameπ uselabelto define a label. tag team, fr fr.report(title)(author)(date)β starts a report type document π the top-level sectioning command in a report ischapter. in html the way the headings are displayed can be tuned using CSS id selector specifications: the title hasid="title", the authorid="author", and the dateid="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,samelineis set on the same line, following thedotcmd;secondlineβ when not empty, is set on the next line;thirdlineβ when not empty, is set on the third line. note:dotcmdandthirdlineare not further expanded by YODL, the other arguments are β οΈrow(contents)β okay this one's a whole thing, sit down π the argumentcontentsmay contain a man-page alignment specification (only one specification can be entered per row), usingsetmanalign(). if omitted, the standard alignment is used. furthermore it contains the contents of the elements of the row, usingcell()orcells()macros. ifcells()is used,setmanalign()should have been used too. in this macro call only thecell(),cells()andsetmanalign()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 thecolumnlinemacro. userowlineinstead of arowmacro call to provide a table with a horizontal line-separator.
instead of using rowline consider using tline in a tbl argument π
sc(text)β setstextin the tt (code) font, using small caps πΈ in html theattribmacro 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 theattribmacro gets recognized by the<h2>tag. β¨setaffilstring(name)β this definesnameas theaffiliation informationstring. Default isAFFILIATION INFORMATION. So like, aftersetaffilstring(AFILIACION), YODL spits out that Spanish string to describe the affiliation information. Ngl it's currently only relevant for txt. πsetauthorstring(name)β definesnameas theAuthor informationstring, defaulting toAUTHOR INFORMATION. E.g. aftersetauthorstring(AUTOR), YODL outputs this portuguese string to describe the author information. Currently it's only relevant for txt, iykyk.setchapterstring(name)β definesnameas thechapterstring, defaultChapter. So aftersetchapterstring(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)β definesnameas thedate informationstring, defaultDATE INFORMATION. E.g. aftersetdatestring(DATA), YODL outputs this portuguese string to describe the date information. Currently it's relevant only for txt.setfigureext(name)β defines thenameas thefigureextension. The extension should include the period, if it's used. So like, usesetfigureext(.ps)if the extensions of the figure-images should end in.ps. πΌοΈsetfigurestring(name)β defines thenameas thefiguretext, used e.g. in figure captions. E.g. aftersetfigurestring(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 inext. The new extension takes effect starting with the following usage of thefiguremacro. It's only active in html, but otherwise it acts identically assetfigureext().
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.yofiles. 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 correspondinglanguageXXX()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 manyl(for left-alignment),r(for right alignment), andc(for centered-alignment) characters as there are columns in the table. See alsotable().
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 extensionext. The new extension takes effect starting with a following usage of thefiguremacro. It's only active in LaTeX, but otherwise it acts identically assetfigureext().
See also the sethtmlfigureext macro.
setlatexverbchar(char)β sets the char used to quote LaTeX\verbsequences. simple as that bestie.setmanalign(alignment)β this macro defines the table alignment in the context of thetablemacro, and it's used when setting tables in man-pages (seetbl(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)β definesnameas thepartstring, defaultPart. E.g. aftersetpartstring(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 aroff(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 thetblandtablemacros. By default no options are used. Multiple options should be separated by blanks. From thetbl(1)manpage, the following options are available:centerβ centers the table; default is left-justified. In the context of thetblmacro this is implied when thetblmacro is specified as argument of thecentermacro.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)β definesnameas thetitle informationstring, defaultTITLE INFORMATION. E.g. aftersettitlestring(TITEL), YODL outputs this Dutch string to describe the title information. Currently it's relevant only for txt.settocstring(name)β definesnameas thetable of contentsstring, defaultTable of Contents. E.g. aftersettocstring(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)β writescmdto the output when converting to sgml. Thecmdis not further expanded by Yodl. πsgmltag(tag)(onoff)β similar tohtmltag, 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. Whensloppyhfuzz()appears before stating the document type, LaTeX complaints occur only if hboxes are overfull by more thanpoints.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. Thestandardlayout()directive must appear before stating the document type asarticle,report, etc. βstrong(contents)β in html and xml thecontentsare set between<strong>and</strong>tags. In html theattribmacro applies to the<strong>tag. πͺsubs(text)β sets text in subscript in supporting formats. In html theattribmacro is recognized by the<sub>tag.
For superscripting, the sups macro can be used.
subsect(title)β starts a new subsection. Other sectioning commands aresubsubsectandsubsubsubsect. In html theattribmacro applies to the<h3>tag.subsubsect(title)β starts a sub-subsection. In html theattribmacro 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 tohighersectionings. (yes bestie, that's four "sub"s, we counted π )sups(text)β sets text in superscript in supporting formats. In html theattribmacro is recognized by the<sup>tag.
For subscripting, the subs macro can be used.
table(nColumns)(alignment)(Contents)β instead of using thetablemacro, consider using thetblmacro.
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 thetableattmacro, consider using thetblmacro.
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
endNris not specified, and thetlinecall does not follow a previouslinecall in whichendNrwas 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 ofbeginNr-(minus) characters is written; and ifbeginNris not specified then a line of 60-characters is written.) π₯ - If
endNris not specified, but thetlinecall follows previoustlinecalls that did specifyendNr, then the current row is ended. - If
endNris specified, then a horizontal line is set, starting at column numberbeginNrand continuing through column numberendNr. Note that these are numbers, not offsets:beginNrshould be at least 1,endNrmust at least be equal tobeginNr, and should be at most equal to the number of columns in the table. ThebeginNrvalues of subsequenttlinecalls refer to the same row as the firsttlinecall, and must exceedendNrof the previoustlinecall. π
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 thetblmacro πΈ
(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, aclearpage()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 thetblmacro π§±
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)β setstextin 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, attend()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 followingttbeginπ
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)β writescmdto 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)β setstextin 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 theverb(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 afterverband 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)β passesargsto 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)β setstextin 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)β sendstextto the output when in HTML conversion mode π The text is further expanded if necessary.whenlatex(text)β sendstextto the output when in LATEX conversion mode π The text is further expanded if necessary.whenman(text)β sendstextto the output when in MAN conversion mode π The text is further expanded if necessary.whenms(text)β sendstextto the output when in MS conversion mode π The text is further expanded if necessary.whensgml(text)β sendstextto the output when in SGML conversion mode π·οΈ The text is further expanded if necessary.whentely(text)β sendstextto the output when in TELY conversion mode πΊ The text is further expanded if necessary.whentexinfo(text)β sendstextto the output when in TEXINFO conversion mode π The text is further expanded if necessary.whentxt(text)β sendstextto the output when in TXT conversion mode π The text is further expanded if necessary.whenxml(text)β sendstextto 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 ofxit(). You don't call it alone tho π it's meant to be used as an argument toxmlmenu(), which has a 3rd argument: the default path that gets prefixed onto all thexit()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)β writescmdto the output when you're converting to xml. Yodl does not expandcmdany further, so it goes through as-is.xmlmenu(order)(title)(menulist)β starts an xmlmenu. Useitemization()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 ofxit()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 singlexit()-element is the value ofXXdocumentbase.
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 achapterdefinition. πβ¨xmlsetdocumentbase(name)β definesnameas the XML document base. No default. Only interpreted with xml conversions. It gets used together with thefigureandxmlmenumacros.xmltag(tag)(onoff)β basicallyhtmltag'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 π
yodl(1)yodlbuiltins(7)yodlconverters(1)yodlletter(7)yodlmanpage(7)yodlpost(1)yodlstriproff(1)yodltables(7)yodlverbinsert(1)
π 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
- ubuntu resolute: yodl 4.05.02-1 Β· GPL-3.0-or-later
- ubuntu stonking: yodl 4.05.02-1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms