FooBarWidget-mizuho 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +1 -1
- data/Rakefile +14 -2
- data/asciidoc/BUGS +11 -6
- data/asciidoc/BUGS.txt +7 -3
- data/asciidoc/CHANGELOG +313 -151
- data/asciidoc/CHANGELOG.txt +177 -12
- data/asciidoc/INSTALL +30 -36
- data/asciidoc/INSTALL.txt +20 -20
- data/asciidoc/Makefile.in +145 -0
- data/asciidoc/README +11 -11
- data/asciidoc/README.txt +9 -9
- data/asciidoc/a2x +40 -7
- data/asciidoc/asciidoc.conf +180 -126
- data/asciidoc/asciidoc.py +1667 -977
- data/asciidoc/common.aap +2 -2
- data/asciidoc/configure +2840 -0
- data/asciidoc/configure.ac +11 -0
- data/asciidoc/dblatex/asciidoc-dblatex.sty +2 -0
- data/asciidoc/dblatex/asciidoc-dblatex.xsl +15 -0
- data/asciidoc/dblatex/dblatex-readme.txt +19 -2
- data/asciidoc/doc/a2x.1 +77 -67
- data/asciidoc/doc/a2x.1.txt +11 -2
- data/asciidoc/doc/article.css-embedded.html +85 -63
- data/asciidoc/doc/article.html +644 -62
- data/asciidoc/doc/article.pdf +0 -0
- data/asciidoc/doc/article.txt +15 -17
- data/asciidoc/doc/asciidoc.1 +34 -40
- data/asciidoc/doc/asciidoc.1.css-embedded.html +67 -32
- data/asciidoc/doc/asciidoc.1.css.html +28 -28
- data/asciidoc/doc/asciidoc.1.html +33 -33
- data/asciidoc/doc/asciidoc.css-embedded.html +2234 -2348
- data/asciidoc/doc/asciidoc.css.html +2203 -2352
- data/asciidoc/doc/asciidoc.dict +52 -1
- data/asciidoc/doc/asciidoc.html +980 -1160
- data/asciidoc/doc/asciidoc.txt +941 -738
- data/asciidoc/doc/asciimathml.txt +63 -0
- data/asciidoc/doc/book-multi.html +26 -43
- data/asciidoc/doc/book-multi.txt +19 -23
- data/asciidoc/doc/book.css-embedded.html +92 -71
- data/asciidoc/doc/book.html +24 -41
- data/asciidoc/doc/book.txt +19 -21
- data/asciidoc/doc/docbook-xsl.css +1 -0
- data/asciidoc/doc/faq.txt +288 -60
- data/asciidoc/doc/images +1 -0
- data/asciidoc/doc/latex-backend.html +16 -123
- data/asciidoc/doc/latex-backend.txt +17 -19
- data/asciidoc/doc/latexmath.txt +233 -24
- data/asciidoc/doc/latexmathml.txt +41 -0
- data/asciidoc/doc/main.aap +9 -5
- data/asciidoc/doc/music-filter.pdf +0 -0
- data/asciidoc/doc/music-filter.txt +2 -2
- data/asciidoc/doc/source-highlight-filter.html +476 -105
- data/asciidoc/doc/source-highlight-filter.pdf +0 -0
- data/asciidoc/doc/source-highlight-filter.txt +39 -10
- data/asciidoc/docbook-xsl/asciidoc-docbook-xsl.txt +1 -29
- data/asciidoc/docbook-xsl/fo.xsl +35 -3
- data/asciidoc/docbook-xsl/manpage.xsl +3 -0
- data/asciidoc/docbook-xsl/text.xsl +50 -0
- data/asciidoc/docbook.conf +182 -73
- data/asciidoc/examples/website/ASCIIMathML.js +1 -0
- data/asciidoc/examples/website/CHANGELOG.html +618 -182
- data/asciidoc/examples/website/CHANGELOG.txt +1 -0
- data/asciidoc/examples/website/INSTALL.html +34 -36
- data/asciidoc/examples/website/INSTALL.txt +1 -0
- data/asciidoc/examples/website/LaTeXMathML.js +1 -0
- data/asciidoc/examples/website/README-website.html +26 -37
- data/asciidoc/examples/website/README-website.txt +6 -6
- data/asciidoc/examples/website/README.html +15 -15
- data/asciidoc/examples/website/README.txt +1 -0
- data/asciidoc/examples/website/a2x.1.html +74 -50
- data/asciidoc/examples/website/a2x.1.txt +1 -0
- data/asciidoc/examples/website/asciidoc-docbook-xsl.html +13 -48
- data/asciidoc/examples/website/asciidoc-docbook-xsl.txt +1 -0
- data/asciidoc/examples/website/asciimathml.txt +1 -0
- data/asciidoc/examples/website/customers.csv +1 -0
- data/asciidoc/examples/website/downloads.html +69 -31
- data/asciidoc/examples/website/downloads.txt +28 -5
- data/asciidoc/examples/website/faq.html +370 -124
- data/asciidoc/examples/website/faq.txt +1 -0
- data/asciidoc/examples/website/images +1 -0
- data/asciidoc/examples/website/index.html +64 -64
- data/asciidoc/examples/website/index.txt +22 -15
- data/asciidoc/examples/website/latex-backend.html +152 -257
- data/asciidoc/examples/website/latex-backend.txt +1 -0
- data/asciidoc/examples/website/latexmathml.txt +1 -0
- data/asciidoc/examples/website/manpage.html +27 -27
- data/asciidoc/examples/website/manpage.txt +1 -0
- data/asciidoc/examples/website/music-filter.html +18 -18
- data/asciidoc/examples/website/music-filter.txt +1 -0
- data/asciidoc/examples/website/music1.abc +1 -1
- data/asciidoc/examples/website/music1.png +0 -0
- data/asciidoc/examples/website/music2.ly +1 -1
- data/asciidoc/examples/website/music2.png +0 -0
- data/asciidoc/examples/website/newlists.txt +40 -0
- data/asciidoc/examples/website/newtables.txt +397 -0
- data/asciidoc/examples/website/source-highlight-filter.html +67 -32
- data/asciidoc/examples/website/source-highlight-filter.txt +1 -0
- data/asciidoc/examples/website/support.html +4 -4
- data/asciidoc/examples/website/toc.js +1 -0
- data/asciidoc/examples/website/userguide.html +2190 -2339
- data/asciidoc/examples/website/userguide.txt +1 -0
- data/asciidoc/examples/website/version83.txt +37 -0
- data/asciidoc/examples/website/version9.html +13 -13
- data/asciidoc/examples/website/xhtml11-manpage.css +1 -0
- data/asciidoc/examples/website/xhtml11-quirks.css +1 -0
- data/asciidoc/examples/website/xhtml11.css +1 -0
- data/asciidoc/filters/code-filter-readme.txt +3 -3
- data/asciidoc/filters/code-filter-test.txt +6 -6
- data/asciidoc/filters/source-highlight-filter.conf +12 -5
- data/asciidoc/html4.conf +152 -58
- data/asciidoc/install-sh +201 -0
- data/asciidoc/latex.conf +41 -41
- data/asciidoc/stylesheets/docbook-xsl.css +1 -0
- data/asciidoc/stylesheets/xhtml11.css +39 -4
- data/asciidoc/text.conf +4 -4
- data/asciidoc/vim/syntax/asciidoc.vim +58 -32
- data/asciidoc/wordpress.conf +48 -0
- data/asciidoc/xhtml11-quirks.conf +1 -1
- data/asciidoc/xhtml11.conf +198 -70
- data/bin/mizuho +5 -2
- data/lib/mizuho/generator.rb +48 -19
- data/mizuho.gemspec +16 -6
- metadata +58 -15
- data/asciidoc/doc/asciimath.txt +0 -47
- data/asciidoc/docbook-xsl/shaded-literallayout.patch +0 -32
- data/asciidoc/examples/website/asciimath.html +0 -157
- data/asciidoc/examples/website/latexmath.html +0 -119
- data/asciidoc/filters/code-filter-test-c++.txt +0 -7
- data/asciidoc/install.sh +0 -55
- data/asciidoc/linuxdoc.conf +0 -285
- data/asciidoc/math.conf +0 -50
- data/asciidoc/stylesheets/xhtml-deprecated-manpage.css +0 -21
- data/asciidoc/stylesheets/xhtml-deprecated.css +0 -247
- data/asciidoc/t.conf +0 -20
- data/asciidoc/xhtml-deprecated-css.conf +0 -235
- data/asciidoc/xhtml-deprecated.conf +0 -351
data/asciidoc/doc/asciidoc.txt
CHANGED
@@ -221,13 +221,19 @@ linkcss::
|
|
221
221
|
which case stylesheets and scripts are automatically embedded in the
|
222
222
|
output document.
|
223
223
|
|
224
|
+
scriptsdir::
|
225
|
+
The name of the directory containing linked JavaScripts. Defaults to
|
226
|
+
`.` (the same directory as the linking document).
|
227
|
+
|
224
228
|
stylesdir::
|
225
229
|
The name of the directory containing linked stylesheets. Defaults to
|
226
230
|
`.` (the same directory as the linking document).
|
227
231
|
|
228
|
-
|
229
|
-
The name of
|
230
|
-
|
232
|
+
stylesheet::
|
233
|
+
The file name of an optional additional CSS stylesheet. If you are
|
234
|
+
embedding the stylesheet specify the actual file name; if you are
|
235
|
+
linking CSS specify the file name relative to the directory
|
236
|
+
specified by the 'stylesdir' attribute.
|
231
237
|
|
232
238
|
[[X45]]
|
233
239
|
icons::
|
@@ -305,45 +311,20 @@ Default 'xhtml11' stylesheets:
|
|
305
311
|
Stylesheet modifications to work around IE6 browser
|
306
312
|
incompatibilities.
|
307
313
|
|
308
|
-
Use the 'theme' attribute to select
|
309
|
-
|
310
|
-
|
314
|
+
Use the 'theme' attribute to select an alternative set of stylesheets.
|
315
|
+
For example, the command-line option `-a theme=foo` will use
|
316
|
+
stylesheets `foo.css`, `foo-manpage.css` and `foo-quirks.css` instead
|
317
|
+
of the default stylesheets.
|
311
318
|
|
319
|
+
Use the 'stylesheet' attribute to include an additional stylesheet in
|
320
|
+
XHTML documents. For example, the command-line option `-a
|
321
|
+
stylesheet=newsletter.css` will use stylesheets `newsletter.css`.
|
312
322
|
|
313
323
|
html4
|
314
324
|
~~~~~
|
315
325
|
This backend generates plain (unstyled) HTML 4.01 Transitional markup.
|
316
326
|
|
317
327
|
|
318
|
-
linuxdoc
|
319
|
-
~~~~~~~~
|
320
|
-
WARNING: The AsciiDoc linuxdoc backend is still distributed but is no
|
321
|
-
longer being actively developed or tested with new AsciiDoc releases
|
322
|
-
(the last supported release was AsciiDoc 6.0.3).
|
323
|
-
|
324
|
-
- Tables are not supported.
|
325
|
-
- Images are not supported.
|
326
|
-
- Callouts are not supported.
|
327
|
-
- Horizontal labeled lists are not supported.
|
328
|
-
- Only article document types are allowed.
|
329
|
-
- The Abstract section can consist only of a single paragraph.
|
330
|
-
- An AsciiDoc Preamble is not allowed.
|
331
|
-
- The LinuxDoc output format does not support multiple labels per
|
332
|
-
labeled list item although LinuxDoc conversion programs generally
|
333
|
-
output all the labels with a warning.
|
334
|
-
- Don't apply character formatting to the `link` macro attributes,
|
335
|
-
LinuxDoc does not allow displayed link text to be formatted.
|
336
|
-
|
337
|
-
The default output file name extension is `.sgml`.
|
338
|
-
|
339
|
-
latex
|
340
|
-
~~~~~
|
341
|
-
An experimental LaTeX backend has been written for AsciiDoc by
|
342
|
-
Benjamin Klum. A tutorial `./doc/latex-backend.html` is included in
|
343
|
-
the AsciiDoc distribution which can also be viewed at
|
344
|
-
http://www.methods.co.nz/asciidoc/latex-backend.html.
|
345
|
-
|
346
|
-
|
347
328
|
Document Structure
|
348
329
|
------------------
|
349
330
|
An AsciiDoc document consists of a series of <<X8,block elements>>
|
@@ -375,13 +356,10 @@ definition] as follows:
|
|
375
356
|
BulletedList ::= (ListItem)+
|
376
357
|
NumberedList ::= (ListItem)+
|
377
358
|
CalloutList ::= (ListItem)+
|
378
|
-
LabeledList ::= (
|
359
|
+
LabeledList ::= (ListEntry)+
|
360
|
+
ListEntry ::= (ListLabel,ListItem)
|
361
|
+
ListLabel ::= (ListTerm+)
|
379
362
|
ListItem ::= (ItemText,(List|ListParagraph|ListContinuation)*)
|
380
|
-
Table ::= (Ruler,TableHeader?,TableBody,TableFooter?)
|
381
|
-
TableHeader ::= (TableRow+,TableUnderline)
|
382
|
-
TableFooter ::= (TableRow+,TableUnderline)
|
383
|
-
TableBody ::= (TableRow+,TableUnderline)
|
384
|
-
TableRow ::= (TableData+)
|
385
363
|
|
386
364
|
Where:
|
387
365
|
|
@@ -474,11 +452,12 @@ load but the browser will ignore the (as yet ungenerated) section ID.
|
|
474
452
|
|
475
453
|
The IDs are generated by the following algorithm:
|
476
454
|
|
477
|
-
- Replace all non-alphanumeric title characters with
|
455
|
+
- Replace all non-alphanumeric title characters with underscores.
|
478
456
|
- Strip leading or trailing underscores.
|
479
457
|
- Convert to lowercase.
|
480
|
-
- Prepend
|
481
|
-
with existing document IDs).
|
458
|
+
- Prepend the `idprefix` attribute (so there's no possibility of name
|
459
|
+
clashes with existing document IDs). Prepend an underscore if the
|
460
|
+
`idprefix` attribute is not defined.
|
482
461
|
- A numbered suffix (`_2`, `_3` ...) is added if a same named
|
483
462
|
auto-generated section ID exists.
|
484
463
|
|
@@ -591,8 +570,7 @@ following default order:
|
|
591
570
|
4. Replacements
|
592
571
|
5. Attributes
|
593
572
|
6. Inline Macros
|
594
|
-
7.
|
595
|
-
8. Replacements2
|
573
|
+
7. Replacements2
|
596
574
|
|
597
575
|
The substitutions and substitution order performed on
|
598
576
|
Title, Paragraph and DelimitedBlock elements is determined by
|
@@ -617,11 +595,18 @@ _Emphasized text_::
|
|
617
595
|
|
618
596
|
+Monospaced text+::
|
619
597
|
Word phrases \`enclosed in backtick characters` (grave
|
620
|
-
accents) or \+plus characters+ are rendered in a monospaced
|
598
|
+
accents) or \+plus characters+ are rendered in a monospaced
|
599
|
+
font.
|
600
|
+
|
601
|
+
`Single quoted text'::
|
602
|
+
Phrases enclosed with a \`single grave accent to the left and
|
603
|
+
a single acute accent to the right' are rendered in single
|
604
|
+
quotation marks.
|
621
605
|
|
622
|
-
``
|
623
|
-
Phrases
|
624
|
-
acute accents to the right
|
606
|
+
``Double quoted text''::
|
607
|
+
Phrases enclosed with \\``two grave accents to the left and
|
608
|
+
two acute accents to the right'' are rendered in quotation
|
609
|
+
marks.
|
625
610
|
|
626
611
|
#Unquoted text#::
|
627
612
|
Placing \#hashes around text# does nothing, it is a mechanism
|
@@ -651,7 +636,7 @@ is a number which treated as em units. Here are some examples:
|
|
651
636
|
New quotes can be defined by editing asciidoc(1) configuration files.
|
652
637
|
See the <<X7,Configuration Files>> section for details.
|
653
638
|
|
654
|
-
.Quoted text
|
639
|
+
.Quoted text behavior
|
655
640
|
- Quoting cannot be overlapped.
|
656
641
|
- Different quoting types can be nested.
|
657
642
|
- To suppress quoted text formatting place a backslash character
|
@@ -700,20 +685,6 @@ constrained quotes) -- here's how to escape the previous example:
|
|
700
685
|
|
701
686
|
=====================================================================
|
702
687
|
|
703
|
-
[[X50]]
|
704
|
-
Inline Passthroughs
|
705
|
-
~~~~~~~~~~~~~~~~~~~
|
706
|
-
This special text quoting mechanism passes inline text to the output
|
707
|
-
document without the usual substitutions. There are two flavors:
|
708
|
-
|
709
|
-
\+\++Triple-plus passthrough\+\++::
|
710
|
-
No change is made to the quoted text, it is passed verbatim to the
|
711
|
-
output document.
|
712
|
-
|
713
|
-
\$$Double-dollar passthrough$$::
|
714
|
-
Special characters are escaped but no other changes are made.
|
715
|
-
This passthrough can be prefixed with inline attributes.
|
716
|
-
|
717
688
|
Superscripts and Subscripts
|
718
689
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
719
690
|
Put \^carets on either^ side of the text to be superscripted, put
|
@@ -732,29 +703,45 @@ Superscripts and subscripts are implemented as <<X52,unconstrained
|
|
732
703
|
quotes>> so they can be escaped with a leading backslash and prefixed
|
733
704
|
with with an attribute list.
|
734
705
|
|
735
|
-
Line Breaks
|
736
|
-
|
706
|
+
Line Breaks
|
707
|
+
~~~~~~~~~~~
|
737
708
|
A plus character preceded by at least one space character at the end
|
738
|
-
of a line forces a line break. It generates
|
739
|
-
(
|
740
|
-
|
709
|
+
of a non-blank line forces a line break. It generates a line break
|
710
|
+
(`br`) tag for HTML outputs and a custom XML `asciidoc-br` processing
|
711
|
+
instruction for DocBook outputs. The `asciidoc-br` processing
|
712
|
+
instruction is handled by <<X43,a2x(1)>> if you use FOP.
|
741
713
|
|
742
|
-
|
743
|
-
|
744
|
-
A line of
|
745
|
-
|
714
|
+
Page Breaks
|
715
|
+
~~~~~~~~~~~
|
716
|
+
A line of three or more less-than (`<<<`) characters will generate a
|
717
|
+
hard page break in DocBook and printed HTML outputs. It uses the CSS
|
718
|
+
`page-break-after` property for HTML outputs and a custom XML
|
719
|
+
`asciidoc-pagebreak` processing instruction for DocBook outputs. The
|
720
|
+
`asciidoc-pagebreak` processing instruction is handled by
|
721
|
+
<<X43,a2x(1)>> if you use FOP. Hard page breaks are sometimes handy
|
722
|
+
but as a general rule you should let your page processor generate page
|
723
|
+
breaks for you.
|
724
|
+
|
725
|
+
Rulers
|
726
|
+
~~~~~~
|
727
|
+
A line of three or more apostrophe characters will generate a ruler
|
728
|
+
line. It generates a ruler (`hr`) tag for HTML outputs and a custom XML
|
729
|
+
`asciidoc-hr` processing instruction for DocBook outputs. The
|
730
|
+
`asciidoc-hr` processing instruction is handled by <<X43,a2x(1)>> if
|
731
|
+
you use FOP.
|
746
732
|
|
747
733
|
Tabs
|
748
734
|
~~~~
|
749
735
|
By default tab characters input files will translated to 8 spaces. Tab
|
750
736
|
expansion is set with the 'tabsize' entry in the configuration file
|
751
|
-
`[miscellaneous]` section and can be overridden in
|
752
|
-
|
737
|
+
`[miscellaneous]` section and can be overridden in included files by
|
738
|
+
setting a 'tabsize' attribute in the `include` macro's attribute list.
|
739
|
+
For example:
|
753
740
|
|
754
741
|
include::addendum.txt[tabsize=2]
|
755
742
|
|
756
743
|
The tab size can also be set using the attribute command-line option,
|
757
|
-
for example
|
744
|
+
for example `--attribute tabsize=4`
|
758
745
|
|
759
746
|
Replacements
|
760
747
|
~~~~~~~~~~~~
|
@@ -771,6 +758,17 @@ Which are rendered as:
|
|
771
758
|
-- em dash, ... ellipsis, -> right arrow, <- left arrow, => right
|
772
759
|
double arrow, <= left double arrow.
|
773
760
|
|
761
|
+
You can also include arbitrary entity references in the AsciiDoc
|
762
|
+
source. Examples:
|
763
|
+
|
764
|
+
➊ ¶
|
765
|
+
|
766
|
+
renders:
|
767
|
+
|
768
|
+
➊ ¶
|
769
|
+
|
770
|
+
To render a replacement literally escape it with a leading back-slash.
|
771
|
+
|
774
772
|
The <<X7,Configuration Files>> section explains how to configure your
|
775
773
|
own replacements.
|
776
774
|
|
@@ -1023,17 +1021,17 @@ The <<X56,code>>, <<X57,source>> and <<X58,music>> filter blocks are
|
|
1023
1021
|
detailed in the <<X59,Filters>> section.
|
1024
1022
|
|
1025
1023
|
.Default DelimitedBlock substitutions
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
Callouts
|
1030
|
-
Attributes
|
1031
|
-
Inline Macros
|
1032
|
-
Quotes
|
1033
|
-
Replacements
|
1034
|
-
Special chars
|
1035
|
-
Special words
|
1036
|
-
|
1024
|
+
[cols="2,5*^",options="header"]
|
1025
|
+
|==================================================================
|
1026
|
+
| |Passthrough |Listing |Literal |Sidebar |Quote
|
1027
|
+
|Callouts | No | Yes | Yes | No | No
|
1028
|
+
|Attributes | Yes | No | No | Yes | Yes
|
1029
|
+
|Inline Macros | Yes | No | No | Yes | Yes
|
1030
|
+
|Quotes | No | No | No | Yes | Yes
|
1031
|
+
|Replacements | No | No | No | Yes | Yes
|
1032
|
+
|Special chars | No | Yes | Yes | Yes | Yes
|
1033
|
+
|Special words | No | No | No | Yes | Yes
|
1034
|
+
|==================================================================
|
1037
1035
|
|
1038
1036
|
Listing Blocks
|
1039
1037
|
~~~~~~~~~~~~~~
|
@@ -1045,14 +1043,16 @@ often used for code and file listings.
|
|
1045
1043
|
|
1046
1044
|
Here's an example:
|
1047
1045
|
|
1048
|
-
|
1049
|
-
|
1046
|
+
---------------------------------------
|
1047
|
+
--------------------------------------
|
1048
|
+
#include <stdio.h>
|
1050
1049
|
|
1051
1050
|
int main() {
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1051
|
+
printf("Hello World!\n");
|
1052
|
+
exit(0);
|
1053
|
+
}
|
1054
|
+
--------------------------------------
|
1055
|
+
---------------------------------------
|
1056
1056
|
|
1057
1057
|
Which will be rendered like:
|
1058
1058
|
|
@@ -1130,11 +1130,12 @@ asciidoc(1).
|
|
1130
1130
|
|
1131
1131
|
See also <<X25,Comment Lines>>.
|
1132
1132
|
|
1133
|
+
[[X76]]
|
1133
1134
|
Passthrough Blocks
|
1134
1135
|
~~~~~~~~~~~~~~~~~~
|
1135
|
-
|
1136
|
-
|
1137
|
-
will
|
1136
|
+
By default the block contents is subject to attribute and macro
|
1137
|
+
substitution, no other markup is generated. PassthroughBlock content
|
1138
|
+
will often be backend specific. Here's an example:
|
1138
1139
|
|
1139
1140
|
---------------------------------------------------------------------
|
1140
1141
|
++++++++++++++++++++++++++++++++++++++
|
@@ -1145,6 +1146,16 @@ will generally be backend specific. Here's an example:
|
|
1145
1146
|
++++++++++++++++++++++++++++++++++++++
|
1146
1147
|
---------------------------------------------------------------------
|
1147
1148
|
|
1149
|
+
Use and explicit 'subs' attribute to control substitution. The
|
1150
|
+
following styles can be applied to passthrough blocks:
|
1151
|
+
|
1152
|
+
pass::
|
1153
|
+
By default no substitutions are performed.
|
1154
|
+
|
1155
|
+
asciimath, latexmath::
|
1156
|
+
By default no substitutions are performed, the contents are rendered
|
1157
|
+
as <<X78,mathematical formulas>>.
|
1158
|
+
|
1148
1159
|
Quote Blocks
|
1149
1160
|
~~~~~~~~~~~~
|
1150
1161
|
QuoteBlocks are used for quoted passages of text. There are two
|
@@ -1222,9 +1233,8 @@ Qui in magna commodo, est labitur dolorum an. Est ne magna primis
|
|
1222
1233
|
adolescens.
|
1223
1234
|
=====================================================================
|
1224
1235
|
|
1225
|
-
|
1226
|
-
|
1227
|
-
backends). For example
|
1236
|
+
A title prefix that can be inserted with the `caption` attribute
|
1237
|
+
(`xhtml11` and `html4` backends). For example:
|
1228
1238
|
|
1229
1239
|
---------------------------------------------------------------------
|
1230
1240
|
[caption="Example 1: "]
|
@@ -1289,20 +1299,22 @@ Lists
|
|
1289
1299
|
- Callout lists (a list of callout annotations).
|
1290
1300
|
|
1291
1301
|
.List behavior
|
1292
|
-
-
|
1293
|
-
does however make the source more readable.
|
1302
|
+
- List item indentation is optional and does not determine nesting,
|
1303
|
+
indentation does however make the source more readable.
|
1294
1304
|
- A nested list must use a different syntax from its parent so that
|
1295
1305
|
asciidoc(1) can distinguish the start of a nested list.
|
1296
1306
|
- By default lists of the same type can only be nested two deep; this
|
1297
1307
|
could be increased by defining new list definitions.
|
1298
1308
|
- In addition to nested lists a list item will include immediately
|
1299
1309
|
following Literal paragraphs.
|
1300
|
-
- Use <<X15, List Item Continuation>> to
|
1301
|
-
|
1310
|
+
- Use <<X15, List Item Continuation>> to append other block elements
|
1311
|
+
to a list item.
|
1302
1312
|
- The `listindex` <<X60,intrinsic attribute>> is the current list item
|
1303
1313
|
index (1..). If this attribute is not inside a list then it's value
|
1304
1314
|
is the number of items in the most recently closed list. Useful for
|
1305
1315
|
displaying the number of items in a list.
|
1316
|
+
- You need to use <<X15,list item continuation>> if a nested list is
|
1317
|
+
accompanied by an <<X21,attribute list>>.
|
1306
1318
|
|
1307
1319
|
Bulleted and Numbered Lists
|
1308
1320
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
@@ -1373,28 +1385,43 @@ Which render as:
|
|
1373
1385
|
3. Donec eget arcu bibendum nunc consequat lobortis.
|
1374
1386
|
4. Nam fermentum mattis ante.
|
1375
1387
|
|
1376
|
-
|
1377
|
-
|
1388
|
+
A predefined 'compact' option is available to bulleted and numbered
|
1389
|
+
lists -- this translates to the DocBook 'spacing="compact"' lists
|
1390
|
+
attribute which may or may not be processed by the DocBook toolchain.
|
1391
|
+
Example:
|
1392
|
+
|
1393
|
+
[options="compact"]
|
1394
|
+
- Compact list item.
|
1395
|
+
- Another compact list item.
|
1396
|
+
|
1397
|
+
TIP: To apply the 'compact' option globally define a document-wide
|
1398
|
+
'compact-option' attribute, e.g. using the `-a compact-option`
|
1399
|
+
command-line option.
|
1400
|
+
|
1401
|
+
Labeled Lists
|
1402
|
+
~~~~~~~~~~~~~
|
1378
1403
|
Labeled list items consist of one or more text labels followed the
|
1379
1404
|
text of the list item.
|
1380
1405
|
|
1381
1406
|
An item label begins a line with an alphanumeric character hard
|
1382
1407
|
against the left margin and ends with a double colon `::` or
|
1383
|
-
semi-colon `;;`.
|
1408
|
+
semi-colon `;;`. A list item can have multiple labels, one per line.
|
1384
1409
|
|
1385
|
-
The list item text consists of one or more lines of text starting
|
1386
|
-
the
|
1387
|
-
List or ListParagraph elements. Item text can be
|
1410
|
+
The list item text consists of one or more lines of text starting
|
1411
|
+
after the last label (either on the same line or a new line) and can
|
1412
|
+
be followed by nested List or ListParagraph elements. Item text can be
|
1413
|
+
optionally indented.
|
1388
1414
|
|
1389
1415
|
Here are some examples:
|
1416
|
+
|
1390
1417
|
---------------------------------------------------------------------
|
1418
|
+
In::
|
1391
1419
|
Lorem::
|
1392
1420
|
Fusce euismod commodo velit.
|
1393
1421
|
|
1394
1422
|
Fusce euismod commodo velit.
|
1395
1423
|
|
1396
|
-
Ipsum::
|
1397
|
-
Vivamus fringilla mi eu lacus.
|
1424
|
+
Ipsum:: Vivamus fringilla mi eu lacus.
|
1398
1425
|
* Vivamus fringilla mi eu lacus.
|
1399
1426
|
* Donec eget arcu bibendum nunc consequat lobortis.
|
1400
1427
|
Dolor::
|
@@ -1409,13 +1436,13 @@ Dolor::
|
|
1409
1436
|
|
1410
1437
|
Which render as:
|
1411
1438
|
|
1439
|
+
In::
|
1412
1440
|
Lorem::
|
1413
1441
|
Fusce euismod commodo velit.
|
1414
1442
|
|
1415
1443
|
Fusce euismod commodo velit.
|
1416
1444
|
|
1417
|
-
Ipsum::
|
1418
|
-
Vivamus fringilla mi eu lacus.
|
1445
|
+
Ipsum:: Vivamus fringilla mi eu lacus.
|
1419
1446
|
* Vivamus fringilla mi eu lacus.
|
1420
1447
|
* Donec eget arcu bibendum nunc consequat lobortis.
|
1421
1448
|
Dolor::
|
@@ -1427,18 +1454,13 @@ Dolor::
|
|
1427
1454
|
In;;
|
1428
1455
|
Dictum mauris in urna.
|
1429
1456
|
|
1430
|
-
Horizontal
|
1431
|
-
|
1432
|
-
|
1433
|
-
the label
|
1434
|
-
under the label. Item text must begin on the same line as the label
|
1435
|
-
although you can begin item text on the next line if you follow the
|
1436
|
-
label with a backslash.
|
1437
|
-
|
1438
|
-
The following horizontal list example also illustrates the omission
|
1439
|
-
of optional indentation:
|
1457
|
+
Horizontal labeled list style
|
1458
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
1459
|
+
The 'horizontal' labeled list style places the list text side-by-side
|
1460
|
+
with the label instead of under the label. Here is an example:
|
1440
1461
|
|
1441
1462
|
---------------------------------------------------------------------
|
1463
|
+
[horizontal]
|
1442
1464
|
*Lorem*:: Fusce euismod commodo velit. Qui in magna commodo, est
|
1443
1465
|
labitur dolorum an. Est ne magna primis adolescens.
|
1444
1466
|
|
@@ -1448,7 +1470,7 @@ labitur dolorum an. Est ne magna primis adolescens.
|
|
1448
1470
|
- Vivamus fringilla mi eu lacus.
|
1449
1471
|
- Donec eget arcu bibendum nunc consequat lobortis.
|
1450
1472
|
|
1451
|
-
*Dolor*::
|
1473
|
+
*Dolor*::
|
1452
1474
|
- Vivamus fringilla mi eu lacus.
|
1453
1475
|
- Donec eget arcu bibendum nunc consequat lobortis.
|
1454
1476
|
|
@@ -1456,6 +1478,7 @@ labitur dolorum an. Est ne magna primis adolescens.
|
|
1456
1478
|
|
1457
1479
|
Which render as:
|
1458
1480
|
|
1481
|
+
[horizontal]
|
1459
1482
|
*Lorem*:: Fusce euismod commodo velit. Qui in magna commodo, est
|
1460
1483
|
labitur dolorum an. Est ne magna primis adolescens.
|
1461
1484
|
|
@@ -1465,50 +1488,54 @@ labitur dolorum an. Est ne magna primis adolescens.
|
|
1465
1488
|
- Vivamus fringilla mi eu lacus.
|
1466
1489
|
- Donec eget arcu bibendum nunc consequat lobortis.
|
1467
1490
|
|
1468
|
-
*Dolor*::
|
1491
|
+
*Dolor*::
|
1469
1492
|
- Vivamus fringilla mi eu lacus.
|
1470
1493
|
- Donec eget arcu bibendum nunc consequat lobortis.
|
1471
1494
|
|
1472
|
-
[
|
1495
|
+
[NOTE]
|
1473
1496
|
=====================================================================
|
1474
|
-
-
|
1475
|
-
|
1476
|
-
|
1477
|
-
- If you are generating DocBook markup the horizontal labeled lists
|
1497
|
+
- Current PDF toolchains do not make a good job of determining
|
1498
|
+
the relative column widths for horizontal labeled lists.
|
1499
|
+
- If you are generating DocBook markup then horizontal labeled lists
|
1478
1500
|
should not be nested because the 'DocBook XML V4.2' DTD does not
|
1479
1501
|
permit nested informal tables (although <<X13,DocBook XSL
|
1480
|
-
Stylesheets>> process them correctly).
|
1502
|
+
Stylesheets>> and <<X31,dblatex>> process them correctly).
|
1503
|
+
- The label width can be set as a percentage of the total width by
|
1504
|
+
setting the 'width' attribute e.g. `width="10%"`
|
1505
|
+
|
1481
1506
|
=====================================================================
|
1482
1507
|
|
1483
1508
|
Question and Answer Lists
|
1484
1509
|
~~~~~~~~~~~~~~~~~~~~~~~~~
|
1485
|
-
AsciiDoc comes pre-configured with a labeled list for generating
|
1486
|
-
DocBook question and answer (Q&A) lists
|
1487
|
-
Example:
|
1510
|
+
AsciiDoc comes pre-configured with a 'qanda' style labeled list for generating
|
1511
|
+
DocBook question and answer (Q&A) lists. Example:
|
1488
1512
|
|
1489
1513
|
---------------------------------------------------------------------
|
1490
|
-
|
1514
|
+
[qanda]
|
1515
|
+
Question one::
|
1491
1516
|
Answer one.
|
1492
|
-
Question two
|
1517
|
+
Question two::
|
1493
1518
|
Answer two.
|
1494
1519
|
---------------------------------------------------------------------
|
1495
1520
|
|
1496
1521
|
Renders:
|
1497
1522
|
|
1498
|
-
|
1523
|
+
[qanda]
|
1524
|
+
Question one::
|
1499
1525
|
Answer one.
|
1500
|
-
Question two
|
1526
|
+
Question two::
|
1501
1527
|
Answer two.
|
1502
1528
|
|
1503
1529
|
Glossary Lists
|
1504
1530
|
~~~~~~~~~~~~~~
|
1505
|
-
AsciiDoc comes pre-configured with a labeled list
|
1506
|
-
|
1531
|
+
AsciiDoc comes pre-configured with a 'glossary' style labeled list for
|
1532
|
+
generating DocBook glossary lists. Example:
|
1507
1533
|
|
1508
1534
|
---------------------------------------------------------------------
|
1509
|
-
|
1535
|
+
[glossary]
|
1536
|
+
A glossary term::
|
1510
1537
|
The corresponding definition.
|
1511
|
-
A second glossary term
|
1538
|
+
A second glossary term::
|
1512
1539
|
The corresponding definition.
|
1513
1540
|
---------------------------------------------------------------------
|
1514
1541
|
|
@@ -1520,13 +1547,14 @@ in a glossary section.
|
|
1520
1547
|
|
1521
1548
|
Bibliography Lists
|
1522
1549
|
~~~~~~~~~~~~~~~~~~
|
1523
|
-
AsciiDoc comes with a predefined
|
1524
|
-
generating bibliography entries.
|
1550
|
+
AsciiDoc comes with a predefined 'bibliography' bulleted list style
|
1551
|
+
generating DocBook bibliography entries. Example:
|
1525
1552
|
|
1526
1553
|
---------------------------------------------------------------------
|
1527
|
-
|
1554
|
+
[bibliography]
|
1555
|
+
- [[[taoup]]] Eric Steven Raymond. 'The Art of UNIX
|
1528
1556
|
Programming'. Addison-Wesley. ISBN 0-13-142901-9.
|
1529
|
-
|
1557
|
+
- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner.
|
1530
1558
|
'DocBook - The Definitive Guide'. O'Reilly & Associates.
|
1531
1559
|
1999. ISBN 1-56592-580-7.
|
1532
1560
|
---------------------------------------------------------------------
|
@@ -1553,7 +1581,11 @@ implicitly included nested lists and Literal paragraphs) place a
|
|
1553
1581
|
separator line containing a single plus character between the list
|
1554
1582
|
item and the ensuing list continuation element. Multiple block
|
1555
1583
|
elements (excluding section Titles and BlockTitles) may be included in
|
1556
|
-
a list item using this technique.
|
1584
|
+
a list item using this technique. Note that the continued items must
|
1585
|
+
be indented as they normally would be outside of the list.
|
1586
|
+
|
1587
|
+
You also need to use list item continuation if a nested list is
|
1588
|
+
accompanied by an <<X21,attribute list>>.
|
1557
1589
|
|
1558
1590
|
Here's an example of list item continuation:
|
1559
1591
|
|
@@ -1677,14 +1709,26 @@ This paragraph belongs to item 1.
|
|
1677
1709
|
Footnotes
|
1678
1710
|
---------
|
1679
1711
|
The shipped AsciiDoc configuration includes the `\footnote:[<text>]`
|
1680
|
-
inline
|
1681
|
-
|
1712
|
+
and `\footnoteref:[<id>,<text>]` inline macros for generating
|
1713
|
+
footnotes:
|
1714
|
+
|
1715
|
+
- The `footnote` macro generates a footnote.
|
1716
|
+
- The `footnoteref` macro has two forms: if the text is supplied a
|
1717
|
+
foot note with an ID is generated; if the text is omitted a
|
1718
|
+
reference to the footnote with the specified ID is generated.
|
1719
|
+
- The footnote text can span multiple lines.
|
1720
|
+
|
1721
|
+
Example footnote:
|
1682
1722
|
|
1683
|
-
A footnote footnote:[An example footnote.]
|
1723
|
+
A footnote footnote:[An example footnote.];
|
1724
|
+
a second footnote with a reference ID footnoteref:[note2,Second footnote.];
|
1725
|
+
finally a reference to the second footnote footnoteref:[note2].
|
1684
1726
|
|
1685
1727
|
Which renders:
|
1686
1728
|
|
1687
|
-
A footnote footnote:[An example footnote.]
|
1729
|
+
A footnote footnote:[An example footnote.];
|
1730
|
+
a second footnote with a reference ID footnoteref:[note2,Second footnote];
|
1731
|
+
finally a reference to the second footnote footnoteref:[note2].
|
1688
1732
|
|
1689
1733
|
Footnotes are primarily useful when generating DocBook output --
|
1690
1734
|
DocBook conversion programs render footnote outside the primary text
|
@@ -1729,30 +1773,30 @@ presented in a callout list after the annotated text. Here's an
|
|
1729
1773
|
example:
|
1730
1774
|
|
1731
1775
|
---------------------------------------------------------------------
|
1732
|
-
.MS-DOS directory listing
|
1733
|
-
|
1734
|
-
10/17/97 9:04 <DIR> bin
|
1735
|
-
10/16/97 14:11 <DIR> DOS \<1>
|
1736
|
-
10/16/97 14:40 <DIR> Program Files
|
1737
|
-
10/16/97 14:46 <DIR> TEMP
|
1738
|
-
10/17/97 9:04 <DIR> tmp
|
1739
|
-
10/16/97 14:37 <DIR> WINNT
|
1740
|
-
10/16/97 14:25 119 AUTOEXEC.BAT \<2>
|
1741
|
-
|
1742
|
-
10/16/97 14:25 115 CONFIG.SYS \<2>
|
1743
|
-
11/16/97 17:17 61,865,984 pagefile.sys
|
1744
|
-
|
1745
|
-
|
1746
|
-
|
1747
|
-
\<1> This directory holds MS-DOS.
|
1748
|
-
\<2> System startup code for DOS.
|
1749
|
-
\<3> Some sort of Windows 3.1 hack.
|
1776
|
+
.MS-DOS directory listing
|
1777
|
+
-----------------------------------------------------
|
1778
|
+
10/17/97 9:04 <DIR> bin
|
1779
|
+
10/16/97 14:11 <DIR> DOS \<1>
|
1780
|
+
10/16/97 14:40 <DIR> Program Files
|
1781
|
+
10/16/97 14:46 <DIR> TEMP
|
1782
|
+
10/17/97 9:04 <DIR> tmp
|
1783
|
+
10/16/97 14:37 <DIR> WINNT
|
1784
|
+
10/16/97 14:25 119 AUTOEXEC.BAT \<2>
|
1785
|
+
2/13/94 6:21 54,619 COMMAND.COM \<2>
|
1786
|
+
10/16/97 14:25 115 CONFIG.SYS \<2>
|
1787
|
+
11/16/97 17:17 61,865,984 pagefile.sys
|
1788
|
+
2/13/94 6:21 9,349 WINA20.386 \<3>
|
1789
|
+
-----------------------------------------------------
|
1790
|
+
|
1791
|
+
\<1> This directory holds MS-DOS.
|
1792
|
+
\<2> System startup code for DOS.
|
1793
|
+
\<3> Some sort of Windows 3.1 hack.
|
1750
1794
|
---------------------------------------------------------------------
|
1751
1795
|
|
1752
1796
|
Which renders:
|
1753
1797
|
|
1754
1798
|
.MS-DOS directory listing
|
1755
|
-
|
1799
|
+
-----------------------------------------------------
|
1756
1800
|
10/17/97 9:04 <DIR> bin
|
1757
1801
|
10/16/97 14:11 <DIR> DOS <1>
|
1758
1802
|
10/16/97 14:40 <DIR> Program Files
|
@@ -1764,7 +1808,7 @@ Which renders:
|
|
1764
1808
|
10/16/97 14:25 115 CONFIG.SYS <2>
|
1765
1809
|
11/16/97 17:17 61,865,984 pagefile.sys
|
1766
1810
|
2/13/94 6:21 9,349 WINA20.386 <3>
|
1767
|
-
|
1811
|
+
-----------------------------------------------------
|
1768
1812
|
|
1769
1813
|
<1> This directory holds MS-DOS.
|
1770
1814
|
<2> System startup code for DOS.
|
@@ -1842,8 +1886,8 @@ Macros are a mechanism for substituting parametrized text into output
|
|
1842
1886
|
documents.
|
1843
1887
|
|
1844
1888
|
Macros have a 'name', a single 'target' argument and an 'attribute
|
1845
|
-
list'. The
|
1846
|
-
inline macros) and `<name>::<target>[<
|
1889
|
+
list'. The usual syntax is `<name>:<target>[<attrlist>]` (for
|
1890
|
+
inline macros) and `<name>::<target>[<attrlist>]` (for block
|
1847
1891
|
macros). Here are some examples:
|
1848
1892
|
|
1849
1893
|
http://www.methods.co.nz/asciidoc/index.html[Asciidoc home page]
|
@@ -1854,19 +1898,24 @@ macros). Here are some examples:
|
|
1854
1898
|
- `<name>` is the macro name. It can only contain letters, digits or
|
1855
1899
|
dash characters and cannot start with a dash.
|
1856
1900
|
- The optional `<target>` cannot contain white space characters.
|
1857
|
-
- `<
|
1901
|
+
- `<attrlist>` is a <<X21,list of attributes>> enclosed in square
|
1858
1902
|
brackets.
|
1859
|
-
-
|
1860
|
-
|
1861
|
-
|
1862
|
-
|
1863
|
-
|
1903
|
+
- `]` characters in attribute lists that are enclosed in `[]` brackets
|
1904
|
+
must be escaped with a backslash.
|
1905
|
+
- Expansion of non-system macro references can normally be escaped by
|
1906
|
+
prefixing a backslash character (see the AsciiDoc 'FAQ' for examples
|
1907
|
+
of exceptions to this rule).
|
1908
|
+
- System macros cannot be escaped.
|
1909
|
+
- Attribute references in block macros are expanded.
|
1864
1910
|
- The substitutions performed prior to Inline macro macro expansion
|
1865
1911
|
are determined by the inline context.
|
1866
1912
|
- Macros are processed in the order they appear in the configuration
|
1867
1913
|
file(s).
|
1868
1914
|
- Calls to inline macros can be nested inside different inline macros
|
1869
1915
|
(an inline macro call cannot contain a nested call to itself).
|
1916
|
+
- In addition to `<name>`, `<target>` and `<attrlist>` the
|
1917
|
+
`<passtext>` and `<subslist>` named groups are available to
|
1918
|
+
<<X77,passthrough macros>>.
|
1870
1919
|
|
1871
1920
|
Inline Macros
|
1872
1921
|
~~~~~~~~~~~~~
|
@@ -1881,7 +1930,7 @@ rendered using predefined inline macros.
|
|
1881
1930
|
- If you don't need a customized the link caption you can enter the
|
1882
1931
|
'http', 'https', 'ftp', 'file' URLs and email addresses without any
|
1883
1932
|
special macro syntax.
|
1884
|
-
- If
|
1933
|
+
- If the `<attrlist>` is empty the URL is displayed.
|
1885
1934
|
|
1886
1935
|
Here are some examples:
|
1887
1936
|
|
@@ -2044,7 +2093,7 @@ Block macros behave just like Inline macros, with the following
|
|
2044
2093
|
differences:
|
2045
2094
|
|
2046
2095
|
- They occur in a block context.
|
2047
|
-
- The default syntax is `<name>::<target>[<
|
2096
|
+
- The default syntax is `<name>::<target>[<attrlist>]` (two
|
2048
2097
|
colons, not one).
|
2049
2098
|
- Markup template section names end in `-blockmacro` instead of
|
2050
2099
|
`-inlinemacro`.
|
@@ -2080,9 +2129,8 @@ For example:
|
|
2080
2129
|
.Main circuit board
|
2081
2130
|
image::images/layout.png[J14P main circuit board]
|
2082
2131
|
|
2083
|
-
|
2084
|
-
|
2085
|
-
For example:
|
2132
|
+
A title prefix that can be inserted with the `caption` attribute
|
2133
|
+
(`xhtml11` and `html4` backends). For example:
|
2086
2134
|
|
2087
2135
|
.Main circuit board
|
2088
2136
|
[caption="Figure 2:"]
|
@@ -2120,7 +2168,6 @@ paragraphs or delimited blocks. Example comment line:
|
|
2120
2168
|
|
2121
2169
|
See also <<X26,Comment Blocks>>.
|
2122
2170
|
|
2123
|
-
|
2124
2171
|
System Macros
|
2125
2172
|
~~~~~~~~~~~~~
|
2126
2173
|
System macros are block macros that perform a predefined task which is
|
@@ -2155,17 +2202,23 @@ Example:
|
|
2155
2202
|
- If the included file name is specified with a relative path then the
|
2156
2203
|
path is relative to the location of the referring document.
|
2157
2204
|
- Include macros can appear inside configuration files.
|
2158
|
-
- Files included from within
|
2205
|
+
- Files included from within 'DelimitedBlocks' are read to completion
|
2159
2206
|
to avoid false end-of-block underline termination.
|
2160
|
-
-
|
2161
|
-
- Attribute references are expanded inside the include `target`; if an
|
2207
|
+
- Attribute references are expanded inside the include 'target'; if an
|
2162
2208
|
attribute is undefined then the included file is silently skipped.
|
2163
2209
|
- The 'tabsize' macro attribute sets the number of space characters to
|
2164
|
-
be used for tab expansion in the included file
|
2210
|
+
be used for tab expansion in the included file (not applicable to
|
2211
|
+
`include1` macro).
|
2212
|
+
- The 'depth' macro attribute sets the maximum permitted number of
|
2213
|
+
subsequent nested includes (not applicable to `include1` macro which
|
2214
|
+
does not process nested includes). Setting 'depth' to one disables
|
2215
|
+
nesting inside the included file. By default, nesting is limited to
|
2216
|
+
a depth of five.
|
2165
2217
|
- Internally the `include1` macro is translated to the `include1`
|
2166
2218
|
system attribute which means it must be evaluated in a region where
|
2167
|
-
attribute substitution is enabled
|
2168
|
-
|
2219
|
+
attribute substitution is enabled. To inhibit nested substitution in
|
2220
|
+
included files it is preferable to use the `include` macro and set
|
2221
|
+
the attribute `depth=1`.
|
2169
2222
|
|
2170
2223
|
Conditional Inclusion Macros
|
2171
2224
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
@@ -2255,30 +2308,91 @@ section:
|
|
2255
2308
|
template::[admonitionblock]
|
2256
2309
|
|
2257
2310
|
.Template macro behavior
|
2258
|
-
- The
|
2311
|
+
- The `template::[]` macro is useful for factoring configuration file
|
2259
2312
|
markup.
|
2260
|
-
-
|
2261
|
-
-
|
2313
|
+
- `template::[]` macros cannot be nested.
|
2314
|
+
- `template::[]` macro expansion is applied to all sections
|
2262
2315
|
after all configuration files have been read.
|
2263
2316
|
|
2264
2317
|
|
2318
|
+
[[X77]]
|
2319
|
+
Passthrough macros
|
2320
|
+
~~~~~~~~~~~~~~~~~~
|
2321
|
+
Passthrough macros are analogous to <<X76,passthrough blocks>> and are
|
2322
|
+
used to pass text directly to the output. The substitution performed
|
2323
|
+
on the text is determined by the macro definition but can be overridden
|
2324
|
+
by the `<subslist>`. The usual syntax is
|
2325
|
+
`<name>:<subslist>[<passtext>]` (for inline macros) and
|
2326
|
+
`<name>::<subslist>[<passtext>]` (for block macros).
|
2327
|
+
|
2328
|
+
pass::
|
2329
|
+
Inline and block. Passes text unmodified apart from explicitly
|
2330
|
+
specified substitutions). Examples:
|
2331
|
+
|
2332
|
+
pass:[<q>To be or not to be</q>]
|
2333
|
+
pass:attributes,quotes[<u>the '{author}'</u>]
|
2334
|
+
|
2335
|
+
asciimath, latexmath::
|
2336
|
+
Inline and block. Passes text unmodified. Used for
|
2337
|
+
<<X78,mathematical formulas>>.
|
2338
|
+
|
2339
|
+
\+++::
|
2340
|
+
Inline and block. The triple-plus passthrough is functionally
|
2341
|
+
identical to the 'pass' macro but you don't have to escape `]`
|
2342
|
+
characters and you can prefix with quoted attributes in the inline
|
2343
|
+
version. Example:
|
2344
|
+
|
2345
|
+
Red [red]+++`sum_(i=1)\^n i=(n(n+1))/2`$+++ AsciiMathML formula
|
2346
|
+
|
2347
|
+
$$::
|
2348
|
+
Inline and block. The double-dollar passthrough is functionally
|
2349
|
+
identical with one exception: special characters are escaped.
|
2350
|
+
Example:
|
2351
|
+
|
2352
|
+
$$`[[a,b],[c,d]]((n),(k))`$$
|
2353
|
+
|
2265
2354
|
Macro Definitions
|
2266
2355
|
~~~~~~~~~~~~~~~~~
|
2267
2356
|
Each entry in the configuration `[macros]` section is a macro
|
2268
2357
|
definition which can take one of the following forms:
|
2269
2358
|
|
2270
|
-
`<pattern>=<name
|
2359
|
+
`<pattern>=<name>[<subslist]`::
|
2271
2360
|
Inline macro definition.
|
2272
|
-
`<pattern>=#<name
|
2361
|
+
`<pattern>=#<name>[<subslist]`::
|
2273
2362
|
Block macro definition.
|
2274
|
-
`<pattern>=+<name
|
2363
|
+
`<pattern>=+<name>[<subslist]`::
|
2275
2364
|
System macro definition.
|
2276
2365
|
`<pattern>`::
|
2277
2366
|
Delete the existing macro with this `<pattern>`.
|
2278
2367
|
|
2279
2368
|
`<pattern>` is a Python regular expression and `<name>` is the name of
|
2280
2369
|
a markup template. If `<name>` is omitted then it is the value of the
|
2281
|
-
regular expression match group named 'name'.
|
2370
|
+
regular expression match group named 'name'. The optional
|
2371
|
+
`[<subslist]` is a comma-separated list of substitution names enclosed
|
2372
|
+
in `[]` brackets, it sets the default substitutions for passthrough
|
2373
|
+
text.
|
2374
|
+
|
2375
|
+
.Pattern named groups
|
2376
|
+
The following named groups can be used in macro `<pattern>` regular
|
2377
|
+
expressions and are available as markup template attributes:
|
2378
|
+
|
2379
|
+
name::
|
2380
|
+
The macro name.
|
2381
|
+
|
2382
|
+
target::
|
2383
|
+
The macro target.
|
2384
|
+
|
2385
|
+
attrlist::
|
2386
|
+
The macro attribute list.
|
2387
|
+
|
2388
|
+
passtext::
|
2389
|
+
Contents of this group are passed unmodified to the output subject
|
2390
|
+
only to 'subslist' substitutions.
|
2391
|
+
|
2392
|
+
subslist::
|
2393
|
+
Processed as a comma-separated list of substitution names for
|
2394
|
+
'passtext' substitution, overrides the the macro definition
|
2395
|
+
'subslist'.
|
2282
2396
|
|
2283
2397
|
.Here's what happens during macro substitution
|
2284
2398
|
- Each contextually relevant macro 'pattern' from the `[macros]`
|
@@ -2295,294 +2409,352 @@ regular expression match group named 'name'.
|
|
2295
2409
|
|
2296
2410
|
Tables
|
2297
2411
|
------
|
2298
|
-
|
2299
|
-
|
2300
|
-
|
2301
|
-
|
2302
|
-
|
2303
|
-
NOTE: AsciiDoc generates nice HTML tables, but the current crop of
|
2304
|
-
DocBook toolchains render tables with varying degrees of success. Use
|
2305
|
-
tables only when really necessary.
|
2412
|
+
The AsciiDoc table syntax looks and behaves like other delimited block
|
2413
|
+
types and supports standard <<X73,block configuration entries>>.
|
2414
|
+
Formatting is easy to read and, just as importantly, easy to enter.
|
2415
|
+
There are a wide variety of built-in customizable styles.
|
2306
2416
|
|
2307
|
-
|
2308
|
-
|
2309
|
-
|
2310
|
-
your own tables.
|
2417
|
+
- All table meta-data is contained specified in the table's attribute
|
2418
|
+
list, not in the the table data.
|
2419
|
+
- There is no provision for cells to span multiple columns.
|
2311
2420
|
|
2312
|
-
|
2313
|
-
|
2421
|
+
.Use tables sparingly
|
2422
|
+
*********************************************************************
|
2423
|
+
When technical users first start creating documents, tables (complete
|
2424
|
+
with column spanning and table nesting) are often considered very
|
2425
|
+
important. important must-have feature. The reality is that tables
|
2426
|
+
are seldom used, even in technical documentation.
|
2314
2427
|
|
2315
|
-
|
2316
|
-
|
2317
|
-
|
2428
|
+
Try this exercise: thumb through your library of technical books,
|
2429
|
+
you'll be surprised just how seldom tables are actually used, even
|
2430
|
+
less seldom are tables containing block elements such as paragraphs or
|
2431
|
+
lists. This is no accident, like figures, tables are outside the
|
2432
|
+
normal document flow -- tables are for consulting not for reading.
|
2318
2433
|
|
2319
|
-
|
2434
|
+
Tables are designed for, and should normally only be used for,
|
2435
|
+
displaying column oriented tabular data.
|
2320
2436
|
|
2321
|
-
|
2322
|
-
`---`---
|
2323
|
-
1 2
|
2324
|
-
3 4
|
2325
|
-
5 6
|
2326
|
-
--------
|
2327
|
-
---------------------------------------------------------------------
|
2437
|
+
*********************************************************************
|
2328
2438
|
|
2329
|
-
|
2439
|
+
Example tables
|
2440
|
+
~~~~~~~~~~~~~~
|
2441
|
+
Simple table
|
2442
|
+
^^^^^^^^^^^^
|
2330
2443
|
|
2331
|
-
|
2332
|
-
|
2333
|
-
|
2334
|
-
|
2335
|
-
|
2444
|
+
[width="15%"]
|
2445
|
+
|=======
|
2446
|
+
|1 |2 |A
|
2447
|
+
|3 |4 |B
|
2448
|
+
|5 |6 |C
|
2449
|
+
|=======
|
2336
2450
|
|
2337
|
-
|
2451
|
+
AsciiDoc source:
|
2338
2452
|
|
2339
2453
|
---------------------------------------------------------------------
|
2340
|
-
|
2341
|
-
|
2342
|
-
|
2343
|
-
|
2344
|
-
|
2345
|
-
|
2346
|
-
2 Item 2
|
2347
|
-
3 Item 3
|
2348
|
-
-------------------------
|
2349
|
-
6 Three items
|
2350
|
-
-------------------------
|
2454
|
+
[width="15%"]
|
2455
|
+
|=======
|
2456
|
+
|1 |2 |A
|
2457
|
+
|3 |4 |B
|
2458
|
+
|5 |6 |C
|
2459
|
+
|=======
|
2351
2460
|
---------------------------------------------------------------------
|
2352
2461
|
|
2353
|
-
|
2462
|
+
Columns formatted with strong, monospaced and emphasis styles
|
2463
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2354
2464
|
|
2355
2465
|
.An example table
|
2356
|
-
[
|
2357
|
-
|
2358
|
-
Column
|
2359
|
-
|
2360
|
-
|
2361
|
-
|
2362
|
-
|
2363
|
-
|
2364
|
-
|
2365
|
-
|
2366
|
-
|
2367
|
-
Four columns totaling 15% of the 'pagewidth', CSV data:
|
2466
|
+
[width="50%",cols=">s,^m,e",frame="none",options="header,footer"]
|
2467
|
+
|==========================
|
2468
|
+
| |Column 2|Column 3
|
2469
|
+
|1 |Item 1 |Item 1
|
2470
|
+
|2 |Item 2 |Item 2
|
2471
|
+
|3 |Item 3 |Item 3
|
2472
|
+
|4 |Item 4 |Item 4
|
2473
|
+
|footer 1|footer 2|footer 3
|
2474
|
+
|==========================
|
2475
|
+
|
2476
|
+
AsciiDoc source:
|
2368
2477
|
|
2369
2478
|
---------------------------------------------------------------------
|
2370
|
-
|
2371
|
-
|
2372
|
-
|
2373
|
-
|
2374
|
-
|
2375
|
-
|
2479
|
+
.An example table
|
2480
|
+
[width="50%",cols=">s,^m,e",frame="none",options="header,footer"]
|
2481
|
+
|==========================
|
2482
|
+
| |Column 2|Column 3
|
2483
|
+
|1 |Item 1 |Item 1
|
2484
|
+
|2 |Item 2 |Item 2
|
2485
|
+
|3 |Item 3 |Item 3
|
2486
|
+
|4 |Item 4 |Item 4
|
2487
|
+
|footer 1|footer 2|footer 3
|
2488
|
+
|==========================
|
2376
2489
|
---------------------------------------------------------------------
|
2377
2490
|
|
2378
|
-
|
2491
|
+
Horizontal and vertical source data
|
2492
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2493
|
+
Short cells can be entered horizontally, longer cells vertically. The
|
2494
|
+
default behavior is to strip leading and trailing blank lines within a
|
2495
|
+
cell. These characteristics aid readability and data entry.
|
2379
2496
|
|
2380
|
-
|
2381
|
-
|
2382
|
-
|
2383
|
-
|
2384
|
-
A,B,C,D
|
2385
|
-
~~~~~~~~
|
2497
|
+
.Windtrainer workouts
|
2498
|
+
[width="80%",cols="3,^2,^2,10",options="header"]
|
2499
|
+
|=========================================================
|
2500
|
+
|Date |Duration |Avg HR |Notes
|
2386
2501
|
|
2387
|
-
|
2502
|
+
|22-Aug-08 |10:24 | 157 |
|
2503
|
+
Worked out MSHR (max sustainable heart rate) by going hard
|
2504
|
+
for this interval.
|
2505
|
+
|
2506
|
+
|22-Aug-08 |23:03 | 152 |
|
2507
|
+
Back-to-back with previous interval.
|
2508
|
+
|
2509
|
+
|24-Aug-08 |40:00 | 145 |
|
2510
|
+
Moderately hard interspersed with 3x 3min intervals (2min
|
2511
|
+
hard + 1min really hard taking the HR up to 160).
|
2512
|
+
|
2513
|
+
|=========================================================
|
2514
|
+
|
2515
|
+
AsciiDoc source:
|
2388
2516
|
|
2389
2517
|
---------------------------------------------------------------------
|
2390
|
-
|
2391
|
-
|
2392
|
-
|
2393
|
-
|
2394
|
-
include::customers.csv[]
|
2395
|
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2396
|
-
---------------------------------------------------------------------
|
2518
|
+
.Windtrainer workouts
|
2519
|
+
[width="80%",cols="3,^2,^2,10",options="header"]
|
2520
|
+
|=========================================================
|
2521
|
+
|Date |Duration |Avg HR |Notes
|
2397
2522
|
|
2398
|
-
|
2523
|
+
|22-Aug-08 |10:24 | 157 |
|
2524
|
+
Worked out MSHR (max sustainable heart rate) by going hard
|
2525
|
+
for this interval.
|
2399
2526
|
|
2400
|
-
|
2401
|
-
.
|
2402
|
-
ID,Customer Name,Contact Name,Customer Address,Phone
|
2403
|
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2404
|
-
include::customers.csv[]
|
2405
|
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2527
|
+
|22-Aug-08 |23:03 | 152 |
|
2528
|
+
Back-to-back with previous interval.
|
2406
2529
|
|
2407
|
-
|
2408
|
-
|
2409
|
-
|
2410
|
-
|
2411
|
-
Table ::= (Ruler,Header?,Body,Footer?)
|
2412
|
-
Header ::= (Row+,Underline)
|
2413
|
-
Footer ::= (Row+,Underline)
|
2414
|
-
Body ::= (Row+,Underline)
|
2415
|
-
Row ::= (Data+)
|
2416
|
-
|
2417
|
-
A table is terminated when the table underline is followed by a blank
|
2418
|
-
line or an end of file. Table underlines which separate table headers,
|
2419
|
-
bodies and footers should not be followed by a blank line.
|
2420
|
-
|
2421
|
-
Ruler
|
2422
|
-
^^^^^
|
2423
|
-
The first line of the table is called the 'Ruler'. The Ruler specifies
|
2424
|
-
which configuration file table definition to use, column widths,
|
2425
|
-
column alignments and the overall table width.
|
2426
|
-
|
2427
|
-
There are two ruler formats:
|
2428
|
-
|
2429
|
-
Character ruler::
|
2430
|
-
The column widths are determined by the number of table fill
|
2431
|
-
characters between column stop characters.
|
2432
|
-
Numeric ruler::
|
2433
|
-
The column widths are specified numerically. If a column width
|
2434
|
-
is omitted the previous width is used. In the degenerate case
|
2435
|
-
of no widths being specified columns are allocated equal
|
2436
|
-
widths.
|
2437
|
-
|
2438
|
-
The ruler format can be summarized as:
|
2439
|
-
|
2440
|
-
ruler ::= ((colstop,colwidth?,fillchar*)+, fillchar+, tablewidth?
|
2441
|
-
|
2442
|
-
- The 'ruler' starts with a column stop character (designating the
|
2443
|
-
start of the first column).
|
2444
|
-
- Column stop characters specify the start and alignment of each
|
2445
|
-
column:
|
2446
|
-
* Backtick (`) -- align left.
|
2447
|
-
* Single quote (') -- align right.
|
2448
|
-
* Period (.) -- align center.
|
2449
|
-
- In the case of 'fixed' format tables the ruler column widths specify
|
2450
|
-
source row data column boundaries.
|
2451
|
-
- The optional 'tablewidth' is a number representing the size of the
|
2452
|
-
output table relative to the 'pagewidth'. If 'tablewidth' is less
|
2453
|
-
than one then it is interpreted as a fraction of the page width; if
|
2454
|
-
it is greater than one then it is interpreted as a percentage of
|
2455
|
-
the page width. If 'tablewidth' is not specified then the table
|
2456
|
-
occupies the full 'pagewidth' (numeric rulers) or the relative width
|
2457
|
-
of the ruler compared to the 'textwidth' (character rulers).
|
2458
|
-
|
2459
|
-
Row and Data Elements
|
2460
|
-
^^^^^^^^^^^^^^^^^^^^^
|
2461
|
-
Each table row consists of a line of text containing the same number
|
2462
|
-
of 'Data' items as there are columns in the table,
|
2530
|
+
|24-Aug-08 |40:00 | 145 |
|
2531
|
+
Moderately hard interspersed with 3x 3min intervals (2min
|
2532
|
+
hard + 1min really hard taking the HR up to 160).
|
2463
2533
|
|
2464
|
-
|
2534
|
+
|=========================================================
|
2535
|
+
---------------------------------------------------------------------
|
2465
2536
|
|
2466
|
-
|
2467
|
-
|
2468
|
-
cannot contain AsciiDoc block elements.
|
2537
|
+
A table with externally sourced CSV data
|
2538
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2469
2539
|
|
2470
|
-
|
2471
|
-
|
2540
|
+
[format="csv",cols="^1,4*2",options="header"]
|
2541
|
+
|===================================================
|
2542
|
+
ID,Customer Name,Contact Name,Customer Address,Phone
|
2543
|
+
include::customers.csv[]
|
2544
|
+
|===================================================
|
2472
2545
|
|
2473
|
-
|
2474
|
-
Row data items are assigned by chopping the row up at ruler column
|
2475
|
-
width boundaries.
|
2546
|
+
AsciiDoc source:
|
2476
2547
|
|
2477
|
-
|
2478
|
-
|
2479
|
-
|
2548
|
+
---------------------------------------------------------------------
|
2549
|
+
[format="csv",cols="^1,4*2",options="header"]
|
2550
|
+
|===================================================
|
2551
|
+
ID,Customer Name,Contact Name,Customer Address,Phone
|
2552
|
+
include::customers.csv[]
|
2553
|
+
|===================================================
|
2554
|
+
---------------------------------------------------------------------
|
2480
2555
|
|
2481
|
-
dsv::
|
2482
|
-
The DSV (Delimiter Separated Values) format is a common UNIX tabular
|
2483
|
-
text file format.
|
2484
|
-
- The separator character is a colon (although this can be set to
|
2485
|
-
any letter using the 'separator' table attribute).
|
2486
|
-
- Common C-style backslash escapes are supported.
|
2487
|
-
- Blank lines are skipped.
|
2488
2556
|
|
2489
|
-
|
2490
|
-
|
2491
|
-
|
2492
|
-
|
2493
|
-
|
2557
|
+
[[X68]]
|
2558
|
+
Table input data formats
|
2559
|
+
~~~~~~~~~~~~~~~~~~~~~~~~
|
2560
|
+
AsciiDoc table data can be 'psv', 'dsv' or 'csv' formatted. The
|
2561
|
+
default AsciiDoc table format is 'psv'.
|
2562
|
+
|
2563
|
+
'csv' is the quasi-standard row oriented 'Comma Separated Values
|
2564
|
+
(CSV)' format commonly used to import and export spreadsheet and
|
2565
|
+
database data.
|
2566
|
+
|
2567
|
+
AsciiDoc 'psv' ('Prefix Separated Values') and 'dsv' ('Delimiter
|
2568
|
+
Separated Values') formats are cell oriented -- the table is treated
|
2569
|
+
as a sequence of cells -- there are no mandatory row separators.
|
2570
|
+
|
2571
|
+
- 'psv' prefixes each cell with a separator whereas 'dsv' delimits
|
2572
|
+
cells with a separator, that really the only difference (apart from
|
2573
|
+
different default separators).
|
2574
|
+
- 'psv' and 'dsv' separators are Python regular expressions.
|
2575
|
+
- The default 'psv' separator is `((?P<cellcount>\d+)\*)?\|` (a pipe
|
2576
|
+
character with optional cell multiplier prefix); the default 'dsv'
|
2577
|
+
separator is `:|\n` (a colon or a line break).
|
2578
|
+
- 'psv' and 'dsv' cell separators can be escaped by preceding them
|
2579
|
+
with a backslash character.
|
2580
|
+
- The 'psv' format allows cells to be stacked vertically, this makes
|
2581
|
+
it easy to enter large amounts of text per cell while still
|
2582
|
+
retaining readability.
|
2583
|
+
|
2584
|
+
Here are four 'psv' cells (the second item is multiplied by two; the
|
2585
|
+
last contains an escaped separator):
|
2586
|
+
|
2587
|
+
|One 2*|Two and three |A \| separator character
|
2588
|
+
|
2589
|
+
[[X69]]
|
2590
|
+
Table attributes
|
2591
|
+
~~~~~~~~~~~~~~~~
|
2592
|
+
Individual tables are customized by an optional <<X21,AttributeList>>
|
2593
|
+
preceding the table. Specify attributes when you want to change the
|
2594
|
+
default table format:
|
2494
2595
|
|
2495
|
-
|
2496
|
-
|
2497
|
-
The following optional table attributes can be specified in an
|
2498
|
-
<<X21,AttributeList>> preceding the table:
|
2596
|
+
format::
|
2597
|
+
'psv' (default), 'dsv' or 'csv' (See <<X68, Table Data Formats>>).
|
2499
2598
|
|
2500
2599
|
separator::
|
2501
|
-
|
2502
|
-
|
2600
|
+
The cell separator. A Python regular expression ('psv' and 'dsv'
|
2601
|
+
formats) or a single character ('csv' format).
|
2503
2602
|
|
2504
2603
|
frame::
|
2505
|
-
|
2506
|
-
|
2507
|
-
|
2604
|
+
Defines the table border and can take the following values: 'topbot'
|
2605
|
+
(top and bottom), 'all' (all sides), 'none' and 'sides' (left and
|
2606
|
+
right sides). The default value is 'all'.
|
2508
2607
|
|
2509
2608
|
grid::
|
2510
|
-
|
2511
|
-
|
2512
|
-
|
2513
|
-
example `[frame="all", grid="none"]`.
|
2514
|
-
|
2515
|
-
format, tablewidth::
|
2516
|
-
See <<X37,Markup Attributes>> below.
|
2609
|
+
Defines which ruler lines are drawn between table rows and columns.
|
2610
|
+
The 'grid' attribute value can be any of the following values: 'none',
|
2611
|
+
'cols', 'rows' and 'all'. The default value is 'all'.
|
2517
2612
|
|
2518
|
-
|
2519
|
-
|
2613
|
+
valign::
|
2614
|
+
Use the 'valign' attribute to vertically align all cells in a table.
|
2615
|
+
The following values are valid: 'top', 'bottom', and 'middle'
|
2616
|
+
(defaults to 'top').
|
2520
2617
|
|
2521
|
-
|
2522
|
-
|
2523
|
-
|
2524
|
-
|
2525
|
-
and markup templates.
|
2618
|
+
options::
|
2619
|
+
The 'options' attribute can contain the following comma separated
|
2620
|
+
values: 'header', 'footer'. By default header and footer rows are
|
2621
|
+
omitted.
|
2526
2622
|
|
2527
2623
|
cols::
|
2528
|
-
|
2624
|
+
The 'cols' attribute is a comma separated list of <<X70,column
|
2625
|
+
specifiers>>. For example `cols="2<p,2*,4p,>"`.
|
2626
|
+
+
|
2627
|
+
- If 'cols' is present it must specify all columns.
|
2628
|
+
- If the 'cols' attribute is not specified the number of columns is
|
2629
|
+
calculated as the number of data items in the *first line* of the
|
2630
|
+
table.
|
2631
|
+
- The degenerate form for the 'cols' attribute is an integer
|
2632
|
+
specifying the number of columns e.g. `cols=4`.
|
2633
|
+
|
2634
|
+
width::
|
2635
|
+
The 'width' attribute is expressed as a percentage value
|
2636
|
+
('"1%"'...'"99%"'). The width specifies the table width relative to
|
2637
|
+
the available width. HTML outputs use this value directly. If width is
|
2638
|
+
specified DocBook uses the absolute widths (see calculated
|
2639
|
+
<<X72,markup attributes>> ), if no width is specified all of the
|
2640
|
+
available width is used.
|
2529
2641
|
|
2530
|
-
|
2531
|
-
|
2532
|
-
|
2533
|
-
|
2534
|
-
and 'footdata' tags).
|
2642
|
+
filter::
|
2643
|
+
The 'filter' attribute defines an external shell command that is
|
2644
|
+
invoked for each cell. The built-in 'asciidoc' table style is
|
2645
|
+
implemented using a filter.
|
2535
2646
|
|
2536
|
-
|
2537
|
-
|
2538
|
-
|
2647
|
+
[[X70]]
|
2648
|
+
Column Specifiers
|
2649
|
+
~~~~~~~~~~~~~~~~~
|
2650
|
+
Column specifiers define how columns are presented and are used in the
|
2651
|
+
table <<X69,cols attribute>>. A column specifier consists of an
|
2652
|
+
optional column multiplier followed by optional alignment, width and
|
2653
|
+
style values and is formatted like:
|
2654
|
+
|
2655
|
+
[<multiplier>*][<align>][<width>][<style>]
|
2656
|
+
|
2657
|
+
- All components are optional. The multiplier must be first and the
|
2658
|
+
style last. The order of 'align' or 'width' is not important.
|
2659
|
+
- Column '<width>' can be either an integer proportional value (1...)
|
2660
|
+
or a percentage (1%...100%). The default value is 1. To ensure
|
2661
|
+
portability across different backends, there is no provision for
|
2662
|
+
absolute column widths (not to be confused with output column width
|
2663
|
+
<<X72,markup attributes>> which are available in both percentage and
|
2664
|
+
absolute units).
|
2665
|
+
- The column '<align>' character can be '<' (left), '^' (center) or
|
2666
|
+
'>' (right). Cells are left aligned by default.
|
2667
|
+
- A '<multiplier>' can be used to specify repeated columns e.g.
|
2668
|
+
`cols="4*<"` specifies four left-justified columns. Default value 1.
|
2669
|
+
- The '<style>' name specifies a <<X71,table style>> to used to markup
|
2670
|
+
column cells (you can use the full style names if you wish but the
|
2671
|
+
first letter is normally sufficient).
|
2672
|
+
- Column specific styles are not applied to 'header' row formatting.
|
2673
|
+
|
2674
|
+
[[X71]]
|
2675
|
+
Table styles
|
2676
|
+
~~~~~~~~~~~~
|
2677
|
+
Table styles can be applied to the entire table (by setting the
|
2678
|
+
'style' attribute in the table's attribute list) or on a per column
|
2679
|
+
basis (by specifying the style in the table's <<X69,cols attribute>>).
|
2680
|
+
Tables come with the following predefined styles:
|
2539
2681
|
|
2540
|
-
|
2541
|
-
|
2542
|
-
|
2682
|
+
default::
|
2683
|
+
The default style: AsciiDoc inline text formatting; blank lines are
|
2684
|
+
treated as paragraph breaks.
|
2543
2685
|
|
2544
|
-
|
2545
|
-
|
2546
|
-
attribute list entry).
|
2686
|
+
emphasis::
|
2687
|
+
Like default but all text is emphasised.
|
2547
2688
|
|
2548
|
-
|
2549
|
-
|
2550
|
-
entry).
|
2689
|
+
monospaced::
|
2690
|
+
Like default but all text is in a monospaced font.
|
2551
2691
|
|
2552
|
-
|
2553
|
-
|
2692
|
+
strong::
|
2693
|
+
Like default but all text is bold.
|
2694
|
+
|
2695
|
+
asciidoc::
|
2696
|
+
With this style table cells can contain any of the AsciiDoc elements
|
2697
|
+
that are allowed inside document sections. This style runs asciidoc(1)
|
2698
|
+
as a filter to process cell contents.
|
2699
|
+
|
2700
|
+
literal::
|
2701
|
+
No text formatting; monospaced font; all line breaks are retained
|
2702
|
+
(like AsciiDoc 'LiteralBlock').
|
2703
|
+
|
2704
|
+
verse::
|
2705
|
+
Text formatting; all line breaks are retained (c.f. AsciiDoc delimited
|
2706
|
+
block 'verse' style).
|
2707
|
+
|
2708
|
+
[[X72]]
|
2709
|
+
Markup attributes
|
2710
|
+
~~~~~~~~~~~~~~~~~
|
2711
|
+
AsciiDoc makes a number of attributes available to table markup
|
2712
|
+
templates and tags. Both absolute and percentage width values are
|
2713
|
+
available. Column specific attributes are available when substituting
|
2714
|
+
the 'colspec' cell data tags.
|
2554
2715
|
|
2555
2716
|
pageunits::
|
2556
|
-
|
2717
|
+
Only used by DocBook, defaults to 'pt'.
|
2557
2718
|
|
2558
|
-
|
2559
|
-
|
2719
|
+
pagewidth::
|
2720
|
+
The nominal output page width in 'pageunit' units. Used to calculate
|
2721
|
+
table and column widths. Only used by DocBook, defaults to '425'.
|
2560
2722
|
|
2561
|
-
|
2723
|
+
tableabswidth::
|
2724
|
+
Integer value calculated from 'width' and 'pagewidth' attributes.
|
2725
|
+
In 'pageunit' units.
|
2562
2726
|
|
2563
|
-
|
2564
|
-
|
2727
|
+
tablepcwidth::
|
2728
|
+
Table width expressed as a percentage of the available width. Integer
|
2729
|
+
value (0..100).
|
2565
2730
|
|
2566
|
-
|
2567
|
-
|
2568
|
-
`N` is the column character width measured on the table ruler):
|
2731
|
+
colalign::
|
2732
|
+
'left', 'right' or 'center'.
|
2569
2733
|
|
2570
|
-
|
2734
|
+
colabswidth::
|
2735
|
+
Integer value calculated from 'cols' column width, 'width' and
|
2736
|
+
'pagewidth' attributes. In 'pageunit' units.
|
2571
2737
|
|
2572
|
-
|
2738
|
+
colpcwidth::
|
2739
|
+
Column width expressed as a percentage of the table width. Integer
|
2740
|
+
value (0..100).
|
2573
2741
|
|
2574
|
-
|
2575
|
-
|
2576
|
-
columns.
|
2742
|
+
colnumber::
|
2743
|
+
Integer value: '1' for column 1, '2' for column 2 ...
|
2577
2744
|
|
2578
|
-
|
2579
|
-
|
2580
|
-
|
2581
|
-
|
2745
|
+
Nested tables
|
2746
|
+
~~~~~~~~~~~~~
|
2747
|
+
An alternative table syntax using a '!' character instead of a '|'
|
2748
|
+
character is provided to allow a single level of table nesting.
|
2749
|
+
Columns containing nested tables must use the 'asciidoc' style. An
|
2750
|
+
example can be found in `./examples/website/newtables.txt`.
|
2582
2751
|
|
2583
|
-
|
2584
|
-
|
2585
|
-
|
2752
|
+
NOTE: When generating PDF nested tables using `a2x(1)` you will need
|
2753
|
+
to use the `--no-xmllint` option. This is because the nested tables
|
2754
|
+
are not legal in DocBook (you have to use the DocBook 4 'entrytbl'
|
2755
|
+
element). But both 'dblatex' (as of version 0.28) and 'FOP' (as of
|
2756
|
+
version 0.95beta) will process nested DocBook tables, but not
|
2757
|
+
'entrytbl' elements.
|
2586
2758
|
|
2587
2759
|
|
2588
2760
|
[[X1]]
|
@@ -2661,6 +2833,89 @@ source file:
|
|
2661
2833
|
:man manual: AsciiDoc Manual
|
2662
2834
|
|
2663
2835
|
|
2836
|
+
[[X78]]
|
2837
|
+
Mathematical Formulas
|
2838
|
+
---------------------
|
2839
|
+
The 'asciimath' and 'latexmath' <<X77,passthrough macros>> along with
|
2840
|
+
'asciimath' and 'latexmath' <<X76,passthrough blocks>> provide a
|
2841
|
+
(backend dependent) mechanism for rendering mathematical formulas. You
|
2842
|
+
can use the following math markups:
|
2843
|
+
|
2844
|
+
NOTE: The 'latexmath' macro used to include 'LaTeX Math' in DocBook
|
2845
|
+
outputs is not the same as the 'latexmath' macro used to include
|
2846
|
+
'LaTeX MathML' in XHTML outputs. 'LaTeX Math' applies to DocBook
|
2847
|
+
outputs that are processed by <<X31,dblatex>> and is normally used to
|
2848
|
+
generate PDF files. 'LaTeXMathML' is very much a subset of 'LaTeX
|
2849
|
+
Math' and applies to XHTML documents.
|
2850
|
+
|
2851
|
+
LaTeX Math
|
2852
|
+
~~~~~~~~~~
|
2853
|
+
ftp://ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdf[LaTeX
|
2854
|
+
math] can be included in documents that are processed by
|
2855
|
+
<<X31,dblatex(1)>>. Example inline formula:
|
2856
|
+
|
2857
|
+
latexmath:[$C = \alpha + \beta Y^{\gamma} + \epsilon$]
|
2858
|
+
|
2859
|
+
For more examples see the http://www.methods.co.nz/asciidoc/[AsciiDoc
|
2860
|
+
website] or the distributed `doc/latexmath.txt` file.
|
2861
|
+
|
2862
|
+
ASCIIMathML
|
2863
|
+
~~~~~~~~~~~
|
2864
|
+
/////////////////////////////////////////////////////////////////////
|
2865
|
+
The older ASCIIMathML 1.47 version is used instead of version 2
|
2866
|
+
because:
|
2867
|
+
|
2868
|
+
1. Version 2 doesn't work when embedded.
|
2869
|
+
2. Version 2 is much larger.
|
2870
|
+
/////////////////////////////////////////////////////////////////////
|
2871
|
+
|
2872
|
+
http://www1.chapman.edu/~jipsen/mathml/asciimath.html[ASCIIMathML]
|
2873
|
+
formulas can be included in XHTML documents generated using the
|
2874
|
+
'xhtml11' backend. To enable ASCIIMathML support you must define the
|
2875
|
+
'asciimath' attribute, for example using the `-a asciimath`
|
2876
|
+
command-line option. Example inline formula:
|
2877
|
+
|
2878
|
+
asciimath:[`x/x={(1,if x!=0),(text{undefined},if x=0):}`]
|
2879
|
+
|
2880
|
+
For more examples see the http://www.methods.co.nz/asciidoc/[AsciiDoc
|
2881
|
+
website] or the distributed `doc/asciimathml.txt` file.
|
2882
|
+
|
2883
|
+
LaTeXMathML
|
2884
|
+
~~~~~~~~~~~
|
2885
|
+
/////////////////////////////////////////////////////////////////////
|
2886
|
+
There is an http://math.etsu.edu/LaTeXMathML/[extended LaTeXMathML
|
2887
|
+
version] by Jeff Knisley, in addition to a JavaScript file it requires
|
2888
|
+
the inclusion of a CSS file.
|
2889
|
+
/////////////////////////////////////////////////////////////////////
|
2890
|
+
|
2891
|
+
'LaTeXMathML' allows LaTeX Math style formulas to be included in XHTML
|
2892
|
+
documents generated using the AsciiDoc 'xhtml11' backend. AsciiDoc
|
2893
|
+
uses the
|
2894
|
+
http://www.maths.nottingham.ac.uk/personal/drw/lm.html[original
|
2895
|
+
LaTeXMathML] by Douglas Woodall. 'LaTeXMathML' is derived from
|
2896
|
+
ASCIIMathML and is for users who are more familiar with or prefer
|
2897
|
+
using LaTeX math formulas (it recognizes a subset of LaTeX Math, the
|
2898
|
+
differences are documented on the 'LaTeXMathML' web page). To enable
|
2899
|
+
LaTeXMathML support you must define the 'latexmath' attribute, for
|
2900
|
+
example using the `-a latexmath` command-line option. Example inline
|
2901
|
+
formula:
|
2902
|
+
|
2903
|
+
latexmath:[$\sum_{n=1}^\infty \frac{1}{2^n}$]
|
2904
|
+
|
2905
|
+
For more examples see the http://www.methods.co.nz/asciidoc/[AsciiDoc
|
2906
|
+
website] or the distributed `doc/latexmathml.txt` file.
|
2907
|
+
|
2908
|
+
There are more examples on the
|
2909
|
+
http://www.methods.co.nz/asciidoc/[AsciiDoc website].
|
2910
|
+
|
2911
|
+
MathML
|
2912
|
+
~~~~~~
|
2913
|
+
http://www.w3.org/Math/[MathML] is a low level XML markup for
|
2914
|
+
mathematics. AsciiDoc has no macros for MathML but users familiar with
|
2915
|
+
this markup could use passthrough macros and passthrough blocks to
|
2916
|
+
include MathML in output documents.
|
2917
|
+
|
2918
|
+
|
2664
2919
|
[[X7]]
|
2665
2920
|
Configuration Files
|
2666
2921
|
-------------------
|
@@ -2694,26 +2949,7 @@ conjunction with asciidoc(1) output files. You can view configuration
|
|
2694
2949
|
file load sequence by turning on the asciidoc(1) `-v` (`--verbose`)
|
2695
2950
|
command-line option.
|
2696
2951
|
|
2697
|
-
|
2698
|
-
~~~~~~~~~~~~~~~~~~~~~~~~
|
2699
|
-
Markup template sections supply backend markup for translating
|
2700
|
-
AsciiDoc elements. Since the text is normally backend dependent
|
2701
|
-
you'll find these sections in the backend specific configuration
|
2702
|
-
files. A markup template section body can contain:
|
2703
|
-
|
2704
|
-
- Backend markup
|
2705
|
-
- Attribute references
|
2706
|
-
- System macro calls.
|
2707
|
-
- A document content placeholder
|
2708
|
-
|
2709
|
-
The document content placeholder is a single | character and is
|
2710
|
-
replaced by text from the source element. Use the `\{brvbar}`
|
2711
|
-
attribute reference if you need a literal | character in the template.
|
2712
|
-
|
2713
|
-
Special Sections
|
2714
|
-
~~~~~~~~~~~~~~~~
|
2715
|
-
AsciiDoc reserves the following predefined special section names for
|
2716
|
-
specific purposes:
|
2952
|
+
AsciiDoc reserves the following section names for specific purposes:
|
2717
2953
|
|
2718
2954
|
miscellaneous::
|
2719
2955
|
Configuration options that don't belong anywhere else.
|
@@ -2735,24 +2971,30 @@ macros::
|
|
2735
2971
|
Macro syntax definitions.
|
2736
2972
|
titles::
|
2737
2973
|
Heading, section and block title definitions.
|
2738
|
-
paradef
|
2974
|
+
paradef-*::
|
2739
2975
|
Paragraph element definitions.
|
2740
|
-
blockdef
|
2976
|
+
blockdef-*::
|
2741
2977
|
DelimitedBlock element definitions.
|
2742
|
-
listdef
|
2978
|
+
listdef-*::
|
2743
2979
|
List element definitions.
|
2744
|
-
|
2980
|
+
listtags-*::
|
2981
|
+
List element tag definitions.
|
2982
|
+
tabledef-*::
|
2745
2983
|
Table element definitions.
|
2984
|
+
tabletags-*::
|
2985
|
+
Table element tag definitions.
|
2746
2986
|
|
2747
|
-
Each line of text in
|
2987
|
+
Each line of text in these sections is a 'section entry'. Section
|
2748
2988
|
entries share the following syntax:
|
2749
2989
|
|
2750
|
-
|
2751
|
-
The entry value is set to
|
2752
|
-
|
2990
|
+
name=value::
|
2991
|
+
The entry value is set to value.
|
2992
|
+
name=::
|
2753
2993
|
The entry value is set to a zero length string.
|
2754
|
-
|
2755
|
-
The entry is undefined (deleted from the configuration).
|
2994
|
+
name!::
|
2995
|
+
The entry is undefined (deleted from the configuration). This
|
2996
|
+
syntax only applies to 'attributes' and 'miscellaneous'
|
2997
|
+
sections.
|
2756
2998
|
|
2757
2999
|
.Section entry behavior
|
2758
3000
|
- All equals characters inside the `name` must be escaped with a
|
@@ -2766,8 +3008,8 @@ entries share the following syntax:
|
|
2766
3008
|
template sections).
|
2767
3009
|
|
2768
3010
|
|
2769
|
-
Miscellaneous
|
2770
|
-
|
3011
|
+
Miscellaneous section
|
3012
|
+
~~~~~~~~~~~~~~~~~~~~~
|
2771
3013
|
The optional `[miscellaneous]` section specifies the following
|
2772
3014
|
`name=value` options:
|
2773
3015
|
|
@@ -2788,15 +3030,15 @@ tabsize::
|
|
2788
3030
|
expansion (useful when piping included files through block
|
2789
3031
|
filters). Included files can override this option using the
|
2790
3032
|
'tabsize' attribute.
|
2791
|
-
|
3033
|
+
pagewidth, pageunits::
|
2792
3034
|
These global table related options are documented in the
|
2793
3035
|
<<X4,Table Configuration File Definitions>> sub-section.
|
2794
3036
|
|
2795
3037
|
NOTE: `[miscellaneous]` configuration file entries can be set using
|
2796
3038
|
the asciidoc(1) `-a` (`--attribute`) command-line option.
|
2797
3039
|
|
2798
|
-
Titles
|
2799
|
-
|
3040
|
+
Titles section
|
3041
|
+
~~~~~~~~~~~~~~
|
2800
3042
|
sectiontitle::
|
2801
3043
|
Two line section title pattern. The entry value is a Python
|
2802
3044
|
regular expression containing the named group 'title'.
|
@@ -2821,8 +3063,8 @@ subs::
|
|
2821
3063
|
the document header and section titles. Defaults to 'normal'
|
2822
3064
|
substitution.
|
2823
3065
|
|
2824
|
-
Tags
|
2825
|
-
|
3066
|
+
Tags section
|
3067
|
+
~~~~~~~~~~~~
|
2826
3068
|
The `[tags]` section contains backend tag definitions (one per
|
2827
3069
|
line). Tags are used to translate AsciiDoc elements to backend
|
2828
3070
|
markup.
|
@@ -2839,20 +3081,20 @@ the output file.
|
|
2839
3081
|
Use the `\{brvbar}` attribute reference if you need to include a | pipe
|
2840
3082
|
character inside tag text.
|
2841
3083
|
|
2842
|
-
Attributes
|
2843
|
-
|
3084
|
+
Attributes section
|
3085
|
+
~~~~~~~~~~~~~~~~~~
|
2844
3086
|
The optional `[attributes]` section contains predefined attributes.
|
2845
3087
|
|
2846
3088
|
If the attribute value requires leading or trailing spaces then the
|
2847
|
-
text text should be enclosed in
|
3089
|
+
text text should be enclosed in quotation mark (") characters.
|
2848
3090
|
|
2849
|
-
To delete a attribute insert a name
|
3091
|
+
To delete a attribute insert a `name!` entry in a downstream
|
2850
3092
|
configuration file or use the asciidoc(1) `--attribute name!`
|
2851
|
-
command-line option (
|
2852
|
-
|
3093
|
+
command-line option (an attribute name suffixed with a `!` character
|
3094
|
+
deletes the attribute)
|
2853
3095
|
|
2854
|
-
Special Characters
|
2855
|
-
|
3096
|
+
Special Characters section
|
3097
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2856
3098
|
The `[specialcharacters]` section specifies how to escape characters
|
2857
3099
|
reserved by the backend markup. Each translation is specified on a
|
2858
3100
|
single line formatted like:
|
@@ -2862,12 +3104,12 @@ single line formatted like:
|
|
2862
3104
|
Special characters are normally confined to those that resolve
|
2863
3105
|
markup ambiguity (in the case of SGML/XML markups the ampersand, less
|
2864
3106
|
than and greater than characters). The following example causes all
|
2865
|
-
occurrences of the `<` character to be replaced by
|
3107
|
+
occurrences of the `<` character to be replaced by `\<`.
|
2866
3108
|
|
2867
3109
|
<=<
|
2868
3110
|
|
2869
|
-
Quoted Text
|
2870
|
-
|
3111
|
+
Quoted Text section
|
3112
|
+
~~~~~~~~~~~~~~~~~~~
|
2871
3113
|
Quoting is used primarily for text formatting. The `[quotes]` section
|
2872
3114
|
defines AsciiDoc quoting characters and their corresponding backend
|
2873
3115
|
markup tags. Each section entry value is the name of a of a `[tags]`
|
@@ -2904,8 +3146,8 @@ name with a hash character, for example:
|
|
2904
3146
|
- To minimize quoting ambiguity try not to use the same quote
|
2905
3147
|
characters in different quote types.
|
2906
3148
|
|
2907
|
-
Special Words
|
2908
|
-
|
3149
|
+
Special Words section
|
3150
|
+
~~~~~~~~~~~~~~~~~~~~~
|
2909
3151
|
The `[specialwords]` section is used to single out words and phrases
|
2910
3152
|
that you want to consistently format in some way throughout your
|
2911
3153
|
document without having to repeatedly specify the markup. The name of
|
@@ -2956,8 +3198,8 @@ ones.
|
|
2956
3198
|
`ten` only if they are not preceded by a backslash.
|
2957
3199
|
|
2958
3200
|
[[X10]]
|
2959
|
-
Replacements
|
2960
|
-
|
3201
|
+
Replacements section
|
3202
|
+
~~~~~~~~~~~~~~~~~~~~
|
2961
3203
|
`[replacements]` and `[replacements2]` configuration file entries
|
2962
3204
|
specify find and replace text and are formatted like:
|
2963
3205
|
|
@@ -2982,6 +3224,23 @@ macro name):
|
|
2982
3224
|
- Replacements are performed in the same order they appear in the
|
2983
3225
|
configuration file replacements section.
|
2984
3226
|
|
3227
|
+
Markup Template Sections
|
3228
|
+
~~~~~~~~~~~~~~~~~~~~~~~~
|
3229
|
+
Markup template sections supply backend markup for translating
|
3230
|
+
AsciiDoc elements. Since the text is normally backend dependent
|
3231
|
+
you'll find these sections in the backend specific configuration
|
3232
|
+
files. Template sections differ from other sections in that they
|
3233
|
+
contain a single block of text instead of per line 'name=value'
|
3234
|
+
entries. A markup template section body can contain:
|
3235
|
+
|
3236
|
+
- Attribute references
|
3237
|
+
- System macro calls.
|
3238
|
+
- A document content placeholder
|
3239
|
+
|
3240
|
+
The document content placeholder is a single | character and is
|
3241
|
+
replaced by text from the source element. Use the `\{brvbar}`
|
3242
|
+
attribute reference if you need a literal | character in the template.
|
3243
|
+
|
2985
3244
|
[[X27]]
|
2986
3245
|
Configuration File Names and Locations
|
2987
3246
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
@@ -2993,7 +3252,8 @@ option).
|
|
2993
3252
|
Implicit configuration files are loaded from the following directories
|
2994
3253
|
in the following order:
|
2995
3254
|
|
2996
|
-
1. The `/etc/asciidoc`
|
3255
|
+
1. The global configuration directory (normally `/etc/asciidoc` or
|
3256
|
+
`/usr/local/etc/asciidoc`) if it exists.
|
2997
3257
|
2. The directory containing the asciidoc executable.
|
2998
3258
|
3. The user's `$HOME/.asciidoc` directory (if it exists).
|
2999
3259
|
4. The directory containing the AsciiDoc source file.
|
@@ -3111,7 +3371,7 @@ To delete (undefine) an attribute use the following syntax:
|
|
3111
3371
|
|
3112
3372
|
:<name>!:
|
3113
3373
|
|
3114
|
-
.AttributeEntry
|
3374
|
+
.AttributeEntry behavior
|
3115
3375
|
- The attribute entry line begins with colon -- no white space allowed
|
3116
3376
|
in left margin.
|
3117
3377
|
- AsciiDoc converts the `<name>` to a legal attribute name (lower
|
@@ -3120,9 +3380,9 @@ To delete (undefine) an attribute use the following syntax:
|
|
3120
3380
|
- Leading and trailing white space is stripped from the `<value>`.
|
3121
3381
|
- If the `<value>` is blank then the corresponding attribute value is
|
3122
3382
|
set to an empty string.
|
3123
|
-
- Special characters in the entry `<value>` are substituted.
|
3124
|
-
|
3125
|
-
|
3383
|
+
- Special characters in the entry `<value>` are substituted. You can
|
3384
|
+
enter special characters using character entity values, for example
|
3385
|
+
`\&`.
|
3126
3386
|
- Attribute references contained in the entry `<value>` will be
|
3127
3387
|
expanded.
|
3128
3388
|
- By default AttributeEntry values are substituted for
|
@@ -3133,8 +3393,7 @@ To delete (undefine) an attribute use the following syntax:
|
|
3133
3393
|
markup template substitution.
|
3134
3394
|
- Attribute elements override configuration file and intrinsic
|
3135
3395
|
attributes but do not override command-line attributes.
|
3136
|
-
|
3137
|
-
Here's another example:
|
3396
|
+
Here are some more attribute entry examples:
|
3138
3397
|
|
3139
3398
|
---------------------------------------------------------------------
|
3140
3399
|
AsciiDoc User Manual
|
@@ -3162,6 +3421,25 @@ the document's directory then it will be added verbatim to the DocBook
|
|
3162
3421
|
header (see the `./doc/asciidoc-revhistory.xml` example that comes
|
3163
3422
|
with the AsciiDoc distribution).].
|
3164
3423
|
|
3424
|
+
Setting configuration entries
|
3425
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
3426
|
+
A variant of the Attribute Entry syntax allows configuration file
|
3427
|
+
entries to be set from within an AsciiDoc document:
|
3428
|
+
|
3429
|
+
:<section_name>.<entry_name>: <entry_value>
|
3430
|
+
|
3431
|
+
Where `<section_name>` is the configuration section name,
|
3432
|
+
`<entry_name>` is the name of the entry and `<entry_value>` is the
|
3433
|
+
optional entry value. This example sets the default labeled list style
|
3434
|
+
to 'horizontal':
|
3435
|
+
|
3436
|
+
:listdef-labeled.style: horizontal
|
3437
|
+
|
3438
|
+
It is exactly equivalent to a configuration file containing:
|
3439
|
+
|
3440
|
+
[listdef-labeled]
|
3441
|
+
style=horizontal
|
3442
|
+
|
3165
3443
|
[[X62]]
|
3166
3444
|
.Attribute entries promote clarity and eliminate repetition
|
3167
3445
|
*********************************************************************
|
@@ -3171,12 +3449,13 @@ compounded by redundancy if the same name is used repeatedly.
|
|
3171
3449
|
Attribute entries can be used to make your documents easier to read
|
3172
3450
|
and write, here are some examples:
|
3173
3451
|
|
3174
|
-
:1:
|
3175
|
-
:homepage:
|
3176
|
-
:new:
|
3452
|
+
:1: http://freshmeat.net/projects/asciidoc/
|
3453
|
+
:homepage: http://hg.sharesource.org/asciidoc/[AsciiDoc home page]
|
3454
|
+
:new: image:./images/smallnew.png[]
|
3455
|
+
:footnote1: footnote:[A meaningless latin term]
|
3177
3456
|
|
3178
3457
|
Using previously defined attributes: See the {1}[Freshmeat summary]
|
3179
|
-
or the {homepage} for something new {new}.
|
3458
|
+
or the {homepage} for something new {new}. Lorem ispum {footnote1}.
|
3180
3459
|
|
3181
3460
|
.Note
|
3182
3461
|
- The attribute entry definition must precede it's usage.
|
@@ -3193,20 +3472,29 @@ Attribute Lists
|
|
3193
3472
|
---------------
|
3194
3473
|
An attribute list is a comma separated list of attribute values. The
|
3195
3474
|
entire list is enclosed in square brackets. Attribute lists are used
|
3196
|
-
to pass parameters to macros, blocks and inline quotes
|
3475
|
+
to pass parameters to macros, blocks and inline quotes:
|
3476
|
+
|
3477
|
+
- The list consists of zero or more positional attribute values
|
3478
|
+
followed by zero or more named attribute values.
|
3479
|
+
- Attribute values are enclosed in quotation mark (") characters.
|
3480
|
+
- If the attribute list only contains positional attribute values and
|
3481
|
+
the values contain no commas then quoting is unnecessary.
|
3197
3482
|
|
3198
|
-
|
3199
|
-
|
3483
|
+
Here are three examples (a single unquoted positional attribute; three
|
3484
|
+
unquoted attribute values; one positional attribute followed by two
|
3485
|
+
named attributes):
|
3200
3486
|
|
3201
3487
|
[Hello]
|
3202
3488
|
[quote, Bertrand Russell, The World of Mathematics (1956)]
|
3203
3489
|
["22 times", backcolor="#0e0e0e", options="noborders,wide"]
|
3204
3490
|
|
3205
|
-
.Attribute list
|
3491
|
+
.Attribute list behavior
|
3206
3492
|
- If one or more attribute values contains a comma the all values must
|
3207
3493
|
be quoted (enclosed in quotation characters).
|
3208
|
-
- If the list contains any named attributes
|
3209
|
-
values must be quoted.
|
3494
|
+
- If the list contains any named or quoted attributes then all string
|
3495
|
+
attribute values must be quoted.
|
3496
|
+
- To include a quotation mark (") character in a quoted attribute
|
3497
|
+
value the the quotation mark must be escaped with a backslash.
|
3210
3498
|
- List attributes take precedence over existing attributes.
|
3211
3499
|
- List attributes can only be referenced in configuration file markup
|
3212
3500
|
templates and tags, they are not available inside the document.
|
@@ -3215,15 +3503,28 @@ by zero or more named attribute values. Here are three examples:
|
|
3215
3503
|
- Positional attributes are referred to as `\{1}`,`\{2}`,`\{3}`,...
|
3216
3504
|
- Attribute `\{0}` refers to the entire list (excluding the enclosing
|
3217
3505
|
square brackets).
|
3218
|
-
- If an attribute named `options` is present it is processed as a
|
3219
|
-
comma separated list of attributes with zero length string values.
|
3220
|
-
For example `[options="opt1,opt2,opt3"]` is equivalent to
|
3221
|
-
`[opt1="",opt2="",opt2=""]`.
|
3222
3506
|
- Attribute lists are evaluated as a list of Python function
|
3223
3507
|
arguments. If this fails or any of the items do not evaluate to a
|
3224
3508
|
string, a number or None then all list items are treated as string
|
3225
3509
|
literals.
|
3226
3510
|
|
3511
|
+
[[X75]]
|
3512
|
+
Options attribute
|
3513
|
+
~~~~~~~~~~~~~~~~~
|
3514
|
+
If the attribute list contains an attribute named `options` it is
|
3515
|
+
processed as a comma separated list of option names:
|
3516
|
+
|
3517
|
+
- Each name generates an attribute named like `<option>-option` (where
|
3518
|
+
`<option>` is the option name) with an empty string value. For
|
3519
|
+
example `[options="opt1,opt2,opt3"]` is equivalent to setting the
|
3520
|
+
following three attributes
|
3521
|
+
`[opt1-option="",opt2-option="",opt2-option=""]`.
|
3522
|
+
- If you define a an option attribute globally (for example with an
|
3523
|
+
<<X18,attribute entry>>) then it will apply to all elements in the
|
3524
|
+
document.
|
3525
|
+
- AsciiDoc implements a number of predefined options which are listed
|
3526
|
+
in the <<X74,Attribute Options appendix>>.
|
3527
|
+
|
3227
3528
|
Macro Attribute lists
|
3228
3529
|
~~~~~~~~~~~~~~~~~~~~~
|
3229
3530
|
Macros calls are suffixed with an attribute list. The list may be
|
@@ -3232,10 +3533,10 @@ attribute values to macro markup templates.
|
|
3232
3533
|
|
3233
3534
|
AttributeList Element
|
3234
3535
|
~~~~~~~~~~~~~~~~~~~~~
|
3235
|
-
An attribute list on a line by itself constitutes an
|
3236
|
-
block element, its
|
3237
|
-
element.
|
3238
|
-
markup template substitution.
|
3536
|
+
An <<X21,attribute list>> on a line by itself constitutes an
|
3537
|
+
'AttributeList' block element, its attributes apply to the following
|
3538
|
+
block element. The list attributes are passed to the next block
|
3539
|
+
element for markup template substitution.
|
3239
3540
|
|
3240
3541
|
|
3241
3542
|
Attribute References
|
@@ -3384,7 +3685,9 @@ command-line arguments, execution parameters along with attributes
|
|
3384
3685
|
defined in the default configuration files. Here's the list of
|
3385
3686
|
predefined intrinsic attributes:
|
3386
3687
|
|
3688
|
+
{amp} ampersand (&) character
|
3387
3689
|
{asciidoc-dir} the asciidoc(1) application directory
|
3690
|
+
{asciidoc-file} the full path name of the asciidoc(1) script
|
3388
3691
|
{asciidoc-version} the version of asciidoc(1)
|
3389
3692
|
{author} author's full name
|
3390
3693
|
{authored} empty string '' if {author} or {email} defined,
|
@@ -3392,6 +3695,7 @@ predefined intrinsic attributes:
|
|
3392
3695
|
{backend-<backend>} empty string ''
|
3393
3696
|
{<backend>-<doctype>} empty string ''
|
3394
3697
|
{backend} document backend specified by `-b` option
|
3698
|
+
{backslash} backslash character
|
3395
3699
|
{basebackend-<base>} empty string ''
|
3396
3700
|
{basebackend} html or docbook
|
3397
3701
|
{brvbar} broken vertical bar (|) character
|
@@ -3402,6 +3706,7 @@ predefined intrinsic attributes:
|
|
3402
3706
|
{doctype} document type specified by `-d` option
|
3403
3707
|
{email} author's email address (from document header)
|
3404
3708
|
{empty} empty string ''
|
3709
|
+
{encoding} specifies input and output encoding
|
3405
3710
|
{filetype-<fileext>} empty string ''
|
3406
3711
|
{filetype} output file name file extension
|
3407
3712
|
{firstname} author first name (from document header)
|
@@ -3419,11 +3724,14 @@ predefined intrinsic attributes:
|
|
3419
3724
|
{mantitle} document title minus the manpage volume number
|
3420
3725
|
{manvolnum} manpage volume number (1..8) (from document header)
|
3421
3726
|
{middlename} author middle name (from document header)
|
3727
|
+
{nbsp} Non-breaking space entity
|
3422
3728
|
{outdir} document output directory name (note 1)
|
3423
3729
|
{outfile} output file name (note 1)
|
3424
3730
|
{revision} document revision number (from document header)
|
3425
3731
|
{sectnum} section number (in section titles)
|
3426
3732
|
{title} section title (in titled elements)
|
3733
|
+
{two_colons} Two colon characters.
|
3734
|
+
{two_semicolons} Two semicolon characters.
|
3427
3735
|
{user-dir} the ~/.asciidoc directory (if it exists)
|
3428
3736
|
{verbose} defined as '' if --verbose command option specified
|
3429
3737
|
|
@@ -3447,6 +3755,7 @@ predefined intrinsic attributes:
|
|
3447
3755
|
contents are written.]
|
3448
3756
|
|
3449
3757
|
|
3758
|
+
[[X73]]
|
3450
3759
|
Block Element Definitions
|
3451
3760
|
-------------------------
|
3452
3761
|
The syntax and behavior of Paragraph, DelimitedBlock, List and Table
|
@@ -3480,7 +3789,10 @@ template::
|
|
3480
3789
|
parameters instead of a single template.
|
3481
3790
|
|
3482
3791
|
options::
|
3483
|
-
A comma delimited list of element specific option names.
|
3792
|
+
A comma delimited list of element specific option names. In addition
|
3793
|
+
to being used internally, options are available during markup tag
|
3794
|
+
and template substitution as attributes with an empty string value
|
3795
|
+
named like `<option>-option` (where `<option>` is the option name).
|
3484
3796
|
|
3485
3797
|
subs, presubs, postsubs::
|
3486
3798
|
* 'presubs' and 'postsubs' are lists of comma separated substitutions that are
|
@@ -3489,9 +3801,9 @@ subs, presubs, postsubs::
|
|
3489
3801
|
|
3490
3802
|
* 'subs' is an alias for 'presubs'.
|
3491
3803
|
|
3492
|
-
* If a 'filter' is allowed (Paragraphs
|
3493
|
-
been specified then 'presubs' and 'postsubs' substitutions
|
3494
|
-
performed before and after the filter is run respectively.
|
3804
|
+
* If a 'filter' is allowed (Paragraphs, DelimitedBlocks and Tables)
|
3805
|
+
and has been specified then 'presubs' and 'postsubs' substitutions
|
3806
|
+
are performed before and after the filter is run respectively.
|
3495
3807
|
|
3496
3808
|
* Allowed values: 'specialcharacters', 'quotes', 'specialwords',
|
3497
3809
|
'replacements', 'macros', 'attributes', 'callouts'.
|
@@ -3503,7 +3815,7 @@ subs, presubs, postsubs::
|
|
3503
3815
|
'normal';;
|
3504
3816
|
The following substitutions:
|
3505
3817
|
'specialcharacters','quotes','attributes','specialwords',
|
3506
|
-
'replacements','macros'
|
3818
|
+
'replacements','macros'.
|
3507
3819
|
'verbatim';;
|
3508
3820
|
'specialcharacters' and 'callouts' substitutions.
|
3509
3821
|
|
@@ -3516,8 +3828,8 @@ subs, presubs, postsubs::
|
|
3516
3828
|
|
3517
3829
|
filter::
|
3518
3830
|
This optional entry specifies an executable shell command for
|
3519
|
-
processing block content (Paragraphs and
|
3520
|
-
filter command can contain attribute references.
|
3831
|
+
processing block content (Paragraphs, DelimitedBlocks and Tables).
|
3832
|
+
The filter command can contain attribute references.
|
3521
3833
|
|
3522
3834
|
posattrs::
|
3523
3835
|
Optional comma separated list of positional attribute names. This
|
@@ -3545,7 +3857,7 @@ Styles
|
|
3545
3857
|
A style is a set of block attributes bundled as a single named
|
3546
3858
|
attribute. The following example defines a style named 'verbatim':
|
3547
3859
|
|
3548
|
-
verbatim-style=template="literalblock",subs="verbatim"
|
3860
|
+
verbatim-style=template="literalblock",subs="verbatim"
|
3549
3861
|
|
3550
3862
|
- All style parameter names must be suffixed with `-style` and the
|
3551
3863
|
style parameter value is in the form of a list of <<X21,named
|
@@ -3586,9 +3898,9 @@ delimiter::
|
|
3586
3898
|
blank line, the end of file, or the start of a DelimitedBlock.
|
3587
3899
|
|
3588
3900
|
options::
|
3589
|
-
The
|
3590
|
-
|
3591
|
-
|
3901
|
+
The 'listelement' option specifies that paragraphs of this type will
|
3902
|
+
automatically be considered part of immediately preceding list
|
3903
|
+
items.
|
3592
3904
|
|
3593
3905
|
.Paragraph processing proceeds as follows:
|
3594
3906
|
1. The paragraph text is aligned to the left margin.
|
@@ -3604,19 +3916,16 @@ options::
|
|
3604
3916
|
|
3605
3917
|
Delimited Blocks
|
3606
3918
|
~~~~~~~~~~~~~~~~
|
3607
|
-
DelimitedBlock
|
3608
|
-
|
3609
|
-
options::
|
3610
|
-
Allowed values are:
|
3919
|
+
DelimitedBlock 'options' values are:
|
3611
3920
|
|
3612
|
-
|
3613
|
-
|
3921
|
+
sectionbody::
|
3922
|
+
The block contents are processed as a SectionBody.
|
3614
3923
|
|
3615
|
-
|
3616
|
-
|
3924
|
+
skip::
|
3925
|
+
The block is treated as a comment (see CommentBlocks).
|
3617
3926
|
|
3618
|
-
|
3619
|
-
|
3927
|
+
list::
|
3928
|
+
The block is a <<X29,list block>>.
|
3620
3929
|
|
3621
3930
|
'presubs', 'postsubs' and 'filter' entries are meaningless when
|
3622
3931
|
'sectionbody', 'skip' or 'list' options are set.
|
@@ -3650,47 +3959,24 @@ type::
|
|
3650
3959
|
|
3651
3960
|
delimiter::
|
3652
3961
|
A Python regular expression that matches the first line of a
|
3653
|
-
list element entry. This expression
|
3654
|
-
|
3655
|
-
|
3656
|
-
subs::
|
3657
|
-
Substitutions that are performed on list item text and terms.
|
3658
|
-
|
3659
|
-
listtag::
|
3660
|
-
The name of the tag that envelopes the List.
|
3661
|
-
|
3662
|
-
itemtag::
|
3663
|
-
The name of the tag that envelopes the ListItem.
|
3664
|
-
|
3665
|
-
texttag::
|
3666
|
-
The name of the tag that envelopes the list item text.
|
3667
|
-
|
3668
|
-
labeltag::
|
3669
|
-
The name of the tag that envelopes a variable list label.
|
3962
|
+
list element entry. This expression can contain the named groups
|
3963
|
+
'text' (bulleted groups), 'index' and 'text' (numbered lists),
|
3964
|
+
'label' and 'text' (labeled lists).
|
3670
3965
|
|
3671
|
-
|
3672
|
-
The name of the
|
3673
|
-
|
3674
|
-
|
3675
|
-
|
3966
|
+
tags::
|
3967
|
+
The `<name>` of the `[listtags-<name>]` configuration file section
|
3968
|
+
containing list markup tag definitions. The tag entries ('list',
|
3969
|
+
'entry', 'label', 'term', 'text') map the AsciiDoc list structure to
|
3970
|
+
backend markup; see the 'listtags' sections in the AsciiDoc
|
3971
|
+
distributed backend `.conf` configuration files for examples.
|
3676
3972
|
|
3677
3973
|
Tables
|
3678
3974
|
~~~~~~
|
3679
|
-
Table behavior and syntax is determined by `[tabledef*]`
|
3680
|
-
file sections. The user can change
|
3681
|
-
|
3682
|
-
|
3683
|
-
|
3684
|
-
|
3685
|
-
fillchar::
|
3686
|
-
A single character that fills table ruler and underline
|
3687
|
-
lines.
|
3688
|
-
|
3689
|
-
subs::
|
3690
|
-
Substitutions performed on table data items.
|
3691
|
-
|
3692
|
-
format::
|
3693
|
-
The source row data format ('fixed', 'csv' or 'dsv').
|
3975
|
+
Table behavior and syntax is determined by `[tabledef*]` and
|
3976
|
+
`[tabletags*]` configuration file sections. The user can change
|
3977
|
+
existing table behavior and add new table types by editing
|
3978
|
+
configuration files. The following `[tabledef*]` section entries
|
3979
|
+
generate table output markup elements:
|
3694
3980
|
|
3695
3981
|
comspec::
|
3696
3982
|
The table 'comspec' tag definition.
|
@@ -3705,18 +3991,18 @@ headdata, footdata, bodydata::
|
|
3705
3991
|
'footdata' table definition entries default to 'bodydata' if they
|
3706
3992
|
are undefined.
|
3707
3993
|
|
3994
|
+
paragraph::
|
3995
|
+
If the 'paragraph' tag is specified then blank lines in the cell
|
3996
|
+
data are treated as paragraph delimiters and marked up using this
|
3997
|
+
tag.
|
3998
|
+
|
3708
3999
|
[[X4]]
|
3709
4000
|
Table behavior is also influenced by the following `[miscellaneous]`
|
3710
4001
|
configuration file entries:
|
3711
4002
|
|
3712
|
-
textwidth::
|
3713
|
-
The page width (in characters) of the source text. This setting is
|
3714
|
-
compared to the table ruler width when calculating the relative
|
3715
|
-
size of character ruler tables on the output page.
|
3716
|
-
|
3717
4003
|
pagewidth::
|
3718
|
-
This integer value is the printable width of the output media.
|
3719
|
-
|
4004
|
+
This integer value is the printable width of the output media. See
|
4005
|
+
<<X69,table attributes>>.
|
3720
4006
|
|
3721
4007
|
pageunits::
|
3722
4008
|
The units of width in output markup width attribute values.
|
@@ -3727,9 +4013,10 @@ pageunits::
|
|
3727
4013
|
most XML table schema.
|
3728
4014
|
- Table definitions can be ``mixed in'' from multiple cascading
|
3729
4015
|
configuration files.
|
3730
|
-
- New table definitions inherit the default table
|
3731
|
-
(
|
3732
|
-
|
4016
|
+
- New table definitions inherit the default table and table tags
|
4017
|
+
definitions (`[tabledef-default]` and `[tabletags-default]`) so you
|
4018
|
+
only need to override those conf file entries that require
|
4019
|
+
modification.
|
3733
4020
|
|
3734
4021
|
|
3735
4022
|
[[X59]]
|
@@ -3751,9 +4038,6 @@ WARNING: Filters can potentially generate unsafe output. Before
|
|
3751
4038
|
installing a filter you should verify that it can't be coerced into
|
3752
4039
|
generating malicious output or exposing sensitive information.
|
3753
4040
|
|
3754
|
-
NOTE: Filter functionality is currently only available on POSIX
|
3755
|
-
platforms (this includes Cygwin).
|
3756
|
-
|
3757
4041
|
Filter Search Paths
|
3758
4042
|
~~~~~~~~~~~~~~~~~~~
|
3759
4043
|
If the filter command does not specify a directory path then
|
@@ -3794,19 +4078,21 @@ it's much to simplistic to be passed off as a code syntax highlighter.
|
|
3794
4078
|
If you want a full featured multi-language highlighter use the
|
3795
4079
|
<<X57,Source Code Highlighter Filter>>.
|
3796
4080
|
|
3797
|
-
|
3798
|
-
|
3799
|
-
|
3800
|
-
|
3801
|
-
|
3802
|
-
|
3803
|
-
|
3804
|
-
|
3805
|
-
|
3806
|
-
|
3807
|
-
|
3808
|
-
|
3809
|
-
|
4081
|
+
---------------------------------------------------------------------
|
4082
|
+
.Code filter example
|
4083
|
+
[code,python]
|
4084
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
4085
|
+
''' A multi-line
|
4086
|
+
comment.'''
|
4087
|
+
def sub_word(mo):
|
4088
|
+
''' Single line comment.'''
|
4089
|
+
word = mo.group('word') # Inline comment
|
4090
|
+
if word in keywords[language]:
|
4091
|
+
return quote + word + quote
|
4092
|
+
else:
|
4093
|
+
return word
|
4094
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
4095
|
+
---------------------------------------------------------------------
|
3810
4096
|
|
3811
4097
|
Outputs:
|
3812
4098
|
|
@@ -3868,9 +4154,9 @@ associated with generating and sequencing the toolchain commands and
|
|
3868
4154
|
managing intermediate and output files. a2x(1) also optionally
|
3869
4155
|
deploys admonition and navigation icons and a CSS stylesheet. See the
|
3870
4156
|
`a2x(1)` man page for more details. All you need is
|
3871
|
-
<<X40,xsltproc(1)>>, <<X13,DocBook XSL Stylesheets>> and
|
3872
|
-
<<X31,dblatex>> or <<X14,FOP>> (if you want PDF)
|
3873
|
-
want text).
|
4157
|
+
<<X40,xsltproc(1)>>, <<X13,DocBook XSL Stylesheets>> and optionally:
|
4158
|
+
<<X31,dblatex>> or <<X14,FOP>> (if you want PDF); `w3m(1)` or
|
4159
|
+
`lynx(1)` (if you want text).
|
3874
4160
|
|
3875
4161
|
The following examples generate `doc/source-highlight-filter.pdf` from
|
3876
4162
|
the AsciiDoc `doc/source-highlight-filter.txt` source file. The first
|
@@ -3878,7 +4164,7 @@ example uses `dblatex(1)` (the default PDF generator) the second
|
|
3878
4164
|
example forces FOP to be used:
|
3879
4165
|
|
3880
4166
|
$ a2x -f pdf doc/source-highlight-filter.txt
|
3881
|
-
$ a2x -f pdf --fop
|
4167
|
+
$ a2x -f pdf --fop doc/source-highlight-filter.txt
|
3882
4168
|
|
3883
4169
|
See the `a2x(1)` man page for details.
|
3884
4170
|
|
@@ -4052,8 +4338,8 @@ composing your own configuration file `[header]` section).
|
|
4052
4338
|
TIP: If you get an 'undefined entity' error when processing DocBook
|
4053
4339
|
files you'll may find that you've used an undefined HTML character
|
4054
4340
|
entity. An easy (although inelegant) fix is to use the character's
|
4055
|
-
character code instead of its symbolic name (for example use
|
4056
|
-
instead of
|
4341
|
+
character code instead of its symbolic name (for example use `\ `
|
4342
|
+
instead of `\ `).
|
4057
4343
|
|
4058
4344
|
If your system has been configured with an XML catalog you may find a
|
4059
4345
|
number of entity sets are already automatically included.
|
@@ -4070,7 +4356,7 @@ Non-standard fonts should be embedded in the distributed document.
|
|
4070
4356
|
[[X36]]
|
4071
4357
|
Help Commands
|
4072
4358
|
-------------
|
4073
|
-
The asciidoc(1) command has a
|
4359
|
+
The asciidoc(1) command has a `--help` option which prints help topics
|
4074
4360
|
to stdout. The default topic summarizes asciidoc(1) usage:
|
4075
4361
|
|
4076
4362
|
$ asciidoc --help
|
@@ -4101,7 +4387,7 @@ The help topic files have the same named section format as other
|
|
4101
4387
|
same locations and loaded in the same order as other configuration
|
4102
4388
|
files.
|
4103
4389
|
|
4104
|
-
When the
|
4390
|
+
When the `--help` command-line option is specified AsciiDoc loads the
|
4105
4391
|
appropriate help files and then prints the contents of the section
|
4106
4392
|
whose name matches the help topic name. If a topic name is not
|
4107
4393
|
specified `default` is used. You don't need to specify the whole help
|
@@ -4141,9 +4427,9 @@ Execute `:help gq` command to read about the vim gq command.
|
|
4141
4427
|
=====================================================================
|
4142
4428
|
- Assign the `gq}` command to the Q key with the `nnoremap Q gq}`
|
4143
4429
|
command or put it in your `\~/.vimrc` file to so it's always
|
4144
|
-
available (see the <<X61, Example
|
4145
|
-
- Put `set` commands in your
|
4146
|
-
enter them manually
|
4430
|
+
available (see the <<X61, Example `~/.vimrc` file>>).
|
4431
|
+
- Put `set` commands in your `~/.vimrc` file so you don't have to
|
4432
|
+
enter them manually.
|
4147
4433
|
- The Vim website (http://www.vim.org) has a wealth of resources,
|
4148
4434
|
including scripts for automated spell checking and ASCII Art
|
4149
4435
|
drawing.
|
@@ -4152,9 +4438,9 @@ Execute `:help gq` command to read about the vim gq command.
|
|
4152
4438
|
|
4153
4439
|
Format Lists
|
4154
4440
|
^^^^^^^^^^^^
|
4155
|
-
The `gq` command can also be used to format bulleted and
|
4156
|
-
lists. First you need to set the `comments
|
4157
|
-
the <<X61, Example
|
4441
|
+
The `gq` command can also be used to format bulleted, numbered and
|
4442
|
+
callout lists. First you need to set the `comments`, `formatoptions`
|
4443
|
+
and `formatlistpat` (see the <<X61, Example `~/.vimrc` file>>).
|
4158
4444
|
|
4159
4445
|
Now you can format simple lists that use dash, asterisk, period and
|
4160
4446
|
plus bullets along with numbered ordered lists:
|
@@ -4168,8 +4454,8 @@ Indent whole paragraphs by indenting the fist line with the desired
|
|
4168
4454
|
indent and then executing the `gq}` command.
|
4169
4455
|
|
4170
4456
|
[[X61]]
|
4171
|
-
Example
|
4172
|
-
|
4457
|
+
Example `~/.vimrc` File
|
4458
|
+
^^^^^^^^^^^^^^^^^^^^^^^
|
4173
4459
|
---------------------------------------------------------------------
|
4174
4460
|
" Show tabs and trailing characters.
|
4175
4461
|
set listchars=tab:»·,trail:·
|
@@ -4191,6 +4477,7 @@ nnoremap W :%s/[\r \t]\+$//<CR>:set et<CR>:retab!<CR>
|
|
4191
4477
|
autocmd BufRead,BufNewFile *.txt,README,TODO,CHANGELOG,NOTES
|
4192
4478
|
\ setlocal autoindent expandtab tabstop=8 softtabstop=2 shiftwidth=2
|
4193
4479
|
\ textwidth=70 wrap formatoptions=tcqn
|
4480
|
+
\ formatlistpat=^\\s*<\\?\\d\\+[\\]:.)}\\t\ >]\\s*
|
4194
4481
|
\ comments=s1:/*,ex:*/,://,b:#,:%,:XCOMM,fb:-,fb:*,fb:+,fb:.,fb:>
|
4195
4482
|
---------------------------------------------------------------------
|
4196
4483
|
|
@@ -4245,12 +4532,6 @@ Ambiguous ordered list items::
|
|
4245
4532
|
The 'list item out of sequence' warning makes it unlikely that this
|
4246
4533
|
problem will go unnoticed.
|
4247
4534
|
|
4248
|
-
Escaping inside DSV table data::
|
4249
|
-
Delimiter separated text uses C style backslash escape sequences.
|
4250
|
-
If you want to enter a backslash (for example, to escape AsciiDoc
|
4251
|
-
text formatting or an inline macro) you need to escape it by
|
4252
|
-
entering two backslashes.
|
4253
|
-
|
4254
4535
|
Special characters in attribute values::
|
4255
4536
|
Special character substitution precedes attribute substitution so
|
4256
4537
|
if attribute values contain special characters you may, depending
|
@@ -4427,7 +4708,7 @@ to using style sheets.
|
|
4427
4708
|
Closing Open Sections
|
4428
4709
|
~~~~~~~~~~~~~~~~~~~~~
|
4429
4710
|
You can close off section tags up to level `N` by calling the
|
4430
|
-
|
4711
|
+
`eval::[Section.setlevel(N)]` system macro. This is useful if you
|
4431
4712
|
want to include a section composed of raw markup. The following
|
4432
4713
|
example includes a DocBook glossary division at the top section level
|
4433
4714
|
(level 0):
|
@@ -4467,20 +4748,21 @@ formed.
|
|
4467
4748
|
|
4468
4749
|
Glossary
|
4469
4750
|
--------
|
4470
|
-
[
|
4751
|
+
[glossary]
|
4752
|
+
[[X8]] Block element::
|
4471
4753
|
An AsciiDoc block element is a document entity composed of one or
|
4472
4754
|
more whole lines of text.
|
4473
4755
|
|
4474
|
-
[[X34]] Inline element
|
4756
|
+
[[X34]] Inline element::
|
4475
4757
|
AsciiDoc inline elements occur within block element textual
|
4476
4758
|
content, they perform formatting and substitution tasks.
|
4477
4759
|
|
4478
|
-
Formal element
|
4760
|
+
Formal element::
|
4479
4761
|
An AsciiDoc block element that has a BlockTitle. Formal elements
|
4480
4762
|
are normally listed in front or back matter, for example lists of
|
4481
4763
|
tables, examples and figures.
|
4482
4764
|
|
4483
|
-
Verbatim element
|
4765
|
+
Verbatim element::
|
4484
4766
|
The word verbatim indicates that white space and line breaks in
|
4485
4767
|
the source document are to be preserved in the output document.
|
4486
4768
|
|
@@ -4495,11 +4777,11 @@ Version 7 to version 8
|
|
4495
4777
|
matched text with backslashes.
|
4496
4778
|
- The index entry inline macro syntax has changed -- if your documents
|
4497
4779
|
include indexes you may need to edit them.
|
4498
|
-
- Replaced a2x(1)
|
4499
|
-
negated equivalents:
|
4780
|
+
- Replaced a2x(1) `--no-icons` and `--no-copy` options with their
|
4781
|
+
negated equivalents: `--icons` and `--copy` respectively. The
|
4500
4782
|
default behavior has also changed -- the use of icons and copying of
|
4501
|
-
icon and CSS files must be specified explicitly with the
|
4502
|
-
and
|
4783
|
+
icon and CSS files must be specified explicitly with the `--icons`
|
4784
|
+
and `--copy` options.
|
4503
4785
|
|
4504
4786
|
The rationale for the changes can be found in the AsciiDoc
|
4505
4787
|
`CHANGELOG`.
|
@@ -4509,78 +4791,13 @@ constrained quotes syntax and the new index entry syntax then you can
|
|
4509
4791
|
define the attribute `asciidoc7compatible` (for example by using the
|
4510
4792
|
`-a asciidoc7compatible` command-line option).
|
4511
4793
|
|
4512
|
-
[[X32]]
|
4513
|
-
Version 6 to version 7
|
4514
|
-
~~~~~~~~~~~~~~~~~~~~~~
|
4515
|
-
The changes that affect the most users relate to renamed and
|
4516
|
-
deprecated backends and command-line syntax:
|
4517
|
-
|
4518
|
-
. The 'html' backend has been renamed 'html4'.
|
4519
|
-
. The 'xhtml' backend has been deprecated to 'xhtml-deprecated' (use
|
4520
|
-
the new 'xhtml11' backend in preference).
|
4521
|
-
. The use of CSS specific `css` and `css-embedded` backends has been
|
4522
|
-
dropped in favor of using attributes (see the table below and
|
4523
|
-
<<X33,xhtml backend attributes>>).
|
4524
|
-
. Deprecated features that emitted warnings in prior versions are no
|
4525
|
-
longer tolerated.
|
4526
|
-
. The command-line syntax for deleting (undefining) an attribute has
|
4527
|
-
changed from `-a ^name` to `-a name!`.
|
4528
|
-
|
4529
|
-
.Equivalent command-line syntax
|
4530
|
-
[grid="all"]
|
4531
|
-
```~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
4532
|
-
Version 6 (old),Version 7 (new),Version 7 (backward compatible)
|
4533
|
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
4534
|
-
-b html,-b html4,-b html4
|
4535
|
-
-b css,-b xhtml11 -a linkcss -a icons,-b xhtml-deprecated -a css -a linkcss -a icons
|
4536
|
-
-b css-embedded,-b xhtml11 -a icons,-b xhtml-deprecated -a css -a icons
|
4537
|
-
-b xhtml,-b xhtml11,-b xhtml-deprecated
|
4538
|
-
-b docbook-sgml,-b docbook -a sgml,-b docbook -a sgml
|
4539
|
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
4540
|
-
|
4541
|
-
If you've customized version 6 distribution stylesheets then you'll
|
4542
|
-
need to either bring them in line with the new
|
4543
|
-
`./stylesheets/xhtml11*.css` class and id names or stick with the
|
4544
|
-
backward compatible `xhtml-deprecated` backend.
|
4545
|
-
|
4546
|
-
Changes to configuration file syntax:
|
4547
|
-
|
4548
|
-
. To undefine an attribute in the `[attributes]` section use `name!`
|
4549
|
-
instead of `name` (`name` now sets that attribute to a blank
|
4550
|
-
string).
|
4551
|
-
|
4552
|
-
|
4553
4794
|
[[X38]]
|
4554
4795
|
Appendix B: Packager Notes
|
4555
4796
|
---------------------------
|
4556
4797
|
Read the `README` and `INSTALL` files (in the distribution root
|
4557
|
-
directory) for install prerequisites and procedures.
|
4558
|
-
|
4559
|
-
|
4560
|
-
installation procedure and is the definitive installation description.
|
4561
|
-
Here's a summary of the installation procedure:
|
4562
|
-
|
4563
|
-
- Unpack entire distribution tarball to `/usr/share/asciidoc/`.
|
4564
|
-
- Move `asciidoc.py` to `/usr/bin/`; rename to `asciidoc`; if
|
4565
|
-
necessary modify shebang line; ensure executable permissions are
|
4566
|
-
set.
|
4567
|
-
- Move `a2x` to `/usr/bin/`; if necessary modify shebang line; ensure
|
4568
|
-
executable permissions are set.
|
4569
|
-
- Move the `./*.conf` files to `/etc/asciidoc/`.
|
4570
|
-
- Move `./filters/{\*.conf,*.py}` to `/etc/asciidoc/filters/`.
|
4571
|
-
- Move `./docbook-xsl/*.xsl` to `/etc/asciidoc/docbook-xsl/`.
|
4572
|
-
- Move `./dblatex/*.{xsl,sty}` to `/etc/asciidoc/dblatex/`.
|
4573
|
-
- Copy `./stylesheets/*.css` to `/etc/asciidoc/stylesheets/`.
|
4574
|
-
- Copy `./javascripts/*.js` to `/etc/asciidoc/javascripts/`.
|
4575
|
-
- Copy `./images/icons/*` to `/etc/asciidoc/images/icons/`
|
4576
|
-
(recursively including the `icons` subdirectory and its contents).
|
4577
|
-
- Compress the asciidoc(1) and ax2(1) man pages (`./doc/*.1`) with
|
4578
|
-
gzip(1) and move them to `/usr/share/man/man1/`.
|
4579
|
-
- If Vim is installed then install Vim syntax and filetype detection
|
4580
|
-
files.
|
4581
|
-
|
4582
|
-
Leaving stylesheets and images in `/usr/share/asciidoc/` ensures the
|
4583
|
-
docs and example website are not broken.
|
4798
|
+
directory) for install prerequisites and procedures. The distribution
|
4799
|
+
`Makefile.in` (used by `configure` to generate the `Makefile`) is the
|
4800
|
+
canonical installation procedure.
|
4584
4801
|
|
4585
4802
|
|
4586
4803
|
[[X39]]
|
@@ -4646,43 +4863,7 @@ you need to be aware of:
|
|
4646
4863
|
format.
|
4647
4864
|
|
4648
4865
|
|
4649
|
-
Appendix E:
|
4650
|
-
-------------------------------
|
4651
|
-
http://www1.chapman.edu/~jipsen/mathml/asciimath.html[ASCIIMathML] is
|
4652
|
-
a clever JavaScript written by Peter Jipsen that transforms
|
4653
|
-
mathematical formulae written in plain text to standard mathematical
|
4654
|
-
notation on an HTML page.
|
4655
|
-
|
4656
|
-
To enable ASCIIMathML support on the `xhtml11` backend include the `-a
|
4657
|
-
asciimath` command-line option. Here's what the `asciimath` attribute
|
4658
|
-
does:
|
4659
|
-
|
4660
|
-
- Embeds the `ASCIIMathML.js` script in the output document (links it
|
4661
|
-
if `-a linkcss` has been specified).
|
4662
|
-
- Escapes ASCIIMathML delimiters.
|
4663
|
-
|
4664
|
-
When entering ASCIIMathML formulas you *must* enclose them inside
|
4665
|
-
<<X50,double-dollar passthroughs>> (this is necessary because
|
4666
|
-
ASCIIMathML characters clash with AsciiDoc formatting characters). The
|
4667
|
-
double-dollar passthrough has the bonus of also escaping special
|
4668
|
-
characters so the output document is valid XHTML. You can see an
|
4669
|
-
ASCIIMathML example at
|
4670
|
-
http://www.methods.co.nz/asciidoc/asciimath.html, the same example
|
4671
|
-
can be found in the AsciiDoc distribution `./doc` directory.
|
4672
|
-
|
4673
|
-
[NOTE]
|
4674
|
-
=====================================================================
|
4675
|
-
- See the
|
4676
|
-
http://www1.chapman.edu/~jipsen/mathml/asciimath.html[ASCIIMathML]
|
4677
|
-
website for ASCIIMathML documentation and the latest version.
|
4678
|
-
- If you use Mozilla you need to install the
|
4679
|
-
http://www.mozilla.org/projects/mathml/fonts/[required math fonts].
|
4680
|
-
- If you use Microsoft Internet Explorer 6 you need to install
|
4681
|
-
http://www.dessci.com/en/products/mathplayer/[MathPlayer].
|
4682
|
-
=====================================================================
|
4683
|
-
|
4684
|
-
|
4685
|
-
Appendix F: Vim Syntax Highlighter
|
4866
|
+
Appendix E: Vim Syntax Highlighter
|
4686
4867
|
----------------------------------
|
4687
4868
|
The AsciiDoc `./vim/` distribution directory contains Vim syntax
|
4688
4869
|
highlighter and filetype detection scripts for AsciiDoc. Syntax
|
@@ -4718,17 +4899,8 @@ around the problems:
|
|
4718
4899
|
preceding blank lines, or putting a list continuation character
|
4719
4900
|
(`+`) in the preceding blank line.
|
4720
4901
|
|
4721
|
-
- Nested text formatting is highlighted according to the outer
|
4722
|
-
|
4723
|
-
- Most escaped inline elements will be highlighted.
|
4724
|
-
|
4725
|
-
- Unterminated quotes are highlighted, for example `'tis` would be
|
4726
|
-
seen as the start of emphasized text. As a damage control measure
|
4727
|
-
quoted text and macro attribute list containing quoted text always
|
4728
|
-
terminate at a blank line. This problem is usually ameliorated by
|
4729
|
-
the fact that characters such as `\~`, `+`, `^` and `_` will
|
4730
|
-
normally occur inside monospaced quotes (unless they are used for
|
4731
|
-
quoting), for example `~/projects`.
|
4902
|
+
- Nested quoted text formatting is highlighted according to the outer
|
4903
|
+
format.
|
4732
4904
|
|
4733
4905
|
- If a closing block delimiter is not preceded by a blank line it is
|
4734
4906
|
sometimes mistaken for a title underline. A workaround is to insert
|
@@ -4737,9 +4909,6 @@ around the problems:
|
|
4737
4909
|
- If a list block delimiter is mistaken for a title underline precede
|
4738
4910
|
it with a blank line.
|
4739
4911
|
|
4740
|
-
- Tables are terminated by a blank line -- use a space character on
|
4741
|
-
blank lines within your table.
|
4742
|
-
|
4743
4912
|
- Lines within a paragraph beginning with a period will be highlighted
|
4744
4913
|
as block titles. For example:
|
4745
4914
|
|
@@ -4755,3 +4924,37 @@ that appear blank but contain white space characters -- setting your
|
|
4755
4924
|
editor options so that white space characters are visible is a good
|
4756
4925
|
idea.
|
4757
4926
|
|
4927
|
+
|
4928
|
+
[[X74]]
|
4929
|
+
Appendix F: Attribute Options
|
4930
|
+
-----------------------------
|
4931
|
+
Here is the list of predefined <<X75,attribute list options>>:
|
4932
|
+
|
4933
|
+
|
4934
|
+
[cols="2,2,2,5",options="header"]
|
4935
|
+
|====================================================================
|
4936
|
+
|Option|Backends|AsciiDoc Elements|Description
|
4937
|
+
|
4938
|
+
|compact |docbook, xhtml11 |bulleted list, numbered list|
|
4939
|
+
Minimizes vertical space in the list
|
4940
|
+
|
4941
|
+
|strong |xhtml11,html4 |labeled lists|
|
4942
|
+
Emboldens label text.
|
4943
|
+
|
4944
|
+
|footer |docbook, xhtml11, html4 |table|
|
4945
|
+
The last row of the table is rendered as a footer.
|
4946
|
+
|
4947
|
+
|header |docbook, xhtml11, html4 |table|
|
4948
|
+
The first row of the table is rendered as a header.
|
4949
|
+
|
4950
|
+
|breakable, unbreakable |docbook (XSL/FO) |table|
|
4951
|
+
The 'breakable' options allows the table to break across page
|
4952
|
+
boundaries (the default behavior); 'unbreakable' attempts to keep the
|
4953
|
+
table together on a single page. If neither option is specified the
|
4954
|
+
default XSL stylesheet behavior prevails.
|
4955
|
+
|
4956
|
+
|pgwide |docbook (XSL/FO) |table, block image, horizontal labeled list|
|
4957
|
+
Specifies that the element should be rendered across the full text
|
4958
|
+
width of the page irrespective of the current indentation.
|
4959
|
+
|
4960
|
+
|====================================================================
|