Source

asciidoc / asciidoc.conf

Full commit
#
# asciidoc.conf
#
# Asciidoc global configuration file.
# Contains backend independent configuration settings that are applied to all
# AsciiDoc documents.
#

[miscellaneous]
tabsize=8
textwidth=70
newline=\r\n

[attributes]
sectids=
iconsdir=./images/icons
encoding=UTF-8
quirks=
empty=
# Attribute and AttributeList element patterns.
attributeentry-pattern=^:(?P<attrname>[a-zA-Z].*?):(?P<attrvalue>.*)$
attributelist-pattern=(?u)(^\[\[(?P<id>[\w\-_]+)\]\]$)|(^\[(?P<attrlist>.*)\]$)
# Substitution attributes for escaping AsciiDoc processing.
amp=&
lt=<
gt=>
brvbar=|
nbsp=&#160;
backslash=\
two_colons=::
two_semicolons=;;
# Captions, used by HTML backends.
# The reason these language specific attributes are not in a lang-en.conf
# file is so that the output will fall back to English if ther specified
# language file is missing.
caution_caption=Caution
important_caption=Important
note_caption=Note
tip_caption=Tip
warning_caption=Warning
figure_caption="Figure: "
table_caption="Table: "

[titles]
subs=specialcharacters,quotes,replacements,macros,attributes
# Double-line title pattern and underlines.
sectiontitle=^(?P<title>.*?)$
underlines="==","--","~~","^^","++"
# Single-line title patterns.
sect0=^= +(?P<title>[\S].*?)( +=)?$
sect1=^== +(?P<title>[\S].*?)( +==)?$
sect2=^=== +(?P<title>[\S].*?)( +===)?$
sect3=^==== +(?P<title>[\S].*?)( +====)?$
sect4=^===== +(?P<title>[\S].*?)( +=====)?$
blocktitle=^\.(?P<title>\S.*)$

[specialcharacters]
&=&amp;
<=&lt;
>=&gt;

