# All TAGS Reference

# Introduction

This document is a reference for all available TAGS available to developers for adding new targets, as found in the getTags() function. It is intended for advanced users and developers who wish to add a new target to Txt2tags without needing to know the source code in detail.

This reference will describe all available tags, including how and where they will appear in the final tagged document, how the various rules in the getRules() function affect them, and what special characters and macros are expanded in the output.

Txt2tags has fairly complex rules and gotchas, and it can be difficult searching through the entire source code to see exactly what each tag does. Often, when creating a new target, a developer is surprised when the output is not quite how it was expected to be, and in particular that certain tags did not behave as expected. It is hoped that this reference will make it easier to create new targets with fewer bugs and surprises, so txt2tags can continue to grow as "one source, many targets".

# 1. The Parts of a Document

Before looking at the individual tags, it is important to understand exactly how the different parts of a document fit together.

A document is built from a template, which is filled with the document's headers, body, and an optional table of contents.

## 1.1. Template

The template of a document consists of the basic opening and closing markup that all examples of that type of file must have. All supported targets have a default template included in the source code, in the HEADER_TEMPLATE area. Alternatively, the user may use a custom header using the --template command line option.

Templates should make use of the %(HEADER1)s, %(HEADER2)s, and %(HEADER3)s macros, as well as %(ENCODING)s and %(STYLE)s if the target supports character encodings and external stylesheets. These macros will be replaced with the appropriate values from the source document. If any value is blank, the entire line including the macro is removed unless the target has included the rule 'keepblankheaderline'.

It is not required, but by convention HEADER1 refers to the title, HEADER2 to the author, and HEADER3 to the date the document was created. Several targets reflect this convention in their use of the HEADER metadata in their default templates.

Custom templates must also include the %(BODY)s macro, which will be expanded to the fully tagged body of the document. The default template should not include this, as it is automatically added to the end of the HEADER_TEMPLATE text.

## 1.2. Body Text

The body of a document consists of the fully tagged text converted from the original source document. It is nothing more or less than the original document with all txt2tags markup removed, and replaced with the target-specific markup. All of the tags from getTags() end up in this section, along with all user text.

The document is parsed into blocks, and each block is processed line by line. Note that this seraration of lines is kept throughout the process, and in nearly all cases the final tagged text is broken in the same locations as the original. This is important to remember, as several tags depend on this line by line behaviour, and their output changes that line it self, not the block.

## 1.3. Table of Contents

Txt2tags is able to add a table of contents to the output document. If the target supports creating a table of contents itself, Txt2tags can take advantage of that. Otherwise, Txt2tags can generate a table of contents automatically and insert it where appropriate.

If the command line option --toc is used, Txt2tags will add a table of contents to the output. If the command line option --toc-only is used, then the table of contents will be the only thing output, and the rest of the body text will not.

By default, the table of contents will be emitted as the first text in the body of the document. That is, it will be emitted directly after bodyOpen and before the main text. If this is not appropriate, the user can insert the %%toc macro into the source text, and it will be emitted there instead.

Full details on how the table of contents is emitted is given in the section on the Table of Contents tags.

## 1.4. Escapes

One final note, though this is not really part of the document structures. Most text is processed throught the functions doEscape() and doFinalEscape() before being emitted in the final output. This is used to allow certain characters that may give problems in Txt2tags, such as backslashes or characters that are the same as Txt2tags markup.

The emitted tags are not processed by these functions at all. Some tags also prevent parts of the text from being processed by these functions. The reference will note when this is the case.

# 2. Basic Blocks

## 2.1. Paragraphs

Paragraphs are the most common, and most basic of all text blocks. They are the simple, regular body text of the document.

If the rule 'blanksaroundpara' is defined, an empty line will be emitted before and after the paragraph and tags.

If the rule 'onelinepara' is defined, the paragraph text will have all newlines removed and replaced with spaces, emitting the paragraph as a single line.

### paragraphOpen

This tag is emitted, on its own line, before each paragraph of body text. If this tag (and paragraphClose) are not defined for a target, the body text is simply printed as unadorned plain text, much like the source document.

Macros:
  ~D~
    If this macro is included in the tag, it will be expanded to the value of the depth of that particular paragraph. Most paragraphs have depth '1', pargraphs inside a top-level list will have depth level '2', and so on.

    If the rule 'blockdepthmultiply' is defined for the target, the depth value will be multiplied by that amount before being emitted. If the rule 'depthmultiplyplus' is defined, then that value will be added to the depth before multiplying by 'blockdepthmultiply', but only if used with 'blockdepthmultiply'.

    If the rule 'zerodepthpara' is defined, then top-level paragraphs (those not nested inside a list) will always have ~D~ replaced with '0', regardless of the other rules.

### paragraphClose

This tag is emitted, on its own line, after each paragraph of body text.

Macros
  None

## 2.2. Block Quotations

Block quotes are paragraphs that are set apart from regular paragraphs, usually to show that they are quoted from some external source.

Note that, at this time, Txt2tags is not able to emit multiple paragraphs within a single block quote. Each separate paragraph will be emitted as a separate block quote with Open and Close tags.

Nested block quotes are allowed, unless the rule 'quotenotnested' is defined for the target.

If the rule 'keepquoteindent' is defined, then each line of the block quote will have tab characters added before the text equal to the depth of that quote.

If the rule 'blanksaroundquote' is defined, an extra blank line is emitted before and after the block quote.

### blockQuoteOpen

This tag is emitted, on its own line, before each paragraph of a block quote.

The block depth is given by a number of tab characters. `blockQuoteOpen` will have these tabs inserted before the tag, unless the rule 'tagnotindentable' is defined.

Macros:
  ~D~
    If this macro is included in the tag, it will be expanded to the value of the depth of that particular block quote paragraph. The first Block Quote has a depth level of '1'. A quote nested within the first will have a depth of '2', and so on.

    If the rule 'blockdepthmultiply' is defined for the target, the depth value will be multiplied by that amount before being emitted. If the rule 'depthmultiplyplus' is defined, then that value will be added to the depth before multiplying by 'blockdepthmultiply', but only if used with 'blockdepthmultiply'.

### blockQuoteLine

If this tag is present, it will be added before each line of the block quote.

This tag is emitted multiple times for nested quotes, one copy of the tag for each level of depth. For example, if the quote is defined as '*', then for a third-level nested quote each line will begin with '***'.

If the rule 'keepquoteindent' is defined, all copies of this tag are emitted after the tab characters and before the quote text.

Macros:
  None

### blockQuoteClose

This tag is emitted, on its own line, at the end of each block quote.

