mizuho 0.9.6 → 0.9.8
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +4 -2
- data/Rakefile +0 -37
- data/asciidoc/BUGS +9 -18
- data/asciidoc/BUGS.txt +5 -14
- data/asciidoc/CHANGELOG +1433 -266
- data/asciidoc/CHANGELOG.txt +2821 -1810
- data/asciidoc/COPYING +339 -339
- data/asciidoc/COPYRIGHT +18 -18
- data/asciidoc/INSTALL +189 -30
- data/asciidoc/INSTALL.txt +175 -19
- data/asciidoc/MANIFEST +88 -0
- data/asciidoc/Makefile.in +29 -13
- data/asciidoc/README +16 -17
- data/asciidoc/README.txt +35 -36
- data/asciidoc/a2x.py +902 -0
- data/asciidoc/asciidoc.conf +610 -455
- data/asciidoc/asciidoc.py +1965 -1061
- data/asciidoc/asciidocapi.py +257 -0
- data/asciidoc/common.aap +2 -2
- data/asciidoc/configure +1170 -1023
- data/asciidoc/configure.ac +1 -1
- data/asciidoc/dblatex/asciidoc-dblatex.xsl +42 -0
- data/asciidoc/doc/a2x.1 +559 -102
- data/asciidoc/doc/a2x.1.txt +233 -91
- data/asciidoc/doc/article-docinfo.xml +87 -0
- data/asciidoc/doc/article.pdf +0 -0
- data/asciidoc/doc/article.txt +139 -122
- data/asciidoc/doc/asciidoc.1 +157 -46
- data/asciidoc/doc/asciidoc.1.txt +171 -118
- data/asciidoc/doc/asciidoc.conf +7 -8
- data/asciidoc/doc/asciidoc.dict +960 -635
- data/asciidoc/doc/asciidoc.txt +2335 -1464
- data/asciidoc/doc/asciidocapi.txt +189 -0
- data/asciidoc/doc/asciimathml.txt +14 -17
- data/asciidoc/doc/book-multi.txt +181 -155
- data/asciidoc/doc/book.epub +0 -0
- data/asciidoc/doc/book.txt +156 -131
- data/asciidoc/doc/customers.csv +18 -18
- data/asciidoc/doc/epub-notes.txt +210 -0
- data/asciidoc/doc/faq.txt +1122 -547
- data/asciidoc/doc/latex-backend.txt +192 -191
- data/asciidoc/doc/latex-bugs.txt +134 -0
- data/asciidoc/doc/latex-filter.pdf +0 -0
- data/asciidoc/doc/latex-filter.txt +196 -0
- data/asciidoc/doc/latexmath.txt +13 -136
- data/asciidoc/doc/latexmathml.txt +2 -2
- data/asciidoc/doc/main.aap +233 -297
- data/asciidoc/doc/music-filter.pdf +0 -0
- data/asciidoc/doc/music-filter.txt +55 -65
- data/asciidoc/doc/publishing-ebooks-with-asciidoc.txt +398 -0
- data/asciidoc/doc/slidy-example.txt +167 -0
- data/asciidoc/doc/slidy.txt +113 -0
- data/asciidoc/doc/source-highlight-filter.pdf +0 -0
- data/asciidoc/doc/source-highlight-filter.txt +45 -20
- data/asciidoc/doc/testasciidoc.txt +231 -0
- data/asciidoc/docbook-xsl/asciidoc-docbook-xsl.txt +30 -8
- data/asciidoc/docbook-xsl/chunked.xsl +17 -19
- data/asciidoc/docbook-xsl/common.xsl +106 -67
- data/asciidoc/docbook-xsl/epub.xsl +35 -0
- data/asciidoc/docbook-xsl/fo.xsl +3 -0
- data/asciidoc/docbook-xsl/htmlhelp.xsl +16 -17
- data/asciidoc/docbook-xsl/manpage.xsl +31 -31
- data/asciidoc/docbook-xsl/text.xsl +6 -1
- data/asciidoc/docbook-xsl/xhtml.xsl +14 -14
- data/asciidoc/docbook45.conf +759 -0
- data/asciidoc/filters/code/code-filter-readme.txt +37 -37
- data/asciidoc/filters/code/code-filter-test.txt +15 -15
- data/asciidoc/filters/code/code-filter.conf +8 -8
- data/asciidoc/filters/graphviz/asciidoc-graphviz-sample.txt +104 -64
- data/asciidoc/filters/graphviz/graphviz-filter.conf +20 -16
- data/asciidoc/filters/graphviz/graphviz2png.py +54 -39
- data/asciidoc/filters/latex/latex-filter.conf +18 -0
- data/asciidoc/filters/latex/latex2png.py +216 -0
- data/asciidoc/filters/music/music-filter.conf +8 -17
- data/asciidoc/filters/music/music2png.py +40 -32
- data/asciidoc/filters/source/source-highlight-filter.conf +40 -34
- data/asciidoc/help.conf +261 -96
- data/asciidoc/html4.conf +505 -460
- data/asciidoc/html5.conf +686 -0
- data/asciidoc/images/highlighter.png +0 -0
- data/asciidoc/images/icons/caution.png +0 -0
- data/asciidoc/images/icons/example.png +0 -0
- data/asciidoc/images/icons/important.png +0 -0
- data/asciidoc/images/icons/note.png +0 -0
- data/asciidoc/images/icons/tip.png +0 -0
- data/asciidoc/images/icons/warning.png +0 -0
- data/asciidoc/images/smallnew.png +0 -0
- data/asciidoc/javascripts/asciidoc.js +189 -0
- data/asciidoc/javascripts/slidy.js +2845 -0
- data/asciidoc/javascripts/toc.js +8 -0
- data/asciidoc/lang-de.conf +57 -0
- data/asciidoc/lang-en.conf +54 -0
- data/asciidoc/lang-es.conf +49 -9
- data/asciidoc/lang-fr.conf +59 -0
- data/asciidoc/lang-hu.conf +55 -0
- data/asciidoc/lang-it.conf +55 -0
- data/asciidoc/lang-nl.conf +57 -0
- data/asciidoc/lang-pt-BR.conf +56 -0
- data/asciidoc/lang-ru.conf +60 -0
- data/asciidoc/lang-uk.conf +60 -0
- data/asciidoc/latex.conf +700 -663
- data/asciidoc/main.aap +77 -0
- data/asciidoc/slidy.conf +136 -0
- data/asciidoc/{examples/website/xhtml11-manpage.css → stylesheets/asciidoc-manpage.css} +1 -1
- data/asciidoc/stylesheets/asciidoc.css +508 -0
- data/asciidoc/stylesheets/docbook-xsl.css +322 -272
- data/asciidoc/stylesheets/flask-manpage.css +1 -0
- data/asciidoc/stylesheets/flask.css +584 -0
- data/asciidoc/stylesheets/pygments.css +66 -0
- data/asciidoc/stylesheets/slidy.css +445 -0
- data/asciidoc/stylesheets/toc2.css +33 -0
- data/asciidoc/stylesheets/volnitsky-manpage.css +1 -0
- data/asciidoc/stylesheets/volnitsky.css +435 -0
- data/asciidoc/stylesheets/xhtml11-quirks.css +5 -3
- data/asciidoc/tests/asciidocapi.py +257 -0
- data/asciidoc/tests/data/deprecated-quotes.txt +12 -0
- data/asciidoc/tests/data/filters-test.txt +90 -0
- data/asciidoc/tests/data/lang-de-test.txt +106 -0
- data/asciidoc/tests/data/lang-en-test.txt +114 -0
- data/asciidoc/tests/data/lang-es-test.txt +106 -0
- data/asciidoc/tests/data/lang-fr-test.txt +106 -0
- data/asciidoc/tests/data/lang-hu-test.txt +106 -0
- data/asciidoc/tests/data/lang-nl-test.txt +94 -0
- data/asciidoc/tests/data/lang-pt-BR-test.txt +106 -0
- data/asciidoc/tests/data/lang-ru-test.txt +106 -0
- data/asciidoc/tests/data/lang-uk-test.txt +106 -0
- data/asciidoc/tests/data/oldtables.txt +64 -0
- data/asciidoc/tests/data/rcs-id-marker-test.txt +6 -0
- data/asciidoc/tests/data/testcases.conf +2 -0
- data/asciidoc/tests/data/testcases.txt +740 -0
- data/asciidoc/tests/data/utf8-bom-test.txt +9 -0
- data/asciidoc/tests/data/utf8-examples.txt +217 -0
- data/asciidoc/tests/testasciidoc.conf +520 -0
- data/asciidoc/tests/testasciidoc.py +411 -0
- data/asciidoc/text.conf +16 -16
- data/asciidoc/vim/syntax/asciidoc.vim +99 -91
- data/asciidoc/wordpress.conf +43 -3
- data/asciidoc/xhtml11-quirks.conf +61 -57
- data/asciidoc/xhtml11.conf +684 -645
- data/lib/mizuho.rb +2 -0
- data/lib/mizuho/generator.rb +2 -2
- data/test/generator_spec.rb +1 -1
- data/test/parser_spec.rb +1 -1
- data/test/spec_helper.rb +3 -4
- metadata +87 -88
- data/asciidoc/a2x +0 -674
- data/asciidoc/doc/article.css-embedded.html +0 -602
- data/asciidoc/doc/article.html +0 -46
- data/asciidoc/doc/asciidoc-revhistory.xml +0 -27
- data/asciidoc/doc/asciidoc.1.css-embedded.html +0 -598
- data/asciidoc/doc/asciidoc.1.css.html +0 -212
- data/asciidoc/doc/asciidoc.1.html +0 -190
- data/asciidoc/doc/asciidoc.css-embedded.html +0 -7853
- data/asciidoc/doc/asciidoc.css.html +0 -7416
- data/asciidoc/doc/asciidoc.html +0 -3339
- data/asciidoc/doc/book-multi.css-embedded.html +0 -575
- data/asciidoc/doc/book-multi.html +0 -55
- data/asciidoc/doc/book.css-embedded.html +0 -607
- data/asciidoc/doc/book.html +0 -43
- data/asciidoc/doc/docbook-xsl.css +0 -272
- data/asciidoc/doc/latex-backend.html +0 -117
- data/asciidoc/doc/music-filter.html +0 -566
- data/asciidoc/doc/source-highlight-filter.html +0 -214
- data/asciidoc/docbook.conf +0 -721
- data/asciidoc/examples/website/ASCIIMathML.js +0 -938
- data/asciidoc/examples/website/CHANGELOG.html +0 -4389
- data/asciidoc/examples/website/CHANGELOG.txt +0 -1810
- data/asciidoc/examples/website/INSTALL.html +0 -161
- data/asciidoc/examples/website/INSTALL.txt +0 -71
- data/asciidoc/examples/website/LaTeXMathML.js +0 -1223
- data/asciidoc/examples/website/README-website.html +0 -118
- data/asciidoc/examples/website/README-website.txt +0 -29
- data/asciidoc/examples/website/README.html +0 -125
- data/asciidoc/examples/website/README.txt +0 -36
- data/asciidoc/examples/website/a2x.1.html +0 -419
- data/asciidoc/examples/website/a2x.1.txt +0 -204
- data/asciidoc/examples/website/asciidoc-docbook-xsl.html +0 -130
- data/asciidoc/examples/website/asciidoc-docbook-xsl.txt +0 -43
- data/asciidoc/examples/website/asciidoc-graphviz-sample.txt +0 -130
- data/asciidoc/examples/website/asciimathml.txt +0 -64
- data/asciidoc/examples/website/build-website.sh +0 -25
- data/asciidoc/examples/website/customers.csv +0 -18
- data/asciidoc/examples/website/downloads.html +0 -257
- data/asciidoc/examples/website/downloads.txt +0 -121
- data/asciidoc/examples/website/faq.html +0 -673
- data/asciidoc/examples/website/faq.txt +0 -547
- data/asciidoc/examples/website/index.html +0 -419
- data/asciidoc/examples/website/index.txt +0 -245
- data/asciidoc/examples/website/latex-backend.html +0 -535
- data/asciidoc/examples/website/latex-backend.txt +0 -191
- data/asciidoc/examples/website/latexmathml.txt +0 -41
- data/asciidoc/examples/website/layout1.conf +0 -161
- data/asciidoc/examples/website/layout1.css +0 -65
- data/asciidoc/examples/website/layout2.conf +0 -158
- data/asciidoc/examples/website/layout2.css +0 -93
- data/asciidoc/examples/website/manpage.html +0 -266
- data/asciidoc/examples/website/manpage.txt +0 -118
- data/asciidoc/examples/website/music-filter.html +0 -242
- data/asciidoc/examples/website/music-filter.txt +0 -158
- data/asciidoc/examples/website/music1.abc +0 -12
- data/asciidoc/examples/website/music1.png +0 -0
- data/asciidoc/examples/website/music2.ly +0 -9
- data/asciidoc/examples/website/music2.png +0 -0
- data/asciidoc/examples/website/newlists.txt +0 -40
- data/asciidoc/examples/website/newtables.txt +0 -397
- data/asciidoc/examples/website/sample1.png +0 -0
- data/asciidoc/examples/website/sample3.png +0 -0
- data/asciidoc/examples/website/sample4.png +0 -0
- data/asciidoc/examples/website/source-highlight-filter.html +0 -286
- data/asciidoc/examples/website/source-highlight-filter.txt +0 -203
- data/asciidoc/examples/website/support.html +0 -78
- data/asciidoc/examples/website/support.txt +0 -5
- data/asciidoc/examples/website/toc.js +0 -69
- data/asciidoc/examples/website/userguide.html +0 -7460
- data/asciidoc/examples/website/userguide.txt +0 -4979
- data/asciidoc/examples/website/version83.txt +0 -37
- data/asciidoc/examples/website/version9.html +0 -143
- data/asciidoc/examples/website/version9.txt +0 -48
- data/asciidoc/examples/website/xhtml11-quirks.css +0 -41
- data/asciidoc/examples/website/xhtml11.css +0 -328
- data/asciidoc/stylesheets/xhtml11-manpage.css +0 -18
- data/asciidoc/stylesheets/xhtml11.css +0 -328
data/asciidoc/doc/faq.txt
CHANGED
@@ -1,547 +1,1122 @@
|
|
1
|
-
AsciiDoc Frequently Asked Questions
|
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
|
-
asciidoc
|
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
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
1
|
+
AsciiDoc Frequently Asked Questions
|
2
|
+
===================================
|
3
|
+
|
4
|
+
|
5
|
+
[NOTE]
|
6
|
+
======
|
7
|
+
- New FAQs are normally added at the top of this document.
|
8
|
+
- The FAQ may be updated between AsciiDoc releases so some of the
|
9
|
+
newer FAQs may apply to the trunk and not the current release.
|
10
|
+
======
|
11
|
+
|
12
|
+
[[X5]]
|
13
|
+
== How can I include embedded fonts in an EPUB document
|
14
|
+
This is a two step process:
|
15
|
+
|
16
|
+
1. Declare the font files and their use in your document's CSS
|
17
|
+
stylesheet. For example:
|
18
|
+
+
|
19
|
+
[listing]
|
20
|
+
.........................................
|
21
|
+
@font-face {
|
22
|
+
font-family : LiberationSerif-Regular;
|
23
|
+
font-weight : normal;
|
24
|
+
font-style: normal;
|
25
|
+
src : url(LiberationSerif-Regular.ttf);
|
26
|
+
}
|
27
|
+
|
28
|
+
body {
|
29
|
+
font-family: LiberationSerif-Regular, serif;
|
30
|
+
}
|
31
|
+
.........................................
|
32
|
+
|
33
|
+
2. Declare the the font file as resource when you use `a2x(1)` to
|
34
|
+
compile the EPUB. For example:
|
35
|
+
|
36
|
+
a2x -f epub -d book --epubcheck --stylesheet epubtest.css --resource .ttf=application/x-font-ttf --resource LiberationSerif-Regular.ttf epubtest.txt
|
37
|
+
|
38
|
+
[NOTE]
|
39
|
+
======
|
40
|
+
- Requires AsciiDoc 8.6.5 or better.
|
41
|
+
- The True Type Font mimetype had to be declared explicitly with the
|
42
|
+
`--resource .ttf=application/x-font-ttf` option because it wasn't
|
43
|
+
registered on my Linux system.
|
44
|
+
- In the above example the font file is in the same directory as the
|
45
|
+
AsciiDoc source file and is installed to the same relative location
|
46
|
+
in the EPUB archive OEBPS directory -- if your font file resides in
|
47
|
+
a different location you'll need to adjust the `--resource` option
|
48
|
+
accordingly (see the 'RESOURCES' section in the `a2x(1)` man page
|
49
|
+
for details).
|
50
|
+
- The URL value of the CSS 'src' property is set to the destination
|
51
|
+
font file relative the the CSS file.
|
52
|
+
- The `--resource` option allows you to inject any file (not just font
|
53
|
+
files) into the EPUB output document.
|
54
|
+
- Using the CSS '@font-face' rule is a complex subject and is outside
|
55
|
+
the scope of the FAQ.
|
56
|
+
- Many EPUB readers do not process embedded fonts.
|
57
|
+
======
|
58
|
+
|
59
|
+
|
60
|
+
== What's the difference between + quoted text and ` quoted monospaced text?
|
61
|
+
`+` (plus) quoted text is implemented as an AsciiDoc 'quotes' whereas
|
62
|
+
+`+ (grave accent or backtick) quoted text is implemented as an
|
63
|
+
AsciiDoc 'inline literal' passthrough macro. The semantics are
|
64
|
+
different:
|
65
|
+
|
66
|
+
1. Inline passthrough macros are processed before any other inline
|
67
|
+
substitutions e.g. all of the following line will be processed as a
|
68
|
+
single inline passthrough and rendered as monospaced text (which is
|
69
|
+
not the intended result):
|
70
|
+
+
|
71
|
+
--
|
72
|
+
`single quoted text' and `monospaced quoted text`
|
73
|
+
|
74
|
+
This line works as expected:
|
75
|
+
|
76
|
+
`single quoted text' and +monospaced quoted text+
|
77
|
+
--
|
78
|
+
|
79
|
+
2. Backtick quoted text is rendered literally i.e. no substitutions
|
80
|
+
are performed on the enclosed text. Here are some examples that
|
81
|
+
would have to be escaped if plus quoting were used (<<X4,see
|
82
|
+
also>>):
|
83
|
+
|
84
|
+
The `++i` and `++j` auto-increments.
|
85
|
+
Paths `~/.vim` and `~/docs`.
|
86
|
+
The `__init__` method.
|
87
|
+
The `{id}` attribute.
|
88
|
+
|
89
|
+
|
90
|
+
== Why is the generated HTML title element text invalid?
|
91
|
+
Probably because your document title contains formatting that has
|
92
|
+
generated HTML title markup. You can resolve this by explicitly
|
93
|
+
defining the 'title' attribute in your document's header.
|
94
|
+
|
95
|
+
|
96
|
+
== AsciiDoc sometimes generates invalid output markup, why?
|
97
|
+
AsciiDoc is backend agnostic, the 'asciidoc' command has no knowledge
|
98
|
+
of the syntax or structure of the backend format that it generates.
|
99
|
+
Output document validation (syntactic and structural) should be
|
100
|
+
performed separately by external validation tools. For example,
|
101
|
+
AsciiDoc's 'a2x' toolchain command automatically performs validation
|
102
|
+
checks using 'xmllint'.
|
103
|
+
|
104
|
+
|
105
|
+
== The AsciiDoc toclevels attribute does not work with DocBook outputs, why?
|
106
|
+
DocBook has no provision for specifying table of contents levels but
|
107
|
+
you can set the TOC level further down the toolchain by passing the
|
108
|
+
DocBook XSL Stylesheets
|
109
|
+
http://docbook.sourceforge.net/release/xsl/current/doc/html/toc.section.depth.html[toc.section.depth]
|
110
|
+
parameter to 'dblatex' (using the `--param` option) or 'xsltproc'
|
111
|
+
(using the `--stringparam` option). For example to show only chapter
|
112
|
+
titles in the TOC of a 'book' document set 'toc.section.depth' to '0'.
|
113
|
+
Increment the 'toc.section.depth' value to show more sub-section
|
114
|
+
titles. If you are using 'a2x' you can set the options in the source
|
115
|
+
file, for example:
|
116
|
+
|
117
|
+
// a2x: --xsltproc-opts "--stringparam toc.section.depth 0"
|
118
|
+
// a2x: --dblatex-opts "--param toc.section.depth=0"
|
119
|
+
|
120
|
+
If the document is of type 'article' use the value '1' to show only
|
121
|
+
top level section titles in the TOC, use the value '2' for two levels
|
122
|
+
etc.
|
123
|
+
|
124
|
+
|
125
|
+
== How can I include chapter and section tables of contents?
|
126
|
+
DocBook outputs processed by DocBook XSL Stylesheets (either manually
|
127
|
+
or via 'a2x') can generate additional separate section and chapter
|
128
|
+
tables of contents using combinations of the
|
129
|
+
http://www.sagehill.net/docbookxsl/TOCcontrol.html[TOC parameters].
|
130
|
+
Here are some examples using combinations of the
|
131
|
+
`generate.section.toc.level` and `toc.section.depth` DocBook XSL
|
132
|
+
Stylesheets parameters:
|
133
|
+
|
134
|
+
[cols="2*l,4",width="90%",frame="topbot",options="header"]
|
135
|
+
|======================================================
|
136
|
+
|generate.section.toc.level |toc.section.depth |
|
137
|
+
|1 |
|
138
|
+
|Single level book chapter TOCs or article section TOCs
|
139
|
+
|
140
|
+
|1 | 3
|
141
|
+
|Article section TOCs with two levels
|
142
|
+
|
143
|
+
|1 | 2
|
144
|
+
|Book chapter TOCs with two levels
|
145
|
+
|======================================================
|
146
|
+
|
147
|
+
|
148
|
+
== How can I customize the appearance of XHTML and EPUB documents generated by a2x?
|
149
|
+
You can customize the appearance of an EPUB document with CSS. See
|
150
|
+
the link:publishing-ebooks-with-asciidoc.html[Sherlock Holmes eBook
|
151
|
+
example] on the AsciiDoc website.
|
152
|
+
|
153
|
+
|
154
|
+
== DocBook has many elements for document meta-data -- how can I use them from AsciiDoc?
|
155
|
+
The 'docinfo', 'docinfo1' and 'docinfo2' attributes allow you include
|
156
|
+
link:userguide.html#X97[document information files] containing DocBook
|
157
|
+
XML into the header of the output file.
|
158
|
+
|
159
|
+
|
160
|
+
== Do element titles automatically generate link captions?
|
161
|
+
If you go the DocBook route then yes -- just omit the caption from the
|
162
|
+
AsciiDoc 'xref' (`<<...>>`) macro. Both dblatex and DocBook XSL will
|
163
|
+
use the target element's title text. Examples:
|
164
|
+
|
165
|
+
[listing]
|
166
|
+
..................................................................
|
167
|
+
[[X1]]
|
168
|
+
Section One
|
169
|
+
-----------
|
170
|
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas
|
171
|
+
ultrices justo porttitor augue. Vestibulum pretium. Donec porta
|
172
|
+
|
173
|
+
See also <<X3>> (this link displays the text 'A titled paragraph').
|
174
|
+
|
175
|
+
[id="X2",reftext="2nd section"]
|
176
|
+
Section Two
|
177
|
+
-----------
|
178
|
+
See also <<X1>> (this link displays the text 'Section One').
|
179
|
+
|
180
|
+
[[X3]]
|
181
|
+
.A titled paragraph
|
182
|
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
|
183
|
+
|
184
|
+
See also <<X2>> (this link displays the text '2nd section').
|
185
|
+
..................................................................
|
186
|
+
|
187
|
+
The AsciiDoc 'reftext' attribute has been used to explicitly set the
|
188
|
+
link text to '2nd section' for 'Section Two'.
|
189
|
+
|
190
|
+
|
191
|
+
== Can I define my own table styles?
|
192
|
+
In addition to the built-in styles you can define your own. This
|
193
|
+
(simplified) example for HTML backends defines a table style called
|
194
|
+
'red' which sets the background cell color to red. First put the
|
195
|
+
definition in a configuration file:
|
196
|
+
|
197
|
+
[listing]
|
198
|
+
.........................................
|
199
|
+
[tabledef-default]
|
200
|
+
red-style=tags="red"
|
201
|
+
|
202
|
+
[tabletags-red]
|
203
|
+
bodydata=<td style="background-color:red;">|</td>
|
204
|
+
.........................................
|
205
|
+
|
206
|
+
Now you can use the style name to style cells or columns (in this
|
207
|
+
example we use an unambiguous shortened abbreviation 'r'):
|
208
|
+
|
209
|
+
[listing]
|
210
|
+
.........................................
|
211
|
+
|==================================
|
212
|
+
|Normal cell r|Red cell
|
213
|
+
|==================================
|
214
|
+
.........................................
|
215
|
+
|
216
|
+
|
217
|
+
== How can I add highlighted editorial comments to an AsciiDoc document?
|
218
|
+
Both block and inline link:userguide.html#X25[comment lines] are
|
219
|
+
displayed on the output if the 'showcomments' attribute is defined.
|
220
|
+
Example:
|
221
|
+
|
222
|
+
[listing]
|
223
|
+
.........................................
|
224
|
+
:showcomments:
|
225
|
+
// A block comment line.
|
226
|
+
|
227
|
+
Qui in magna commodo, est labitur dolorum an. Est ne magna primis
|
228
|
+
// An inline comment line.
|
229
|
+
adolescens.
|
230
|
+
.........................................
|
231
|
+
|
232
|
+
Is rendered as:
|
233
|
+
|
234
|
+
:showcomments:
|
235
|
+
// A block comment line.
|
236
|
+
|
237
|
+
Qui in magna commodo, est labitur dolorum an. Est ne magna primis
|
238
|
+
// An inline comment line.
|
239
|
+
adolescens.
|
240
|
+
|
241
|
+
NOTE: link:userguide.html#X26[Comment blocks] are never displayed.
|
242
|
+
|
243
|
+
|
244
|
+
== What is the preferred file name extension for AsciiDoc files?
|
245
|
+
The `.txt` http://en.wikipedia.org/wiki/Text_file[text file] extension
|
246
|
+
is preferred, but it's just a convention and it's not enforced by the
|
247
|
+
software.
|
248
|
+
|
249
|
+
AsciiDoc source files are human readable
|
250
|
+
http://en.wikipedia.org/wiki/Plain_text[plain text] files which is
|
251
|
+
what the `.txt` extension is for. All text editors recognize and open
|
252
|
+
files with a `.txt` extension. The `.txt` extension is universally
|
253
|
+
recognized and unambiguous -- you are not left asking questions like
|
254
|
+
``What on earth is this file with the funny extension?'', ``How do I
|
255
|
+
open it?'' and ``Is it safe to open?''.
|
256
|
+
|
257
|
+
|
258
|
+
== How can I generate numbered bibliographic entries?
|
259
|
+
If your outputs are DocBook generated then adding the following inline
|
260
|
+
macro to a custom configuration file will result in auto-incrementing
|
261
|
+
bibliography entry numbers (instead of displaying the bibliographic
|
262
|
+
identifiers):
|
263
|
+
|
264
|
+
[anchor3-inlinemacro]
|
265
|
+
<anchor id="{1}" xreflabel="[{counter:bibliography1}]"/>[{counter:bibliography2}]
|
266
|
+
|
267
|
+
This FAQ submitted by Bela Hausmann.
|
268
|
+
|
269
|
+
|
270
|
+
== How can I include lines of dashes inside a listing block?
|
271
|
+
A line of four or more dashes will be mistaken for the ListingBlock
|
272
|
+
terminator, one way round this problem is to use a LiteralBlock styled
|
273
|
+
as a listing block. For example:
|
274
|
+
|
275
|
+
[listing]
|
276
|
+
...........................
|
277
|
+
Lorum ipsum
|
278
|
+
-----------
|
279
|
+
...........................
|
280
|
+
|
281
|
+
|
282
|
+
== How can I customize PDF files generated by dblatex?
|
283
|
+
|
284
|
+
There are a number of dblatex XSL parameters that can be used to
|
285
|
+
customize PDF output. You can set them globally in the AsciiDoc
|
286
|
+
`./dblatex/asciidoc-dblatex.xsl` configuration file or you can also
|
287
|
+
pass them on the a2x(1) command-line. Here are some examples:
|
288
|
+
|
289
|
+
The
|
290
|
+
http://dblatex.sourceforge.net/doc/manual/latex.output.revhistory.html[latex.output.revhistory]
|
291
|
+
parameter is used to suppress the revision history:
|
292
|
+
|
293
|
+
a2x -f pdf --dblatex-opts "-P latex.output.revhistory=0" doc/article.txt
|
294
|
+
|
295
|
+
The
|
296
|
+
http://dblatex.sourceforge.net/doc/manual/doc.layout.html[doc.layout]
|
297
|
+
parameter is used to include the cover page and document body (i.e. excludes
|
298
|
+
table of contents and index), the
|
299
|
+
http://dblatex.sourceforge.net/doc/manual/doc.publisher.show.html[doc.publisher.show]
|
300
|
+
parameter is used to exclude the cover page logo:
|
301
|
+
|
302
|
+
a2x -f pdf --dblatex-opts " -P doc.layout=\"coverpage mainmatter\" -P doc.publisher.show=0" doc/article.txt
|
303
|
+
|
304
|
+
See also the
|
305
|
+
http://dblatex.sourceforge.net/doc/manual/sec-params.html[dblatex XSL
|
306
|
+
parameter reference].
|
307
|
+
|
308
|
+
|
309
|
+
== How can I add lists of figures and tables to PDFs created by dblatex?
|
310
|
+
Set the
|
311
|
+
http://dblatex.sourceforge.net/doc/sec-custom.html[doc.lot.show XSL
|
312
|
+
parameter] -- you can set it using the dblatex `--param` command-line
|
313
|
+
option, for example:
|
314
|
+
|
315
|
+
$ a2x --dblatex-opts="--param=doc.lot.show=figure,table" doc/article.txt
|
316
|
+
|
317
|
+
|
318
|
+
== How can I stop the document title being displayed?
|
319
|
+
You could simply omit the document title, but this will result in a
|
320
|
+
blank 'title' element in HTML outputs. If you want the HTML 'title'
|
321
|
+
element to contain the document title then define the 'notitle'
|
322
|
+
attribute (this will just suppress displaying the title), for example:
|
323
|
+
|
324
|
+
My document title
|
325
|
+
=================
|
326
|
+
:no title:
|
327
|
+
|
328
|
+
|
329
|
+
== Why am I having trouble getting nested macros to work?
|
330
|
+
The following example expands the 'image' inline macro, but the
|
331
|
+
expansion contains double-quote characters which confuses the ensuing
|
332
|
+
'footnoteref' macro expansion:
|
333
|
+
|
334
|
+
footnoteref:["F1","A footnote, with an image image:smallnew.png[]"]
|
335
|
+
|
336
|
+
The solution is to use unquoted attribute values, replacing embedded
|
337
|
+
commas with the comma character entity (`,`):
|
338
|
+
|
339
|
+
footnoteref:[F1,A footnote, with an image image:smallnew.png[]]
|
340
|
+
|
341
|
+
Similarly, you can embed double-quote characters in unquoted attribute
|
342
|
+
values using the `"` character entity.
|
343
|
+
|
344
|
+
|
345
|
+
== Why am I getting DocBook validation errors?
|
346
|
+
Not all valid AsciiDoc source generates valid DocBook, for example
|
347
|
+
'special sections' (abstract, preface, colophon, dedication,
|
348
|
+
bibliography, glossary, appendix, index, synopsis) have different
|
349
|
+
DocBook schema's to normal document sections. For example, a paragraph
|
350
|
+
is illegal in a bibliography.
|
351
|
+
|
352
|
+
Don't forget if your document is a book you need to specify the
|
353
|
+
asciidoc `-d book` command option, if you don't an article DocBook
|
354
|
+
document will be generated, possibly containing book specific
|
355
|
+
sections, resulting in validation errors.
|
356
|
+
|
357
|
+
|
358
|
+
== How can I disable special section titles?
|
359
|
+
For example, you want to use 'References' as a normal section name but
|
360
|
+
AsciiDoc is auto-magically generating a DocBook 'bibliography'
|
361
|
+
section. All you need to do is explicitly specify the section template
|
362
|
+
name, for example:
|
363
|
+
|
364
|
+
[sect1]
|
365
|
+
References
|
366
|
+
----------
|
367
|
+
|
368
|
+
|
369
|
+
== How can I insert XML processing instructions into output documents?
|
370
|
+
Use an inline or block passthrough macros. This example inserts
|
371
|
+
`<?dblatex bgcolor="#cceeff"?>` into the DocBook output generated by
|
372
|
+
AsciiDoc:
|
373
|
+
|
374
|
+
pass::[<?dblatex bgcolor="#cceeff"?>]
|
375
|
+
|
376
|
+
NOTE: XML processing instructions are specific to the application that
|
377
|
+
processes the XML (the previous `dblatex` processing instruction is
|
378
|
+
recognized by `dblatex(1)` when it processes the DocBook XML generated
|
379
|
+
by Asciidoc).
|
380
|
+
|
381
|
+
|
382
|
+
[[X4]]
|
383
|
+
== How do I prevent double-quoted text being mistaken for an inline literal?
|
384
|
+
Mixing doubled-quoted text with inline literal passthroughs can
|
385
|
+
produce undesired results, for example, all of the following line is
|
386
|
+
interpreted as an inline literal passthrough:
|
387
|
+
|
388
|
+
``XXX'' `YYY`
|
389
|
+
|
390
|
+
In this case the solution is to use monospace quoting instead of the
|
391
|
+
inline literal:
|
392
|
+
|
393
|
+
``XXX'' +YYY+
|
394
|
+
|
395
|
+
Use the +\pass:[]+ macro if it's necessary to suppress
|
396
|
+
substitutions in the monospaced text, for example:
|
397
|
+
|
398
|
+
``XXX'' +pass:[don't `quote` me]+
|
399
|
+
|
400
|
+
|
401
|
+
== How can I generate a single HTML document file containing images and CSS styles?
|
402
|
+
With the advent of Internet Explorer 8 all major web browsers now
|
403
|
+
support the
|
404
|
+
http://en.wikipedia.org/wiki/Data:_URI_scheme[data URI scheme] for
|
405
|
+
embedded images. The AsciiDoc 'xhtml11' and 'html5' backends supports
|
406
|
+
the data URI scheme for embedded images and by default it embeds the
|
407
|
+
CSS stylesheet. For example the following command will generate a
|
408
|
+
single `article.html` file containing embedded images, admonition
|
409
|
+
icons and the CSS stylesheet:
|
410
|
+
|
411
|
+
$ asciidoc -a data-uri -a icons article.txt
|
412
|
+
|
413
|
+
|
414
|
+
== Are there any tools to help me understand what's going on inside AsciiDoc?
|
415
|
+
|
416
|
+
AsciiDoc has a built-in trace mechanism which is controlled by the
|
417
|
+
'trace' attribute; there is also the `--verbose` command-line option.
|
418
|
+
These features are detailed in
|
419
|
+
http://www.methods.co.nz/asciidoc/userguide.html#X82[Appendix G of the
|
420
|
+
User Guide].
|
421
|
+
|
422
|
+
|
423
|
+
== One-liner ifdef::[]'s are disproportionately verbose can they shortened?
|
424
|
+
|
425
|
+
This is the response to a question posted on the AsciiDoc discussion
|
426
|
+
list, it illustrates a number of useful techniques. The question arose
|
427
|
+
because the source highlight filter language identifier for the C++
|
428
|
+
language is `c++` when generating PDFs via dblatex (LaTeX listings
|
429
|
+
package) or `cpp` when generating HTML (GNU source-highlight).
|
430
|
+
|
431
|
+
Using straight `ifdef::[]` block macros we have:
|
432
|
+
|
433
|
+
[listing]
|
434
|
+
.........................................
|
435
|
+
\ifdef::basebackend-docbook[]
|
436
|
+
[source,c++]
|
437
|
+
\endif::basebackend-docbook[]
|
438
|
+
\ifdef::basebackend-html[]
|
439
|
+
[source,cpp]
|
440
|
+
\endif::basebackend-html[]
|
441
|
+
-----------------------------------------
|
442
|
+
class FooParser {
|
443
|
+
public:
|
444
|
+
virtual void startDocument() = 0;
|
445
|
+
virtual void endDocument() = 0;
|
446
|
+
};
|
447
|
+
-----------------------------------------
|
448
|
+
.........................................
|
449
|
+
|
450
|
+
|
451
|
+
This can be shortened using the short form of the `ifdef::[]` macro:
|
452
|
+
|
453
|
+
[listing]
|
454
|
+
.........................................
|
455
|
+
\ifdef::basebackend-docbook[[source,c++]]
|
456
|
+
\ifdef::basebackend-html[[source,cpp]]
|
457
|
+
-----------------------------------------
|
458
|
+
class FooParser {
|
459
|
+
public:
|
460
|
+
virtual void startDocument() = 0;
|
461
|
+
virtual void endDocument() = 0;
|
462
|
+
};
|
463
|
+
-----------------------------------------
|
464
|
+
.........................................
|
465
|
+
|
466
|
+
|
467
|
+
Using a conditional attribute instead of the `ifdef::[]` macro is even
|
468
|
+
shorter:
|
469
|
+
|
470
|
+
[listing]
|
471
|
+
.........................................
|
472
|
+
[source,{basebackend@docbook:c++:cpp}]
|
473
|
+
-----------------------------------------
|
474
|
+
class FooParser {
|
475
|
+
public:
|
476
|
+
virtual void startDocument() = 0;
|
477
|
+
virtual void endDocument() = 0;
|
478
|
+
};
|
479
|
+
-----------------------------------------
|
480
|
+
.........................................
|
481
|
+
|
482
|
+
|
483
|
+
If you have a number of listings it makes sense to factor the
|
484
|
+
conditional attribute to a normal attribute:
|
485
|
+
|
486
|
+
[listing]
|
487
|
+
.........................................
|
488
|
+
:cpp: {basebackend@docbook:c++:cpp}
|
489
|
+
|
490
|
+
[source,{cpp}]
|
491
|
+
-----------------------------------------
|
492
|
+
class FooParser {
|
493
|
+
public:
|
494
|
+
virtual void startDocument() = 0;
|
495
|
+
virtual void endDocument() = 0;
|
496
|
+
};
|
497
|
+
-----------------------------------------
|
498
|
+
.........................................
|
499
|
+
|
500
|
+
|
501
|
+
Even shorter, set the default source highlight filter `language`
|
502
|
+
attribute so you don't have to specify it every time:
|
503
|
+
|
504
|
+
[listing]
|
505
|
+
.........................................
|
506
|
+
:language: {basebackend@docbook:c++:cpp}
|
507
|
+
|
508
|
+
[source]
|
509
|
+
-----------------------------------------
|
510
|
+
class FooParser {
|
511
|
+
public:
|
512
|
+
virtual void startDocument() = 0;
|
513
|
+
virtual void endDocument() = 0;
|
514
|
+
};
|
515
|
+
-----------------------------------------
|
516
|
+
.........................................
|
517
|
+
|
518
|
+
|
519
|
+
== Some of my inline passthroughs are not passed through, why?
|
520
|
+
|
521
|
+
Most likely the passthrough encloses another passthrough with a higher
|
522
|
+
precedence. For example trying to render this +\pass:[]+ with this
|
523
|
+
+\`\pass:[]`+ results in a blank string because the +\pass:[]+
|
524
|
+
passthrough evaluates first, instead use monospaced quoting and escape
|
525
|
+
the passthrough i.e. ++ \+\\pass:[]+ ++
|
526
|
+
|
527
|
+
|
528
|
+
== How can I place an anchor (link target) on a list item?
|
529
|
+
|
530
|
+
You can't use a 'BlockId' block element inside a list but you can use
|
531
|
+
the syntactically identical 'anchor' inline macro. For example:
|
532
|
+
|
533
|
+
---------------------
|
534
|
+
one:: Item one.
|
535
|
+
[[X2]]two:: Item two.
|
536
|
+
three:: Item three.
|
537
|
+
---------------------
|
538
|
+
|
539
|
+
This *will not* work:
|
540
|
+
|
541
|
+
---------------------
|
542
|
+
one:: Item one.
|
543
|
+
[[X2]]
|
544
|
+
two:: Item two.
|
545
|
+
three:: Item three.
|
546
|
+
---------------------
|
547
|
+
|
548
|
+
|
549
|
+
== How can I stop lists from nesting?
|
550
|
+
|
551
|
+
If you place two lists with different syntax hard up against each
|
552
|
+
other then the second list will be nested in the first. If you don't
|
553
|
+
want the second list to be nested separate them with a comment line
|
554
|
+
block macro. For example:
|
555
|
+
|
556
|
+
-------------------
|
557
|
+
1. List 1.
|
558
|
+
2. List 1.
|
559
|
+
|
560
|
+
//
|
561
|
+
a. List 2.
|
562
|
+
b. List 2.
|
563
|
+
-------------------
|
564
|
+
|
565
|
+
|
566
|
+
== Is it possible to include charts in AsciiDoc documents?
|
567
|
+
|
568
|
+
There are a number of programs available that generate presentation
|
569
|
+
charts from textual specification, for example
|
570
|
+
http://home.gna.org/pychart/[Pychart] is a library for writing chart
|
571
|
+
scripts in Python. Here's an example from the 'Pychart' documentation:
|
572
|
+
|
573
|
+
.barchart.py
|
574
|
+
---------------------------------------------------------------------
|
575
|
+
#
|
576
|
+
# Example bar chart (from Pychart documentation http://home.gna.org/pychart/).
|
577
|
+
#
|
578
|
+
from pychart import *
|
579
|
+
theme.get_options()
|
580
|
+
|
581
|
+
data = [(10, 20, 30, 5), (20, 65, 33, 5), (30, 55, 30, 5), (40, 45, 51, 7),
|
582
|
+
(50, 25, 27, 3), (60, 75, 30, 5), (70, 80, 42, 5), (80, 62, 32, 5),
|
583
|
+
(90, 42, 39, 5), (100, 32, 39, 4)]
|
584
|
+
|
585
|
+
# The attribute y_coord=... tells that the Y axis values
|
586
|
+
# should be taken from samples.
|
587
|
+
# In this example, Y values will be [40,50,60,70,80].
|
588
|
+
ar = area.T(y_coord = category_coord.T(data[3:8], 0),
|
589
|
+
x_grid_style=line_style.gray50_dash1,
|
590
|
+
x_grid_interval=20, x_range = (0,100),
|
591
|
+
x_axis=axis.X(label="X label"),
|
592
|
+
y_axis=axis.Y(label="Y label"),
|
593
|
+
bg_style = fill_style.gray90,
|
594
|
+
border_line_style = line_style.default,
|
595
|
+
legend = legend.T(loc=(80,10)))
|
596
|
+
|
597
|
+
# Below call sets the default attributes for all bar plots.
|
598
|
+
chart_object.set_defaults(bar_plot.T, direction="horizontal", data=data)
|
599
|
+
|
600
|
+
# Attribute cluster=(0,3) tells that you are going to draw three bar
|
601
|
+
# plots side by side. The plot labeled "foo" will the leftmost (i.e.,
|
602
|
+
# 0th out of 3). Attribute hcol tells the column from which to
|
603
|
+
# retrive sample values from. It defaults to one.
|
604
|
+
ar.add_plot(bar_plot.T(label="foo", cluster=(0,3)))
|
605
|
+
ar.add_plot(bar_plot.T(label="bar", hcol=2, cluster=(1,3)))
|
606
|
+
ar.add_plot(bar_plot.T(label="baz", hcol=3, cluster=(2,3)))
|
607
|
+
ar.draw()
|
608
|
+
---------------------------------------------------------------------
|
609
|
+
|
610
|
+
To execute the script and include the generated chart image in your
|
611
|
+
document add the following lines to the AsciiDoc source:
|
612
|
+
|
613
|
+
---------------------------------------------------------------------
|
614
|
+
// Generate chart image file.
|
615
|
+
\sys2::[python "{indir}/barchart.py" --format=png --output="{outdir}/barchart.png" --scale=2]
|
616
|
+
|
617
|
+
// Display chart image file.
|
618
|
+
image::barchart.png[]
|
619
|
+
---------------------------------------------------------------------
|
620
|
+
|
621
|
+
[NOTE]
|
622
|
+
=====================================================================
|
623
|
+
- The `barchart.py` script is located in the same directory as the
|
624
|
+
AsciiDoc source file (`{indir}`).
|
625
|
+
- The generated chart image file (`barchart.png`) is written to the
|
626
|
+
same directory as the output file (`{outdir}`).
|
627
|
+
=====================================================================
|
628
|
+
|
629
|
+
|
630
|
+
== How can I render indented paragraphs?
|
631
|
+
|
632
|
+
Styling is backend dependent:
|
633
|
+
|
634
|
+
[float]
|
635
|
+
==== Create an indented paragraph style (xhtml11 and html5 backends)
|
636
|
+
. Define an 'indented' paragraph style, for example, by putting this
|
637
|
+
in a custom configuration file:
|
638
|
+
+
|
639
|
+
---------------------------------------------------------------------
|
640
|
+
[paradef-default]
|
641
|
+
indented-style=template="indentedparagraph"
|
642
|
+
|
643
|
+
[indentedparagraph]
|
644
|
+
<div class="paragraph"{id? id="{id}"} style="text-indent:3em;">{title?<div class="title">{title}</div>}<p>
|
645
|
+
|
|
646
|
+
</p></div>
|
647
|
+
---------------------------------------------------------------------
|
648
|
+
|
649
|
+
. Now apply the 'indented' style to normal paragraphs, for example:
|
650
|
+
+
|
651
|
+
---------------------------------------------------------------------
|
652
|
+
[indented]
|
653
|
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas
|
654
|
+
ultrices justo porttitor augue. Vestibulum pretium. Donec porta
|
655
|
+
vestibulum mi. Aliquam pede. Aenean lobortis lorem et lacus. Sed
|
656
|
+
lacinia. Vivamus at lectus.
|
657
|
+
---------------------------------------------------------------------
|
658
|
+
|
659
|
+
[float]
|
660
|
+
==== Use the role attribute (xhtml11 and html5 backends)
|
661
|
+
. Add the following line to custom stylesheet:
|
662
|
+
+
|
663
|
+
---------------------------------------------------------------------
|
664
|
+
div.paragraph.indented p {text-indent: 3em;}
|
665
|
+
---------------------------------------------------------------------
|
666
|
+
|
667
|
+
. Apply the 'role' attribute to indented paragraphs, for example:
|
668
|
+
+
|
669
|
+
---------------------------------------------------------------------
|
670
|
+
[role="indented"]
|
671
|
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas
|
672
|
+
ultrices justo porttitor augue. Vestibulum pretium. Donec porta
|
673
|
+
vestibulum mi. Aliquam pede. Aenean lobortis lorem et lacus. Sed
|
674
|
+
lacinia. Vivamus at lectus.
|
675
|
+
---------------------------------------------------------------------
|
676
|
+
|
677
|
+
. Include the custom stylesheet by setting the 'stylesheet' attribute
|
678
|
+
(either from the command-line or with an attribute entry in the
|
679
|
+
document header).
|
680
|
+
|
681
|
+
[float]
|
682
|
+
==== Use the role attribute (docbook backend)
|
683
|
+
. Add the following line to the distributed `docbook-xsl.css`
|
684
|
+
stylesheet or include it in a custom stylesheet:
|
685
|
+
+
|
686
|
+
---------------------------------------------------------------------
|
687
|
+
p.indented {text-indent: 3em;}
|
688
|
+
---------------------------------------------------------------------
|
689
|
+
|
690
|
+
. Apply the 'role' attribute to indented paragraphs, for example:
|
691
|
+
+
|
692
|
+
---------------------------------------------------------------------
|
693
|
+
[role="indented"]
|
694
|
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas
|
695
|
+
ultrices justo porttitor augue. Vestibulum pretium. Donec porta
|
696
|
+
vestibulum mi. Aliquam pede. Aenean lobortis lorem et lacus. Sed
|
697
|
+
lacinia. Vivamus at lectus.
|
698
|
+
---------------------------------------------------------------------
|
699
|
+
|
700
|
+
. If you have included the custom CSS in a separate stylesheet you
|
701
|
+
will need to specify the stylesheet file name (along with the
|
702
|
+
default `docbook-xsl.css` stylesheet file name) with the
|
703
|
+
`html.stylesheet` XSL parameter. If you are using 'a2x(1)' use the
|
704
|
+
`--stylesheet` option (it sets the `html.stylesheet` XSL parameter),
|
705
|
+
for example: `--stylesheet "docbook-xsl.css mycss.css"`.
|
706
|
+
|
707
|
+
NOTE: This applies to HTML outputs not PDF. To achieve the same
|
708
|
+
results with PDF outputs you will need to customize the DocBook XSL
|
709
|
+
Stylesheets to render indented paragraphs from DocBook `simpara`
|
710
|
+
elements containing the the `role="indented"` attribute.
|
711
|
+
|
712
|
+
|
713
|
+
== Is there a way to set default table grid and frame attributes?
|
714
|
+
|
715
|
+
You can set the 'grid' and 'frame' attributes globally in your
|
716
|
+
document header with Attribute Entries or from the command-line using
|
717
|
+
the `--attribute` option. In the following example tables that don't
|
718
|
+
explicitly set the 'grid' and 'frame' values will default to 'all' and
|
719
|
+
'topbot' respectively:
|
720
|
+
|
721
|
+
---------------------------------------------------------------------
|
722
|
+
:grid: all
|
723
|
+
:frame: topbot
|
724
|
+
---------------------------------------------------------------------
|
725
|
+
|
726
|
+
TIP: This technique can be applied to any block element attribute
|
727
|
+
(just beware of possible ambiguity, for example, table and image
|
728
|
+
blocks both have a 'width' attribute).
|
729
|
+
|
730
|
+
|
731
|
+
== How can I place a backslash character in front of an attribute reference without escaping the reference?
|
732
|
+
|
733
|
+
Use the predefined `{backslash}` attribute reference instead of an
|
734
|
+
actual backslash, for example if the `{projectname}` attribute has
|
735
|
+
the value `foobar` then:
|
736
|
+
|
737
|
+
d:\data{backslash}{projectname}
|
738
|
+
|
739
|
+
would be rendered as:
|
740
|
+
|
741
|
+
d:\data\foobar
|
742
|
+
|
743
|
+
== How can I escape AsciiDoc markup?
|
744
|
+
|
745
|
+
Most AsciiDoc inline elements can be suppressed by preceding them with
|
746
|
+
a backslash character. These elements include:
|
747
|
+
|
748
|
+
- Attribute references.
|
749
|
+
- Text formatting.
|
750
|
+
- Quoting,
|
751
|
+
- Macros.
|
752
|
+
- Replacements.
|
753
|
+
- Special words.
|
754
|
+
- Table cell separators.
|
755
|
+
|
756
|
+
But there are exceptions -- see the next question.
|
757
|
+
|
758
|
+
|
759
|
+
== Some elements can't be escaped with a single backslash
|
760
|
+
|
761
|
+
There are a number of exceptions to the usual single backslash rule
|
762
|
+
-- mostly relating to URL macros that have two syntaxes or quoting
|
763
|
+
ambiguity. Here are some non-standard escape examples:
|
764
|
+
|
765
|
+
[cols="l,v",width="40%",frame="topbot",options="header"]
|
766
|
+
|========================================
|
767
|
+
|AsciiDoc | Renders
|
768
|
+
|
769
|
+
2*|
|
770
|
+
\srackham@methods.co.nz
|
771
|
+
<\srackham@methods.co.nz>
|
772
|
+
\mailto:[\srackham@methods.co.nz]
|
773
|
+
|
774
|
+
2*|
|
775
|
+
\http://www.foo1.co.nz
|
776
|
+
\\http://www.foobar.com[]
|
777
|
+
\\http://www.foobar.com[Foobar Limited]
|
778
|
+
|
779
|
+
2*|
|
780
|
+
A C\++ Library for C++
|
781
|
+
\\``double-quotes''
|
782
|
+
\*\*F**ile Open\...
|
783
|
+
|========================================
|
784
|
+
|
785
|
+
The source of this problem is ambiguity across substitution types --
|
786
|
+
the first match unescapes allowing the second to substitute. A
|
787
|
+
work-around for difficult cases is to side-step the problem using the
|
788
|
+
+\pass:[]+ passthrough inline macro.
|
789
|
+
|
790
|
+
NOTE: Escaping is unnecessary inside 'inline literal passthroughs'
|
791
|
+
(backtick quoted text).
|
792
|
+
|
793
|
+
|
794
|
+
== How can I escape a list?
|
795
|
+
Here's how to handle situations where the first line of a paragraph is
|
796
|
+
mistaken for a list item.
|
797
|
+
|
798
|
+
[float]
|
799
|
+
==== Numbered and bulleted lists
|
800
|
+
Precede the bullet or index of the first list item with an `{empty}`
|
801
|
+
attribute, for example:
|
802
|
+
|
803
|
+
{empty}- Qui in magna commodo est labitur dolorum an. Est ne magna
|
804
|
+
primis adolescens.
|
805
|
+
|
806
|
+
The predefined `{empty}` attribute is replaced by an empty string and
|
807
|
+
ensures the first line is not mistaken for a bulleted list item.
|
808
|
+
|
809
|
+
[float]
|
810
|
+
==== Labeled lists
|
811
|
+
Two colons or semicolons in a paragraph may be confused with a labeled
|
812
|
+
list entry. Use the predefined `{two-colons}` and `{two-semicolons}`
|
813
|
+
attributes to suppress this behavior, for example:
|
814
|
+
|
815
|
+
Qui in magna commodo{two-colons} est labitur dolorum an. Est ne
|
816
|
+
magna primis adolescens.
|
817
|
+
|
818
|
+
Will be rendered as:
|
819
|
+
|
820
|
+
Qui in magna commodo{two-colons} est labitur dolorum an. Est ne
|
821
|
+
magna primis adolescens.
|
822
|
+
|
823
|
+
|
824
|
+
== How can I set default list and tables styles?
|
825
|
+
|
826
|
+
You can set the element's 'style' entry in a global or custom
|
827
|
+
configuration file.
|
828
|
+
|
829
|
+
This example this will horizontally style all labeled lists that don't
|
830
|
+
have an explicit style attribute:
|
831
|
+
|
832
|
+
----------------------------------
|
833
|
+
[listdef-labeled]
|
834
|
+
style=horizontal
|
835
|
+
|
836
|
+
[listdef-labeled2]
|
837
|
+
style=horizontal
|
838
|
+
----------------------------------
|
839
|
+
|
840
|
+
This example will put a top and bottom border on all tables that don't
|
841
|
+
already have an explicit style attribute:
|
842
|
+
|
843
|
+
----------------------------------
|
844
|
+
[tabledef-default]
|
845
|
+
style=topbot
|
846
|
+
topbot-style=frame="topbot"
|
847
|
+
----------------------------------
|
848
|
+
|
849
|
+
Alternatively you can set the configuration entries from inside your
|
850
|
+
document, the above examples are equivalent to:
|
851
|
+
|
852
|
+
----------------------------------
|
853
|
+
:listdef-labeled.style: horizontal
|
854
|
+
:listdef-labeled2.style: horizontal
|
855
|
+
|
856
|
+
:tabledef-default.topbot-style: frame="topbot"
|
857
|
+
:tabledef-default.style: topbot
|
858
|
+
----------------------------------
|
859
|
+
|
860
|
+
|
861
|
+
== Why do I get a filter non-zero exit code error?
|
862
|
+
|
863
|
+
An error was returned when AsciiDoc tried to execute an external
|
864
|
+
filter command. The most common reason for this is that the filter
|
865
|
+
command could not be found by the command shell. To figure out what
|
866
|
+
the problem is run AsciiDoc with the `--verbose` option to determine
|
867
|
+
the command that is failing and then try to run the command manually
|
868
|
+
from the command-line.
|
869
|
+
|
870
|
+
|
871
|
+
== Are there any DocBook viewers?
|
872
|
+
|
873
|
+
http://live.gnome.org/Yelp[Yelp], the GNOME help viewer, does a
|
874
|
+
creditable job of displaying DocBook XML files directly.
|
875
|
+
|
876
|
+
|
877
|
+
== Can you create ODF documents using AsciiDoc?
|
878
|
+
|
879
|
+
The easiest and highest fidelity method I've seen is to generate
|
880
|
+
HTML from AsciiDoc then paste it from your browser (we use Firefox)
|
881
|
+
into OpenOffice Writer.
|
882
|
+
|
883
|
+
- I found that that there is better fidelity pasting HTML generated by
|
884
|
+
the 'html4' backend instead of the default 'xhtml11' backend.
|
885
|
+
- Don't paste AsciiDoc tables of contents, OpenOffice Writer (I was
|
886
|
+
using version 2.3) hangs when saving. This may be something to do
|
887
|
+
with the embedded JavaScript but I haven't looked closely at it, I
|
888
|
+
may even be wrong about this.
|
889
|
+
|
890
|
+
This tip was contributed by Bernard Amade.
|
891
|
+
|
892
|
+
|
893
|
+
== How can I suppress cell separators in included table data files?
|
894
|
+
|
895
|
+
Use the `{include:}` system attribute instead of the `include::[]`
|
896
|
+
macro (the former is not expanded until after the table data has been
|
897
|
+
parsed into cells, whereas the latter is included before the table is
|
898
|
+
processed.
|
899
|
+
|
900
|
+
|
901
|
+
== How can I preserve paragraph line boundaries?
|
902
|
+
|
903
|
+
Apply the The 'verse' paragraph style, the rendered text preserves
|
904
|
+
line boundaries and is useful for lyrics and poems. For example:
|
905
|
+
|
906
|
+
---------------------------------------------------------------------
|
907
|
+
[verse]
|
908
|
+
Consul *necessitatibus* per id,
|
909
|
+
consetetur, eu pro everti postulant
|
910
|
+
homero verear ea mea, qui.
|
911
|
+
---------------------------------------------------------------------
|
912
|
+
|
913
|
+
Alternatively, if you are generating PDF files, you can use line
|
914
|
+
breaks. For example:
|
915
|
+
|
916
|
+
---------------------------------------------------------------------
|
917
|
+
Consul *necessitatibus* per id, +
|
918
|
+
consetetur, eu pro everti postulant +
|
919
|
+
homero verear ea mea, qui.
|
920
|
+
---------------------------------------------------------------------
|
921
|
+
|
922
|
+
|
923
|
+
== How can I include non-breaking space characters?
|
924
|
+
|
925
|
+
Use the non-breaking space character entity reference ` ` (see
|
926
|
+
the next question). You could also use the predefined `{nbsp}`
|
927
|
+
attribute reference.
|
928
|
+
|
929
|
+
|
930
|
+
== Can I include HTML and XML character entity references in my document?
|
931
|
+
|
932
|
+
Yes, just enter the reference in your document. For example `β`
|
933
|
+
will print a Greek small beta character β
|
934
|
+
|
935
|
+
|
936
|
+
[[X1]]
|
937
|
+
== How do I include spaces in URLs?
|
938
|
+
|
939
|
+
URL inline macro targets (addresses) cannot contain white space
|
940
|
+
characters. If you need spaces encode them as `%20`. For example:
|
941
|
+
|
942
|
+
image:large%20image.png[]
|
943
|
+
http://www.foo.bar.com/an%20example%20document.html
|
944
|
+
|
945
|
+
|
946
|
+
== How can I get AsciiDoc to assign the correct DocBook language attribute?
|
947
|
+
|
948
|
+
Set the AsciiDoc 'lang' attribute to the appropriate language code.
|
949
|
+
For example:
|
950
|
+
|
951
|
+
$ a2x -a lang=es doc/article.txt
|
952
|
+
|
953
|
+
This will ensure that downstream DocBook processing will generate the
|
954
|
+
correct language specific document headings (things like table of
|
955
|
+
contents, revision history, figure and table captions, admonition
|
956
|
+
captions).
|
957
|
+
|
958
|
+
|
959
|
+
== How can I turn off table and image title numbering?
|
960
|
+
For HTML outputs set the 'caption' attribute to an empty string,
|
961
|
+
either globally:
|
962
|
+
|
963
|
+
-------------------------
|
964
|
+
:caption:
|
965
|
+
-------------------------
|
966
|
+
|
967
|
+
or on an element by element basis, for example:
|
968
|
+
|
969
|
+
-------------------------
|
970
|
+
.Tiger
|
971
|
+
[caption=""]
|
972
|
+
image::images/tiger.png[]
|
973
|
+
-------------------------
|
974
|
+
|
975
|
+
|
976
|
+
== How can I assign multiple author names?
|
977
|
+
|
978
|
+
A quick way to do this is put both authors in a single first name, for
|
979
|
+
example:
|
980
|
+
|
981
|
+
---------------------------------------
|
982
|
+
My Document
|
983
|
+
===========
|
984
|
+
:Author: Bill_and_Ben_the_Flowerpot_Men
|
985
|
+
:Author Initials: BB & BC
|
986
|
+
---------------------------------------
|
987
|
+
|
988
|
+
asciidoc(1) replaces the underscores with spaces.
|
989
|
+
|
990
|
+
If you are generating DocBook then a more flexible approach is to
|
991
|
+
create a 'docinfo' file containing a DocBook 'authorgroup' element
|
992
|
+
(search the 'User Guide' for 'docinfo' for more details).
|
993
|
+
|
994
|
+
|
995
|
+
== How can I selectively disable a quoted text substitution?
|
996
|
+
|
997
|
+
Omitting the tag name will disable quoting. For example, if you don't
|
998
|
+
want superscripts or subscripts then put the following in a custom
|
999
|
+
configuration file or edit the global `asciidoc.conf` configuration
|
1000
|
+
file:
|
1001
|
+
|
1002
|
+
-------------------
|
1003
|
+
[quotes]
|
1004
|
+
^=
|
1005
|
+
~=
|
1006
|
+
-------------------
|
1007
|
+
|
1008
|
+
Alternatively you can set the configuration entries from within your
|
1009
|
+
document, the above examples are equivalent to:
|
1010
|
+
|
1011
|
+
-------------------
|
1012
|
+
:quotes.^:
|
1013
|
+
:quotes.~:
|
1014
|
+
-------------------
|
1015
|
+
|
1016
|
+
|
1017
|
+
== How can I customize the \{localdate} format?
|
1018
|
+
|
1019
|
+
The default format for the `{localdate}` attribute is the ISO 8601
|
1020
|
+
`yyyy-mm-dd` format. You can change this format by explicitly setting
|
1021
|
+
the `{localdate}` attribute. For example by setting it using the
|
1022
|
+
asciidoc(1) `-a` command-line option:
|
1023
|
+
|
1024
|
+
$ asciidoc -a localdate=`date +%d-%m-%Y` mydoc.txt
|
1025
|
+
|
1026
|
+
You could also set it by adding an Attribute Entry to your source
|
1027
|
+
document, for example:
|
1028
|
+
|
1029
|
+
:localdate: {sys: date +%Y-%m-%d}
|
1030
|
+
|
1031
|
+
|
1032
|
+
== Where can I find examples of commands used to build output documents?
|
1033
|
+
|
1034
|
+
The User Guide has some. You could also look at `./doc/main.aap` and
|
1035
|
+
`./examples/website/main.aap` in the AsciiDoc distribution, they have
|
1036
|
+
all the commands used to build the AsciiDoc documentation and the
|
1037
|
+
AsciiDoc website (even if you don't use A-A-P you'll still find it
|
1038
|
+
useful).
|
1039
|
+
|
1040
|
+
|
1041
|
+
== Why have you used the DocBook <simpara> element instead of <para>?
|
1042
|
+
|
1043
|
+
`<simpara>` is really the same as `<para>` except it can't contain
|
1044
|
+
block elements -- this matches, more closely, the AsciiDoc paragraph
|
1045
|
+
semantics.
|
1046
|
+
|
1047
|
+
|
1048
|
+
== How can I format text inside a listing block?
|
1049
|
+
|
1050
|
+
By default only 'specialcharacters' and 'callouts' are substituted in
|
1051
|
+
listing blocks; you can add quotes substitutions by explicitly setting
|
1052
|
+
the block 'subs' attribute, for example:
|
1053
|
+
|
1054
|
+
[listing]
|
1055
|
+
..........................................
|
1056
|
+
[subs="quotes"]
|
1057
|
+
------------------------------------------
|
1058
|
+
$ ls *-al*
|
1059
|
+
------------------------------------------
|
1060
|
+
..........................................
|
1061
|
+
|
1062
|
+
The `-al` will rendered bold. Note that:
|
1063
|
+
|
1064
|
+
- You would need to explicitly escape text you didn't want quoted.
|
1065
|
+
- Don't do this in source code listing blocks because it modifies the
|
1066
|
+
source code which confuses the syntax highlighter.
|
1067
|
+
- This only works if your DocBook processor recognizes DocBook
|
1068
|
+
`<emphasis>` elements inside `<screen>` elements.
|
1069
|
+
|
1070
|
+
Alternative, if the lines are contiguous, you could use the 'literal'
|
1071
|
+
paragraph style:
|
1072
|
+
|
1073
|
+
------------------------------------------
|
1074
|
+
["literal",subs="quotes"]
|
1075
|
+
$ ls *-al*
|
1076
|
+
------------------------------------------
|
1077
|
+
|
1078
|
+
|
1079
|
+
== Why doesn't the include1::[] macro work?
|
1080
|
+
|
1081
|
+
Internally the `include1` macro is translated to the `include1` system
|
1082
|
+
attribute which means it must be evaluated in a region where attribute
|
1083
|
+
substitution is enabled. `include1` won't work, for example, in a
|
1084
|
+
ListingBlock (unless attribute substitution is enabled). `include1`
|
1085
|
+
is intended for use in configuration files, use the `include` macro
|
1086
|
+
and set the attribute `depth=1` instead, for example:
|
1087
|
+
|
1088
|
+
[listing]
|
1089
|
+
................................................
|
1090
|
+
------------------------------------------------
|
1091
|
+
\include::blogpost_media_processing.txt[depth=1]
|
1092
|
+
------------------------------------------------
|
1093
|
+
................................................
|
1094
|
+
|
1095
|
+
|
1096
|
+
== How can I make the mailto macro work with multiple email addresses?
|
1097
|
+
|
1098
|
+
For the AsciiDoc 'mailto' macro to work with multiple email addresses
|
1099
|
+
(as per RFC2368) you need to URL encode the '@' characters (replace
|
1100
|
+
them with '%40'), if you don't the individual addresses will be
|
1101
|
+
rendered as separate links. You also need to <<X1,replace spaces with
|
1102
|
+
'%20'>>.
|
1103
|
+
|
1104
|
+
For example, the following call won't work:
|
1105
|
+
|
1106
|
+
mailto:jb@foobar.com,jd@acme.co.nz?subject=New foofoo release[New foofoo release]
|
1107
|
+
|
1108
|
+
Use this instead:
|
1109
|
+
|
1110
|
+
mailto:jb%40foobar.com,jd%40acme.co.nz?subject=New%20foofoo%20release[New foofoo release]
|
1111
|
+
|
1112
|
+
|
1113
|
+
== How can a replacement have a trailing backslash?
|
1114
|
+
Quote the entry name -- this nonsensical example replaces `x\` with
|
1115
|
+
`y`:
|
1116
|
+
|
1117
|
+
"x\\"=y
|
1118
|
+
|
1119
|
+
If quoting were omitted the equals character (separating the
|
1120
|
+
entry name `x` from the value `y`) would be escaped.
|
1121
|
+
|
1122
|
+
|