[quotes]
# Constrained quotes.
*=strong
'=emphasis
`=monospaced
``|''=quoted
ifdef::asciidoc7compatible[]
\##=unquoted
endif::asciidoc7compatible[]
ifndef::asciidoc7compatible[]
\#=unquoted
_=emphasis
+=monospaced
# Unconstrained quotes.
**=#strong
__=#emphasis
++=#monospaced
\##=#unquoted
^=#superscript
~=#subscript
endif::asciidoc7compatible[]

[specialwords]
emphasizedwords=
strongwords=
monospacedwords=

[tags]
# $$ inline passthrough.
passthrough=|

[replacements]
# Replacements performed in order of configuration file entry.  The first entry
# of each replacement pair performs the (non-escaped) replacement, the second
# strips the backslash from the esaped replacement.

# (C) Copyright (entity reference &copy;)
(?<!\\)\(C\)=&#169;
\\\(C\)=(C)

# (R) registered trade mark (entity reference &reg;
(?<!\\)\(R\)=&#174;
\\\(R\)=(R)

# (TM) Trademark (entity reference &trade;)
(?<!\\)\(TM\)=&#8482;
\\\(TM\)=(TM)

# -- Spaced and unspaced em dashes (entity reference &mdash;)
# But disallow unspaced in man pages because double-dash option name prefixes
# are pervasive.
ifndef::doctype-manpage[]
(^|[^-\\])--($|[^-])=\1&#8212;\2
endif::doctype-manpage[]
ifdef::doctype-manpage[]
(^|\s*[^\S\\])--($|\s+)=\1&#8212;\2
endif::doctype-manpage[]
\\--(?!-)=--

# ... Ellipsis (entity reference &hellip;)
(?<!\\)\.\.\.=&#8230;
\\\.\.\.=...

##
# The following require non-standard embedded fonts in PDF files so are not
# enabled.
# -> right arrow
#-&gt;=&#8594;
# => right double arrow
#=&gt;=&#8658;
# <- left arrow
#&lt;-=&#8592;
# <= left double arrow
#&lt;\==&#8656;

# Paragraphs.
[paradef-default]
delimiter=(?s)(?P<text>\S.*)
template=paragraph
posattrs=style
verse-style=template="verseparagraph"
NOTE-style=template="admonitionparagraph",name="note",caption="{note_caption}"
TIP-style=template="admonitionparagraph",name="tip",caption="{tip_caption}"
IMPORTANT-style=template="admonitionparagraph",name="important",caption="{important_caption}"
WARNING-style=template="admonitionparagraph",name="warning",caption="{warning_caption}"
CAUTION-style=template="admonitionparagraph",name="caution",caption="{caution_caption}"

[paradef-literal]
delimiter=(?s)(?P<text>\s+.*)
options=listelement
template=literalparagraph
subs=verbatim

[paradef-admonition]
delimiter=(?s)^\s*(?P<style>NOTE|TIP|IMPORTANT|WARNING|CAUTION):\s+(?P<text>.+)
NOTE-style=template="admonitionparagraph",name="note",caption="{note_caption}"
TIP-style=template="admonitionparagraph",name="tip",caption="{tip_caption}"
IMPORTANT-style=template="admonitionparagraph",name="important",caption="{important_caption}"
WARNING-style=template="admonitionparagraph",name="warning",caption="{warning_caption}"
CAUTION-style=template="admonitionparagraph",name="caution",caption="{caution_caption}"

[macros]
# Inline macros.
# Backslash prefix required for escape processing.
# (?s) re flag for line spanning.

# Explicit so they can be nested.
(?su)[\\]?(?P<name>(http|https|ftp|file|mailto|callto|image|link)):(?P<target>\S*?)(\[(?P<attrlist>.*?)\])=

# Anchor: [[[id]]]. Bibliographic anchor.
(?su)[\\]?\[\[\[(?P<attrlist>[\w][\w-]*?)\]\]\]=anchor3
# Anchor: [[id,xreflabel]]
(?su)[\\]?\[\[(?P<attrlist>[\w"].*?)\]\]=anchor2
# Link: <<id,text>>
(?su)[\\]?&lt;&lt;(?P<attrlist>[\w"].*?)&gt;&gt;=xref2

ifdef::asciidoc7compatible[]
# Index term: ++primary,secondary,tertiary++
(?su)(?<!\S)[\\]?\+\+(?P<attrlist>[^+].*?)\+\+(?!\+)=indexterm
# Index term: +primary+
# Follows ++...++ macro otherwise it will match them.
(?<!\S)[\\]?\+(?P<attrlist>[^\s\+][^+].*?)\+(?!\+)=indexterm2
endif::asciidoc7compatible[]

ifndef::asciidoc7compatible[]
# Index term: (((primary,secondary,tertiary)))
(?su)(?<!\()[\\]?\(\(\((?P<attrlist>[^(].*?)\)\)\)(?!\))=indexterm
# Index term: ((primary))
# Follows (((...))) macro otherwise it will match them.
(?<!\()[\\]?\(\((?P<attrlist>[^\s\(][^(].*?)\)\)(?!\))=indexterm2
endif::asciidoc7compatible[]

# Callout
[\\]?&lt;(?P<index>\d+)&gt;=callout

# Default inline macro (listed last as a catchall)).
(?su)[\\]?(?P<name>\w(\w|-)*?):(?P<target>\S*?)(\[(?P<attrlist>.*?)\])=

# Block macros.
(?u)^(?P<name>\w(\w|-)*?)::(?P<target>\S*?)(\[(?P<attrlist>.*?)\])$=#
^'{4,}$=#ruler
^//([^/].*|)$=#comment

# System macros.
# This default system macro is hardwired into asciidoc.
#(?u)^(?P<name>\w(\w|-)*?)::(?P<target>\S*?)(\[(?P<attrlist>.*?)\])$=+

# Delimited blocks.
[blockdef-comment]
delimiter=^/{4,}
options=skip

[comment-blockmacro]
# Outputs nothing.

[blockdef-sidebar]
delimiter=^\*{4,}$
template=sidebarblock
options=sectionbody

[blockdef-list]
delimiter=^--$
template=listblock
options=list

[listblock]
|

[blockdef-passthrough]
delimiter=^\+{4,}$
template=passthroughblock
subs=attributes,macros

[blockdef-listing]
delimiter=^-{4,}$
template=listingblock
subs=verbatim

[blockdef-literal]
delimiter=^\.{4,}$
template=literalblock
subs=verbatim
posattrs=style
verse-style=template="verseblock",subs="normal"

[blockdef-quote]
delimiter=^_{4,}$
template=quoteblock
options=sectionbody
subs=normal
posattrs=attribution,citetitle

[blockdef-example]
delimiter=^\={4,}$
template=exampleblock
options=sectionbody
posattrs=style
NOTE-style=template="admonitionblock",name="note",caption="{note_caption}"
TIP-style=template="admonitionblock",name="tip",caption="{tip_caption}"
IMPORTANT-style=template="admonitionblock",name="important",caption="{important_caption}"
WARNING-style=template="admonitionblock",name="warning",caption="{warning_caption}"
CAUTION-style=template="admonitionblock",name="caution",caption="{caution_caption}"


# Lists.
[listdef-bulleted]
type=bulleted
delimiter=^\s*- +(?P<text>.+)$
listtag=ilist
itemtag=ilistitem
texttag=ilisttext

[listdef-bulleted2]
type=bulleted
delimiter=^\s*\* +(?P<text>.+)$
listtag=ilist
itemtag=ilistitem
texttag=ilisttext

[listdef-numbered]
type=numbered
delimiter=^\s*(?P<index>\d*)\. +(?P<text>.+)$
listtag=olist
itemtag=olistitem
texttag=olisttext

[listdef-numbered2]
type=numbered
delimiter=^\s*(?P<index>[.a-z])\. +(?P<text>.+)$
listtag=olist2
itemtag=olistitem
texttag=olisttext

[listdef-vlabeled]
type=labeled
delimiter=^\s*(?P<label>.*\S)::$
listtag=vlist
itemtag=vlistitem
texttag=vlisttext
entrytag=vlistentry
labeltag=vlistterm

[listdef-vlabeled2]
type=labeled
delimiter=^\s*(?P<label>.*\S);;$
listtag=vlist
itemtag=vlistitem
texttag=vlisttext
entrytag=vlistentry
labeltag=vlistterm

[listdef-hlabeled]
type=labeled
delimiter=^\s*(?P<label>.*\S)((::\s*\\)|(::\s+(?P<text>.+)))$
listtag=hlist
itemtag=hlistitem
texttag=hlisttext
entrytag=hlistentry
labeltag=hlistterm

[listdef-hlabeled2]
type=labeled
delimiter=^\s*(?P<label>.*\S)((;;\s*\\)|(;;\s+(?P<text>.+)))$
listtag=hlist
itemtag=hlistitem
texttag=hlisttext
entrytag=hlistentry
labeltag=hlistterm


# Question and Answer list.
[listdef-qanda]
type=labeled
delimiter=^\s*(?P<label>.*\S)\?\?$
listtag=qlist
itemtag=qlistitem
texttag=qlisttext
entrytag=qlistentry
labeltag=qlistterm

# Bibliography list.
[listdef-bibliography]
type=bulleted
delimiter=^\+ +(?P<text>.+)$
listtag=blist
itemtag=blistitem
texttag=blisttext

# Glossary list.
[listdef-glossary]
type=labeled
delimiter=^(?P<label>.*\S):-$
listtag=glist
itemtag=glistitem
texttag=glisttext
entrytag=glistentry
labeltag=glistterm

# Callout list.
[listdef-callout]
type=callout
delimiter=^<?(?P<index>\d*)> +(?P<text>.+)$
listtag=colist
itemtag=colistitem
texttag=colisttext

# Tables.
[tabledef-default]
fillchar=-
format=fixed

[tabledef-csv]
fillchar=~
format=csv

[tabledef-dsv]
fillchar=_
format=dsv