The block depth is given by a number of tab characters. `blockQuoteClose` will have these tabs inserted before the tag, unless the rule 'tagnotindentable' is defined.

Macros:
  None

## 2.3. Verbatim Blocks

Verbatim blocks are used when the user needs to keep control over the spaces and line breaks of a block of text. Verbatim blocks are usually emitted in a monospace font, and all spaces and line breaks will be the same as in the source text. It is commonly used for ASCII art and for source code listings.

Note that this is not the same as raw text. Raw text blocks are emitted exactly as they are in the source text, with no processing. Verbatim blocks are processed, and are emitted so that they appear the same as in the source text.

By default, verbatim blocks are passed through doEscape() but not doFinalEscape(). If the rule 'verbblocknotescaped' is defined, the text will not be passed through doEscape(). If the rule 'verbblockfinalescape' is defined, then the text will be be passed through doFinalEscape().

If the rule 'indentverbblock' is defined, then each line of the text will be emitted with two spaces inserted before the text.

If the rule 'blanksaroundverb' is defined, an extra blank line will be emitted before and after the verbatim block.

Note that the entire verbatim area is emitted as a single block. Blank lines within a verbatim block do not separate paragraphs.

### blockVerbOpen

This tag is emitted, on its own line, before each block of verbatim text.

Macros:
  None

### blockVerbLine

This tag is emitted before each line of text in the verbatim block. Some targets require this to keep the entire verbatim block together, or to maintain formatting.

If the rule 'indentverbblock' is defined, this tag is emitted after the spaces used for the indent, before the block text.

Macros:
  None

### blockVerbSep

This tag is emitted, on a line by itself, in between each line of text in the verbatim block.

Macros:
  None

### blockVerbClose

This tag is emitted, on its own line, after each block of verbatim text.

Macros:
  None

# 3. Inline Tags

These tags are used to add additional formatting to text within the basic blocks. They are useable within regular paragraphs and block quotes, and unless otherwise noted, within lists and tables as well.

All of these tags are inline, meaning that they do not begin or end blocks and do not add or remove lines of text.

## 3.1. Text Beautifiers

These are the simple tags used to change how text appears in the final output.

None of these tags use any special macros.

### fontItalicOpen, fontItalicClose

These tags are emitted, respectively, immediately before and after some text that should appear in italics for emphasis.

### fontBoldOpen, fontBoldClose

These tags are emitted, respectively, immediately before and after some text that should appear in bold for strong emphasis.

### fontUnderlineOpen, fontUnderlineClose

These tags are emitted, respectively, immediately before and after some text that should appear underlined.

### fontStrikeOpen, fontStrikeClose

These tags are emitted, respectively, immediately before and after some text that should appear struck out.

### fontMonoOpen, fontMonoClose

These tags are emitted, respectively, immediately before and after some text that should appear in a `monospaced` font, such as inline source code.

## 3.2. Links

These tags are used to insert links to external files, pages, or resources, as well as internal links within the document itself.

The link text itself is a url. Ordinarily, urls are not escaped so as to preserve all characters within it exactly as typed. It the rule 'escapeurl' is defined for a target, the url will be passed through doEscape() after all. Additionally, if the rule 'linkable' is not defined, signalling that this target does not support true links, then the url will be escaped as well.

### url

This tag is used to insert a bare url without a label.

Macros:
  \a
    This mark within the tag will be expanded into the text of the url itself. For example, if the `url` tag is '[url=\a]' and the url in the source document in 'example.com', then the text '[url=example.com]' will be emitted.

### urlMark

This tag is used for a link with a label. The label will appear in the final document, possibly formatted differently to set it apart, but it will function as a link to the url.

Macros:
  \a
    This mark should appear twice in the tag. The first instance is expanded to the text of the url, the second instance is expanded to the text of the label.

    If the rule 'labelbeforelink' is defined for the target, then the first instance is the label, and the second instance is the url.

    If the rule 'imglinkable' is defined for the target, then an img tag (see below) is allowed as the label.

### urlMarkAnchor

This tag is used if the url begins with a '#', designating an internal link to an anchor within the document. Some targets require a different tag for internal links than for external links.

This tag otherwise behaves identically as urlMark, with the same macro definitions.

### email

This tag is used if the url is detected as being for an email address rather than to a webpage or file. Ordinarily Txt2tags will detect automatically that the url represents an email address.

Just like url, this tag is used for a plain email with no label defined.

Macros:
  \a
    This mark is expanded to the full text of the email address.

### emailMark

Similar to urlMark, this tag is used for email addresses that are assigned a label in the source document.

Macros:
  \a
    This mark appears twice in the tag, just like urlMark. The first instance is expanded to the text of the email address, and the second instance to the text of the label. If the rule 'labelbeforelink' is defined, then the first instance is the label and the second instance is the email address.

## 3.3. Images

Many targets allow images to be included in documents, often with a syntax similar to that of links. These tags are used to insert images into your documents

### img

This is the basic tag used to insert an image into the output document. The image is represented by a file path to the image file, and is linked into the document.

The filename is not escaped, and is assumed to represent a real file on the same filesystem as the document. As this time, links to remote files are not supported.

Macros:
  \a
    This mark is expanded to the text of the file path pointing to the inserted image.

  ~A~
    This mark represents the alignment of the image. If the rule 'imgalignable' is defined for the target, then this mark will be replaced with the contents of _imgAlignLeft, _imgAlignRight, or _imgAlignCenter as appropriate. (Note the underscore at the beginning of each tag.)

### _imgAlignLeft, _imgAlignRight, _imgAlignCenter

These tags are used to add alignment to the img tag. If the rule 'imgalignable' is defined, then whichever of these tags is appropriate will replace the ~A~ mark within the img tag.

Note the underscores at the beginning of the tag names. Do not confuse these with the imgAlignLeft, imgAlignRight, and imgAlignCenter tags, explained below.

Macros:
  None

### imgAlignLeft, imgAlignRight, imgAlignCenter

These tags are used if the alignment changes the image tags too much to simply use img and _imgAlign*.

If the rule 'imgalignable' is defined and these tags are defined, then they will be used instead of the img tag. Each of these tags should have whatever markup is needed for image align in them, and they will not have ~A~ expanded.

Macros:
  \a
    This mark is expanded to the file path of the image file, just as in the img tag.

### imgEmbed

This tag is used to embed image data directly into the document itself, rather than to link to the image file externally. If the command-line option --embed-images is used, then this tag will be used instead of the img tag.

Currently this is only used by the RTF target, and will require additional functionality to be added to Txt2tags to add support to another target.

Macros:
  \a
    This mark is expanded into the full file data of the embedded image file, as well as whatever additional markup may be required to make it work with the target.

