mizuho 0.9.6
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE.txt +20 -0
- data/README.markdown +61 -0
- data/Rakefile +41 -0
- data/asciidoc/BUGS +39 -0
- data/asciidoc/BUGS.txt +32 -0
- data/asciidoc/CHANGELOG +1796 -0
- data/asciidoc/CHANGELOG.txt +1810 -0
- data/asciidoc/COPYING +339 -0
- data/asciidoc/COPYRIGHT +18 -0
- data/asciidoc/INSTALL +76 -0
- data/asciidoc/INSTALL.txt +71 -0
- data/asciidoc/Makefile.in +161 -0
- data/asciidoc/README +46 -0
- data/asciidoc/README.txt +36 -0
- data/asciidoc/a2x +674 -0
- data/asciidoc/asciidoc.conf +455 -0
- data/asciidoc/asciidoc.py +4998 -0
- data/asciidoc/common.aap +9 -0
- data/asciidoc/configure +2840 -0
- data/asciidoc/configure.ac +11 -0
- data/asciidoc/dblatex/asciidoc-dblatex.sty +20 -0
- data/asciidoc/dblatex/asciidoc-dblatex.xsl +32 -0
- data/asciidoc/dblatex/dblatex-readme.txt +39 -0
- data/asciidoc/doc/a2x.1 +257 -0
- data/asciidoc/doc/a2x.1.txt +204 -0
- data/asciidoc/doc/article.css-embedded.html +602 -0
- data/asciidoc/doc/article.html +46 -0
- data/asciidoc/doc/article.pdf +0 -0
- data/asciidoc/doc/article.txt +122 -0
- data/asciidoc/doc/asciidoc-revhistory.xml +27 -0
- data/asciidoc/doc/asciidoc.1 +155 -0
- data/asciidoc/doc/asciidoc.1.css-embedded.html +598 -0
- data/asciidoc/doc/asciidoc.1.css.html +212 -0
- data/asciidoc/doc/asciidoc.1.html +190 -0
- data/asciidoc/doc/asciidoc.1.txt +118 -0
- data/asciidoc/doc/asciidoc.conf +8 -0
- data/asciidoc/doc/asciidoc.css-embedded.html +7853 -0
- data/asciidoc/doc/asciidoc.css.html +7416 -0
- data/asciidoc/doc/asciidoc.dict +733 -0
- data/asciidoc/doc/asciidoc.html +3339 -0
- data/asciidoc/doc/asciidoc.txt +4979 -0
- data/asciidoc/doc/asciimathml.txt +64 -0
- data/asciidoc/doc/book-multi.css-embedded.html +575 -0
- data/asciidoc/doc/book-multi.html +55 -0
- data/asciidoc/doc/book-multi.txt +155 -0
- data/asciidoc/doc/book.css-embedded.html +607 -0
- data/asciidoc/doc/book.html +43 -0
- data/asciidoc/doc/book.txt +131 -0
- data/asciidoc/doc/customers.csv +18 -0
- data/asciidoc/doc/docbook-xsl.css +272 -0
- data/asciidoc/doc/faq.txt +547 -0
- data/asciidoc/doc/latex-backend.html +117 -0
- data/asciidoc/doc/latex-backend.txt +191 -0
- data/asciidoc/doc/latexmath.txt +244 -0
- data/asciidoc/doc/latexmathml.txt +41 -0
- data/asciidoc/doc/main.aap +297 -0
- data/asciidoc/doc/music-filter.html +566 -0
- data/asciidoc/doc/music-filter.pdf +0 -0
- data/asciidoc/doc/music-filter.txt +158 -0
- data/asciidoc/doc/source-highlight-filter.html +214 -0
- data/asciidoc/doc/source-highlight-filter.pdf +0 -0
- data/asciidoc/doc/source-highlight-filter.txt +203 -0
- data/asciidoc/docbook-xsl/asciidoc-docbook-xsl.txt +43 -0
- data/asciidoc/docbook-xsl/chunked.xsl +19 -0
- data/asciidoc/docbook-xsl/common.xsl +67 -0
- data/asciidoc/docbook-xsl/fo.xsl +149 -0
- data/asciidoc/docbook-xsl/htmlhelp.xsl +17 -0
- data/asciidoc/docbook-xsl/manpage.xsl +31 -0
- data/asciidoc/docbook-xsl/text.xsl +50 -0
- data/asciidoc/docbook-xsl/xhtml.xsl +14 -0
- data/asciidoc/docbook.conf +721 -0
- data/asciidoc/examples/website/ASCIIMathML.js +938 -0
- data/asciidoc/examples/website/CHANGELOG.html +4389 -0
- data/asciidoc/examples/website/CHANGELOG.txt +1810 -0
- data/asciidoc/examples/website/INSTALL.html +161 -0
- data/asciidoc/examples/website/INSTALL.txt +71 -0
- data/asciidoc/examples/website/LaTeXMathML.js +1223 -0
- data/asciidoc/examples/website/README-website.html +118 -0
- data/asciidoc/examples/website/README-website.txt +29 -0
- data/asciidoc/examples/website/README.html +125 -0
- data/asciidoc/examples/website/README.txt +36 -0
- data/asciidoc/examples/website/a2x.1.html +419 -0
- data/asciidoc/examples/website/a2x.1.txt +204 -0
- data/asciidoc/examples/website/asciidoc-docbook-xsl.html +130 -0
- data/asciidoc/examples/website/asciidoc-docbook-xsl.txt +43 -0
- data/asciidoc/examples/website/asciidoc-graphviz-sample.txt +130 -0
- data/asciidoc/examples/website/asciimathml.txt +64 -0
- data/asciidoc/examples/website/build-website.sh +25 -0
- data/asciidoc/examples/website/customers.csv +18 -0
- data/asciidoc/examples/website/downloads.html +257 -0
- data/asciidoc/examples/website/downloads.txt +121 -0
- data/asciidoc/examples/website/faq.html +673 -0
- data/asciidoc/examples/website/faq.txt +547 -0
- data/asciidoc/examples/website/index.html +419 -0
- data/asciidoc/examples/website/index.txt +245 -0
- data/asciidoc/examples/website/latex-backend.html +535 -0
- data/asciidoc/examples/website/latex-backend.txt +191 -0
- data/asciidoc/examples/website/latexmathml.txt +41 -0
- data/asciidoc/examples/website/layout1.conf +161 -0
- data/asciidoc/examples/website/layout1.css +65 -0
- data/asciidoc/examples/website/layout2.conf +158 -0
- data/asciidoc/examples/website/layout2.css +93 -0
- data/asciidoc/examples/website/manpage.html +266 -0
- data/asciidoc/examples/website/manpage.txt +118 -0
- data/asciidoc/examples/website/music-filter.html +242 -0
- data/asciidoc/examples/website/music-filter.txt +158 -0
- data/asciidoc/examples/website/music1.abc +12 -0
- data/asciidoc/examples/website/music1.png +0 -0
- data/asciidoc/examples/website/music2.ly +9 -0
- 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/sample1.png +0 -0
- data/asciidoc/examples/website/sample3.png +0 -0
- data/asciidoc/examples/website/sample4.png +0 -0
- data/asciidoc/examples/website/source-highlight-filter.html +286 -0
- data/asciidoc/examples/website/source-highlight-filter.txt +203 -0
- data/asciidoc/examples/website/support.html +78 -0
- data/asciidoc/examples/website/support.txt +5 -0
- data/asciidoc/examples/website/toc.js +69 -0
- data/asciidoc/examples/website/userguide.html +7460 -0
- data/asciidoc/examples/website/userguide.txt +4979 -0
- data/asciidoc/examples/website/version83.txt +37 -0
- data/asciidoc/examples/website/version9.html +143 -0
- data/asciidoc/examples/website/version9.txt +48 -0
- data/asciidoc/examples/website/xhtml11-manpage.css +18 -0
- data/asciidoc/examples/website/xhtml11-quirks.css +41 -0
- data/asciidoc/examples/website/xhtml11.css +328 -0
- data/asciidoc/filters/code/code-filter-readme.txt +37 -0
- data/asciidoc/filters/code/code-filter-test.txt +15 -0
- data/asciidoc/filters/code/code-filter.conf +8 -0
- data/asciidoc/filters/code/code-filter.py +239 -0
- data/asciidoc/filters/graphviz/asciidoc-graphviz-sample.txt +130 -0
- data/asciidoc/filters/graphviz/graphviz-filter.conf +39 -0
- data/asciidoc/filters/graphviz/graphviz2png.py +154 -0
- data/asciidoc/filters/music/music-filter-test.txt +40 -0
- data/asciidoc/filters/music/music-filter.conf +40 -0
- data/asciidoc/filters/music/music2png.py +189 -0
- data/asciidoc/filters/source/source-highlight-filter-test.txt +19 -0
- data/asciidoc/filters/source/source-highlight-filter.conf +108 -0
- data/asciidoc/help.conf +213 -0
- data/asciidoc/html4.conf +460 -0
- data/asciidoc/images/highlighter.png +0 -0
- data/asciidoc/images/icons/README +5 -0
- data/asciidoc/images/icons/callouts/1.png +0 -0
- data/asciidoc/images/icons/callouts/10.png +0 -0
- data/asciidoc/images/icons/callouts/11.png +0 -0
- data/asciidoc/images/icons/callouts/12.png +0 -0
- data/asciidoc/images/icons/callouts/13.png +0 -0
- data/asciidoc/images/icons/callouts/14.png +0 -0
- data/asciidoc/images/icons/callouts/15.png +0 -0
- data/asciidoc/images/icons/callouts/2.png +0 -0
- data/asciidoc/images/icons/callouts/3.png +0 -0
- data/asciidoc/images/icons/callouts/4.png +0 -0
- data/asciidoc/images/icons/callouts/5.png +0 -0
- data/asciidoc/images/icons/callouts/6.png +0 -0
- data/asciidoc/images/icons/callouts/7.png +0 -0
- data/asciidoc/images/icons/callouts/8.png +0 -0
- data/asciidoc/images/icons/callouts/9.png +0 -0
- data/asciidoc/images/icons/caution.png +0 -0
- data/asciidoc/images/icons/example.png +0 -0
- data/asciidoc/images/icons/home.png +0 -0
- data/asciidoc/images/icons/important.png +0 -0
- data/asciidoc/images/icons/next.png +0 -0
- data/asciidoc/images/icons/note.png +0 -0
- data/asciidoc/images/icons/prev.png +0 -0
- data/asciidoc/images/icons/tip.png +0 -0
- data/asciidoc/images/icons/up.png +0 -0
- data/asciidoc/images/icons/warning.png +0 -0
- data/asciidoc/images/smallnew.png +0 -0
- data/asciidoc/images/tiger.png +0 -0
- data/asciidoc/install-sh +201 -0
- data/asciidoc/javascripts/ASCIIMathML.js +938 -0
- data/asciidoc/javascripts/LaTeXMathML.js +1223 -0
- data/asciidoc/javascripts/toc.js +69 -0
- data/asciidoc/lang-es.conf +15 -0
- data/asciidoc/latex.conf +663 -0
- data/asciidoc/stylesheets/docbook-xsl.css +272 -0
- data/asciidoc/stylesheets/xhtml11-manpage.css +18 -0
- data/asciidoc/stylesheets/xhtml11-quirks.css +41 -0
- data/asciidoc/stylesheets/xhtml11.css +328 -0
- data/asciidoc/text.conf +16 -0
- data/asciidoc/vim/ftdetect/asciidoc_filetype.vim +53 -0
- data/asciidoc/vim/syntax/asciidoc.vim +165 -0
- data/asciidoc/wordpress.conf +48 -0
- data/asciidoc/xhtml11-quirks.conf +57 -0
- data/asciidoc/xhtml11.conf +645 -0
- data/bin/mizuho +47 -0
- data/bin/mizuho-asciidoc +4 -0
- data/lib/mizuho.rb +10 -0
- data/lib/mizuho/chapter.rb +54 -0
- data/lib/mizuho/generator.rb +134 -0
- data/lib/mizuho/heading.rb +46 -0
- data/lib/mizuho/parser.rb +103 -0
- data/lib/mizuho/source_highlight.rb +2 -0
- data/lib/mizuho/template.rb +50 -0
- data/source-highlight/ada.lang +38 -0
- data/source-highlight/bib.lang +6 -0
- data/source-highlight/bison.lang +3 -0
- data/source-highlight/c.lang +41 -0
- data/source-highlight/c_comment.lang +27 -0
- data/source-highlight/c_string.lang +9 -0
- data/source-highlight/caml.lang +16 -0
- data/source-highlight/changelog.lang +8 -0
- data/source-highlight/clike_vardeclaration.lang +4 -0
- data/source-highlight/cpp.lang +15 -0
- data/source-highlight/csharp.lang +36 -0
- data/source-highlight/css.lang +14 -0
- data/source-highlight/css_common.outlang +26 -0
- data/source-highlight/darwin/source-highlight +0 -0
- data/source-highlight/default.css +51 -0
- data/source-highlight/default.lang +8 -0
- data/source-highlight/default.style +57 -0
- data/source-highlight/desktop.lang +7 -0
- data/source-highlight/diff.lang +32 -0
- data/source-highlight/docbook.outlang +36 -0
- data/source-highlight/esc.outlang +46 -0
- data/source-highlight/esc.style +35 -0
- data/source-highlight/extreme_comment.lang +5 -0
- data/source-highlight/extreme_comment2.lang +5 -0
- data/source-highlight/extreme_comment3.lang +15 -0
- data/source-highlight/fixed-fortran.lang +5 -0
- data/source-highlight/flex.lang +37 -0
- data/source-highlight/fortran.lang +57 -0
- data/source-highlight/function.lang +2 -0
- data/source-highlight/glsl.lang +86 -0
- data/source-highlight/haxe.lang +7 -0
- data/source-highlight/html.lang +7 -0
- data/source-highlight/html.outlang +25 -0
- data/source-highlight/html_common.outlang +35 -0
- data/source-highlight/html_notfixed.outlang +22 -0
- data/source-highlight/html_ref.outlang +6 -0
- data/source-highlight/htmlcss.outlang +28 -0
- data/source-highlight/htmltable.outlang +14 -0
- data/source-highlight/htmltablelinenum.outlang +26 -0
- data/source-highlight/java.lang +26 -0
- data/source-highlight/javadoc.outlang +24 -0
- data/source-highlight/javascript.lang +27 -0
- data/source-highlight/key_string.lang +4 -0
- data/source-highlight/lang.map +108 -0
- data/source-highlight/langdef.lang +21 -0
- data/source-highlight/latex.lang +52 -0
- data/source-highlight/latex.outlang +59 -0
- data/source-highlight/latexcolor.outlang +44 -0
- data/source-highlight/ldap.lang +10 -0
- data/source-highlight/log.lang +53 -0
- data/source-highlight/logtalk.lang +85 -0
- data/source-highlight/lsm.lang +7 -0
- data/source-highlight/lua.lang +27 -0
- data/source-highlight/m4.lang +27 -0
- data/source-highlight/makefile.lang +42 -0
- data/source-highlight/nohilite.lang +2 -0
- data/source-highlight/number.lang +3 -0
- data/source-highlight/outlang.lang +16 -0
- data/source-highlight/outlang.map +12 -0
- data/source-highlight/pascal.lang +20 -0
- data/source-highlight/perl.lang +134 -0
- data/source-highlight/php.lang +25 -0
- data/source-highlight/postscript.lang +42 -0
- data/source-highlight/prolog.lang +37 -0
- data/source-highlight/properties.lang +7 -0
- data/source-highlight/python.lang +26 -0
- data/source-highlight/ruby.lang +32 -0
- data/source-highlight/scala.lang +31 -0
- data/source-highlight/script_comment.lang +3 -0
- data/source-highlight/sh.lang +38 -0
- data/source-highlight/slang.lang +25 -0
- data/source-highlight/sml.lang +5 -0
- data/source-highlight/source-highlight +24 -0
- data/source-highlight/spec.lang +12 -0
- data/source-highlight/sql.lang +46 -0
- data/source-highlight/style.defaults +15 -0
- data/source-highlight/style.lang +16 -0
- data/source-highlight/style2.style +10 -0
- data/source-highlight/style3.style +10 -0
- data/source-highlight/symbols.lang +2 -0
- data/source-highlight/tcl.lang +35 -0
- data/source-highlight/texinfo.outlang +34 -0
- data/source-highlight/texinfo.style +20 -0
- data/source-highlight/url.lang +3 -0
- data/source-highlight/xhtml.outlang +25 -0
- data/source-highlight/xhtml_common.outlang +8 -0
- data/source-highlight/xhtml_notfixed.outlang +16 -0
- data/source-highlight/xhtmlcss.outlang +19 -0
- data/source-highlight/xhtmltable.outlang +7 -0
- data/source-highlight/xml.lang +17 -0
- data/source-highlight/xorg.lang +10 -0
- data/templates/asciidoc.css +358 -0
- data/templates/asciidoc.html.erb +86 -0
- data/templates/manualsonrails.css +165 -0
- data/templates/manualsonrails.html.erb +97 -0
- data/test/generator_spec.rb +60 -0
- data/test/parser_spec.rb +239 -0
- data/test/spec_helper.rb +51 -0
- metadata +358 -0
@@ -0,0 +1,547 @@
|
|
1
|
+
AsciiDoc Frequently Asked Questions
|
2
|
+
===================================
|
3
|
+
|
4
|
+
An embryonic AsciiDoc FAQ.
|
5
|
+
|
6
|
+
|
7
|
+
== Is it possible to include charts in AsciiDoc documents?
|
8
|
+
|
9
|
+
There are a number of programs available that generate presentation
|
10
|
+
charts from textual specification, for example
|
11
|
+
http://home.gna.org/pychart/[Pychart] is a library for writing chart
|
12
|
+
scripts in Python. Here's an example from the 'Pychart' documentation:
|
13
|
+
|
14
|
+
.barchart.py
|
15
|
+
---------------------------------------------------------------------
|
16
|
+
#
|
17
|
+
# Example bar chart (from Pychart documentation http://home.gna.org/pychart/).
|
18
|
+
#
|
19
|
+
from pychart import *
|
20
|
+
theme.get_options()
|
21
|
+
|
22
|
+
data = [(10, 20, 30, 5), (20, 65, 33, 5), (30, 55, 30, 5), (40, 45, 51, 7),
|
23
|
+
(50, 25, 27, 3), (60, 75, 30, 5), (70, 80, 42, 5), (80, 62, 32, 5),
|
24
|
+
(90, 42, 39, 5), (100, 32, 39, 4)]
|
25
|
+
|
26
|
+
# The attribute y_coord=... tells that the Y axis values
|
27
|
+
# should be taken from samples.
|
28
|
+
# In this example, Y values will be [40,50,60,70,80].
|
29
|
+
ar = area.T(y_coord = category_coord.T(data[3:8], 0),
|
30
|
+
x_grid_style=line_style.gray50_dash1,
|
31
|
+
x_grid_interval=20, x_range = (0,100),
|
32
|
+
x_axis=axis.X(label="X label"),
|
33
|
+
y_axis=axis.Y(label="Y label"),
|
34
|
+
bg_style = fill_style.gray90,
|
35
|
+
border_line_style = line_style.default,
|
36
|
+
legend = legend.T(loc=(80,10)))
|
37
|
+
|
38
|
+
# Below call sets the default attributes for all bar plots.
|
39
|
+
chart_object.set_defaults(bar_plot.T, direction="horizontal", data=data)
|
40
|
+
|
41
|
+
# Attribute cluster=(0,3) tells that you are going to draw three bar
|
42
|
+
# plots side by side. The plot labeled "foo" will the leftmost (i.e.,
|
43
|
+
# 0th out of 3). Attribute hcol tells the column from which to
|
44
|
+
# retrive sample values from. It defaults to one.
|
45
|
+
ar.add_plot(bar_plot.T(label="foo", cluster=(0,3)))
|
46
|
+
ar.add_plot(bar_plot.T(label="bar", hcol=2, cluster=(1,3)))
|
47
|
+
ar.add_plot(bar_plot.T(label="baz", hcol=3, cluster=(2,3)))
|
48
|
+
ar.draw()
|
49
|
+
---------------------------------------------------------------------
|
50
|
+
|
51
|
+
To execute the script and include the generated chart image in your
|
52
|
+
document add the following lines to the AsciiDoc source:
|
53
|
+
|
54
|
+
---------------------------------------------------------------------
|
55
|
+
// Generate chart image file.
|
56
|
+
\sys2::[python barchart.py --format=png --output=barchart.png --scale=2]
|
57
|
+
|
58
|
+
// Display chart image file.
|
59
|
+
image::barchart.png[]
|
60
|
+
---------------------------------------------------------------------
|
61
|
+
|
62
|
+
NOTE: You need to run asciidoc(1) with the `--unsafe` command-line
|
63
|
+
option to execute the `sys2` system macro.
|
64
|
+
|
65
|
+
|
66
|
+
== How can I render indented paragraphs?
|
67
|
+
|
68
|
+
To unconditionally indent all paragraphs add the following line to the
|
69
|
+
`xhtml11.css` stylesheet (or a custom stylesheet).
|
70
|
+
|
71
|
+
---------------------------------------------------------------------
|
72
|
+
div.paragraph p {text-indent: 3em;}
|
73
|
+
---------------------------------------------------------------------
|
74
|
+
|
75
|
+
This will restyle the entire document by indenting all paragraphs
|
76
|
+
which is normally what you want to do (mixed paragraph styles produce
|
77
|
+
ugly documents).
|
78
|
+
|
79
|
+
To selectively indent paragraphs with the 'indented' style add the
|
80
|
+
following line to the `xhtml11.css` stylesheet (or a custom
|
81
|
+
stylesheet).
|
82
|
+
|
83
|
+
---------------------------------------------------------------------
|
84
|
+
div.paragraph.indented p {text-indent: 3em;}
|
85
|
+
---------------------------------------------------------------------
|
86
|
+
|
87
|
+
Then apply the 'indented' style to normal paragraphs, for example:
|
88
|
+
|
89
|
+
---------------------------------------------------------------------
|
90
|
+
[indented]
|
91
|
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas
|
92
|
+
ultrices justo porttitor augue. Vestibulum pretium. Donec porta
|
93
|
+
vestibulum mi. Aliquam pede. Aenean lobortis lorem et lacus. Sed
|
94
|
+
lacinia. Vivamus at lectus.
|
95
|
+
---------------------------------------------------------------------
|
96
|
+
|
97
|
+
NOTE: This FAQ applies to XHTML output not DocBook. To achieve the
|
98
|
+
same results with DocBook you would need to customize the DocBook XSL
|
99
|
+
stylesheets to indent paragraphs with the `simpara` element
|
100
|
+
`role="indented"` attribute.
|
101
|
+
|
102
|
+
|
103
|
+
== Is there a way to set default image height and width attributes?
|
104
|
+
|
105
|
+
You can set the 'height' and 'width' attributes globally in your
|
106
|
+
document with Attribute Entries or from the command-line using the
|
107
|
+
`--attribute` option. In the following example images that don't
|
108
|
+
explicitly set the 'height' and 'width' values will be 350 by 250
|
109
|
+
pixels.
|
110
|
+
|
111
|
+
---------------------------------------------------------------------
|
112
|
+
:height: 250
|
113
|
+
:width: 350
|
114
|
+
|
115
|
+
image:images/tiger.png[]
|
116
|
+
---------------------------------------------------------------------
|
117
|
+
|
118
|
+
|
119
|
+
== How can I place a backslash character in front of an attribute reference without escaping the reference?
|
120
|
+
|
121
|
+
Use the predefined `\{backslash}` attribute reference instead of an
|
122
|
+
actual backslash, for example if the `\{projectname}` attribute has
|
123
|
+
the value `foobar` then:
|
124
|
+
|
125
|
+
d:\data{backslash}{projectname}
|
126
|
+
|
127
|
+
would be rendered as:
|
128
|
+
|
129
|
+
d:\data\foobar
|
130
|
+
|
131
|
+
== How can I escape AsciiDoc markup?
|
132
|
+
|
133
|
+
Most AsciiDoc inline elements can be suppressed by preceding them with
|
134
|
+
a backslash character. These elements include:
|
135
|
+
|
136
|
+
- Attribute references.
|
137
|
+
- Text formatting.
|
138
|
+
- Quoting,
|
139
|
+
- Macros.
|
140
|
+
- Replacements.
|
141
|
+
- Special words.
|
142
|
+
- Table cell separators.
|
143
|
+
|
144
|
+
But there are exceptions -- see the next question.
|
145
|
+
|
146
|
+
|
147
|
+
== Some elements can't be escaped with a single backslash
|
148
|
+
|
149
|
+
There are a number of exceptions to the usual single backslash rule
|
150
|
+
-- mostly relating to URL macros that have two syntaxes or quoting
|
151
|
+
ambiguity. Here are some non-standard escape examples:
|
152
|
+
|
153
|
+
[cols="1default,4literal",width="70%",grid="none",frame="none"]
|
154
|
+
|====================================================================
|
155
|
+
|Mailto URLs |
|
156
|
+
\srackham@methods.co.nz
|
157
|
+
<\srackham@methods.co.nz>
|
158
|
+
\mailto:[\srackham@methods.co.nz]
|
159
|
+
|
160
|
+
|Web URLs |
|
161
|
+
\http://www.foo1.co.nz
|
162
|
+
\\http://www.foobar.com[]
|
163
|
+
\\http://www.foobar.com[Foobar Limited]
|
164
|
+
|
165
|
+
|Other |
|
166
|
+
A C+\+ Library for C++
|
167
|
+
A C+\+ Library for C+\+ \+++
|
168
|
+
\\``double-quotes''
|
169
|
+
\*\*F**ile Open...
|
170
|
+
|====================================================================
|
171
|
+
|
172
|
+
The source of this problem is ambiguity across substitution types --
|
173
|
+
the first match unescapes allowing the second to substitute. A
|
174
|
+
work-around for difficult cases is to side-step the problem using the
|
175
|
+
`\pass:[]` passthrough inline macro.
|
176
|
+
|
177
|
+
|
178
|
+
== How can I set default list and tables styles?
|
179
|
+
|
180
|
+
You can set the element's 'style' entry in a global or custom
|
181
|
+
configuration file.
|
182
|
+
|
183
|
+
This example this will horizontally style all labeled lists that don't
|
184
|
+
have an explicit style attribute:
|
185
|
+
|
186
|
+
----------------------------------
|
187
|
+
[listdef-labeled]
|
188
|
+
style=horizontal
|
189
|
+
|
190
|
+
[listdef-labeled2]
|
191
|
+
style=horizontal
|
192
|
+
----------------------------------
|
193
|
+
|
194
|
+
This example will put a top and bottom border on all tables that don't
|
195
|
+
already have an explicit style attribute:
|
196
|
+
|
197
|
+
----------------------------------
|
198
|
+
[tabledef-default]
|
199
|
+
style=topbot
|
200
|
+
topbot-style=frame="topbot"
|
201
|
+
----------------------------------
|
202
|
+
|
203
|
+
Alternatively you can set the configuration entries from inside your
|
204
|
+
document, the above examples are equivalent to:
|
205
|
+
|
206
|
+
----------------------------------
|
207
|
+
:listdef-labeled.style: horizontal
|
208
|
+
:listdef-labeled2.style: horizontal
|
209
|
+
|
210
|
+
:tabledef-default.topbot-style: frame="topbot"
|
211
|
+
:tabledef-default.style: topbot
|
212
|
+
----------------------------------
|
213
|
+
|
214
|
+
|
215
|
+
== Why do I get a filter non-zero exit code error?
|
216
|
+
|
217
|
+
An error was returned when AsciiDoc tried to execute an external
|
218
|
+
filter command. The most common reason for this is that the filter
|
219
|
+
command could not be found by the command shell. To figure out what
|
220
|
+
the problem is run AsciiDoc with the `--verbose` option to determine
|
221
|
+
the command that is failing and then try to run the command manually
|
222
|
+
from the command-line.
|
223
|
+
|
224
|
+
|
225
|
+
== Are there any DocBook viewers?
|
226
|
+
|
227
|
+
http://live.gnome.org/Yelp[Yelp], the GNOME help viewer, does a
|
228
|
+
creditable job of displaying DocBook files XML files directly. Just
|
229
|
+
run it from the command-line, for example:
|
230
|
+
|
231
|
+
$ yelp file://home/srackham/tmp/book.xml
|
232
|
+
|
233
|
+
Note that you have to supply the full path name in URI format, this
|
234
|
+
shell script makes interactive use easier:
|
235
|
+
|
236
|
+
-------------------------------
|
237
|
+
#!/bin/sh
|
238
|
+
if [ -z "$1" ]; then
|
239
|
+
echo "usage: dbkview FILE"
|
240
|
+
exit 1
|
241
|
+
fi
|
242
|
+
yelp "file://$(pwd)/$1"
|
243
|
+
-------------------------------
|
244
|
+
|
245
|
+
This tip was submitted by Lionel Orry.
|
246
|
+
|
247
|
+
|
248
|
+
== Can you create ODF documents using AsciiDoc?
|
249
|
+
|
250
|
+
The easiest and highest fidelity methods I've seen is to generate
|
251
|
+
HTML from AsciiDoc then paste it from your browser (we use Firefox)
|
252
|
+
into OpenOffice Writer.
|
253
|
+
|
254
|
+
- I found that that there is better fidelity pasting HTML generated by
|
255
|
+
the 'html4' backend instead of the default 'xhtml11' backend.
|
256
|
+
- Don't paste AsciiDoc tables of contents, OpenOffice Writer (I was
|
257
|
+
using version 2.3) hangs when saving. This may be something to do
|
258
|
+
with the embedded JavaScript but I haven't looked closely at it, I
|
259
|
+
may even be wrong about this.
|
260
|
+
|
261
|
+
This tip was contributed by Bernard Amade.
|
262
|
+
|
263
|
+
|
264
|
+
== How can I supress cell separators in included table data files?
|
265
|
+
|
266
|
+
Use the `\{include:}` system attribute instead of the `\include::[]`
|
267
|
+
macro (the former is not expanded until after the table data has been
|
268
|
+
parsed into cells, whereas the latter is included before the table is
|
269
|
+
processed.
|
270
|
+
|
271
|
+
|
272
|
+
== How can I preserve paragraph line boundaries?
|
273
|
+
|
274
|
+
Apply the The 'verse' paragraph style, the rendered text preserves
|
275
|
+
line boundaries and is useful for lyrics and poems. For example:
|
276
|
+
|
277
|
+
---------------------------------------------------------------------
|
278
|
+
[verse]
|
279
|
+
Consul *necessitatibus* per id,
|
280
|
+
consetetur, eu pro everti postulant
|
281
|
+
homero verear ea mea, qui.
|
282
|
+
---------------------------------------------------------------------
|
283
|
+
|
284
|
+
If you are generating PDF files (using FOP) or HTML files then you can
|
285
|
+
use line breaks. For example:
|
286
|
+
|
287
|
+
---------------------------------------------------------------------
|
288
|
+
Consul *necessitatibus* per id, +
|
289
|
+
consetetur, eu pro everti postulant +
|
290
|
+
homero verear ea mea, qui.
|
291
|
+
---------------------------------------------------------------------
|
292
|
+
|
293
|
+
|
294
|
+
== How can I include non-breaking space characters?
|
295
|
+
|
296
|
+
The predefined `\{nbsp}` attribute reference will be replaced by a
|
297
|
+
non-breaking space character. You could also use the non-breaking
|
298
|
+
space character entity reference `\ ` (see the next question).
|
299
|
+
|
300
|
+
|
301
|
+
== Can I include HTML and XML character entity references in my document?
|
302
|
+
|
303
|
+
Yes, just enter the reference in your document. For example `\β`
|
304
|
+
will print a Greek small beta character β
|
305
|
+
|
306
|
+
|
307
|
+
[[X1]]
|
308
|
+
== How do I include spaces in URLs?
|
309
|
+
|
310
|
+
URL inline macro targets (addresses) cannot contain white space
|
311
|
+
characters. If you need spaces encode them as `%20`. For example:
|
312
|
+
|
313
|
+
image:large%20image.png[]
|
314
|
+
http://www.foo.bar.com/an%20example%20document.html
|
315
|
+
|
316
|
+
|
317
|
+
== How can I get AsciiDoc to assign the correct DocBook language attribute?
|
318
|
+
|
319
|
+
Set the AsciiDoc 'lang' attribute to the appropriate language code.
|
320
|
+
For example:
|
321
|
+
|
322
|
+
$ a2x -a lang=es doc/article.txt
|
323
|
+
|
324
|
+
This will ensure that downstream DocBook processing will generate the
|
325
|
+
correct language specific document headings (things like table of
|
326
|
+
contents, revision history, figure and table captions, admonition
|
327
|
+
captions).
|
328
|
+
|
329
|
+
|
330
|
+
== Why does AsciiDoc give me a ``malformed author'' error?
|
331
|
+
|
332
|
+
This is normally because there are more than three names (up to three
|
333
|
+
are expected: first name, middle name and last name). For example,
|
334
|
+
this author line would result in an error:
|
335
|
+
|
336
|
+
Vincent Willem van Gogh
|
337
|
+
|
338
|
+
You can enter multi-word first, middle and last names in the author
|
339
|
+
line using the underscore as a word separator. For example:
|
340
|
+
|
341
|
+
Vincent Willem van_Gogh
|
342
|
+
|
343
|
+
You could also resolve the problem by replacing the author line with
|
344
|
+
explicit attribute entries:
|
345
|
+
|
346
|
+
:First name: Vincent
|
347
|
+
:Middle name: Willem
|
348
|
+
:Last name: Van Gogh
|
349
|
+
|
350
|
+
|
351
|
+
== How can I assign multiple author names?
|
352
|
+
|
353
|
+
A quick way to do this is put both authors in a single first name, for
|
354
|
+
example:
|
355
|
+
|
356
|
+
My Document
|
357
|
+
===========
|
358
|
+
:Author: Bill_and_Ben_the_Flowerpot_Men
|
359
|
+
:Author Initials: BB & BC
|
360
|
+
|
361
|
+
asciidoc(1) replaces the underscores with spaces.
|
362
|
+
|
363
|
+
The longer, semantically correct, way is to override the
|
364
|
+
`[header]` configuration file section in a document specific `.conf`
|
365
|
+
file. For example if your document is `mydoc.txt` then a file called
|
366
|
+
`mydoc.conf` in the document directory would be picked up
|
367
|
+
automatically by asciidoc(1). Copy and paste the default
|
368
|
+
`docbook.conf` file `[header]` to `mydoc.conf` and modify the author
|
369
|
+
related markup:
|
370
|
+
|
371
|
+
[header]
|
372
|
+
:
|
373
|
+
<authorgroup>...
|
374
|
+
:
|
375
|
+
|
376
|
+
|
377
|
+
== How can I escape a labeled list entry?
|
378
|
+
|
379
|
+
Two colons or semicolons in a paragraph may be confused with a labeled
|
380
|
+
list entry. Use the predefined `\{two_colons}` and `\{two_semicolons}`
|
381
|
+
to suppress this behavior, for example:
|
382
|
+
|
383
|
+
Qui in magna commodo{two_colons} est labitur dolorum an. Est ne
|
384
|
+
magna primis adolescens.
|
385
|
+
|
386
|
+
Will be rendered as:
|
387
|
+
|
388
|
+
Qui in magna commodo{two_colons} est labitur dolorum an. Est ne
|
389
|
+
magna primis adolescens.
|
390
|
+
|
391
|
+
|
392
|
+
== How can I selectively disable a quoted text substitution?
|
393
|
+
|
394
|
+
Omitting the tag name will disable quoting. For example, if you don't
|
395
|
+
want superscripts or subscripts then put the following in a custom
|
396
|
+
configuration file or edit the global `asciidoc.conf` configuration
|
397
|
+
file:
|
398
|
+
|
399
|
+
-------------------
|
400
|
+
[quotes]
|
401
|
+
^=
|
402
|
+
~=
|
403
|
+
-------------------
|
404
|
+
|
405
|
+
Alternatively you can set the configuration entries from within your
|
406
|
+
document, the above examples are equivalent to:
|
407
|
+
|
408
|
+
-------------------
|
409
|
+
:quotes.^:
|
410
|
+
:quotes.~:
|
411
|
+
-------------------
|
412
|
+
|
413
|
+
|
414
|
+
== How can I customize the \{localdate} format?
|
415
|
+
|
416
|
+
The default format for the `\{localdate}` attribute is the ISO 8601
|
417
|
+
`yyyy-mm-dd` format. You can change this format by explicitly setting
|
418
|
+
the `\{localdate}` attribute. For example by setting it using the
|
419
|
+
asciidoc(1) `-a` command-line option:
|
420
|
+
|
421
|
+
$ asciidoc -a localdate=`date +%d-%d-%Y` mydoc.txt
|
422
|
+
|
423
|
+
You could also set it by adding an Attribute Entry to your souce
|
424
|
+
document, for example:
|
425
|
+
|
426
|
+
:localdate: {sys: date +%Y-%m-%d}
|
427
|
+
|
428
|
+
Since it's set using an executable attribute you'll also need to
|
429
|
+
include the `--unsafe` option when you run asciidoc).
|
430
|
+
|
431
|
+
|
432
|
+
== Why doesn't AsciiDoc support strike through text?
|
433
|
+
|
434
|
+
The reason it's not in the distribution is that DocBook does not have
|
435
|
+
provision for strike through text and one of the AsciiDoc design goals
|
436
|
+
is that AsciiDoc markup should be applicable to all output formats.
|
437
|
+
|
438
|
+
Strike through is normally used to mark deleted text -- a more
|
439
|
+
comprehensive way to manage document revisions is to use a version
|
440
|
+
control system such as Subversion. You can also use the AsciiDoc
|
441
|
+
'CommentLines' and 'CommentBlocks' to retain revised text in the
|
442
|
+
source document.
|
443
|
+
|
444
|
+
If you really need strike through text for (X)HTML outputs then adding
|
445
|
+
the following to a configuration file will allow you to quote strike
|
446
|
+
through text with hyphen characters:
|
447
|
+
|
448
|
+
---------------------------------------------------------------------
|
449
|
+
ifdef::basebackend-html[]
|
450
|
+
|
451
|
+
[quotes]
|
452
|
+
-=strikethrough
|
453
|
+
|
454
|
+
[tags]
|
455
|
+
strikethrough=<span style="text-decoration: line-through;">|</span>
|
456
|
+
|
457
|
+
endif::basebackend-html[]
|
458
|
+
---------------------------------------------------------------------
|
459
|
+
|
460
|
+
|
461
|
+
== Where can I find examples of commands used to build output documents?
|
462
|
+
|
463
|
+
The User Guide has some. You could also look at `./doc/main.aap` in
|
464
|
+
the AsciiDoc distribution, it has all the commands used to build the
|
465
|
+
AsciiDoc documentation (even if you don't use A-A-P you'll still find
|
466
|
+
it useful).
|
467
|
+
|
468
|
+
|
469
|
+
== Why have you used the DocBook <simpara> element instead of <para>?
|
470
|
+
|
471
|
+
`<simpara>` is really the same as `<para>` except it can't contain
|
472
|
+
block elements -- this matched, more closely, the AsciiDoc paragraph
|
473
|
+
semantics.
|
474
|
+
|
475
|
+
|
476
|
+
== How can I format text inside a listing block?
|
477
|
+
|
478
|
+
By default only 'specialcharacters' and 'callouts' are substituted in
|
479
|
+
listing blocks; you can add quotes substitutions by explicitly setting
|
480
|
+
the block 'subs' attribute, for example:
|
481
|
+
|
482
|
+
[subs="quotes"]
|
483
|
+
------------------------------------------
|
484
|
+
$ ls *-al*
|
485
|
+
------------------------------------------
|
486
|
+
|
487
|
+
The `-al` will rendered bold. Note that:
|
488
|
+
|
489
|
+
- You would need to explicitly escape text you didn't want quoted.
|
490
|
+
- Don't do this in source code listing blocks because it modifies the
|
491
|
+
source code which confuses the syntax highlighter.
|
492
|
+
- This only works if your DocBook processor recognizes DocBook
|
493
|
+
`<emphasis>` elements inside `<screen>` elements.
|
494
|
+
|
495
|
+
|
496
|
+
== Why doesn't the include1::[] macro work?
|
497
|
+
|
498
|
+
Internally the `include1` macro is translated to the `include1` system
|
499
|
+
attribute which means it must be evaluated in a region where attribute
|
500
|
+
substitution is enabled. `include1` won't work, for example, in a
|
501
|
+
ListingBlock (unless attribute substitution is enabled). `include1`
|
502
|
+
is intended for use in configuration files, use the `include` macro
|
503
|
+
and set the attribute `depth=1` instead, for example:
|
504
|
+
|
505
|
+
-----------------------------------------------
|
506
|
+
include::blogpost_media_processing.txt[depth=1]
|
507
|
+
-----------------------------------------------
|
508
|
+
|
509
|
+
== How can I customize PDF files generated by dblatex?
|
510
|
+
|
511
|
+
There are a number of dblatex XSL parameters that can be used to
|
512
|
+
customize PDF output. You can set them globally in the AsciiDoc
|
513
|
+
`./dblatex/asciidoc-dblatex.xsl` configuration file or you can also
|
514
|
+
pass them on the a2x(1) command-line, for example:
|
515
|
+
|
516
|
+
a2x -f pdf --dblatex-opts "-P latex.output.revhistory=0" doc/article.txt
|
517
|
+
|
518
|
+
See also the http://dblatex.sourceforge.net/[dblatex] documentation.
|
519
|
+
|
520
|
+
|
521
|
+
== How can I make the mailto macro work with multiple email addresses?
|
522
|
+
|
523
|
+
For the AsciiDoc 'mailto' macro to work with multiple email addresses
|
524
|
+
(as per RFC2368) you need to URL encode the '@' characters (replace
|
525
|
+
them with '%40'), if you don't the individual addresses will be
|
526
|
+
rendered as separate links. You also need to <<X1,replace spaces with
|
527
|
+
'%20'>>.
|
528
|
+
|
529
|
+
For example, the following call won't work:
|
530
|
+
|
531
|
+
mailto:jb@foobar.com,jd@acme.co.nz?subject=New foofoo release[New foofoo release]
|
532
|
+
|
533
|
+
Use this instead:
|
534
|
+
|
535
|
+
mailto:jb%40foobar.com,jd%40acme.co.nz?subject=New%20foofoo%20release[New foofoo release]
|
536
|
+
|
537
|
+
|
538
|
+
== How can a replacement have a trailing backslash?
|
539
|
+
Quote the entry name -- this nonsensical example replaces `x\` with
|
540
|
+
`y`:
|
541
|
+
|
542
|
+
"x\\"=y
|
543
|
+
|
544
|
+
If quoting were omitted the equals character (separating the
|
545
|
+
entry name `x` from the value `y`) would be escaped.
|
546
|
+
|
547
|
+
|