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,673 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
6
|
+
<meta name="generator" content="AsciiDoc 8.3.3" />
|
7
|
+
<link rel="stylesheet" href="./xhtml11.css" type="text/css" />
|
8
|
+
<link rel="stylesheet" href="./xhtml11-quirks.css" type="text/css" />
|
9
|
+
<link rel="stylesheet" href="./layout1.css" type="text/css" />
|
10
|
+
<script type="text/javascript">
|
11
|
+
/*<![CDATA[*/
|
12
|
+
window.onload = function(){generateToc(2)}
|
13
|
+
/*]]>*/
|
14
|
+
</script>
|
15
|
+
<script type="text/javascript" src="./toc.js"></script>
|
16
|
+
<title>AsciiDoc Frequently Asked Questions</title>
|
17
|
+
</head>
|
18
|
+
<body>
|
19
|
+
<div id="layout-banner">
|
20
|
+
<div id="layout-title">AsciiDoc</div>
|
21
|
+
<div id="layout-description">Text based document generation</div>
|
22
|
+
</div>
|
23
|
+
<table>
|
24
|
+
<tr valign="top">
|
25
|
+
<td id="layout-menu">
|
26
|
+
<div>»<a href="index.html">Home</a></div>
|
27
|
+
<div>»<a href="manpage.html">Man Page</a></div>
|
28
|
+
<div>»<a href="userguide.html">User Guide</a></div>
|
29
|
+
<div>»<a href="http://powerman.name/doc/asciidoc">Cheatsheet</a></div>
|
30
|
+
<div>»<a href="a2x.1.html">a2x</a></div>
|
31
|
+
<div>»<a href="README.html">README</a></div>
|
32
|
+
<div>»<a href="CHANGELOG.html">ChangeLog</a></div>
|
33
|
+
<div>»<a href="INSTALL.html">Installation</a></div>
|
34
|
+
<div>»<a href="downloads.html">Downloads</a></div>
|
35
|
+
<div>»<a href="faq.html">FAQ</a></div>
|
36
|
+
<div>»<a href="support.html">Support</a></div>
|
37
|
+
<div id="page-source">»<a href="faq.txt">Page Source</a></div>
|
38
|
+
</td>
|
39
|
+
<td>
|
40
|
+
<div id="layout-content">
|
41
|
+
<div id="header">
|
42
|
+
<h1>AsciiDoc Frequently Asked Questions</h1>
|
43
|
+
</div>
|
44
|
+
<div id="toc">
|
45
|
+
<div id="toctitle">Table of Contents</div>
|
46
|
+
<noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
|
47
|
+
</div>
|
48
|
+
<div id="preamble">
|
49
|
+
<div class="sectionbody">
|
50
|
+
<div class="paragraph"><p>An embryonic <em>AsciiDoc</em> FAQ.</p></div>
|
51
|
+
</div>
|
52
|
+
</div>
|
53
|
+
<h2 id="_is_it_possible_to_include_charts_in_asciidoc_documents">1. Is it possible to include charts in AsciiDoc documents?</h2>
|
54
|
+
<div class="sectionbody">
|
55
|
+
<div class="paragraph"><p>There are a number of programs available that generate presentation
|
56
|
+
charts from textual specification, for example
|
57
|
+
<a href="http://home.gna.org/pychart/">Pychart</a> is a library for writing chart
|
58
|
+
scripts in Python. Here’s an example from the <em>Pychart</em> documentation:</p></div>
|
59
|
+
<div class="listingblock">
|
60
|
+
<div class="title">barchart.py</div>
|
61
|
+
<div class="content">
|
62
|
+
<pre><tt>#
|
63
|
+
# Example bar chart (from Pychart documentation http://home.gna.org/pychart/).
|
64
|
+
#
|
65
|
+
from pychart import *
|
66
|
+
theme.get_options()
|
67
|
+
|
68
|
+
data = [(10, 20, 30, 5), (20, 65, 33, 5), (30, 55, 30, 5), (40, 45, 51, 7),
|
69
|
+
(50, 25, 27, 3), (60, 75, 30, 5), (70, 80, 42, 5), (80, 62, 32, 5),
|
70
|
+
(90, 42, 39, 5), (100, 32, 39, 4)]
|
71
|
+
|
72
|
+
# The attribute y_coord=... tells that the Y axis values
|
73
|
+
# should be taken from samples.
|
74
|
+
# In this example, Y values will be [40,50,60,70,80].
|
75
|
+
ar = area.T(y_coord = category_coord.T(data[3:8], 0),
|
76
|
+
x_grid_style=line_style.gray50_dash1,
|
77
|
+
x_grid_interval=20, x_range = (0,100),
|
78
|
+
x_axis=axis.X(label="X label"),
|
79
|
+
y_axis=axis.Y(label="Y label"),
|
80
|
+
bg_style = fill_style.gray90,
|
81
|
+
border_line_style = line_style.default,
|
82
|
+
legend = legend.T(loc=(80,10)))
|
83
|
+
|
84
|
+
# Below call sets the default attributes for all bar plots.
|
85
|
+
chart_object.set_defaults(bar_plot.T, direction="horizontal", data=data)
|
86
|
+
|
87
|
+
# Attribute cluster=(0,3) tells that you are going to draw three bar
|
88
|
+
# plots side by side. The plot labeled "foo" will the leftmost (i.e.,
|
89
|
+
# 0th out of 3). Attribute hcol tells the column from which to
|
90
|
+
# retrive sample values from. It defaults to one.
|
91
|
+
ar.add_plot(bar_plot.T(label="foo", cluster=(0,3)))
|
92
|
+
ar.add_plot(bar_plot.T(label="bar", hcol=2, cluster=(1,3)))
|
93
|
+
ar.add_plot(bar_plot.T(label="baz", hcol=3, cluster=(2,3)))
|
94
|
+
ar.draw()</tt></pre>
|
95
|
+
</div></div>
|
96
|
+
<div class="paragraph"><p>To execute the script and include the generated chart image in your
|
97
|
+
document add the following lines to the <em>AsciiDoc</em> source:</p></div>
|
98
|
+
<div class="listingblock">
|
99
|
+
<div class="content">
|
100
|
+
<pre><tt>// Generate chart image file.
|
101
|
+
sys2::[python barchart.py --format=png --output=barchart.png --scale=2]
|
102
|
+
|
103
|
+
// Display chart image file.
|
104
|
+
image::barchart.png[]</tt></pre>
|
105
|
+
</div></div>
|
106
|
+
<div class="admonitionblock">
|
107
|
+
<table><tr>
|
108
|
+
<td class="icon">
|
109
|
+
<img src="./images/icons/note.png" alt="Note" />
|
110
|
+
</td>
|
111
|
+
<td class="content">You need to run <tt>asciidoc(1)</tt> with the <tt>--unsafe</tt> command-line
|
112
|
+
option to execute the <tt>sys2</tt> system macro.</td>
|
113
|
+
</tr></table>
|
114
|
+
</div>
|
115
|
+
</div>
|
116
|
+
<h2 id="_how_can_i_render_indented_paragraphs">2. How can I render indented paragraphs?</h2>
|
117
|
+
<div class="sectionbody">
|
118
|
+
<div class="paragraph"><p>To unconditionally indent all paragraphs add the following line to the
|
119
|
+
<tt>xhtml11.css</tt> stylesheet (or a custom stylesheet).</p></div>
|
120
|
+
<div class="listingblock">
|
121
|
+
<div class="content">
|
122
|
+
<pre><tt>div.paragraph p {text-indent: 3em;}</tt></pre>
|
123
|
+
</div></div>
|
124
|
+
<div class="paragraph"><p>This will restyle the entire document by indenting all paragraphs
|
125
|
+
which is normally what you want to do (mixed paragraph styles produce
|
126
|
+
ugly documents).</p></div>
|
127
|
+
<div class="paragraph"><p>To selectively indent paragraphs with the <em>indented</em> style add the
|
128
|
+
following line to the <tt>xhtml11.css</tt> stylesheet (or a custom
|
129
|
+
stylesheet).</p></div>
|
130
|
+
<div class="listingblock">
|
131
|
+
<div class="content">
|
132
|
+
<pre><tt>div.paragraph.indented p {text-indent: 3em;}</tt></pre>
|
133
|
+
</div></div>
|
134
|
+
<div class="paragraph"><p>Then apply the <em>indented</em> style to normal paragraphs, for example:</p></div>
|
135
|
+
<div class="listingblock">
|
136
|
+
<div class="content">
|
137
|
+
<pre><tt>[indented]
|
138
|
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas
|
139
|
+
ultrices justo porttitor augue. Vestibulum pretium. Donec porta
|
140
|
+
vestibulum mi. Aliquam pede. Aenean lobortis lorem et lacus. Sed
|
141
|
+
lacinia. Vivamus at lectus.</tt></pre>
|
142
|
+
</div></div>
|
143
|
+
<div class="admonitionblock">
|
144
|
+
<table><tr>
|
145
|
+
<td class="icon">
|
146
|
+
<img src="./images/icons/note.png" alt="Note" />
|
147
|
+
</td>
|
148
|
+
<td class="content">This FAQ applies to XHTML output not DocBook. To achieve the
|
149
|
+
same results with DocBook you would need to customize the DocBook XSL
|
150
|
+
stylesheets to indent paragraphs with the <tt>simpara</tt> element
|
151
|
+
<tt>role="indented"</tt> attribute.</td>
|
152
|
+
</tr></table>
|
153
|
+
</div>
|
154
|
+
</div>
|
155
|
+
<h2 id="_is_there_a_way_to_set_default_image_height_and_width_attributes">3. Is there a way to set default image height and width attributes?</h2>
|
156
|
+
<div class="sectionbody">
|
157
|
+
<div class="paragraph"><p>You can set the <em>height</em> and <em>width</em> attributes globally in your
|
158
|
+
document with Attribute Entries or from the command-line using the
|
159
|
+
<tt>--attribute</tt> option. In the following example images that don’t
|
160
|
+
explicitly set the <em>height</em> and <em>width</em> values will be 350 by 250
|
161
|
+
pixels.</p></div>
|
162
|
+
<div class="listingblock">
|
163
|
+
<div class="content">
|
164
|
+
<pre><tt>:height: 250
|
165
|
+
:width: 350
|
166
|
+
|
167
|
+
image:images/tiger.png[]</tt></pre>
|
168
|
+
</div></div>
|
169
|
+
</div>
|
170
|
+
<h2 id="_how_can_i_place_a_backslash_character_in_front_of_an_attribute_reference_without_escaping_the_reference">4. How can I place a backslash character in front of an attribute reference without escaping the reference?</h2>
|
171
|
+
<div class="sectionbody">
|
172
|
+
<div class="paragraph"><p>Use the predefined <tt>{backslash}</tt> attribute reference instead of an
|
173
|
+
actual backslash, for example if the <tt>{projectname}</tt> attribute has
|
174
|
+
the value <tt>foobar</tt> then:</p></div>
|
175
|
+
<div class="literalblock">
|
176
|
+
<div class="content">
|
177
|
+
<pre><tt>d:\data{backslash}{projectname}</tt></pre>
|
178
|
+
</div></div>
|
179
|
+
<div class="paragraph"><p>would be rendered as:</p></div>
|
180
|
+
<div class="literalblock">
|
181
|
+
<div class="content">
|
182
|
+
<pre><tt>d:\data\foobar</tt></pre>
|
183
|
+
</div></div>
|
184
|
+
</div>
|
185
|
+
<h2 id="_how_can_i_escape_asciidoc_markup">5. How can I escape AsciiDoc markup?</h2>
|
186
|
+
<div class="sectionbody">
|
187
|
+
<div class="paragraph"><p>Most <em>AsciiDoc</em> inline elements can be suppressed by preceding them with
|
188
|
+
a backslash character. These elements include:</p></div>
|
189
|
+
<div class="ulist"><ul>
|
190
|
+
<li>
|
191
|
+
<p>
|
192
|
+
Attribute references.
|
193
|
+
</p>
|
194
|
+
</li>
|
195
|
+
<li>
|
196
|
+
<p>
|
197
|
+
Text formatting.
|
198
|
+
</p>
|
199
|
+
</li>
|
200
|
+
<li>
|
201
|
+
<p>
|
202
|
+
Quoting,
|
203
|
+
</p>
|
204
|
+
</li>
|
205
|
+
<li>
|
206
|
+
<p>
|
207
|
+
Macros.
|
208
|
+
</p>
|
209
|
+
</li>
|
210
|
+
<li>
|
211
|
+
<p>
|
212
|
+
Replacements.
|
213
|
+
</p>
|
214
|
+
</li>
|
215
|
+
<li>
|
216
|
+
<p>
|
217
|
+
Special words.
|
218
|
+
</p>
|
219
|
+
</li>
|
220
|
+
<li>
|
221
|
+
<p>
|
222
|
+
Table cell separators.
|
223
|
+
</p>
|
224
|
+
</li>
|
225
|
+
</ul></div>
|
226
|
+
<div class="paragraph"><p>But there are exceptions — see the next question.</p></div>
|
227
|
+
</div>
|
228
|
+
<h2 id="_some_elements_can_8217_t_be_escaped_with_a_single_backslash">6. Some elements can’t be escaped with a single backslash</h2>
|
229
|
+
<div class="sectionbody">
|
230
|
+
<div class="paragraph"><p>There are a number of exceptions to the usual single backslash rule — mostly relating to URL macros that have two syntaxes or quoting
|
231
|
+
ambiguity. Here are some non-standard escape examples:</p></div>
|
232
|
+
<div class="tableblock">
|
233
|
+
<table rules="none"
|
234
|
+
width="70%"
|
235
|
+
frame="void"
|
236
|
+
cellspacing="0" cellpadding="4">
|
237
|
+
<col width="20%" />
|
238
|
+
<col width="80%" />
|
239
|
+
<tbody valign="top">
|
240
|
+
<tr>
|
241
|
+
<td align="left"><p class="table">Mailto URLs</p></td>
|
242
|
+
<td align="left"><div class="literal"><pre><tt>\srackham@methods.co.nz
|
243
|
+
<\srackham@methods.co.nz>
|
244
|
+
\mailto:[\srackham@methods.co.nz]</tt></pre></div></td>
|
245
|
+
</tr>
|
246
|
+
<tr>
|
247
|
+
<td align="left"><p class="table">Web URLs</p></td>
|
248
|
+
<td align="left"><div class="literal"><pre><tt>\http://www.foo1.co.nz
|
249
|
+
\\http://www.foobar.com[]
|
250
|
+
\\http://www.foobar.com[Foobar Limited]</tt></pre></div></td>
|
251
|
+
</tr>
|
252
|
+
<tr>
|
253
|
+
<td align="left"><p class="table">Other</p></td>
|
254
|
+
<td align="left"><div class="literal"><pre><tt>A C+\+ Library for C++
|
255
|
+
A C+\+ Library for C+\+ \+++
|
256
|
+
\\``double-quotes''
|
257
|
+
\*\*F**ile Open...</tt></pre></div></td>
|
258
|
+
</tr>
|
259
|
+
</tbody>
|
260
|
+
</table>
|
261
|
+
</div>
|
262
|
+
<div class="paragraph"><p>The source of this problem is ambiguity across substitution types — the first match unescapes allowing the second to substitute. A
|
263
|
+
work-around for difficult cases is to side-step the problem using the
|
264
|
+
<tt>pass:[]</tt> passthrough inline macro.</p></div>
|
265
|
+
</div>
|
266
|
+
<h2 id="_how_can_i_set_default_list_and_tables_styles">7. How can I set default list and tables styles?</h2>
|
267
|
+
<div class="sectionbody">
|
268
|
+
<div class="paragraph"><p>You can set the element’s <em>style</em> entry in a global or custom
|
269
|
+
configuration file.</p></div>
|
270
|
+
<div class="paragraph"><p>This example this will horizontally style all labeled lists that don’t
|
271
|
+
have an explicit style attribute:</p></div>
|
272
|
+
<div class="listingblock">
|
273
|
+
<div class="content">
|
274
|
+
<pre><tt>[listdef-labeled]
|
275
|
+
style=horizontal
|
276
|
+
|
277
|
+
[listdef-labeled2]
|
278
|
+
style=horizontal</tt></pre>
|
279
|
+
</div></div>
|
280
|
+
<div class="paragraph"><p>This example will put a top and bottom border on all tables that don’t
|
281
|
+
already have an explicit style attribute:</p></div>
|
282
|
+
<div class="listingblock">
|
283
|
+
<div class="content">
|
284
|
+
<pre><tt>[tabledef-default]
|
285
|
+
style=topbot
|
286
|
+
topbot-style=frame="topbot"</tt></pre>
|
287
|
+
</div></div>
|
288
|
+
<div class="paragraph"><p>Alternatively you can set the configuration entries from inside your
|
289
|
+
document, the above examples are equivalent to:</p></div>
|
290
|
+
<div class="listingblock">
|
291
|
+
<div class="content">
|
292
|
+
<pre><tt>:listdef-labeled.style: horizontal
|
293
|
+
:listdef-labeled2.style: horizontal
|
294
|
+
|
295
|
+
:tabledef-default.topbot-style: frame="topbot"
|
296
|
+
:tabledef-default.style: topbot</tt></pre>
|
297
|
+
</div></div>
|
298
|
+
</div>
|
299
|
+
<h2 id="_why_do_i_get_a_filter_non_zero_exit_code_error">8. Why do I get a filter non-zero exit code error?</h2>
|
300
|
+
<div class="sectionbody">
|
301
|
+
<div class="paragraph"><p>An error was returned when <em>AsciiDoc</em> tried to execute an external
|
302
|
+
filter command. The most common reason for this is that the filter
|
303
|
+
command could not be found by the command shell. To figure out what
|
304
|
+
the problem is run <em>AsciiDoc</em> with the <tt>--verbose</tt> option to determine
|
305
|
+
the command that is failing and then try to run the command manually
|
306
|
+
from the command-line.</p></div>
|
307
|
+
</div>
|
308
|
+
<h2 id="_are_there_any_docbook_viewers">9. Are there any DocBook viewers?</h2>
|
309
|
+
<div class="sectionbody">
|
310
|
+
<div class="paragraph"><p><a href="http://live.gnome.org/Yelp">Yelp</a>, the GNOME help viewer, does a
|
311
|
+
creditable job of displaying DocBook files XML files directly. Just
|
312
|
+
run it from the command-line, for example:</p></div>
|
313
|
+
<div class="literalblock">
|
314
|
+
<div class="content">
|
315
|
+
<pre><tt>$ yelp file://home/srackham/tmp/book.xml</tt></pre>
|
316
|
+
</div></div>
|
317
|
+
<div class="paragraph"><p>Note that you have to supply the full path name in URI format, this
|
318
|
+
shell script makes interactive use easier:</p></div>
|
319
|
+
<div class="listingblock">
|
320
|
+
<div class="content">
|
321
|
+
<pre><tt>#!/bin/sh
|
322
|
+
if [ -z "$1" ]; then
|
323
|
+
echo "usage: dbkview FILE"
|
324
|
+
exit 1
|
325
|
+
fi
|
326
|
+
yelp "file://$(pwd)/$1"</tt></pre>
|
327
|
+
</div></div>
|
328
|
+
<div class="paragraph"><p>This tip was submitted by Lionel Orry.</p></div>
|
329
|
+
</div>
|
330
|
+
<h2 id="_can_you_create_odf_documents_using_asciidoc">10. Can you create ODF documents using AsciiDoc?</h2>
|
331
|
+
<div class="sectionbody">
|
332
|
+
<div class="paragraph"><p>The easiest and highest fidelity methods I’ve seen is to generate
|
333
|
+
HTML from <em>AsciiDoc</em> then paste it from your browser (we use Firefox)
|
334
|
+
into OpenOffice Writer.</p></div>
|
335
|
+
<div class="ulist"><ul>
|
336
|
+
<li>
|
337
|
+
<p>
|
338
|
+
I found that that there is better fidelity pasting HTML generated by
|
339
|
+
the <em>html4</em> backend instead of the default <em>xhtml11</em> backend.
|
340
|
+
</p>
|
341
|
+
</li>
|
342
|
+
<li>
|
343
|
+
<p>
|
344
|
+
Don’t paste <em>AsciiDoc</em> tables of contents, OpenOffice Writer (I was
|
345
|
+
using version 2.3) hangs when saving. This may be something to do
|
346
|
+
with the embedded JavaScript but I haven’t looked closely at it, I
|
347
|
+
may even be wrong about this.
|
348
|
+
</p>
|
349
|
+
</li>
|
350
|
+
</ul></div>
|
351
|
+
<div class="paragraph"><p>This tip was contributed by Bernard Amade.</p></div>
|
352
|
+
</div>
|
353
|
+
<h2 id="_how_can_i_supress_cell_separators_in_included_table_data_files">11. How can I supress cell separators in included table data files?</h2>
|
354
|
+
<div class="sectionbody">
|
355
|
+
<div class="paragraph"><p>Use the <tt>{include:}</tt> system attribute instead of the <tt>\include::[]</tt>
|
356
|
+
macro (the former is not expanded until after the table data has been
|
357
|
+
parsed into cells, whereas the latter is included before the table is
|
358
|
+
processed.</p></div>
|
359
|
+
</div>
|
360
|
+
<h2 id="_how_can_i_preserve_paragraph_line_boundaries">12. How can I preserve paragraph line boundaries?</h2>
|
361
|
+
<div class="sectionbody">
|
362
|
+
<div class="paragraph"><p>Apply the The <em>verse</em> paragraph style, the rendered text preserves
|
363
|
+
line boundaries and is useful for lyrics and poems. For example:</p></div>
|
364
|
+
<div class="listingblock">
|
365
|
+
<div class="content">
|
366
|
+
<pre><tt>[verse]
|
367
|
+
Consul *necessitatibus* per id,
|
368
|
+
consetetur, eu pro everti postulant
|
369
|
+
homero verear ea mea, qui.</tt></pre>
|
370
|
+
</div></div>
|
371
|
+
<div class="paragraph"><p>If you are generating PDF files (using FOP) or HTML files then you can
|
372
|
+
use line breaks. For example:</p></div>
|
373
|
+
<div class="listingblock">
|
374
|
+
<div class="content">
|
375
|
+
<pre><tt>Consul *necessitatibus* per id, +
|
376
|
+
consetetur, eu pro everti postulant +
|
377
|
+
homero verear ea mea, qui.</tt></pre>
|
378
|
+
</div></div>
|
379
|
+
</div>
|
380
|
+
<h2 id="_how_can_i_include_non_breaking_space_characters">13. How can I include non-breaking space characters?</h2>
|
381
|
+
<div class="sectionbody">
|
382
|
+
<div class="paragraph"><p>The predefined <tt>{nbsp}</tt> attribute reference will be replaced by a
|
383
|
+
non-breaking space character. You could also use the non-breaking
|
384
|
+
space character entity reference <tt>&#160;</tt> (see the next question).</p></div>
|
385
|
+
</div>
|
386
|
+
<h2 id="_can_i_include_html_and_xml_character_entity_references_in_my_document">14. Can I include HTML and XML character entity references in my document?</h2>
|
387
|
+
<div class="sectionbody">
|
388
|
+
<div class="paragraph"><p>Yes, just enter the reference in your document. For example <tt>&#946;</tt>
|
389
|
+
will print a Greek small beta character β</p></div>
|
390
|
+
</div>
|
391
|
+
<h2 id="X1">15. How do I include spaces in URLs?</h2>
|
392
|
+
<div class="sectionbody">
|
393
|
+
<div class="paragraph"><p>URL inline macro targets (addresses) cannot contain white space
|
394
|
+
characters. If you need spaces encode them as <tt>%20</tt>. For example:</p></div>
|
395
|
+
<div class="literalblock">
|
396
|
+
<div class="content">
|
397
|
+
<pre><tt>image:large%20image.png[]
|
398
|
+
http://www.foo.bar.com/an%20example%20document.html</tt></pre>
|
399
|
+
</div></div>
|
400
|
+
</div>
|
401
|
+
<h2 id="_how_can_i_get_asciidoc_to_assign_the_correct_docbook_language_attribute">16. How can I get AsciiDoc to assign the correct DocBook language attribute?</h2>
|
402
|
+
<div class="sectionbody">
|
403
|
+
<div class="paragraph"><p>Set the <em>AsciiDoc</em> <em>lang</em> attribute to the appropriate language code.
|
404
|
+
For example:</p></div>
|
405
|
+
<div class="literalblock">
|
406
|
+
<div class="content">
|
407
|
+
<pre><tt>$ a2x -a lang=es doc/article.txt</tt></pre>
|
408
|
+
</div></div>
|
409
|
+
<div class="paragraph"><p>This will ensure that downstream DocBook processing will generate the
|
410
|
+
correct language specific document headings (things like table of
|
411
|
+
contents, revision history, figure and table captions, admonition
|
412
|
+
captions).</p></div>
|
413
|
+
</div>
|
414
|
+
<h2 id="_why_does_asciidoc_give_me_a_8220_malformed_author_8221_error">17. Why does AsciiDoc give me a “malformed author” error?</h2>
|
415
|
+
<div class="sectionbody">
|
416
|
+
<div class="paragraph"><p>This is normally because there are more than three names (up to three
|
417
|
+
are expected: first name, middle name and last name). For example,
|
418
|
+
this author line would result in an error:</p></div>
|
419
|
+
<div class="literalblock">
|
420
|
+
<div class="content">
|
421
|
+
<pre><tt>Vincent Willem van Gogh</tt></pre>
|
422
|
+
</div></div>
|
423
|
+
<div class="paragraph"><p>You can enter multi-word first, middle and last names in the author
|
424
|
+
line using the underscore as a word separator. For example:</p></div>
|
425
|
+
<div class="literalblock">
|
426
|
+
<div class="content">
|
427
|
+
<pre><tt>Vincent Willem van_Gogh</tt></pre>
|
428
|
+
</div></div>
|
429
|
+
<div class="paragraph"><p>You could also resolve the problem by replacing the author line with
|
430
|
+
explicit attribute entries:</p></div>
|
431
|
+
<div class="literalblock">
|
432
|
+
<div class="content">
|
433
|
+
<pre><tt>:First name: Vincent
|
434
|
+
:Middle name: Willem
|
435
|
+
:Last name: Van Gogh</tt></pre>
|
436
|
+
</div></div>
|
437
|
+
</div>
|
438
|
+
<h2 id="_how_can_i_assign_multiple_author_names">18. How can I assign multiple author names?</h2>
|
439
|
+
<div class="sectionbody">
|
440
|
+
<div class="paragraph"><p>A quick way to do this is put both authors in a single first name, for
|
441
|
+
example:</p></div>
|
442
|
+
<div class="literalblock">
|
443
|
+
<div class="content">
|
444
|
+
<pre><tt>My Document
|
445
|
+
===========
|
446
|
+
:Author: Bill_and_Ben_the_Flowerpot_Men
|
447
|
+
:Author Initials: BB & BC</tt></pre>
|
448
|
+
</div></div>
|
449
|
+
<div class="paragraph"><p><tt>asciidoc(1)</tt> replaces the underscores with spaces.</p></div>
|
450
|
+
<div class="paragraph"><p>The longer, semantically correct, way is to override the
|
451
|
+
<tt>[header]</tt> configuration file section in a document specific <tt>.conf</tt>
|
452
|
+
file. For example if your document is <tt>mydoc.txt</tt> then a file called
|
453
|
+
<tt>mydoc.conf</tt> in the document directory would be picked up
|
454
|
+
automatically by <tt>asciidoc(1)</tt>. Copy and paste the default
|
455
|
+
<tt>docbook.conf</tt> file <tt>[header]</tt> to <tt>mydoc.conf</tt> and modify the author
|
456
|
+
related markup:</p></div>
|
457
|
+
<div class="literalblock">
|
458
|
+
<div class="content">
|
459
|
+
<pre><tt>[header]
|
460
|
+
:
|
461
|
+
<authorgroup>...
|
462
|
+
:</tt></pre>
|
463
|
+
</div></div>
|
464
|
+
</div>
|
465
|
+
<h2 id="_how_can_i_escape_a_labeled_list_entry">19. How can I escape a labeled list entry?</h2>
|
466
|
+
<div class="sectionbody">
|
467
|
+
<div class="paragraph"><p>Two colons or semicolons in a paragraph may be confused with a labeled
|
468
|
+
list entry. Use the predefined <tt>{two_colons}</tt> and <tt>{two_semicolons}</tt>
|
469
|
+
to suppress this behavior, for example:</p></div>
|
470
|
+
<div class="literalblock">
|
471
|
+
<div class="content">
|
472
|
+
<pre><tt>Qui in magna commodo{two_colons} est labitur dolorum an. Est ne
|
473
|
+
magna primis adolescens.</tt></pre>
|
474
|
+
</div></div>
|
475
|
+
<div class="paragraph"><p>Will be rendered as:</p></div>
|
476
|
+
<div class="paragraph"><p>Qui in magna commodo:: est labitur dolorum an. Est ne
|
477
|
+
magna primis adolescens.</p></div>
|
478
|
+
</div>
|
479
|
+
<h2 id="_how_can_i_selectively_disable_a_quoted_text_substitution">20. How can I selectively disable a quoted text substitution?</h2>
|
480
|
+
<div class="sectionbody">
|
481
|
+
<div class="paragraph"><p>Omitting the tag name will disable quoting. For example, if you don’t
|
482
|
+
want superscripts or subscripts then put the following in a custom
|
483
|
+
configuration file or edit the global <tt>asciidoc.conf</tt> configuration
|
484
|
+
file:</p></div>
|
485
|
+
<div class="listingblock">
|
486
|
+
<div class="content">
|
487
|
+
<pre><tt>[quotes]
|
488
|
+
^=
|
489
|
+
~=</tt></pre>
|
490
|
+
</div></div>
|
491
|
+
<div class="paragraph"><p>Alternatively you can set the configuration entries from within your
|
492
|
+
document, the above examples are equivalent to:</p></div>
|
493
|
+
<div class="listingblock">
|
494
|
+
<div class="content">
|
495
|
+
<pre><tt>:quotes.^:
|
496
|
+
:quotes.~:</tt></pre>
|
497
|
+
</div></div>
|
498
|
+
</div>
|
499
|
+
<h2 id="_how_can_i_customize_the_localdate_format">21. How can I customize the {localdate} format?</h2>
|
500
|
+
<div class="sectionbody">
|
501
|
+
<div class="paragraph"><p>The default format for the <tt>{localdate}</tt> attribute is the ISO 8601
|
502
|
+
<tt>yyyy-mm-dd</tt> format. You can change this format by explicitly setting
|
503
|
+
the <tt>{localdate}</tt> attribute. For example by setting it using the
|
504
|
+
<tt>asciidoc(1)</tt> <tt>-a</tt> command-line option:</p></div>
|
505
|
+
<div class="literalblock">
|
506
|
+
<div class="content">
|
507
|
+
<pre><tt>$ asciidoc -a localdate=`date +%d-%d-%Y` mydoc.txt</tt></pre>
|
508
|
+
</div></div>
|
509
|
+
<div class="paragraph"><p>You could also set it by adding an Attribute Entry to your souce
|
510
|
+
document, for example:</p></div>
|
511
|
+
<div class="literalblock">
|
512
|
+
<div class="content">
|
513
|
+
<pre><tt>:localdate: {sys: date +%Y-%m-%d}</tt></pre>
|
514
|
+
</div></div>
|
515
|
+
<div class="paragraph"><p>Since it’s set using an executable attribute you’ll also need to
|
516
|
+
include the <tt>--unsafe</tt> option when you run asciidoc).</p></div>
|
517
|
+
</div>
|
518
|
+
<h2 id="_why_doesn_8217_t_asciidoc_support_strike_through_text">22. Why doesn’t AsciiDoc support strike through text?</h2>
|
519
|
+
<div class="sectionbody">
|
520
|
+
<div class="paragraph"><p>The reason it’s not in the distribution is that DocBook does not have
|
521
|
+
provision for strike through text and one of the <em>AsciiDoc</em> design goals
|
522
|
+
is that <em>AsciiDoc</em> markup should be applicable to all output formats.</p></div>
|
523
|
+
<div class="paragraph"><p>Strike through is normally used to mark deleted text — a more
|
524
|
+
comprehensive way to manage document revisions is to use a version
|
525
|
+
control system such as Subversion. You can also use the <em>AsciiDoc</em>
|
526
|
+
<em>CommentLines</em> and <em>CommentBlocks</em> to retain revised text in the
|
527
|
+
source document.</p></div>
|
528
|
+
<div class="paragraph"><p>If you really need strike through text for (X)HTML outputs then adding
|
529
|
+
the following to a configuration file will allow you to quote strike
|
530
|
+
through text with hyphen characters:</p></div>
|
531
|
+
<div class="listingblock">
|
532
|
+
<div class="content">
|
533
|
+
<pre><tt> ifdef::basebackend-html[]
|
534
|
+
|
535
|
+
[quotes]
|
536
|
+
-=strikethrough
|
537
|
+
|
538
|
+
[tags]
|
539
|
+
strikethrough=<span style="text-decoration: line-through;">|</span>
|
540
|
+
|
541
|
+
endif::basebackend-html[]</tt></pre>
|
542
|
+
</div></div>
|
543
|
+
</div>
|
544
|
+
<h2 id="_where_can_i_find_examples_of_commands_used_to_build_output_documents">23. Where can I find examples of commands used to build output documents?</h2>
|
545
|
+
<div class="sectionbody">
|
546
|
+
<div class="paragraph"><p>The User Guide has some. You could also look at <tt>./doc/main.aap</tt> in
|
547
|
+
the <em>AsciiDoc</em> distribution, it has all the commands used to build the
|
548
|
+
<em>AsciiDoc</em> documentation (even if you don’t use A-A-P you’ll still find
|
549
|
+
it useful).</p></div>
|
550
|
+
</div>
|
551
|
+
<h2 id="_why_have_you_used_the_docbook_lt_simpara_gt_element_instead_of_lt_para_gt">24. Why have you used the DocBook <simpara> element instead of <para>?</h2>
|
552
|
+
<div class="sectionbody">
|
553
|
+
<div class="paragraph"><p><tt><simpara></tt> is really the same as <tt><para></tt> except it can’t contain
|
554
|
+
block elements — this matched, more closely, the <em>AsciiDoc</em> paragraph
|
555
|
+
semantics.</p></div>
|
556
|
+
</div>
|
557
|
+
<h2 id="_how_can_i_format_text_inside_a_listing_block">25. How can I format text inside a listing block?</h2>
|
558
|
+
<div class="sectionbody">
|
559
|
+
<div class="paragraph"><p>By default only <em>specialcharacters</em> and <em>callouts</em> are substituted in
|
560
|
+
listing blocks; you can add quotes substitutions by explicitly setting
|
561
|
+
the block <em>subs</em> attribute, for example:</p></div>
|
562
|
+
<div class="literalblock">
|
563
|
+
<div class="content">
|
564
|
+
<pre><tt>[subs="quotes"]
|
565
|
+
------------------------------------------
|
566
|
+
$ ls *-al*
|
567
|
+
------------------------------------------</tt></pre>
|
568
|
+
</div></div>
|
569
|
+
<div class="paragraph"><p>The <tt>-al</tt> will rendered bold. Note that:</p></div>
|
570
|
+
<div class="ulist"><ul>
|
571
|
+
<li>
|
572
|
+
<p>
|
573
|
+
You would need to explicitly escape text you didn’t want quoted.
|
574
|
+
</p>
|
575
|
+
</li>
|
576
|
+
<li>
|
577
|
+
<p>
|
578
|
+
Don’t do this in source code listing blocks because it modifies the
|
579
|
+
source code which confuses the syntax highlighter.
|
580
|
+
</p>
|
581
|
+
</li>
|
582
|
+
<li>
|
583
|
+
<p>
|
584
|
+
This only works if your DocBook processor recognizes DocBook
|
585
|
+
<tt><emphasis></tt> elements inside <tt><screen></tt> elements.
|
586
|
+
</p>
|
587
|
+
</li>
|
588
|
+
</ul></div>
|
589
|
+
</div>
|
590
|
+
<h2 id="_why_doesn_8217_t_the_include1_macro_work">26. Why doesn’t the include1::[] macro work?</h2>
|
591
|
+
<div class="sectionbody">
|
592
|
+
<div class="paragraph"><p>Internally the <tt>include1</tt> macro is translated to the <tt>include1</tt> system
|
593
|
+
attribute which means it must be evaluated in a region where attribute
|
594
|
+
substitution is enabled. <tt>include1</tt> won’t work, for example, in a
|
595
|
+
ListingBlock (unless attribute substitution is enabled). <tt>include1</tt>
|
596
|
+
is intended for use in configuration files, use the <tt>include</tt> macro
|
597
|
+
and set the attribute <tt>depth=1</tt> instead, for example:</p></div>
|
598
|
+
<div class="literalblock">
|
599
|
+
<div class="content">
|
600
|
+
<pre><tt>-----------------------------------------------
|
601
|
+
include::blogpost_media_processing.txt[depth=1]
|
602
|
+
-----------------------------------------------</tt></pre>
|
603
|
+
</div></div>
|
604
|
+
</div>
|
605
|
+
<h2 id="_how_can_i_customize_pdf_files_generated_by_dblatex">27. How can I customize PDF files generated by dblatex?</h2>
|
606
|
+
<div class="sectionbody">
|
607
|
+
<div class="paragraph"><p>There are a number of dblatex XSL parameters that can be used to
|
608
|
+
customize PDF output. You can set them globally in the <em>AsciiDoc</em>
|
609
|
+
<tt>./dblatex/asciidoc-dblatex.xsl</tt> configuration file or you can also
|
610
|
+
pass them on the <tt>a2x(1)</tt> command-line, for example:</p></div>
|
611
|
+
<div class="literalblock">
|
612
|
+
<div class="content">
|
613
|
+
<pre><tt>a2x -f pdf --dblatex-opts "-P latex.output.revhistory=0" doc/article.txt</tt></pre>
|
614
|
+
</div></div>
|
615
|
+
<div class="paragraph"><p>See also the <a href="http://dblatex.sourceforge.net/">dblatex</a> documentation.</p></div>
|
616
|
+
</div>
|
617
|
+
<h2 id="_how_can_i_make_the_mailto_macro_work_with_multiple_email_addresses">28. How can I make the mailto macro work with multiple email addresses?</h2>
|
618
|
+
<div class="sectionbody">
|
619
|
+
<div class="paragraph"><p>For the <em>AsciiDoc</em> <em>mailto</em> macro to work with multiple email addresses
|
620
|
+
(as per RFC2368) you need to URL encode the <em>@</em> characters (replace
|
621
|
+
them with <em>%40</em>), if you don’t the individual addresses will be
|
622
|
+
rendered as separate links. You also need to <a href="#X1">replace spaces with <em>%20</em></a>.</p></div>
|
623
|
+
<div class="paragraph"><p>For example, the following call won’t work:</p></div>
|
624
|
+
<div class="literalblock">
|
625
|
+
<div class="content">
|
626
|
+
<pre><tt>mailto:jb@foobar.com,jd@acme.co.nz?subject=New foofoo release[New foofoo release]</tt></pre>
|
627
|
+
</div></div>
|
628
|
+
<div class="paragraph"><p>Use this instead:</p></div>
|
629
|
+
<div class="literalblock">
|
630
|
+
<div class="content">
|
631
|
+
<pre><tt>mailto:jb%40foobar.com,jd%40acme.co.nz?subject=New%20foofoo%20release[New foofoo release]</tt></pre>
|
632
|
+
</div></div>
|
633
|
+
</div>
|
634
|
+
<h2 id="_how_can_a_replacement_have_a_trailing_backslash">29. How can a replacement have a trailing backslash?</h2>
|
635
|
+
<div class="sectionbody">
|
636
|
+
<div class="paragraph"><p>Quote the entry name — this nonsensical example replaces <tt>x\</tt> with
|
637
|
+
<tt>y</tt>:</p></div>
|
638
|
+
<div class="literalblock">
|
639
|
+
<div class="content">
|
640
|
+
<pre><tt>"x\\"=y</tt></pre>
|
641
|
+
</div></div>
|
642
|
+
<div class="paragraph"><p>If quoting were omitted the equals character (separating the
|
643
|
+
entry name <tt>x</tt> from the value <tt>y</tt>) would be escaped.</p></div>
|
644
|
+
</div>
|
645
|
+
<div id="footer">
|
646
|
+
<div id="footer-text">
|
647
|
+
Version 8.3.3<br />
|
648
|
+
Last updated 2009-01-02 11:18:49 NZDT
|
649
|
+
</div>
|
650
|
+
<div id="footer-badges">
|
651
|
+
<a href="http://validator.w3.org/check?uri=referer">
|
652
|
+
<img style="border:none; width:88px; height:31px;"
|
653
|
+
src="http://www.w3.org/Icons/valid-xhtml11"
|
654
|
+
alt="Valid XHTML 1.1!" />
|
655
|
+
</a>
|
656
|
+
<a href="http://jigsaw.w3.org/css-validator/check/referer">
|
657
|
+
<img style="border:none; width:88px; height:31px;"
|
658
|
+
src="http://jigsaw.w3.org/css-validator/images/vcss"
|
659
|
+
alt="Valid CSS!" />
|
660
|
+
</a>
|
661
|
+
<a href="http://www.mozilla.org/products/firefox/">
|
662
|
+
<img style="border:none; width:110px; height:32px;"
|
663
|
+
src="http://www.spreadfirefox.com/community/images/affiliates/Buttons/110x32/safer.gif"
|
664
|
+
alt="Get Firefox!" />
|
665
|
+
</a>
|
666
|
+
</div>
|
667
|
+
</div>
|
668
|
+
</div>
|
669
|
+
</td>
|
670
|
+
</tr>
|
671
|
+
</table>
|
672
|
+
</body>
|
673
|
+
</html>
|