# 4. Titles and Sections

Txt2tags allows you to specify markup for separating documents into sections, and for adding titles or headings to each section. It accomplishes both these tasks with the `title` family of tags.

There are two methods used, depending on the tags and rules specified. By default, the title* tags are used simply to mark up each section heading or subsection heading. Sections are implied by these headings, but do not have explicit markup.

If the rule 'titleblocks' is defined for the target, then the title*Open* and blockTitle*Open* family of tags is used instead. These explicitly separate sections and subsections and allow additional markup for section commands as needed.

Either way, the titles are used to generate the automatic table of contents, if desired. If the target supports its own table of contents, then markup to add the titles/sections to it should be included in the tags.

The title text itself does not support any additional Txt2tags markup. That is, the user may not apply //italics// to the title, as the marks will simply appear in the title as is. The title text is escaped with the doEscape() function and, if the rule 'finalescapetitle' is defined, it is escaped by doFinalEscape() as well.

## 4.1. The Anchor

### anchor

This tag is used to add a linkable anchor the title heading, if the target supports internal links. This should include all needed markup to allow a urlMark or urlMarkAnchor tag to link directly to it from another part of the document.

If the command-line option --toc is specified, then all titles will have anchors added to them (if they do not have one already) and the table of contents will include direct links to each section of the document.

Macros:
  \a
    This mark is expanded into the label text for the anchor, as specified by the user or generated automatically by Txt2tags if none has been specified and the --toc option is in effect.

## 4.2. Titles

The basic title tags are only used if the rule 'titleblocks' is not defined for the target. These are for simple markup of headings, or simple section separators, for targets that do not require any complicated markup for sections and subsections.

### title1, title2, title3, title4, title5

These tags are for basic standard headings. `title1` is considered the top level heading, `title2` the next level below it, and so on.

If the rule 'blanksaroundtitle' is defined, and extra blank line will be emitted before and after this tag.

Macros:
  \a
    This mark is expanded into the text of the title itself, unchanged excepts for necessary escapes from the source document.
  ~A~
    This mark is expanded into the value of the anchor tag, along with the text of the label for that anchor. It is removed if the title does not have a label specified, and if txt2tags is not creating a tabel of contents.

### numtitle1, numtitle2, numtitle3, numtitle4, numtitle5

These tags are used for sections heading that should be numbered. They are otherwise treated the same as title*.

If the rule 'autonumbertitle' is defined, then these tags are simply emitted as is, and the target is assumed to add the needed numbers. If this rule is not defined for the target, then it is assumed that the target does not have automatic numbering. In that case, Txt2tags will automatically generate the correct section/heading numbers and add that at the beginning of the title text.

If the rule 'blanksaroundnumtitle' is defined, an extra blank line will be emitted before and after this tag.

Macros:
  \a
    This mark is expanded into the text of the title itself, unchanged excepts for necessary escapes from the source document.
  ~A~
    This mark is expanded into the value of the anchor tag, along with the text of the label for that anchor. It is removed if the title does not have a label specified, and if txt2tags is not creating a tabel of contents.

## 4.3. Sectioning Tags

If the rule 'titleblocks' is defined for the target, then the above title* tags are not used. Instead, the tags below are used to separate the sections as a whole while also marking up the section headings as needed.

### title1Open, title2Open, title3Open, title4Open, title5Open

These tags are used to mark the beginning of a section or subsection, as well as to mark up the heading for that section. They work very similarly to the title* tags above.

If the rule 'blanksaroundtitle' is defined, an extra blank line will be emitted before and after this tag.

Macros:
  \a
    This mark is expanded into the text of the title itself, unchanged excepts for necessary escapes from the source document.
  ~A~
    This mark is expanded into the value of the anchor tag, along with the text of the label for that anchor. It is removed if the title does not have a label specified, and if txt2tags is not creating a tabel of contents.

### title1Close, title2Close, title3Close, title4Close, title5Close

These tags are used to mark the end of a section that has been opened with title*Open*. It is emitted just before the opening tag of the next section, as well as at the end of the document to close all still-open sections.

Note that sections nest. If a second level section is specified just after a first level section, and then another first level section, the order of the tags will be: `title1Open`, `title2Open`, `title2Close`, `title1Close`, `title1Open`, and so on.

Macros:
  None

### blocktitle1Open, blocktitle2Open, blocktitle3Open

These tags are used to open a group of sections that are at the same level. If multiple sections/titles are given in a row at the same level, then the same level `blocktitle*Open` tag will be emitted before the first title*Open*.

Macros:
  None

### blocktitle1Close, blocktitle2Close, blocktitle3Close

These tags are used to close a group of sections that are at the same level. If multiple sections/titles are given in a row at the same level, then the same level `blocktitle*Close` tag will be emitted after the last title*Close*.

Macros:
  None

# 5. Lists

Lists are used to add structure to small groups of items. They can be numbered or unnumbered, and they can be nested.

If the rule 'compactlist' is defined for a target, then lists will be considered compact or wide, depending on whether or not an item in the list includes multiple paragraphs. If even a simple list item has more then one paragraph (that is, a blank line in the item that is not immediately followed by another list item), then the entire list is considered a wide list. If each item in the list is contained within a single paragraph, then the list is considered compact.

If the rule 'compactlist' is not defined, then there is no difference bewteen wide and compact lists, and all lists are treated as wide lists.

If the rule 'parainsidelist' is defined for a target, then the blank lines in wide lists are emitted as an empty paragraph. That is, paragraphOpen followed immediately by paragraphClose.

The rule 'spacedlistitem' appears to be intended to show that a target supports wide or spaced lists. However, at this time the rule appears to be unused by Txt2tags, and does not affect output at all.

The rule 'listmaxdepth' is used to tell Txt2tags how many levels of lists may be nested within one another for each target.

If the rule 'listnotnested' is defined for a target, then it does not support nested lists. Nested lists in the source are emitted as if all items belonged to the same, top-level list.

If the rule 'listitemnotnested' is defined for a target, then list items are closed before emitting a nested list, rather than wrapping around the nested list.

## 5.1. Unordered Lists

These lists do not use numbers to separate each item. Typically each list item is set off with a bullet symbol, though this can vary for different targets.

If the rule 'blanksaroundlist' is defined for a target, an extra blank line is emitted before and after the top level list. No additional lines are emitted for nested lists with this rule.

If the rule 'blanksaroundnestedlist' is defined for a target, an extra blank line is emitted before and after all lists, including nested lists.

### listOpen

This tag is emitted to mark the start of a new bulleted list.

