1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00
elinks/doc/tools/asciidoc/asciidoc.conf
Kalle Olavi Niemitalo 40715ffbd4 Import and use AsciiDoc 7.1.2 configuration files
In the past, we have hit annoying incompatibilities when
people have attempted to rebuild ELinks documentation
with new versions of AsciiDoc:

http://bugzilla.elinks.cz/show_bug.cgi?id=989
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=491820

So now we bundle the configuration files from a known good version
to let ELinks documentation be built with them regardless of which
version has been installed on the machine.
2008-08-02 11:28:24 +03:00

336 lines
7.8 KiB
Plaintext

#
# 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]
iconsdir=./images/icons
encoding=UTF-8
quirks=
empty=
amp=&
lt=<
gt=>
brvbar=|
nbsp=&#160;
backslash=\
# Attribute and AttributeList element patterns.
attributeentry-pattern=^:(?P<attrname>[a-zA-Z].*?):(?P<attrvalue>.*)$
attributelist-pattern=(?u)(^\[\[(?P<id>[\w\-_]+)\]\]$)|(^\[(?P<attrlist>.*)\]$)
[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]
# Don't use "double-quote" characters -- they interfere with quoted element
# attribute values (see ``alternative'' below).
*=strong
'=emphasis
`=monospaced
``|''=quoted
\##|##=unquoted
[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"
TIP-style=template="admonitionparagraph",name="tip",caption="Tip"
IMPORTANT-style=template="admonitionparagraph",name="important",caption="Important"
WARNING-style=template="admonitionparagraph",name="warning",caption="Warning"
CAUTION-style=template="admonitionparagraph",name="caution",caption="Caution"
[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"
TIP-style=template="admonitionparagraph",name="tip",caption="Tip"
IMPORTANT-style=template="admonitionparagraph",name="important",caption="Important"
WARNING-style=template="admonitionparagraph",name="warning",caption="Warning"
CAUTION-style=template="admonitionparagraph",name="caution",caption="Caution"
[macros]
# Inline macros.
# Backslash prefix required for escape processing.
# (?s) re flag for line spanning.
(?su)[\\]?(?P<name>\w(\w|-)*?):(?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
# Index term: ++primary,secondar,tertiary++
#(?su)(?<!\S)[\\]?\+\+(?P<attrlist>.+?)\+\+(?!\+)=indexterm
(?su)(?<!\S)[\\]?\+\+(?P<attrlist>[^+].*?)\+\+(?!\+)=indexterm
# Index term: +primary+
# Follows ++...++ macro otherwise it will match them.
#(?<!\S)[\\]?\+(?P<attrlist>[^\s\+].*?)\+(?!\+)=indexterm2
(?<!\S)[\\]?\+(?P<attrlist>[^\s\+][^+].*?)\+(?!\+)=indexterm2
# Callout
[\\]?&lt;(?P<index>\d+)&gt;=callout
# Block macros.
(?u)^(?P<name>\w(\w|-)*?)::(?P<target>\S*?)(\[(?P<attrlist>.*?)\])$=#
^'{4,}$=#ruler
^//([^/].*|)$=#comment
# System macros.
# The default macro which 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"
TIP-style=template="admonitionblock",name="tip",caption="Tip"
IMPORTANT-style=template="admonitionblock",name="important",caption="Important"
WARNING-style=template="admonitionblock",name="warning",caption="Warning"
CAUTION-style=template="admonitionblock",name="caution",caption="Caution"
# 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+(?P<text>.+)$
listtag=hlist
itemtag=hlistitem
texttag=hlisttext
entrytag=hlistentry
labeltag=hlistterm
[listdef-hlabeled2]
type=labeled
delimiter=^\s*(?P<label>[\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