summaryrefslogtreecommitdiff
path: root/asciidoc.conf
blob: eccece59d949cf3863307cd8ab7544f2edb08e14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
#
# 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>\w[^.]*?)(\.(?P<attrname2>.*?))?:(\s+(?P<attrvalue>.*))?$
attributelist-pattern=(?u)(^\[\[(?P<id>[\w\-_]+)(,(?P<label>.*?))?\]\]$)|(^\[(?P<attrlist>.*)\]$)
# Substitution attributes for escaping AsciiDoc processing.
amp=&
lt=<
gt=>
brvbar=|
nbsp=&#160;
wj=&#8288;
deg=&#176;
backslash=\
two_colons=::
two_semicolons=;;
# Captions, used by XHTML 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 the specified
# language file is missing.
caution_caption=Caution
important_caption=Important
note_caption=Note
tip_caption=Tip
warning_caption=Warning
figure_caption=
table_caption=
toc_title=Table of Contents

[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].*)|(\.[^.\s].*))$

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

[quotes]
# The order is important, quotes are processed in conf file order.
**=#strong
*=strong
``|''=doublequoted
'=emphasis
`|'=singlequoted
`=monospaced
# +++ and $$ quoting is applied to the +++ and $$ inline passthrough
# macros to allow quoted attributes to be used.
# This trick only works with inline passthrough macros.
+++=#unquoted
$$=#unquoted
++=#monospaced
+=monospaced
__=#emphasis
_=emphasis
\##=#unquoted
\#=unquoted
^=#superscript
~=#subscript

[specialwords]
emphasizedwords=
strongwords=
monospacedwords=

[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 escaped 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;).
# Space on both sides is translated to thin space characters.
(^-- )=&#8212;&#8201;
(\n-- )|( -- )|( --\n)=&#8201;&#8212;&#8201;
(\w)--(\w)=\1&#8212;\2
\\--(?!-)=--

# Replace vertical typewriter apostrophe with punctuation apostrophe.
(\w)'(\w)=\1&#8217;\2

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

# Arrows from the Arrows block of Unicode.
# -> right arrow
(?<!\\)-&gt;=&#8594;
\\-&gt;=-&gt;
# => right double arrow
(?<!\\)\=&gt;=&#8658;
\\\=&gt;==&gt;
# <- left arrow
(?<!\\)&lt;-=&#8592;
\\&lt;-=&lt;-
# <= left double arrow
(?<!\\)&lt;\==&#8656;
\\&lt;\==&lt;=