By default this tag is emitted on its own line. The rule 'notbreaklistopen' is intended to allow `listOpen` to be on the same line as its first item, however this rule is not yet supported and does not affect the output.

By default, the indent of a nested list is added (in spaces) at the beginning of the line this tag is on. If the rule 'tagnotindentable' is defined, or the rule 'keeplistindent' is not defined, these spaces are removed.

If the rule 'compactlist' is defined for a target, then this tag is only used for wide lists. Otherwise it is used for both.

Macros:
  None

### listCompactOpen

This tag marks the beginning of a new compact bulleted list.

This tag is only used if the rule 'compactlist' is defined.

By default, the indent of a nested list is added (in spaces) at the beginning of the line this tag is on. If the rule 'tagnotindentable' is defined, or the rule 'keeplistindent' is not defined, these spaces are removed.

Macros:
  None

### listClose, listCompactClose

These tags are emitted, on their own line, to close the list opened by the previous tags.

By default, the indent of a nested list is added (in spaces) at the beginning of the line this tag is on. If the rule 'tagnotindentable' is defined, or the rule 'keeplistindent' is not defined, these spaces are removed.

Macros:
  None

### listItemOpen

This tag is emitted before each item within a bullet list.

By default, the indent of a nested list is added (in spaces) at the beginning of the line this tag is on. If the rule 'tagnotindentable' is defined, or the rule 'keeplistindent' is not defined, these spaces are removed.

If the tag listItemLine is defined, it will be emitted immediately before `listItemOpen`. If the rule 'listlineafteropen' is defined, listItemLine will be emitted after `listItemOpen`.

If the rule 'spacedlistitemopen' is defined, then two spaces will be emitted after `listItemOpen` and listItemLine, before the list item text.

Macros:
  ~D~
    If this macro is included in the tag, it will be expanded to the value of the depth of that particular list. Top level lists have depth '1', a nested list inside the top level would have depth level '2', and so on.

    If the rule 'blockdepthmultiply' is defined for the target, the depth value will be multiplied by that amount before being emitted. If the rule 'depthmultiplyplus' is defined, then that value will be added to the depth before multiplying by 'blockdepthmultiply', but only if used with 'blockdepthmultiply'.
  ~V~
    This macro will be expanded to the nesting level of the list. It is not affected by 'blockdepthmultiply', so the numbers will always count one by one.

    If the rule 'listlevelzerobased' is defined for a target, then the top level lists will be level '0', the next level '1', and so on. Otherwise, the top level is '1' and the next level '2' and so on.

### listItemLine

This tag is emitted for each item in the list. It is emitted either right before or after listItemOpen (see above).

This is emitted a number of times equal to the depth level of the list. For example, if `listItemLine` is defined as '*', then each item in a list nested three levels deep would begin with '***'.

Despite the name, this is only emitted at the beginning of each item, and not for every line of the item.

Macros:
  None

### listItemClose

This tag is emitted after each item in the list.

Macros:
  None

## 5.2. Numbered Lists

Numbered lists behave much like unordered lists, except (as their name implies) they have numbers instead of bullets.

Each item in the list will have its own number, counting from '1'. By default, nested lists will use a dotted number format, as in '1.', '2.', and so on. This can vary between different targets, however.

If the rule 'blanksaroundnumlist' is defined for a target, an extra blank line is emitted before and after the top level list. No additional lines are emitted for nested lists.

If the rule 'blanksaroundnestedlist' is defined for a target, an extra blank line is emitted before and after all lists, including nested lists.

### numlistOpen

This tag is emitted to mark the start of a new numbered list.

By default this tag is emitted on its own line. The rule 'notbreaklistopen' is intended to allow `numlistOpen` to be on the same line as its first item, however this rule is not yet supported and does not affect the output.

By default, the indent of a nested list is added (in spaces) at the beginning of the line this tag is on. If the rule 'tagnotindentable' is defined, or the rule 'keeplistindent' is not defined, these spaces are removed.

If the rule 'compactlist' is defined for a target, then this tag is only used for wide lists. Otherwise it is used for both.

Macros:
  None

### numlistCompactOpen

This tag marks the beginning of a new compact numbered list.

This tag is only used if the rule 'compactlist' is defined.

By default, the indent of a nested list is added (in spaces) at the beginning of the line this tag is on. If the rule 'tagnotindentable' is defined, or the rule 'keeplistindent' is not defined, these spaces are removed.

Macros:
  None

### numlistClose, numlistCompactClose

These tags are emitted, on their own line, to close the list opened by the previous tags.

By default, the indent of a nested list is added (in spaces) at the beginning of the line this tag is on. If the rule 'tagnotindentable' is defined, or the rule 'keeplistindent' is not defined, these spaces are removed.

Macros:
  None

### numlistItemOpen

This tag is emitted before each item within a numbered list.

If the rule 'autonumberlist' is defined, then the target is assumed to put the numbers in itself. In this case Txt2Tags simply emits this tag just like listItemOpen. If it is not defined, then the correct number is calculated and inserted by Txt2tags. It uses the default number format given at the beginning of this subsection above.

By default, the indent of a nested list is added (in spaces) at the beginning of the line this tag is on. If the rule 'tagnotindentable' is defined, or the rule 'keeplistindent' is not defined, these spaces are removed.

If the tag numlistItemLine is defined, it will be emitted immediately before `numlistItemOpen`. If the rule 'listlineafteropen' is defined, numlistItemLine will be emitted after `numlistItemOpen`.

If the rule 'spacednumlistitemopen' is defined, then two spaces will be emitted after `numlistItemOpen` and numlistItemLine, before the list item text.

Macros:
  \a
    If the rule 'autonumberlist' is not defined, then this mark is expanded into the correct number for this list item.
  ~D~
    If this macro is included in the tag, it will be expanded to the value of the depth of that particular list. Top level lists have depth '1', a nested list inside the top level would have depth level '2', and so on.

    If the rule 'blockdepthmultiply' is defined for the target, the depth value will be multiplied by that amount before being emitted. If the rule 'depthmultiplyplus' is defined, then that value will be added to the depth before multiplying by 'blockdepthmultiply', but only if used with 'blockdepthmultiply'.
  ~V~
    This macro will be expanded to the nesting level of the list. It is not affected by 'blockdepthmultiply', so the numbers will always count one by one.

    If the rule 'listlevelzerobased' is defined for a target, then the top level lists will be level '0', the next level '1', and so on. Otherwise, the top level is '1' and the next level '2' and so on.

### numlistItemLine

This tag is emitted for each item in the list. It is emitted either right before or after numlistItemOpen (see above).

