summaryrefslogtreecommitdiff
path: root/doc/doc-docbook/MyAsciidoc.conf
blob: 4b09e5a6ad089fb7fc056ddf8b0727a221e44535 (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
# $Cambridge: exim/doc/doc-docbook/MyAsciidoc.conf,v 1.1 2005/06/16 10:32:31 ph10 Exp $

# Asciidoc configuration customization for creating the DocBook XML sources
# of the Exim specification and the filter document.

[miscellaneous]
newline=\n

[quotes]
_=filename
$=varname
%=option
^=command
^^=function
^%|%^=parameter
``|''=quoted

[tags]
strong=<emphasis role="bold">|</emphasis>

filename=<filename>|</filename>
varname=<varname>$|</varname>
option=<option>|</option>
command=<command>|</command>
function=<function>|</function>
parameter=<parameter>|</parameter>
quoted=<quote>|</quote>


[replacements]
# Nothing - this is for disambiguating markup
"##"=

# -- En dash
(^|[^-])--($|[^-])=\1&#x2013;\2

# --- Em dash
(^|\s+)---($|\s+)=\1&#x8212;\2

# -- Hard space
~=&#x00a0;

# ' automatic apostrophe
([A-Za-z0-9])'([A-Za-z\s])=\1&#x2019;\2

# daggers
!!=&#x2020;
!\?=&#x2021;

# The default markup recognizes subscripts and superscripts using tilde and
# circumflex. We don't want this. These settings manage to turn off the
# effect, while still allowing tilde to be recognized as a hard space.
\^(.+?)\^=^\1^
~(.+?)~=~\1~


[attributes]
# Manual apostrophe: needed for an apostrophe after something quoted, because
# I can't get the automatic one to work in that situation
ap=&#x2019;

# Manual tilde: tilde is defined as a hard space, and it doesn't seem possible
# to quote is using a backslash.
tl=&#x007e;

# Two hyphens, to stop them being treated as an en dash
hh=&#x002d;&#x002d;

# Percent: causes confusion with the quote otherwise
pc=&#x0025;

# Colon: there's a case where this causes trouble
co=&#x003A;

# The sequence "[]" for use in index terms
bk=&#x005B;&#x005D;


# We need to add extra stuff to the <bookinfo> element

[header]
<?xml {xmldecl}?>
<!DOCTYPE book {dtddecl}>

<book lang="en">
{doctitle#}<bookinfo>
    <title>{doctitle}</title>
    <titleabbrev>{doctitleabbrev}</titleabbrev>
    <date>{date}</date>
    {authored#}<author>
        <firstname>{firstname}</firstname>
        <othername>{middlename}</othername>
        <surname>{lastname}</surname>
    {authored#}</author>
    <authorinitials>{authorinitials}</authorinitials>
    {revisionhistory%}<revhistory><revision><revnumber>{revision}</revnumber><date>{date}</date>{authorinitials?<authorinitials>{authorinitials}</authorinitials>}{revremark?<revremark>{revremark}</revremark>}</revision></revhistory>
    <corpname>{companyname}</corpname>
    <othercredit><contrib>{othercredit},</contrib></othercredit>
    {copyright#}<copyright><year>{cpyear}</year><holder>{copyright}</holder></copyright>
    <abstract><para>{abstract}</para></abstract>
{doctitle#}</bookinfo>


# Define a new kind of block that maps to <literallayout> so as not to
# insist on a monospaced font. Delimiter is &&&.

[blockdef-literallayout]
delimiter=^&{3,}(\[(?P<args>.*)\])?=*$
template=literallayoutblock
presubs=specialcharacters,quotes,replacements,macros,callouts

# The template for my non-monospaced literal layout block

[literallayoutblock]
<literallayout{revisionflag? revisionflag="{revisionflag}"}>
|
</literallayout>


# Paragraph substitution - use <para> rather than <simplepara>

[paragraph]
{title#}<formalpara{id? id="{id}"{revisionflag? revisionflag="{revisionflag}"}}><title>{title}</title><para>
{title%}<para{id? id="{id}"}{revisionflag? revisionflag="{revisionflag}"}>
|
{title%}</para>
{title#}</para></formalpara>
{empty}


# Define a special table for left-centre-right lines, filling the whole page
# width, with a border but no separators, for Exim configuration options. It
# would be nice if this could call the default [table] template, forcing the
# appropriate attributes, but I have not found a way of doing this.

[tabledef-conf]
fillchar==
format=csv
template=conf-table
colspec=<colspec align="{colalign}"/>
bodyrow=<row>|</row>
bodydata=<entry>|</entry>

[conf-table]
<{title?table}{title!informaltable}{id? id="{id}"} pgwide="1" frame="all" colsep="0" rowsep="0">
<title>{title}</title>
<tgroup cols="{cols}">
<colspec align="left" colwidth="8*"/>
<colspec align="center" colwidth = "5*"/>
<colspec align="center" colwidth = "5*"/>
<colspec align="right" colwidth = "6*"/>
{headrows#}<thead>
{headrows}
{headrows#}</thead>
{footrows#}<tfoot>
{footrows}
{footrows#}</tfoot>
<tbody>
{bodyrows}
</tbody>
</tgroup>
</{title?table}{title!informaltable}>

# The default indexterm macro generates primary index entries for the
# secondary and tertiary terms as well, which does not make sense
# in the context of the way I write indexes. As well as a replacement
# that does the simple, straightforward thing, we actually want to have
# two different macros: one for concepts and one for options.

[cindex-inlinemacro]
# Inline index term for concepts.
<indexterm role="concept">
  <primary>{1}</primary>
  <secondary>{2}</secondary>
  <tertiary>{3}</tertiary>
</indexterm>

[oindex-inlinemacro]
# Inline index term for options.
<indexterm role="option">
  <primary>{1}</primary>
  <secondary>{2}</secondary>
  <tertiary>{3}</tertiary>
</indexterm>

# Allow for the "role" attribute for an index.

[sect-index]
<index{id? id="{id}"}{role? role="{role}"}>
<title>{title}</title>
|
</index>


# Allow for the "titleabbrev" attribute for chapters.

[sect1]
<chapter{id? id="{id}"}>
<title>{title}</title>
<titleabbrev>{titleabbrev}</titleabbrev>
|
</chapter>


#### End ####