# Arbitrary entity references.
(?<!\\)&amp;([:_#a-zA-Z][:_.\-\w]*?;)=&\1
\\(&amp;[:_#a-zA-Z][:_.\-\w]*?;)=\1

#-----------
# 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.

# Macros using default syntax.
(?su)[\\]?(?P<name>http|https|ftp|file|irc|mailto|callto|image|link|anchor|xref|footnote|footnoteref|indexterm):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=

# These URL types don't require any special attribute list formatting.
(?su)(?<!\S)[\\]?(?P<name>http|https|ftp|file|irc):(?P<target>//[^\s<>]*[\w/])=
# Allow a leading parenthesis.
(?su)(?<\=\()[\\]?(?P<name>http|https|ftp|file|irc):(?P<target>//[^\s<>]*[\w/])=
# Allow <> brackets.
(?su)[\\]?&lt;(?P<name>http|https|ftp|file|irc):(?P<target>//[^\s<>]*[\w/])&gt;=

# Email addresses don't require special attribute list formatting.
# The before ">: and after "< character exclusions stop multiple substitution.
(?su)(?<![">:\w])[\\]?(?P<target>\w[\w._-]*@[\w._-]*\w)(?!["<\w.])=mailto

# 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

# Passthrough macros.
(?su)[\\]?(?P<name>pass):(?P<subslist>\S*?)\[(?P<passtext>.*?)(?<!\\)\]=[]

# Triple-plus and double-dollar inline passthroughs.
(?su)[\\]?\+\+\+(?P<passtext>.*?)\+\+\+=pass[]
(?su)[\\]?\$\$(?P<passtext>.*?)\$\$=pass[specialcharacters]

# Inline comment.
(?mu)^[\\]?//(?P<passtext>[^/].*|)$=comment[normal]

# Default (catchall) inline macro is not implemented so there is no ambiguity
# with previous definition that could result in double substitution of escaped
# references.
#(?su)[\\]?(?P<name>\w(\w|-)*?):(?P<target>\S*?)\[(?P<passtext>.*?)(?<!\\)\]=

#-------------
# Block macros
#-------------
# Macros using default syntax.
(?u)^(?P<name>image)::(?P<target>\S*?)(\[(?P<attrlist>.*?)\])$=#

# Passthrough macros.
(?u)^(?P<name>pass)::(?P<subslist>\S*?)(\[(?P<passtext>.*?)\])$=#

^'{3,}$=#ruler
^<{3,}$=#pagebreak
^//(?P<passtext>[^/].*|)$=#comment[normal]

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

[blockdef-sidebar]
delimiter=^\*{4,}$
template=sidebarblock
options=sectionbody
posattrs=style
abstract-style=template="abstractblock"

[blockdef-open]
# A block without opening or closing tags.
delimiter=^--$
template=openblock
options=sectionbody

[openblock]
|

[blockdef-pass]
delimiter=^\+{4,}$
template=passblock
# Default subs choosen for backward compatibility.
subs=attributes,macros
posattrs=style
pass-style=template="passblock",subs=[]

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

[blockdef-literal]
delimiter=^\.{4,}$
template=literalblock
subs=verbatim
posattrs=style
listing-style=template="listingblock"
# DEPRECATED: Use verse style on quote blocks instead.
verse-style=template="verseblock",subs="normal"

[blockdef-quote]
delimiter=^_{4,}$
subs=normal
style=quote
posattrs=style,attribution,citetitle
quote-style=template="quoteblock",options=("sectionbody",)
verse-style=template="verseblock"

[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}"

# For use by custom filters.
# NOTE: No longer used, a styled listing block (blockdef-listing) is preferable.
[blockdef-filter]
delimiter=^~{4,}$
template=listingblock
subs=none
posattrs=style

#-------
# Lists
#-------
[listdef-bulleted]
# - bullets.
delimiter=^\s*- +(?P<text>.+)$
posattrs=style
type=bulleted
tags=bulleted
callout-style=tags="callout"
bibliography-style=tags="bibliography"

[listdef-bulleted1]
# * bullets.
template::[listdef-bulleted]
delimiter=^\s*\* +(?P<text>.+)$

[listdef-bulleted2]
# ** bullets.
template::[listdef-bulleted]
delimiter=^\s*\*{2} +(?P<text>.+)$

[listdef-bulleted3]
# *** bullets.
template::[listdef-bulleted]
delimiter=^\s*\*{3} +(?P<text>.+)$

[listdef-bulleted4]
# **** bullets.
template::[listdef-bulleted]
delimiter=^\s*\*{4} +(?P<text>.+)$

[listdef-bulleted5]
# ***** bullets.
template::[listdef-bulleted]
delimiter=^\s*\*{5} +(?P<text>.+)$

[listdef-arabic]
# Arabic numbering.
delimiter=^\s*(?P<index>\d+\.) +(?P<text>.+)$
posattrs=style
type=numbered
tags=numbered
style=arabic

[listdef-loweralpha]
# Lower alpha numbering.
template::[listdef-arabic]
delimiter=^\s*(?P<index>[a-z]\.) +(?P<text>.+)$
style=loweralpha

[listdef-upperalpha]
# Upper alpha numbering.
template::[listdef-arabic]
delimiter=^\s*(?P<index>[A-Z]\.) +(?P<text>.+)$
style=upperalpha

[listdef-lowerroman]
# Lower roman numbering.
template::[listdef-arabic]
delimiter=^\s*(?P<index>[ivx]+\)) +(?P<text>.+)$
style=lowerroman

[listdef-upperroman]
# Upper roman numbering.
template::[listdef-arabic]
delimiter=^\s*(?P<index>[IVX]+\)) +(?P<text>.+)$
style=upperroman

[listdef-numbered1]
# . numbering.
template::[listdef-arabic]
delimiter=^\s*\. +(?P<text>.+)$

[listdef-numbered2]
# .. numbering.
template::[listdef-loweralpha]
delimiter=^\s*\.{2} +(?P<text>.+)$

[listdef-numbered3]
# ... numbering.
template::[listdef-lowerroman]
delimiter=^\s*\.{3} +(?P<text>.+)$

[listdef-numbered4]
# .... numbering.
template::[listdef-upperalpha]
delimiter=^\s*\.{4} +(?P<text>.+)$

[listdef-numbered5]
# ..... numbering.
template::[listdef-upperroman]
delimiter=^\s*\.{5} +(?P<text>.+)$

[listdef-labeled]
# label:: item.
delimiter=^\s*(?P<label>.*[^:])::(\s+(?P<text>.+))?$
posattrs=style
type=labeled
tags=labeled
vertical-style=tags="labeled"
horizontal-style=tags="horizontal"
glossary-style=tags="glossary"
qanda-style=tags="qanda"

[listdef-labeled2]
# label;; item.
template::[listdef-labeled]
delimiter=^\s*(?P<label>.*[^;]);;(\s+(?P<text>.+))?$

[listdef-labeled3]
# label::: item.
template::[listdef-labeled]
delimiter=^\s*(?P<label>.*[^:]):{3}(\s+(?P<text>.+))?$

[listdef-labeled4]
# label:::: item.
template::[listdef-labeled]
delimiter=^\s*(?P<label>.*[^:]):{4}(\s+(?P<text>.+))?$

[listdef-callout]
posattrs=style
delimiter=^<?(?P<index>\d*>) +(?P<text>.+)$
type=callout
tags=callout
style=arabic

# DEPRECATED: Old list syntax.
[listdef-qanda]
posattrs=style
delimiter=^\s*(?P<label>.*\S)\?\?$
type=labeled
tags=qanda

# DEPRECATED: Old list syntax.
[listdef-bibliography]
posattrs=style
delimiter=^\+ +(?P<text>.+)$
type=bulleted
tags=bibliography

# DEPRECATED: Old list syntax.
[listdef-glossary]
delimiter=^(?P<label>.*\S):-$
posattrs=style
type=labeled
tags=glossary

#-------
# Tables
#-------
[tabledef-default]
delimiter=^\|={3,}$
# Like normal subs but quotes are substituted a second time after attributes so
# {include:} contents are marked up (maybe this should be the system wide
# asciidoc.py SUBS_NORMAL).
subs=specialcharacters,quotes,attributes,quotes,specialwords,replacements,macros
posattrs=style
template=table
default-style=tags="default"
verse-style=tags="verse"
literal-style=tags="literal",subs=["specialcharacters"]
emphasis-style=tags="emphasis"
strong-style=tags="strong"
monospaced-style=tags="monospaced"
asciidoc-style=tags="asciidoc",subs=[],filter='python "{asciidoc-file}" -b {backend} -s -'

[tabledef-nested]
# Same as [tabledef-default] but with different delimiter and separator.
delimiter=^!={3,}$
separator=((?P<cellcount>\d+)\*)?!
subs=specialcharacters,quotes,attributes,quotes,specialwords,replacements,macros
posattrs=style
template=table
verse-style=tags="verse"
literal-style=tags="literal",subs=["specialcharacters"]
emphasis-style=tags="emphasis"
strong-style=tags="strong"
monospaced-style=tags="monospaced"
asciidoc-style=tags="asciidoc",subs=[],filter='python "{asciidoc-file}" -b {backend} -s -'

#----------------------------------------
# Common block and macro markup templates
#----------------------------------------
[comment-inlinemacro]
# Outputs nothing.

[comment-blockmacro]
# Outputs nothing.

[pass-blockmacro]
{passtext}

[pass-inlinemacro]
template::[pass-blockmacro]

[passblock]
|

#--------------------------------------------------------------------
# Deprecated old table definitions.
#

[old_tabledef-default]
fillchar=-
format=fixed

[old_tabledef-csv]
fillchar=~
format=csv

[old_tabledef-dsv]
fillchar=_
format=dsv

# End of deprecated old table definitions.
#--------------------------------------------------------------------