This is emitted a number of times equal to the depth level of the list. For example, if `numlistItemLine` is defined as '+', then each item in a list nested three levels deep would begin with '+++'.

Despite the name, this is only emitted at the beginning of each item, and not for every line of the item.

Macros:
  None

### numlistItemClose

This tag is emitted after each item in the list.

Macros:
  None

## 5.3. Definition Lists

Definition lists work a little bit differently from standard lists. Each list item has two parts: the item or word to be defined, and the definition itself.

If the rule 'deflisttextstrip' is defined, then each line of the definition will have extra spaces stripped off, even if 'keeplistindent' is also defined.

If the rule 'blanksarounddeflist' is defined for a target, an extra blank line is emitted before and after the top level list. No additional lines are emitted for nested lists.

If the rule 'blanksaroundnestedlist' is defined for a target, an extra blank line is emitted before and after all lists, including nested lists.

### deflistOpen

This tag is emitted to mark the start of a new definition list.

By default this tag is emitted on its own line. The rule 'notbreaklistopen' is intended to allow listOpen to be on the same line as its first item, however this rule is not yet supported and does not affect the output.

By default, the indent of a nested list is added (in spaces) at the beginning of the line this tag is on. If the rule 'tagnotindentable' is defined, or the rule 'keeplistindent' is not defined, these spaces are removed.

If the rule 'compactlist' is defined for a target, then this tag is only used for wide lists. Otherwise it is used for both.

Macros:
  None

### deflistCompactOpen

This tag marks the beginning of a new compact definition list.

This tag is only used if the rule 'compactlist' is defined.

By default, the indent of a nested list is added (in spaces) at the beginning of the line this tag is on. If the rule 'tagnotindentable' is defined, or the rule 'keeplistindent' is not defined, these spaces are removed.

Macros:
  None

### deflistClose, deflistCompactClose

These tags are emitted, on their own line, to close the list opened by the previous tags.

By default, the indent of a nested list is added (in spaces) at the beginning of the line this tag is on. If the rule 'tagnotindentable' is defined, or the rule 'keeplistindent' is not defined, these spaces are removed.

Macros:
  None

### deflistItem1Open

This tag is emitted before each item within a definition list. It is specifically meant to go before the term to be defined.

By default, the indent of a nested list is added (in spaces) at the beginning of the line this tag is on. If the rule 'tagnotindentable' is defined, or the rule 'keeplistindent' is not defined, these spaces are removed.

If the rule 'imgasdefterm' is defined, then a linked image is allowed as the term to be defined. Otherwise, only text is allowed.

Macros:
  ~D~
    If this macro is included in the tag, it will be expanded to the value of the depth of that particular list. Top level lists have depth '1', a nested list inside the top level would have depth level '2', and so on.

    If the rule 'blockdepthmultiply' is defined for the target, the depth value will be multiplied by that amount before being emitted. If the rule 'depthmultiplyplus' is defined, then that value will be added to the depth before multiplying by 'blockdepthmultiply', but only if used with 'blockdepthmultiply'.
  ~V~
    This macro will be expanded to the nesting level of the list. It is not affected by 'blockdepthmultiply', so the numbers will always count one by one.

    If the rule 'listlevelzerobased' is defined for a target, then the top level lists will be level '0', the next level '1', and so on. Otherwise, the top level is '1' and the next level '2' and so on.

### deflistItem1Close

This tag is emitted after each definition term, but before the definition itself, for each item in the list.

Macros:
  None

### deflistItem2Open

This tag is emitted directly after deflistItem1Close, and is used right before the definition text of the item.

Macros:
  None

### deflistItem2LinePrefix

This tag is emitted at the beginning of each line of the definition text for each item.

Note that it is not multiplied for nexted lists. It is the same for every level of a nested list.

If the rule 'keeplistindent' is defined and 'deflisttextstrip' is not defined, then this is emitted after the indent for each line of the list.

Macros:
  None

### deflistItem2Close

This tag is emitted at the end of each definition, and therefor at the end of each item of the definition list.

For examples, the tags for a definition list are emitted as follows: `deflistOpen`, `deflistItem1Open`, `deflistItem1Close`, `deflistItem2Open`, (`deflistItem2LinePrefix` for each line), `deflistItem2Close`, `deflistItem1Open`, and so on for the entire list.

Macros:
  None

# 6. Tables

Tables allow the user to arrange data in rows and columns for better organization. Some targets support very complicated tables, while others only support limited options within tables or do not support tables at all. Txt2tags is limited to the most basic and most common table options usable by the greatest number of targets.

If the rule 'tableable' is not defined, then the table markup is emitted unchanged from the source document and put inside a verbatim block.

If the rule 'blanksaroundtable' is defined, then an extra blank line will be emitted before and after the table markup.

## 6.1. Macros

Because of how complicated most table markup can be, there are several macro tags that can be defined that may be expanded by several other tags. These tags will all be defined here to be easier to find in this reference.

### _tableBorder

This tag may be inserted into the outer table and row tags to designate that this table should have a border.

For tags that support it, it will replace the macro ~B~.

### _tableCellBorder

This tag may be inserted into the markup of each individual cell to designate that this table should have a border.

It will replace the macro ~B~.

### _tableAlignLeft, _tableAlignCenter

These tags may be inserted into the outer table and row tags to designate how the entire table should be aligned within the document, if the target supports table alignment.

Note that Txt2tags does not currently allow right-aligned tables.

Whichever tag is appropriate will replace the macro ~A~.

### _tableColAlignLeft, _tableColAlignRight, _tableColAlignCenter

If the rule 'tablecellaligntype' is set to the value 'column' for the target, then these tags may be inserted into the outer table or row tags for that table.

These alignment settings will be used for each cell in the column, for targets that do not support per-cell alignment.

The column alignment 'group' is made out of several copies of these tags, one for each column in the table. They may be separated by tableColAlignSep. Then the entire group is inserted into the appropriate opening tags of the table.

The column alignment group will replace the macro ~C~.

### tableColAlignSep

If the table has a border, then each item in the column alignment group (see above) will be separated by this tag. It is also used in multicolumn cells (see below) for the same purpose.

Note that, if the table does not have a border, then not only will this tag not be inserted into the alignment group, but any copies of the tag already in the relevant tags of the table will also be removed.

### _tableCellAlignLeft, _tableCellAlignRight, _tableCellAlignCenter

If the rule 'tablecellaligntype' is set to the value 'cell' for the target, then these tags may be inserted into the cell tags for the table. This is for targets that support per-cell alignment.

The alignment tag will replace the macro ~A~.

### _tableCellColSpan

If the rule 'tablecellspannable' is defined for a target, then this tag will be inserted into cells that span more than one column.

