47
AsciiDoc User Guide
70 / 88
32 Block Element Definitions
The syntax and behavior of Paragraph, DelimitedBlock, List and Table block elements is determined by block definitions con-
tained inAsciiDocconfigurationfilesections.
Eachdefinitionconsists of asectiontitle followedbyone or moresectionentries. Eachentrydefinesa blockparameter controlling
some aspect of the block’s behavior. Here’s an example:
[blockdef-listing]
delimiter=^-{4,}$
template=listingblock
presubs=specialcharacters,callouts
Configuration file block definition sections are processed incrementally after each configuration file is loaded. Block definition
section entries are merged into the block definition, this allows block parameters to be overridden and extended by laterloading
configuration files.
AsciiDoc Paragraph, DelimitedBlock, List and Table block elements share a common subset of configuration file parameters:
delimiter
APython regular expression that matches the first line of a block element—in the case of DelimitedBlocks and Tables it
also matches the last line.
template
The name of the configuration file markup template section that will envelope the block contents. The pipe (|) character is
substituted for the block contents. List elements use a set of (list specific) tag parameters instead of a single template. The
template name can contain attribute references allowing dynamic template selection a the time of template substitution.
options
Acomma delimited listof element specific option names. In addition tobeing used internally, options are available during
markup tag and template substitution as attributes with an empty string value named like <option>-option (where
<option> is the option name). Seeattributeoptions for a complete list of available options.
subs, presubs, postsubs
• presubs and postsubs are lists of comma separated substitutions that are performed on the block contents. presubs is
applied first, postsubs (if specified) second.
• subs is an alias for presubs.
• If a filter is allowed (Paragraphs, DelimitedBlocks and Tables) and has been specified then presubs and postsubs substi-
tutions are performed before and after the filter is run respectively.
• Allowed values: specialcharacters, quotes, specialwords, replacements, macros, attributes, callouts.
• The following composite values are also allowed:
none
Nosubstitutions.
normal
The following substitutions in the following order: specialcharacters, quotes, attributes, specialwords, replace-
ments, macros, replacements2.
verbatim
The following substitutions in the following order: specialcharacters andcallouts.
• normal and verbatim substitutions can be redefined by with subsnormal and subsverbatim entries in a configu-
ration file [miscellaneous] section.
• The substitutions are processed in the order in which they are listed and can appear more than once.
filter
This optional entry specifies an executable shell commandfor processing block content (Paragraphs, DelimitedBlocks and
Tables). The filter command can contain attribute references.