Changed invocations of Pre-xml to ./Pre-xml for those without . in their path
[users/jgh/exim.git] / doc / doc-docbook / MyAsciidoc.conf
1 # $Cambridge: exim/doc/doc-docbook/MyAsciidoc.conf,v 1.2 2005/11/10 12:30:13 ph10 Exp $
2
3 # Asciidoc configuration customization for creating the DocBook XML sources
4 # of the Exim specification and the filter document.
5
6 [miscellaneous]
7 newline=\n
8
9 [quotes]
10 _=filename
11 $=varname
12 %=option
13 ^=command
14 ^^=function
15 ^%|%^=parameter
16 ``|''=quoted
17
18 [tags]
19 strong=<emphasis role="bold">|</emphasis>
20
21 filename=<filename>|</filename>
22 varname=<varname>$|</varname>
23 option=<option>|</option>
24 command=<command>|</command>
25 function=<function>|</function>
26 parameter=<parameter>|</parameter>
27 quoted=<quote>|</quote>
28
29
30 [replacements]
31 # Nothing - this is for disambiguating markup
32 "##"=
33
34 # -- En dash
35 (^|[^-])--($|[^-])=\1&#x2013;\2
36
37 # --- Em dash
38 (^|\s+)---($|\s+)=\1&#x8212;\2
39
40 # -- Hard space
41 ~=&#x00a0;
42
43 # ' automatic apostrophe
44 ([A-Za-z0-9])'([A-Za-z\s])=\1&#x2019;\2
45
46 # daggers
47 !!=&#x2020;
48 !\?=&#x2021;
49
50 # The default markup recognizes subscripts and superscripts using tilde and
51 # circumflex. We don't want this. These settings manage to turn off the
52 # effect, while still allowing tilde to be recognized as a hard space.
53 \^(.+?)\^=^\1^
54 ~(.+?)~=~\1~
55
56
57 [attributes]
58 # Manual apostrophe: needed for an apostrophe after something quoted, because
59 # I can't get the automatic one to work in that situation
60 ap=&#x2019;
61
62 # Manual tilde: tilde is defined as a hard space, and it doesn't seem possible
63 # to quote is using a backslash.
64 tl=&#x007e;
65
66 # Two hyphens, to stop them being treated as an en dash
67 hh=&#x002d;&#x002d;
68
69 # Percent: causes confusion with the quote otherwise
70 pc=&#x0025;
71
72 # Colon: there's a case where this causes trouble
73 co=&#x003A;
74
75 # The sequence "[]" for use in index terms
76 bk=&#x005B;&#x005D;
77
78
79 # We need to add extra stuff to the <bookinfo> element
80
81 [header]
82 <?xml {xmldecl}?>
83 <!DOCTYPE book {dtddecl}>
84
85 <book lang="en">
86 {doctitle#}<bookinfo>
87     <title>{doctitle}</title>
88     <titleabbrev>{doctitleabbrev}</titleabbrev>
89     <date>{date}</date>
90     {authored#}<author>
91         <firstname>{firstname}</firstname>
92         <othername>{middlename}</othername>
93         <surname>{lastname}</surname>
94     {authored#}</author>
95     <authorinitials>{authorinitials}</authorinitials>
96     {revisionhistory%}<revhistory><revision><revnumber>{revision}</revnumber><date>{date}</date>{authorinitials?<authorinitials>{authorinitials}</authorinitials>}{revremark?<revremark>{revremark}</revremark>}</revision></revhistory>
97     <corpname>{companyname}</corpname>
98     <othercredit><contrib>{othercredit},</contrib></othercredit>
99     {copyright#}<copyright><year>{cpyear}</year><holder>{copyright}</holder></copyright>
100     <abstract><para>{abstract}</para></abstract>
101 {doctitle#}</bookinfo>
102
103
104 # Define a new kind of block that maps to <literallayout> so as not to
105 # insist on a monospaced font. Delimiter is &&&.
106
107 [blockdef-literallayout]
108 delimiter=^&{3,}(\[(?P<args>.*)\])?=*$
109 template=literallayoutblock
110 presubs=specialcharacters,quotes,replacements,macros,callouts
111
112 # The template for my non-monospaced literal layout block
113
114 [literallayoutblock]
115 <literallayout{revisionflag? revisionflag="{revisionflag}"}>|</literallayout>
116
117 # Replace the template for normal literal blocks so as to support the
118 # revisionflag feature.
119
120 [literalblock]
121 <example><title>{title}</title>
122 <literallayout{id? id="{id}"} {revisionflag? revisionflag="{revisionflag}"} class="monospaced">
123 |
124 </literallayout>
125 {title#}</example>
126
127 # Paragraph substitution - use <para> rather than <simplepara>
128
129 [paragraph]
130 {title#}<formalpara{id? id="{id}"{revisionflag? revisionflag="{revisionflag}"}}><title>{title}</title><para>
131 {title%}<para{id? id="{id}"}{revisionflag? revisionflag="{revisionflag}"}>
132 |
133 {title%}</para>
134 {title#}</para></formalpara>
135 {empty}
136
137
138 # Define a special table for left-centre-right lines, filling the whole page
139 # width, with a border but no separators, for Exim configuration options. It
140 # would be nice if this could call the default [table] template, forcing the
141 # appropriate attributes, but I have not found a way of doing this.
142
143 [tabledef-conf]
144 fillchar==
145 format=csv
146 template=conf-table
147 colspec=<colspec align="{colalign}"/>
148 bodyrow=<row>|</row>
149 bodydata=<entry>|</entry>
150
151 [conf-table]
152 <{title?table}{title!informaltable}{id? id="{id}"} pgwide="1" frame="all" colsep="0" rowsep="0">
153 <title>{title}</title>
154 <tgroup cols="{cols}">
155 <colspec align="left" colwidth="8*"/>
156 <colspec align="center" colwidth = "5*"/>
157 <colspec align="center" colwidth = "5*"/>
158 <colspec align="right" colwidth = "6*"/>
159 {headrows#}<thead>
160 {headrows}
161 {headrows#}</thead>
162 {footrows#}<tfoot>
163 {footrows}
164 {footrows#}</tfoot>
165 <tbody>
166 {bodyrows}
167 </tbody>
168 </tgroup>
169 </{title?table}{title!informaltable}>
170
171 # The default indexterm macro generates primary index entries for the
172 # secondary and tertiary terms as well, which does not make sense
173 # in the context of the way I write indexes. As well as a replacement
174 # that does the simple, straightforward thing, we actually want to have
175 # two different macros: one for concepts and one for options.
176
177 [cindex-inlinemacro]
178 # Inline index term for concepts.
179 <indexterm role="concept">
180   <primary>{1}</primary>
181   <secondary>{2}</secondary>
182   <tertiary>{3}</tertiary>
183 </indexterm>
184
185 [oindex-inlinemacro]
186 # Inline index term for options.
187 <indexterm role="option">
188   <primary>{1}</primary>
189   <secondary>{2}</secondary>
190   <tertiary>{3}</tertiary>
191 </indexterm>
192
193 # Allow for the "role" attribute for an index.
194
195 [sect-index]
196 <index{id? id="{id}"}{role? role="{role}"}>
197 <title>{title}</title>
198 |
199 </index>
200
201
202 # Allow for the "titleabbrev" attribute for chapters.
203
204 [sect1]
205 <chapter{id? id="{id}"}>
206 <title>{title}</title>
207 <titleabbrev>{titleabbrev}</titleabbrev>
208 |
209 </chapter>
210
211
212 #### End ####