It replaces the macro ~S~.

Macros:
  \a
    This mark is used inside the tag to give the span of the cell. It is replaced with the numeric value of the number of columns that this cell spans.

    `_tableCellColSpan` will only be emitted for cells that have a span value greater than '1'.

    If the rule 'cellspancumulative' is defined for a target, then this value will grow for each cell in a row. That is, cell '1' will have a span value of '1', cell '2' will have a span value of '2', and so on, with spanned cells increasing the value more.

    If the rule 'cellspanmultiplier' is defined for a target, then the span value will be multiplied by this value, after accumulation if appropriate.

### _tableCellColSpanChar

If the rule 'tablecellspannable' is defined for a target and this tag is also defined, it will be used instead of _tableCellColSpan.

This tag will be emitted the same number of times as columns that the cell spans, minus 1. For example, if the tag is defined as '|', and a cell spans three columns, then '||' will be emitted.

The tag, however many need to be emitted, will replace the macro ~S~.

### _tableAttrDelimiter

This tag may be inserted into cells that have either a cell alignment or a cell span to insert. This may be used to separate the cell attributes from the body of the cell itself.

If the cell has neither an alignment or span to insert, then the macro for this tag is removed.

This tag will replace the macro ~Z~.

## 6.2. Table Structure

### tableOpen, tableClose

These tags are the first and last tag emitted for a table. They are emitted on lines of their own, and are emitted only once for each table.

Macros:
  ~A~
    This will be replaced with _tableAlign* for a left or center aligned table.
  ~B~
    This will be replaced with the _tableBorder tag for tables that have a border, or removed otherwise.
  ~C~
    If the rule 'tablecellaligntype' is set to 'column', then this will be replaced with the column alignment group for the table. (See _tableColAlign* above.)

### tableRowOpen

This tag is emitted at the beginning of each row of cells.

By default each row is emitted on a single line. If the rule 'breaktablelineopen' is defined, then a linebreak will be emitted after this tag before the cells.

Macros:
  ~A~
    This will be replaced with _tableAlign* for a left or center aligned table.
  ~B~
    This will be replaced with the _tableBorder tag for tables that have a border, or removed otherwise.
  ~C~
    If the rule 'tablecellaligntype' is set to 'column', then this will be replaced with the column alignment group for the table. (See _tableColAlign* above.)

### tableTitleRowOpen

This tag, if defined, will be used instead of tableRowOpen for title rows. If it is not defined, tableRowOpen will be used for all rows.

Note that title rows are not required, and do not need to be the first row of a table.

If the rule 'breaktablelineopen' is defined, then a linebreak will be emitted after this tag before the cells.

Macros:
  ~A~
    This will be replaced with _tableAlign* for a left or center aligned table.
  ~B~
    This will be replaced with the _tableBorder tag for tables that have a border, or removed otherwise.
  ~C~
    If the rule 'tablecellaligntype' is set to 'column', then this will be replaced with the column alignment group for the table. (See _tableColAlign* above.)

### tableRowClose, tableTitleRowClose

These tags are emitted at the end of each row begun by the tags above.

If `tableTitleRowClose` is not defined, `tableRowClose` will be used instead.

Macros:
  ~A~
    This will be replaced with _tableAlign* for a left or center aligned table.
  ~B~
    This will be replaced with the _tableBorder tag for tables that have a border, or removed otherwise.
  ~C~
    If the rule 'tablecellaligntype' is set to 'column', then this will be replaced with the column alignment group for the table. (See _tableColAlign* above.)

### tableRowSep

This tag will be emitted in between each row of cells.

Note that if this tag is defined, then tableRowOpen and tableRowClose will not be used at all.

Macros:
  ~A~
    This will be replaced with _tableAlign* for a left or center aligned table.
  ~B~
    This will be replaced with the _tableBorder tag for tables that have a border, or removed otherwise.
  ~C~
    If the rule 'tablecellaligntype' is set to 'column', then this will be replaced with the column alignment group for the table. (See _tableColAlign* above.)

## 6.3. Cells

Each cell of data for a table may be marked up separately.

By default, each row of cells is emitted on a single line. If the rule 'breaktablecell' is defined for a target, then a linebreak will be emitted after each cell.

If the rule 'tablecellstrip' is defined for a target, then any extra spaces will be stripped from each cell before it is emitted. Otherwise, all spaces from the source document (including that used to determine cell alignment) will be included in the final output.

If the rule 'tabletitlerowinbold' is defined, then all cells considered part of a title row will have their contents wrapped in fontBoldOpen and fontBoldClose tags.

### tableCellOpen, tableTitleCellOpen

These tags are emitted at the beginning of each cell within the table. If `tableTitleCellOpen` is defined, then it will be used for the cells on a title row. Otherwise, `tableCellOpen` will be used for all cells.

Macros:
  ~A~
    If the rule 'tablecellaligntype' is set to the value 'cell' for a target, then this will be replaced with the appropriate _tableCellAlign* tag.
  ~B~
    If the table has a border, this will be replaced with the _tableCellBorder tag, or removed if not.
  ~S~
    If the rule 'tablecellspannable' is defined, and the cell spans multiple columns, then this tag will be replaced with the value of either _tableCellColSpanChar or _tableCellColSpan as appropriate.
  ~Z~
    If the cell has and alignment or column span to be inserted, then this tag will be replaced with _tableAttrDelimiter. If the cell has neither, then it will be removed.

### tableCellClose, tableTitleCellClose

These tags are emitted at the end of each cell within the table. If `tableTitleCellClose` is defined, then it will be used for the cells on a title row. Otherwise, `tableCellClose` will be used for all cells.

Macros:
  ~A~
    If the rule 'tablecellaligntype' is set to the value 'cell' for a target, then this will be replaced with the appropriate _tableCellAlign* tag.
  ~B~
    If the table has a border, this will be replaced with the _tableCellBorder tag, or removed if not.
  ~S~
    If the rule 'tablecellspannable' is defined, and the cell spans multiple columns, then this tag will be replaced with the value of either _tableCellColSpanChar or _tableCellColSpan as appropriate.

### tableCellSep, tableTitleCellSep

These tags are emitted in between each cell of a row. If `tableTitleCellSep` is defined, then it will be used for the cells on a title row. Otherwise, `tableCellSep` will be used for all cells.

These tags are only emited between cells. They do not appear before the first cell of a row or after the last cell of a row.

Note that, unlike tableRowSep, these tags are used as well as tableCellOpen and tableCellClose. If all are defined, then `tableCellSep` will be emitted after `tableCellClose` and before the next `tableCellOpen`.

Macros:
  None

### _tableCellMulticolOpen

If the rule 'tablecellmulticol' is defined for a target, and a cell spans more than one column, then this tag will be used instead of tableCellOpen.

Macros:
  \a
    This will be replaced with the current cell's column span value. See _tableCellColSpan above for an explanation of this value.
  ~A~
    If the rule 'tablecellaligntype' is set to the value 'cell' for a target, then this will be replaced with the appropriate _tableCellAlign* tag.
  ~Z~
    If the cell has an alignment or column span to be inserted, then this tag will be replaced with _tableAttrDelimiter. If the cell has neither, then it will be removed.

### _tableCellMulticolClose

If the rule 'tablecellmulticol' is defined for a target, and a cell spans more than one column, then this tag will be used instead of tableCellClose.

Macros:
  None

### tableCellHead, tableTitleCellHead

These tags are use to define 'headers', one for each cell, that are inserted at the beginning of a row before the cell data itself.

For example, the order of tags for a row with three cells may be `tableRowOpen`, `tableCellHead`, `tableCellHead`, `tableCellHead`, `tableCellOpen`, and so on.

If `tableTitleCellHead` is defined, it will be used for cells in a title row, otherwise `tableCellHead` will be used for all rows.

Macros:
  ~A~
    If the rule 'tablecellaligntype' is set to the value 'cell' for a target, then this will be replaced with the appropriate _tableCellAlign* tag.
  ~B~
    If the table has a border, this will be replaced with the _tableCellBorder tag, or removed if not.
  ~S~
    If the rule 'tablecellspannable' is defined, and the cell spans multiple columns, then this tag will be replaced with the value of either _tableCellColSpanChar or _tableCellColSpan as appropriate.

### tableCellAlignLeft, tableCellAlignRight, tableCellAlignCenter

If these tags are defined and a cell has an alignment attribute, then the cell text will be wrapped by the appropriate tag before it is emitted.

Note that these cells do not begin with an underscore. Do not get them confused with the _tableCellAlign* tags, which replace macros within the other cell tags.

Macros:
  \a
    This will be replaced by the text of the cell itself.

# 7. Miscellaneous

These tags are useful or necessary for a fully implemented target, but did not fit well within the other categories.

## 7.1. Document Structure and Formatting

### pageBreak

For targets that support separation into pages, this tag is used to force a page break in the output.

### bar1, bar2

These tags are used to insert a horizontal line in the output, usually used as a lesser section break without beginning a new section.

`bar1` is considered a normal line, and `bar2` is considered a strong or thick line.

If the rule 'barinsidequote' is defined, then a bar is allowed inside a block quote. Otherwise the block quote must be closed and reopened around the bar.

If the rule 'mapbar2pagebreak' is defined, then the value of `bar2` is ignored and a pageBreak is emitted instead.

Macros:
  \a
    If this mark is present, it will be replaced with the text of the actual marks used for the bar in the source document.

### EOD

This is the End Of Document tag, and is the very last thing emitted to the output.

Any tags that were opened in the default HEADER_TEMPLATE should be closed in this tag.

If the command line option --template is used, then this tag is not emitted. Anything necessary for a complete document should be included in the template.

The default template can thus be considered: HEADER_TEMPLATE + %%body + `EOD`.

### bodyOpen, bodyClose

These are the first and last tags emitted for the document body text itself. `bodyOpen` is emitted immediately after HEADER_TEMPLATE and `bodyClose` is immediately before EOD.

## 7.2. HTML

### cssOpen, cssClose

These tags are used to insert a stylesheet directly into the text of the output document itself.

If the command line option --css-inside is used, then the contents of external stylesheets will be inserted into the document header. Each stylesheet will be wrapped in these tags before being emitted.

Currently this option, and these tags, are only used by the HTML family of targets, are have no effect on any other target.

## 7.3. Comments

### comment

This tag is used to insert a single line comment into the output. It should be such that it will not appear to readers in the final document, only in the tagged source of the document.

It is used, if available, to insert a comment at the end of the docment stating the date and version of Txt2tags used to generate the output document.

Macros:
  \a
    This is replaced with the text of the comment generated by Txt2tags.

### blockCommentOpen, blockCommentClose

These are intended to be used before and after multiline comments in the output.

Currently, all comments in the source are ignored, so these tags are unused.

## 7.4. Table Of Contents

The automatic table of contents is emitted as a list, with each list item corresponding to a title* within the document. Lower level titles will be emitted as nested lists.

If the target supports them, each list item in the list will be a link to the corresponding title. Each title will have an anchor added automatically if they do not have one already.

If the rule 'autotocwithbars' is defined, then a bar1 will be added before and after the table of contents.

If the rule 'blankendautotoc' is defined, then an extra blank line will be added after the table of contents.

If the rule 'autotocnewpagebefore' is defined, then a pageBreak will be emitted before the table of contents.

If the rule 'autotocnewpageafter' is defined, then a pageBreak will be emitted after the table of contents.

### tocOpen, tocClose

These tags will be emitted directly before and after the automatically generated table of contents.

### TOC

This tag is used for targets that support their own table of contents. If this tag is defined, then it will be emitted, on its own, instead of the automatically generated table of contents. No other processing will be done and all of the rules pretaining to the automatic table of contents will be ignored.

# Appendix: Rules

### linkable

This target supports external links.

It affects the output of url, urlMark, urlMarkAnchor, email, emailMark.

### tableable

This target supports tables. If this is not defined, then all tags in the Table section are ignored.

### imglinkable

This target supports images as links.

It may affect the output of url and img.

### imgalignable

This target supports image alignment. If it is not defined, then all _imgAlign and imgAlign tags are ignored.

It affects the output of img.

### imgasdefterm

This target supports images as definition terms.

It may affect the output of deflistItem1Open.

### autonumberlist

This target supports numbered lists natively. If this is defined, then numbers will not be generated by Txt2tags for numbered lists.

It affects the output of numlistItemOpen.

### autonumbertitle

This target supports numbered titles natively. If this is defined, then numbers will not be generated by Txt2tags for numbered titles.

It affects the output of numtitle*.

### stylable

This target supports external style files. If this is defined, then the %(STYLE)s macros may be expanded. Otherwise style definitions are ignored.

It affects the output of the Template

### parainsidelist

This target supports paragraph tags inside lists. If this is defined, then paragraphOpen and paragraphClose tags may be inserted into lists.

### compactlist

This target has separate enclosing tags for compact lists. If this is not defined, then listCompactOpen, numlistCompactOpen, and deflistCompactOpen are ignored.

### spacedlistitem

This target supports blank lines between items in lists.

This rule is currently unused and ignored.

### listnotnested

This target does not support nested lists.

If this is defined, then all lists are emitted as a single, top-level list. It affects the output of lists.

### listitemnotnested

This target does not allow nested lists to be inside a list item.

If this is defined, then list items are closed before sublists are emitted. If it is not defined, then list items are closed after the sublists they contain. It affects the output of lists.

### quotenotnested

This target does not support nested quotes.

If this is defines, all block quotations are emitted at the same, top level. If affects the output of block quotes.

### verbblocknotescaped

This target should not run verbatim blocks through doEscape().

It affects the output of verbatim blocks.

### verbblockfinalescape

This target should run verbatim blocks through doFinalEscape().

It affects the output of verbatim blocks.

### escapeurl

This target should run URLs through doEscape().

It affects the output of url, urlMark, urlMarkAnchor, email, and emailMark.

### labelbeforelink

For this target, labels should come before the link in a URL.

It affects the output of urlMark, urlMarkAnchor, and emailMark.

### onelinepara

This target should emit paragraphs as a single long line.

It affects the output of paragraphs.

### tabletitlerowinbold

This target should manually emit table title rows in bold face.

It affects the output of table cells.

### tablecellstrip

This target should strip extra spaces from each table cell.

It affects the output of table cells.

### tablecellspannable

This target supports the span attribute in table cells.

It may affect the output of tableCellOpen, tableCellClose, and tableCellHead.

### tablecellmulticol

This target has separate open and close tags for multicolumn cells.

If it is defined, then _tableCellMulticolOpen will be used for multicolumn cells instead of tableCellOpen.

### barinsidequote

This target allows horizontal bars inside block quotes.

It affects the output of block quotes, and uses bar1.

### finalescapetitle

This target should run the text of titles through doFinalEscape()

It affects the output of titles.

### autotocnewpagebefore

This target should emit a pageBreak before the automatic Table of Contents.

### autotocnewpageafter

This target should emit a pageBreak after the automatic Table of Contents.

### autotocwithbars

This target should emit a bar1 before and after the automatic Table of Contents.

### mapbar2pagebreak

This target should use a pageBreak instead of bar2. If it is defined, the anything defined for `bar2` is ignored.

### titleblocks

This target uses title and section blocks.

If it is defined, then title* tags are ignored. Instead title*Open and blockTitle*Open tags will be used to set off titles and sections.

This affects the output of titles.

### listlineafteropen

This target should emit listItemLine after listItemOpen.

### escapexmlchars

This target should escape the XML special characters: < > &

### listlevelzerobased

This target should start list levels at 0 when encoding the level into list tags.

It affects the output of listItemOpen, numlistItemOpen, and deflistItemOpen.

### zerodepthparagraph

For this target, non-nested paragraphs should have block depth of 0 instead of 1 when the block depth is encoded into the output.

This affects the output of paragraphOpen.

### cellspancumulative

For this target, cell span values add up for each cell of a row.

It affects the output of _tableCellColSpan, and from that it may affect the output of tableCellOpen, tableCellClose, tableCellHead, and _tableCellMulticolOpen.

### keepblankheaderline

For this target, template lines are not removed if the macros being inserted are blank.

This affects the output of the template.

### indentverbblock

This target should add leading spaces to verb block lines.

It affects the output of verbatim blocks.

### breaktablecell

This target should insert line breaks after every table cell.

If affects the output of table cells.

### breaktablelineopen

This target should insert a line break after tableRowOpen and tableTitleRowOpen.

### notbreaklistopen

This target should not insert a line break after listOpen, numlistOpen or deflistOpen.

### keepquoteindent

This target should not remove the leading TABs in block quotes.

It affects the output of block quotations.

### keeplistindent

This target should not remove the leading spaces on list tags.

It affects the output of all tags for lists.

### blankendautotoc

This target should append a blank line at the end of the automatic Table of Contents.

### tagnotindentable

For this target, tags must be placed at the line beginning.

If affects the tags for block quotes and lists.

### spacedlistitemopen

This target should append a space after listItemOpen.

### spacednumlistitemopen

This target should append a space after numlistItemOpen.

### deflisttextstrip

This target should strip the whitespace off of the definition list text.

It affects the output of definition lists.

### blanksaroundpara

This target should put a blank line before and after paragraphs.

It affects the output of paragraphs.

### blanksaroundverb

This target should put a blank line before and after verb blocks.

It affects the output of verbatim blocks.

### blanksaroundquote

This target should put a blank line before and after quotes.

It affects the output of block quotations.

### blanksaroundlist

This target should put a blank line before and after lists.

It affects the output of regular lists.

### blanksaroundnumlist

This target should put a blank line before and after numbered lists.

It affects the output of [numbered lists [#section-NumberedLists].

### blanksarounddeflist

This target should put a blank line before and after definition lists.

It affects the output of [definition lists [#section-DefinitionLists].

### blanksaroundnestedlist

This target should put a blank line before and after all types of nested lists.

It affects the output of all lists.

### blanksaroundtable

This target should put a blank line before and after tables.

It affects the output of tables.

### blanksaroundbar

This target should put a blank line before and after horizontal lines.

It affects the output of bar1 and bar2.

### blanksaroundtitle

This target should put a blank line before and after titles.

It affects the output of title* and title*Open.

### blanksaroundnumtitle

This target should put a blank line before and after numbered titles.

If affects the output of numtitle*.

### listmaxdepth

This is a value rule defining the maximum nesting depth for lists.

It affects the output of lists.

### quotemaxdepth

This is a value rule defining the maximum nesting depth for block quotes.

It affects the output of block quotations.

### tablecellaligntype

This is a value rule defining the type of alignment allowed for tables cells. The legal values are 'cell' or 'column'.

Its value affects whether _tableColAlign* or _tableCellAlign* tags are used.

It may affect the output of tableOpen, tableRowOpen, tableRowSep, tableCellOpen, _tableCellMulticolOpen, tableCellHead, and other related tags.

### blockdepthmultiply

This value rule changes the value of a blocks depth value, for targets that encode depth into the output tags.

It may affect the output of paragraphOpen, blockQuoteOpen, listItemOpen, numlistItemOpen, and deflistItemOpen.

### depthmultiplyplus

This value rule is added to add to the block depth before multiplying by 'blockdepthmultiply'.

It may affect the output of paragraphOpen, blockQuoteOpen, listItemOpen, numlistItemOpen, and deflistItemOpen.

### cellspanmultiplier

This value rule changes the value of a table cell span.

It affects the output of _tableCellColSpan, and from that may affect the output of tableCellOpen, tableCellClose, _tableCellMulticolOpen and tableCellHead.