git-scribe 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/Rakefile +31 -0
- data/SPEC.asciidoc +126 -0
- data/TODO.txt +29 -0
- data/bin/git-scribe +2 -1
- data/docbook-xsl/.CatalogManager.properties.example +61 -0
- data/docbook-xsl/.urilist +1 -0
- data/git-scribe.gemspec +32 -0
- data/lib/git-scribe.rb +21 -315
- data/lib/git-scribe/check.rb +60 -0
- data/lib/git-scribe/cli.rb +84 -0
- data/lib/git-scribe/generate.rb +222 -0
- data/lib/git-scribe/init.rb +16 -0
- data/lib/git-scribe/version.rb +3 -0
- data/template/.gitignore +1 -0
- data/template/.gitscribe +5 -0
- data/test/check_test.rb +12 -0
- data/test/gen_test.rb +78 -0
- data/test/init_test.rb +36 -0
- data/test/test_helper.rb +44 -0
- metadata +49 -161
- data/example/book/big.asc +0 -5604
- data/example/book/holmes.asc +0 -12983
- data/example/output/META-INF/container.xml +0 -6
- data/example/output/OEBPS/ar01s02.html +0 -15
- data/example/output/OEBPS/ar01s03.html +0 -3
- data/example/output/OEBPS/content.opf +0 -21
- data/example/output/OEBPS/index.html +0 -5
- data/example/output/OEBPS/toc.ncx +0 -37
- data/example/output/a_case_of_identity.html +0 -725
- data/example/output/a_example_appendix.html +0 -63
- data/example/output/a_migration_notes.html +0 -95
- data/example/output/apa.html +0 -20
- data/example/output/apb.html +0 -6
- data/example/output/apc.html +0 -24
- data/example/output/apd.html +0 -30
- data/example/output/ape.html +0 -26
- data/example/output/apf.html +0 -9
- data/example/output/apg.html +0 -42
- data/example/output/aph.html +0 -89
- data/example/output/ar01s02.html +0 -12
- data/example/output/ar01s03.html +0 -34
- data/example/output/ar01s04.html +0 -77
- data/example/output/ar01s05.html +0 -272
- data/example/output/ar01s06.html +0 -35
- data/example/output/ar01s07.html +0 -105
- data/example/output/ar01s08.html +0 -33
- data/example/output/ar01s09.html +0 -12
- data/example/output/ar01s10.html +0 -14
- data/example/output/ar01s11.html +0 -34
- data/example/output/ar01s12.html +0 -63
- data/example/output/ar01s13.html +0 -156
- data/example/output/ar01s14.html +0 -330
- data/example/output/ar01s15.html +0 -22
- data/example/output/ar01s16.html +0 -27
- data/example/output/ar01s17.html +0 -94
- data/example/output/ar01s18.html +0 -359
- data/example/output/ar01s19.html +0 -373
- data/example/output/ar01s20.html +0 -27
- data/example/output/ar01s21.html +0 -33
- data/example/output/ar01s22.html +0 -351
- data/example/output/ar01s23.html +0 -21
- data/example/output/ar01s24.html +0 -69
- data/example/output/ar01s25.html +0 -60
- data/example/output/ar01s26.html +0 -217
- data/example/output/ar01s27.html +0 -88
- data/example/output/ar01s28.html +0 -237
- data/example/output/ar01s29.html +0 -68
- data/example/output/ar01s30.html +0 -154
- data/example/output/ar01s31.html +0 -6
- data/example/output/ar01s32.html +0 -22
- data/example/output/ar01s33.html +0 -209
- data/example/output/asciidoc_backends.html +0 -190
- data/example/output/asciidoc_document_types.html +0 -131
- data/example/output/attribute_entries.html +0 -185
- data/example/output/attribute_lists.html +0 -157
- data/example/output/attribute_references.html +0 -414
- data/example/output/attributelist_element.html +0 -143
- data/example/output/b_packager_notes.html +0 -68
- data/example/output/bi01.html +0 -18
- data/example/output/big.asc +0 -5604
- data/example/output/block_element_definitions.html +0 -448
- data/example/output/block_titles.html +0 -83
- data/example/output/blockid_element.html +0 -80
- data/example/output/book.asc +0 -5604
- data/example/output/book.epub +0 -0
- data/example/output/book.fo +0 -3788
- data/example/output/book.html +0 -8793
- data/example/output/book.xml +0 -8265
- data/example/output/c_asciidoc_safe_mode.html +0 -105
- data/example/output/callouts.html +0 -214
- data/example/output/catalog +0 -10
- data/example/output/colophon.html +0 -397
- data/example/output/configuration_files.html +0 -672
- data/example/output/converting_docbook_to_other_file_formats.html +0 -324
- data/example/output/d_using_asciidoc_with_non-english_languages.html +0 -107
- data/example/output/delimited_blocks.html +0 -455
- data/example/output/document_attributes.html +0 -95
- data/example/output/document_processing.html +0 -116
- data/example/output/document_structure.html +0 -493
- data/example/output/e_vim_syntax_highlighter.html +0 -111
- data/example/output/example_bibliography.html +0 -82
- data/example/output/example_colophon.html +0 -58
- data/example/output/example_glossary.html +0 -73
- data/example/output/example_index.html +0 -108
- data/example/output/f_attribute_options.html +0 -129
- data/example/output/filters.html +0 -179
- data/example/output/footnotes.html +0 -103
- data/example/output/g_diagnostics.html +0 -148
- data/example/output/generating_plain_text_files.html +0 -68
- data/example/output/getting_started.html +0 -87
- data/example/output/glossary.html +0 -95
- data/example/output/go01.html +0 -24
- data/example/output/h_backend_attributes.html +0 -308
- data/example/output/help_commands.html +0 -96
- data/example/output/holmes.asc +0 -12983
- data/example/output/image/octocat_professor.png +0 -0
- data/example/output/include/hello.c +0 -10
- data/example/output/index.html +0 -656
- data/example/output/indexes.html +0 -104
- data/example/output/intrinsic_attributes.html +0 -165
- data/example/output/ix01.html +0 -3
- data/example/output/lists.html +0 -666
- data/example/output/macros.html +0 -737
- data/example/output/manpage_documents.html +0 -124
- data/example/output/master.css +0 -281
- data/example/output/mathematical_formulas.html +0 -125
- data/example/output/page.html +0 -60
- data/example/output/paragraphs.html +0 -192
- data/example/output/pr01.html +0 -3
- data/example/output/source_code_highlighting.html +0 -59
- data/example/output/stylesheets/handbookish-quirks.css +0 -0
- data/example/output/stylesheets/handbookish.css +0 -233
- data/example/output/tables.html +0 -797
- data/example/output/text_formatting.html +0 -273
- data/example/output/the_adventure_of_the_beryl_coronet.html +0 -968
- data/example/output/the_adventure_of_the_blue_carbuncle.html +0 -825
- data/example/output/the_adventure_of_the_copper_beeches.html +0 -998
- data/example/output/the_adventure_of_the_engineer_s_thumb.html +0 -851
- data/example/output/the_adventure_of_the_noble_bachelor.html +0 -861
- data/example/output/the_adventure_of_the_speckled_band.html +0 -1015
- data/example/output/the_boscombe_valley_mystery.html +0 -974
- data/example/output/the_first_chapter.html +0 -110
- data/example/output/the_five_orange_pips.html +0 -776
- data/example/output/the_man_with_the_twisted_lip.html +0 -946
- data/example/output/the_red-headed_league.html +0 -950
- data/example/output/the_second_chapter.html +0 -95
- data/example/output/the_third_chapter.html +0 -58
- data/example/output/tips_and_tricks.html +0 -452
- data/example/output/title.html +0 -120
- data/example/output/titles.html +0 -126
data/example/output/ar01s28.html
DELETED
@@ -1,237 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Block Element Definitions</title><link rel="stylesheet" href="stylesheets/handbookish.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.74.1" /><link rel="home" href="index.html" title="AsciiDoc User Guide" /><link rel="up" href="index.html" title="AsciiDoc User Guide" /><link rel="prev" href="ar01s27.html" title="Intrinsic Attributes" /><link rel="next" href="ar01s29.html" title="Filters" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Block Element Definitions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s27.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ar01s29.html">Next</a></td></tr></table><hr /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="X73"></a>Block Element Definitions</h2></div></div></div><p>The syntax and behavior of Paragraph, DelimitedBlock, List and Table
|
4
|
-
block elements is determined by block definitions contained in
|
5
|
-
<a class="link" href="ar01s22.html" title="Configuration Files">AsciiDoc configuration file</a> sections.</p><p>Each definition consists of a section title followed by one or more
|
6
|
-
section entries. Each entry defines a block parameter controlling some
|
7
|
-
aspect of the block’s behavior. Here’s an example:</p><pre class="screen">[blockdef-listing]
|
8
|
-
delimiter=^-{4,}$
|
9
|
-
template=listingblock
|
10
|
-
presubs=specialcharacters,callouts</pre><p>AsciiDoc Paragraph, DelimitedBlock, List and Table block elements
|
11
|
-
share a common subset of configuration file parameters:</p><div class="variablelist"><dl><dt><span class="term">
|
12
|
-
delimiter
|
13
|
-
</span></dt><dd>
|
14
|
-
A Python regular expression that matches the first line of a block
|
15
|
-
element — in the case of DelimitedBlocks and Tables it also matches
|
16
|
-
the last line.
|
17
|
-
</dd><dt><span class="term">
|
18
|
-
template
|
19
|
-
</span></dt><dd>
|
20
|
-
The name of the configuration file markup template section that will
|
21
|
-
envelope the block contents. The pipe (<span class="emphasis"><em>|</em></span>) character is substituted
|
22
|
-
for the block contents. List elements use a set of (list specific)
|
23
|
-
tag parameters instead of a single template. The template name can
|
24
|
-
contain attribute references allowing dynamic template selection a
|
25
|
-
the time of template substitution.
|
26
|
-
</dd><dt><span class="term">
|
27
|
-
options
|
28
|
-
</span></dt><dd>
|
29
|
-
A comma delimited list of element specific option names. In addition
|
30
|
-
to being used internally, options are available during markup tag
|
31
|
-
and template substitution as attributes with an empty string value
|
32
|
-
named like <code class="literal"><option>-option</code> (where <code class="literal"><option></code> is the option name).
|
33
|
-
See <a class="link" href="apf.html" title="F. Attribute Options">attribute options</a> for a complete list of available
|
34
|
-
options.
|
35
|
-
</dd><dt><span class="term">
|
36
|
-
subs, presubs, postsubs
|
37
|
-
</span></dt><dd><div class="itemizedlist"><ul type="disc"><li>
|
38
|
-
<span class="emphasis"><em>presubs</em></span> and <span class="emphasis"><em>postsubs</em></span> are lists of comma separated substitutions that are
|
39
|
-
performed on the block contents. <span class="emphasis"><em>presubs</em></span> is applied first,
|
40
|
-
<span class="emphasis"><em>postsubs</em></span> (if specified) second.
|
41
|
-
</li><li>
|
42
|
-
<span class="emphasis"><em>subs</em></span> is an alias for <span class="emphasis"><em>presubs</em></span>.
|
43
|
-
</li><li>
|
44
|
-
If a <span class="emphasis"><em>filter</em></span> is allowed (Paragraphs, DelimitedBlocks and Tables)
|
45
|
-
and has been specified then <span class="emphasis"><em>presubs</em></span> and <span class="emphasis"><em>postsubs</em></span> substitutions
|
46
|
-
are performed before and after the filter is run respectively.
|
47
|
-
</li><li>
|
48
|
-
Allowed values: <span class="emphasis"><em>specialcharacters</em></span>, <span class="emphasis"><em>quotes</em></span>, <span class="emphasis"><em>specialwords</em></span>,
|
49
|
-
<span class="emphasis"><em>replacements</em></span>, <span class="emphasis"><em>macros</em></span>, <span class="emphasis"><em>attributes</em></span>, <span class="emphasis"><em>callouts</em></span>.
|
50
|
-
</li><li><p>
|
51
|
-
The following composite values are also allowed:
|
52
|
-
</p><div class="variablelist"><dl><dt><span class="term">
|
53
|
-
<span class="emphasis"><em>none</em></span>
|
54
|
-
</span></dt><dd>
|
55
|
-
No substitutions.
|
56
|
-
</dd><dt><span class="term">
|
57
|
-
<span class="emphasis"><em>normal</em></span>
|
58
|
-
</span></dt><dd>
|
59
|
-
The following substitutions:
|
60
|
-
<span class="emphasis"><em>specialcharacters</em></span>,<span class="emphasis"><em>quotes</em></span>,<span class="emphasis"><em>attributes</em></span>,<span class="emphasis"><em>specialwords</em></span>,
|
61
|
-
<span class="emphasis"><em>replacements</em></span>,<span class="emphasis"><em>macros</em></span>.
|
62
|
-
</dd><dt><span class="term">
|
63
|
-
<span class="emphasis"><em>verbatim</em></span>
|
64
|
-
</span></dt><dd>
|
65
|
-
<span class="emphasis"><em>specialcharacters</em></span> and <span class="emphasis"><em>callouts</em></span> substitutions.
|
66
|
-
</dd></dl></div></li><li>
|
67
|
-
<span class="emphasis"><em>normal</em></span> and <span class="emphasis"><em>verbatim</em></span> substitutions can be redefined by with
|
68
|
-
<code class="literal">subsnormal</code> and <code class="literal">subsverbatim</code> entries in a configuration file
|
69
|
-
<code class="literal">[miscellaneous]</code> section.
|
70
|
-
</li><li>
|
71
|
-
The substitutions are processed in the order in which they are
|
72
|
-
listed and can appear more than once.
|
73
|
-
</li></ul></div></dd><dt><span class="term">
|
74
|
-
filter
|
75
|
-
</span></dt><dd>
|
76
|
-
This optional entry specifies an executable shell command for
|
77
|
-
processing block content (Paragraphs, DelimitedBlocks and Tables).
|
78
|
-
The filter command can contain attribute references.
|
79
|
-
</dd><dt><span class="term">
|
80
|
-
posattrs
|
81
|
-
</span></dt><dd><p>
|
82
|
-
Optional comma separated list of positional attribute names. This
|
83
|
-
list maps positional attributes (in the block’s <a class="link" href="ar01s25.html" title="Attribute Lists">attribute list</a>) to named block attributes. The following example, from the
|
84
|
-
QuoteBlock definition, maps the first and section positional
|
85
|
-
attributes:
|
86
|
-
</p><pre class="literallayout">posattrs=attribution,citetitle</pre></dd><dt><span class="term">
|
87
|
-
style
|
88
|
-
</span></dt><dd>
|
89
|
-
This optional parameter specifies the default style name.
|
90
|
-
</dd><dt><span class="term">
|
91
|
-
<stylename>-style
|
92
|
-
</span></dt><dd>
|
93
|
-
Optional style definition (see <a class="link" href="ar01s28.html#X23" title="Styles">Styles</a> below).
|
94
|
-
</dd></dl></div><p>The following block parameters behave like document attributes and can
|
95
|
-
be set in block attribute lists and style definitions: <span class="emphasis"><em>template</em></span>,
|
96
|
-
<span class="emphasis"><em>options</em></span>, <span class="emphasis"><em>subs</em></span>, <span class="emphasis"><em>presubs</em></span>, <span class="emphasis"><em>postsubs</em></span>, <span class="emphasis"><em>filter</em></span>.</p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="X23"></a>Styles</h3></div></div></div><p>A style is a set of block attributes bundled as a single named
|
97
|
-
attribute. The following example defines a style named <span class="emphasis"><em>verbatim</em></span>:</p><pre class="literallayout">verbatim-style=template="literalblock",subs="verbatim"</pre><div class="itemizedlist"><ul type="disc"><li>
|
98
|
-
All style parameter names must be suffixed with <code class="literal">-style</code> and the
|
99
|
-
style parameter value is in the form of a list of <a class="link" href="ar01s25.html" title="Attribute Lists">named attributes</a>.
|
100
|
-
</li><li>
|
101
|
-
Multi-item style attributes (<span class="emphasis"><em>subs</em></span>,<span class="emphasis"><em>presubs</em></span>,<span class="emphasis"><em>postsubs</em></span>,<span class="emphasis"><em>posattrs</em></span>)
|
102
|
-
must be specified using Python tuple syntax rather than a simple
|
103
|
-
list of values as they in separate entries e.g.
|
104
|
-
<code class="literal">postsubs=("callouts",)</code> not <code class="literal">postsubs="callouts"</code>.
|
105
|
-
</li></ul></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_paragraphs_2"></a>Paragraphs</h3></div></div></div><p>Paragraph translation is controlled by <code class="literal">[paradef-*]</code> configuration
|
106
|
-
file section entries. Users can define new types of paragraphs and
|
107
|
-
modify the behavior of existing types by editing AsciiDoc
|
108
|
-
configuration files.</p><p>Here is the shipped Default paragraph definition:</p><pre class="screen">[paradef-default]
|
109
|
-
delimiter=(?P<text>\S.*)
|
110
|
-
template=paragraph</pre><p>The normal paragraph definition has a couple of special properties:</p><div class="orderedlist"><ol type="1"><li>
|
111
|
-
It must exist and be defined in a configuration file section named
|
112
|
-
<code class="literal">[paradef-default]</code>.
|
113
|
-
</li><li>
|
114
|
-
Irrespective of its position in the configuration files default
|
115
|
-
paragraph document matches are attempted only after trying all
|
116
|
-
other paragraph types.
|
117
|
-
</li></ol></div><p>Paragraph specific block parameter notes:</p><div class="variablelist"><dl><dt><span class="term">
|
118
|
-
delimiter
|
119
|
-
</span></dt><dd>
|
120
|
-
This regular expression must contain the named group <span class="emphasis"><em>text</em></span> which
|
121
|
-
matches the text on the first line. Paragraphs are terminated by a
|
122
|
-
blank line, the end of file, or the start of a DelimitedBlock.
|
123
|
-
</dd><dt><span class="term">
|
124
|
-
options
|
125
|
-
</span></dt><dd>
|
126
|
-
The <span class="emphasis"><em>listelement</em></span> option specifies that paragraphs of this type will
|
127
|
-
automatically be considered part of immediately preceding list
|
128
|
-
items.
|
129
|
-
</dd></dl></div><div class="orderedlist"><p class="title"><b>Paragraph processing proceeds as follows:</b></p><ol type="1"><li>
|
130
|
-
The paragraph text is aligned to the left margin.
|
131
|
-
</li><li>
|
132
|
-
Optional <span class="emphasis"><em>presubs</em></span> inline substitutions are performed on the
|
133
|
-
paragraph text.
|
134
|
-
</li><li>
|
135
|
-
If a filter command is specified it is executed and the paragraph
|
136
|
-
text piped to its standard input; the filter output replaces the
|
137
|
-
paragraph text.
|
138
|
-
</li><li>
|
139
|
-
Optional <span class="emphasis"><em>postsubs</em></span> inline substitutions are performed on the
|
140
|
-
paragraph text.
|
141
|
-
</li><li>
|
142
|
-
The paragraph text is enveloped by the paragraph’s markup template
|
143
|
-
and written to the output file.
|
144
|
-
</li></ol></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_delimited_blocks_2"></a>Delimited Blocks</h3></div></div></div><p>DelimitedBlock <span class="emphasis"><em>options</em></span> values are:</p><div class="variablelist"><dl><dt><span class="term">
|
145
|
-
sectionbody
|
146
|
-
</span></dt><dd>
|
147
|
-
The block contents are processed as a SectionBody.
|
148
|
-
</dd><dt><span class="term">
|
149
|
-
skip
|
150
|
-
</span></dt><dd>
|
151
|
-
The block is treated as a comment (see <a class="link" href="ar01s13.html#X26" title="Comment Blocks">CommentBlocks</a>).
|
152
|
-
</dd></dl></div><p><span class="emphasis"><em>presubs</em></span>, <span class="emphasis"><em>postsubs</em></span> and <span class="emphasis"><em>filter</em></span> entries are ignored when
|
153
|
-
<span class="emphasis"><em>sectionbody</em></span> or <span class="emphasis"><em>skip</em></span> options are set.</p><p>DelimitedBlock processing proceeds as follows:</p><div class="orderedlist"><ol type="1"><li>
|
154
|
-
Optional <span class="emphasis"><em>presubs</em></span> substitutions are performed on the block
|
155
|
-
contents.
|
156
|
-
</li><li>
|
157
|
-
If a filter is specified it is executed and the block’s contents
|
158
|
-
piped to its standard input. The filter output replaces the block
|
159
|
-
contents.
|
160
|
-
</li><li>
|
161
|
-
Optional <span class="emphasis"><em>postsubs</em></span> substitutions are performed on the block
|
162
|
-
contents.
|
163
|
-
</li><li>
|
164
|
-
The block contents is enveloped by the block’s markup template and
|
165
|
-
written to the output file.
|
166
|
-
</li></ol></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><p>Attribute expansion is performed on the block filter command
|
167
|
-
before it is executed, this is useful for passing arguments to the
|
168
|
-
filter.</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_lists"></a>Lists</h3></div></div></div><p>List behavior and syntax is determined by <code class="literal">[listdef-*]</code> configuration
|
169
|
-
file sections. The user can change existing list behavior and add new
|
170
|
-
list types by editing configuration files.</p><p>List specific block definition notes:</p><div class="variablelist"><dl><dt><span class="term">
|
171
|
-
type
|
172
|
-
</span></dt><dd>
|
173
|
-
This is either <span class="emphasis"><em>bulleted</em></span>,<span class="emphasis"><em>numbered</em></span>,<span class="emphasis"><em>labeled</em></span> or <span class="emphasis"><em>callout</em></span>.
|
174
|
-
</dd><dt><span class="term">
|
175
|
-
delimiter
|
176
|
-
</span></dt><dd>
|
177
|
-
A Python regular expression that matches the first line of a
|
178
|
-
list element entry. This expression can contain the named groups
|
179
|
-
<span class="emphasis"><em>text</em></span> (bulleted groups), <span class="emphasis"><em>index</em></span> and <span class="emphasis"><em>text</em></span> (numbered lists),
|
180
|
-
<span class="emphasis"><em>label</em></span> and <span class="emphasis"><em>text</em></span> (labeled lists).
|
181
|
-
</dd><dt><span class="term">
|
182
|
-
tags
|
183
|
-
</span></dt><dd>
|
184
|
-
The <code class="literal"><name></code> of the <code class="literal">[listtags-<name>]</code> configuration file section
|
185
|
-
containing list markup tag definitions. The tag entries (<span class="emphasis"><em>list</em></span>,
|
186
|
-
<span class="emphasis"><em>entry</em></span>, <span class="emphasis"><em>label</em></span>, <span class="emphasis"><em>term</em></span>, <span class="emphasis"><em>text</em></span>) map the AsciiDoc list structure to
|
187
|
-
backend markup; see the <span class="emphasis"><em>listtags</em></span> sections in the AsciiDoc
|
188
|
-
distributed backend <code class="literal">.conf</code> configuration files for examples.
|
189
|
-
</dd></dl></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_tables_2"></a>Tables</h3></div></div></div><p>Table behavior and syntax is determined by <code class="literal">[tabledef-*]</code> and
|
190
|
-
<code class="literal">[tabletags-*]</code> configuration file sections. The user can change
|
191
|
-
existing table behavior and add new table types by editing
|
192
|
-
configuration files. The following <code class="literal">[tabledef-*]</code> section entries
|
193
|
-
generate table output markup elements:</p><div class="variablelist"><dl><dt><span class="term">
|
194
|
-
colspec
|
195
|
-
</span></dt><dd>
|
196
|
-
The table <span class="emphasis"><em>colspec</em></span> tag definition.
|
197
|
-
</dd><dt><span class="term">
|
198
|
-
headrow, footrow, bodyrow
|
199
|
-
</span></dt><dd>
|
200
|
-
Table header, footer and body row tag definitions. <span class="emphasis"><em>headrow</em></span> and
|
201
|
-
<span class="emphasis"><em>footrow</em></span> table definition entries default to <span class="emphasis"><em>bodyrow</em></span> if
|
202
|
-
they are undefined.
|
203
|
-
</dd><dt><span class="term">
|
204
|
-
headdata, footdata, bodydata
|
205
|
-
</span></dt><dd>
|
206
|
-
Table header, footer and body data tag definitions. <span class="emphasis"><em>headdata</em></span> and
|
207
|
-
<span class="emphasis"><em>footdata</em></span> table definition entries default to <span class="emphasis"><em>bodydata</em></span> if they
|
208
|
-
are undefined.
|
209
|
-
</dd><dt><span class="term">
|
210
|
-
paragraph
|
211
|
-
</span></dt><dd>
|
212
|
-
If the <span class="emphasis"><em>paragraph</em></span> tag is specified then blank lines in the cell
|
213
|
-
data are treated as paragraph delimiters and marked up using this
|
214
|
-
tag.
|
215
|
-
</dd></dl></div><p><a id="X4"></a>Table behavior is also influenced by the following <code class="literal">[miscellaneous]</code>
|
216
|
-
configuration file entries:</p><div class="variablelist"><dl><dt><span class="term">
|
217
|
-
pagewidth
|
218
|
-
</span></dt><dd>
|
219
|
-
This integer value is the printable width of the output media. See
|
220
|
-
<a class="link" href="ar01s19.html#X69" title="Table attributes">table attributes</a>.
|
221
|
-
</dd><dt><span class="term">
|
222
|
-
pageunits
|
223
|
-
</span></dt><dd>
|
224
|
-
The units of width in output markup width attribute values.
|
225
|
-
</dd></dl></div><div class="itemizedlist"><p class="title"><b>Table definition behavior</b></p><ul type="disc"><li>
|
226
|
-
The output markup generation is specifically designed to work with
|
227
|
-
the HTML and CALS (DocBook) table models, but should be adaptable to
|
228
|
-
most XML table schema.
|
229
|
-
</li><li>
|
230
|
-
Table definitions can be “mixed in” from multiple cascading
|
231
|
-
configuration files.
|
232
|
-
</li><li>
|
233
|
-
New table definitions inherit the default table and table tags
|
234
|
-
definitions (<code class="literal">[tabledef-default]</code> and <code class="literal">[tabletags-default]</code>) so you
|
235
|
-
only need to override those conf file entries that require
|
236
|
-
modification.
|
237
|
-
</li></ul></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s27.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ar01s29.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Intrinsic Attributes </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Filters</td></tr></table></div></body></html>
|
data/example/output/ar01s29.html
DELETED
@@ -1,68 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Filters</title><link rel="stylesheet" href="stylesheets/handbookish.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.74.1" /><link rel="home" href="index.html" title="AsciiDoc User Guide" /><link rel="up" href="index.html" title="AsciiDoc User Guide" /><link rel="prev" href="ar01s28.html" title="Block Element Definitions" /><link rel="next" href="ar01s30.html" title="Converting DocBook to other file formats" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Filters</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s28.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ar01s30.html">Next</a></td></tr></table><hr /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="X59"></a>Filters</h2></div></div></div><p>Filters are external shell commands used to process Paragraph,
|
4
|
-
DelimitedBlock and Table content and are specified in the
|
5
|
-
corresponding configuration file definitions.</p><p>There’s nothing special about the filters, they’re just standard UNIX
|
6
|
-
filters: they read text from the standard input, process it, and write
|
7
|
-
to the standard output.</p><p>Attribute substitution is performed on the filter command prior to
|
8
|
-
execution — attributes can be used to pass parameters from the
|
9
|
-
AsciiDoc source document to the filter.</p><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>Filters can potentially generate unsafe output. Before
|
10
|
-
installing a filter you should verify that it is from a trusted
|
11
|
-
source.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_filter_search_paths"></a>Filter Search Paths</h3></div></div></div><p>If the filter command does not specify a directory path then
|
12
|
-
asciidoc(1) searches for the command:</p><div class="itemizedlist"><ul type="disc"><li>
|
13
|
-
First it looks in the user’s <code class="literal">$HOME/.asciidoc/filters</code> directory.
|
14
|
-
</li><li>
|
15
|
-
Next the global filters directory (usually <code class="literal">/etc/asciidoc/filters</code>
|
16
|
-
or <code class="literal">/usr/local/etc/asciidoc</code>) directory is searched.
|
17
|
-
</li><li>
|
18
|
-
Then it looks in the asciidoc(1) <code class="literal">./filters</code> directory.
|
19
|
-
</li><li>
|
20
|
-
Finally it relies on the executing shell to search the environment
|
21
|
-
search path (<code class="literal">$PATH</code>).
|
22
|
-
</li></ul></div><p>Sub-directories are also included in the searches — standard practice
|
23
|
-
is to install each filter in it’s own sub-directory with the same name
|
24
|
-
as the filter’s style definition. For example the music filter’s style
|
25
|
-
name is <span class="emphasis"><em>music</em></span> so it’s configuration and filter files are stored in
|
26
|
-
the <code class="literal">filters/music</code> directory.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_filter_configuration_files"></a>Filter Configuration Files</h3></div></div></div><p>Filters are normally accompanied by a configuration file containing a
|
27
|
-
Paragraph or DelimitedBlock definition along with corresponding markup
|
28
|
-
templates.</p><p>While it is possible to create new Paragraph or DelimitedBlock
|
29
|
-
definitions the preferred way to implement a filter is to add a
|
30
|
-
<a class="link" href="ar01s28.html#X23" title="Styles">style</a> to the existing Paragraph and ListingBlock definitions
|
31
|
-
(all filters shipped with AsciiDoc use this technique). The filter is
|
32
|
-
applied to the paragraph or delimited block by preceding it with an
|
33
|
-
attribute list: the first positional attribute is the style name,
|
34
|
-
remaining attributes are normally filter specific parameters.</p><p>asciidoc(1) auto-loads all <code class="literal">.conf</code> files found in the filter search
|
35
|
-
paths (see previous section).</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="X56"></a>Code Filter</h3></div></div></div><p>AsciiDoc comes with a toy filter for highlighting source code keywords
|
36
|
-
and comments. See also the <code class="literal">./filters/code/code-filter-readme.txt</code>
|
37
|
-
file.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This filter primarily to demonstrate how to write a filter — it’s much to simplistic to be passed off as a code syntax highlighter.
|
38
|
-
If you want a full featured multi-language highlighter use the
|
39
|
-
<a class="link" href="ar01s29.html#X57" title="Source Code Highlighter Filter">Source Code Highlighter Filter</a>.</p></div><pre class="screen">.Code filter example
|
40
|
-
[code,python]
|
41
|
-
----------------------------------------------
|
42
|
-
''' A multi-line
|
43
|
-
comment.'''
|
44
|
-
def sub_word(mo):
|
45
|
-
''' Single line comment.'''
|
46
|
-
word = mo.group('word') # Inline comment
|
47
|
-
if word in keywords[language]:
|
48
|
-
return quote + word + quote
|
49
|
-
else:
|
50
|
-
return word
|
51
|
-
----------------------------------------------</pre><p>Outputs:</p><p><b>Code filter example. </b>
|
52
|
-
</p><pre class="screen"><span class="emphasis"><em>''' A multi-line</em></span>
|
53
|
-
<span class="emphasis"><em> comment.'''</em></span>
|
54
|
-
<span class="strong"><strong>def</strong></span> sub_word(mo):
|
55
|
-
<span class="emphasis"><em> ''' Single line comment.'''</em></span>
|
56
|
-
word = mo.group('word') <span class="emphasis"><em># Inline comment</em></span>
|
57
|
-
<span class="strong"><strong>if</strong></span> word <span class="strong"><strong>in</strong></span> keywords[language]:
|
58
|
-
<span class="strong"><strong>return</strong></span> quote + word + quote
|
59
|
-
<span class="strong"><strong>else</strong></span>:
|
60
|
-
<span class="strong"><strong>return</strong></span> word</pre><p>
|
61
|
-
</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="X57"></a>Source Code Highlighter Filter</h3></div></div></div><p>A
|
62
|
-
<a class="ulink" href="http://www.methods.co.nz/asciidoc/source-highlight-filter.html" target="_top">source code highlighter filter</a>
|
63
|
-
can be found in the AsciiDoc distribution <code class="literal">./filters</code> directory.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="X58"></a>Music Filter</h3></div></div></div><p>A <a class="ulink" href="http://www.methods.co.nz/asciidoc/music-filter.html" target="_top">music filter</a> is included in the
|
64
|
-
distribution <code class="literal">./filters</code> directory. It translates music in
|
65
|
-
<a class="ulink" href="http://lilypond.org/" target="_top">LilyPond</a> or <a class="ulink" href="http://abcnotation.org.uk/" target="_top">ABC</a>
|
66
|
-
notation to standard Western classical notation in the form of a
|
67
|
-
trimmed PNG image which is automatically inserted into the output
|
68
|
-
document.</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s28.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ar01s30.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Block Element Definitions </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Converting DocBook to other file formats</td></tr></table></div></body></html>
|
data/example/output/ar01s30.html
DELETED
@@ -1,154 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Converting DocBook to other file formats</title><link rel="stylesheet" href="stylesheets/handbookish.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.74.1" /><link rel="home" href="index.html" title="AsciiDoc User Guide" /><link rel="up" href="index.html" title="AsciiDoc User Guide" /><link rel="prev" href="ar01s29.html" title="Filters" /><link rel="next" href="ar01s31.html" title="Generating Plain Text Files" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Converting DocBook to other file formats</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s29.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ar01s31.html">Next</a></td></tr></table><hr /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="X12"></a>Converting DocBook to other file formats</h2></div></div></div><p>DocBook files are validated, parsed and translated various
|
4
|
-
presentation file formats using a combination of applications
|
5
|
-
collectively called a DocBook <span class="emphasis"><em>tool chain</em></span>. The function of a tool
|
6
|
-
chain is to read the DocBook markup (produced by AsciiDoc) and
|
7
|
-
transform it to a presentation format (for example HTML, PDF, HTML
|
8
|
-
Help, EPUB, DVI, PostScript, LaTeX).</p><p>A wide range of user output format requirements coupled with a choice
|
9
|
-
of available tools and stylesheets results in many valid tool chain
|
10
|
-
combinations.</p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="X43"></a>a2x Toolchain Wrapper</h3></div></div></div><p>One of the biggest hurdles for new users is installing, configuring
|
11
|
-
and using a DocBook XML toolchain. <code class="literal">a2x(1)</code> can help — it’s a
|
12
|
-
toolchain wrapper command that will generate XHTML (chunked and
|
13
|
-
unchunked), PDF, EPUB, DVI, PS, LaTeX, man page, HTML Help and text
|
14
|
-
file outputs from an AsciiDoc text file. <code class="literal">a2x(1)</code> does all the grunt
|
15
|
-
work associated with generating and sequencing the toolchain commands
|
16
|
-
and managing intermediate and output files. <code class="literal">a2x(1)</code> also optionally
|
17
|
-
deploys admonition and navigation icons and a CSS stylesheet. See the
|
18
|
-
<code class="literal">a2x(1)</code> man page for more details. In addition to <code class="literal">asciidoc(1)</code> you
|
19
|
-
also need <a class="link" href="ar01s30.html#X40">xsltproc(1)</a>, <a class="link" href="ar01s30.html#X13">DocBook XSL Stylesheets</a> and
|
20
|
-
optionally: <a class="link" href="ar01s30.html#X31">dblatex</a> or <a class="link" href="ar01s30.html#X14">FOP</a> (to generate PDF);
|
21
|
-
<code class="literal">w3m(1)</code> or <code class="literal">lynx(1)</code> (to generate text).</p><p>The following examples generate <code class="literal">doc/source-highlight-filter.pdf</code> from
|
22
|
-
the AsciiDoc <code class="literal">doc/source-highlight-filter.txt</code> source file. The first
|
23
|
-
example uses <code class="literal">dblatex(1)</code> (the default PDF generator) the second
|
24
|
-
example forces FOP to be used:</p><pre class="literallayout">$ a2x -f pdf doc/source-highlight-filter.txt
|
25
|
-
$ a2x -f pdf --fop doc/source-highlight-filter.txt</pre><p>See the <code class="literal">a2x(1)</code> man page for details.</p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><p>Use the <code class="literal">--verbose</code> command-line option to view executed
|
26
|
-
toolchain commands.</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_html_generation"></a>HTML generation</h3></div></div></div><p>AsciiDoc produces nicely styled HTML directly without requiring a
|
27
|
-
DocBook toolchain but there are also advantages in going the DocBook
|
28
|
-
route:</p><div class="itemizedlist"><ul type="disc"><li>
|
29
|
-
HTML from DocBook can optionally include automatically generated
|
30
|
-
indexes, tables of contents, footnotes, lists of figures and tables.
|
31
|
-
</li><li>
|
32
|
-
DocBook toolchains can also (optionally) generate separate (chunked)
|
33
|
-
linked HTML pages for each document section.
|
34
|
-
</li><li>
|
35
|
-
Toolchain processing performs link and document validity checks.
|
36
|
-
</li><li>
|
37
|
-
If the DocBook <span class="emphasis"><em>lang</em></span> attribute is set then things like table of
|
38
|
-
contents, figure and table captions and admonition captions will be
|
39
|
-
output in the specified language (setting the AsciiDoc <span class="emphasis"><em>lang</em></span>
|
40
|
-
attribute sets the DocBook <span class="emphasis"><em>lang</em></span> attribute).
|
41
|
-
</li></ul></div><p>On the other hand, HTML output directly from AsciiDoc is much faster,
|
42
|
-
is easily customized and can be used in situations where there is no
|
43
|
-
suitable DocBook toolchain (for example, see the <a class="ulink" href="http://www.methods.co.nz/asciidoc/" target="_top">AsciiDoc
|
44
|
-
website</a>).</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_pdf_generation"></a>PDF generation</h3></div></div></div><p>There are two commonly used tools to generate PDFs from DocBook,
|
45
|
-
<a class="link" href="ar01s30.html#X31">dblatex</a> and <a class="link" href="ar01s30.html#X14">FOP</a>.</p><div class="itemizedlist"><p class="title"><b>dblatex or FOP?</b></p><ul type="disc"><li>
|
46
|
-
<span class="emphasis"><em>dblatex</em></span> is easier to install, there’s zero configuration
|
47
|
-
required and no Java VM to install — it just works out of the box.
|
48
|
-
</li><li>
|
49
|
-
<span class="emphasis"><em>dblatex</em></span> source code highlighting and numbering is superb.
|
50
|
-
</li><li>
|
51
|
-
<span class="emphasis"><em>dblatex</em></span> is easier to use as it converts DocBook directly to PDF
|
52
|
-
whereas before using <span class="emphasis"><em>FOP</em></span> you have to convert DocBook to XML-FO
|
53
|
-
using <a class="link" href="ar01s30.html#X13">DocBook XSL Stylesheets</a>.
|
54
|
-
</li><li>
|
55
|
-
<span class="emphasis"><em>FOP</em></span> is more feature complete (for example, callouts are processed
|
56
|
-
inside literal layouts) and arguably produces nicer looking output.
|
57
|
-
</li></ul></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_html_help_generation"></a>HTML Help generation</h3></div></div></div><div class="orderedlist"><ol type="1"><li>
|
58
|
-
Convert DocBook XML documents to HTML Help compiler source files
|
59
|
-
using <a class="link" href="ar01s30.html#X13">DocBook XSL Stylesheets</a> and <a class="link" href="ar01s30.html#X40">xsltproc(1)</a>.
|
60
|
-
</li><li>
|
61
|
-
Convert the HTML Help source (<code class="literal">.hhp</code> and <code class="literal">.html</code>) files to HTML Help
|
62
|
-
(<code class="literal">.chm</code>) files using the <a class="link" href="ar01s30.html#X67">Microsoft HTML Help Compiler</a>.
|
63
|
-
</li></ol></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_toolchain_components_summary"></a>Toolchain components summary</h3></div></div></div><div class="variablelist"><dl><dt><span class="term">
|
64
|
-
AsciiDoc
|
65
|
-
</span></dt><dd>
|
66
|
-
Converts AsciiDoc (<code class="literal">.txt</code>) files to DocBook XML (<code class="literal">.xml</code>) files.
|
67
|
-
</dd><dt><span class="term">
|
68
|
-
<a id="X13"></a><a class="ulink" href="http://docbook.sourceforge.net/projects/xsl/" target="_top">DocBook XSL Stylesheets</a>
|
69
|
-
</span></dt><dd>
|
70
|
-
These are a set of XSL stylesheets containing rules for converting
|
71
|
-
DocBook XML documents to HTML, XSL-FO, manpage and HTML Help files.
|
72
|
-
The stylesheets are used in conjunction with an XML parser such as
|
73
|
-
<a class="link" href="ar01s30.html#X40">xsltproc(1)</a>.
|
74
|
-
</dd><dt><span class="term">
|
75
|
-
<a id="X40"></a><a class="ulink" href="http://www.xmlsoft.org" target="_top">xsltproc</a>
|
76
|
-
</span></dt><dd>
|
77
|
-
An XML parser for applying XSLT stylesheets (in our case the
|
78
|
-
<a class="link" href="ar01s30.html#X13">DocBook XSL Stylesheets</a>) to XML documents.
|
79
|
-
</dd><dt><span class="term">
|
80
|
-
<a id="X31"></a><a class="ulink" href="http://dblatex.sourceforge.net/" target="_top">dblatex</a>
|
81
|
-
</span></dt><dd>
|
82
|
-
Generates PDF, DVI, PostScript and LaTeX formats directly from
|
83
|
-
DocBook source via the intermediate LaTeX typesetting language — uses <a class="link" href="ar01s30.html#X13">DocBook XSL Stylesheets</a>, <a class="link" href="ar01s30.html#X40">xsltproc(1)</a> and
|
84
|
-
<code class="literal">latex(1)</code>.
|
85
|
-
</dd><dt><span class="term">
|
86
|
-
<a id="X14"></a><a class="ulink" href="http://xml.apache.org/fop/" target="_top">FOP</a>
|
87
|
-
</span></dt><dd>
|
88
|
-
The Apache Formatting Objects Processor converts XSL-FO (<code class="literal">.fo</code>)
|
89
|
-
files to PDF files. The XSL-FO files are generated from DocBook
|
90
|
-
source files using <a class="link" href="ar01s30.html#X13">DocBook XSL Stylesheets</a> and
|
91
|
-
<a class="link" href="ar01s30.html#X40">xsltproc(1)</a>.
|
92
|
-
</dd><dt><span class="term">
|
93
|
-
<a id="X67"></a>Microsoft Help Compiler
|
94
|
-
</span></dt><dd>
|
95
|
-
The Microsoft HTML Help Compiler (<code class="literal">hhc.exe</code>) is a command-line tool
|
96
|
-
that converts HTML Help source files to a single HTML Help (<code class="literal">.chm</code>)
|
97
|
-
file. It runs on MS Windows platforms and can be downloaded from
|
98
|
-
<a class="ulink" href="http://www.microsoft.com" target="_top">http://www.microsoft.com</a>.
|
99
|
-
</dd></dl></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_asciidoc_dblatex_configuration_files"></a>AsciiDoc dblatex configuration files</h3></div></div></div><p>The AsciiDoc distribution <code class="literal">./dblatex</code> directory contains
|
100
|
-
<code class="literal">asciidoc-dblatex.xsl</code> (customized XSL parameter settings) and
|
101
|
-
<code class="literal">asciidoc-dblatex.sty</code> (customized LaTeX settings). These are examples
|
102
|
-
of optional <a class="link" href="ar01s30.html#X31">dblatex</a> output customization and are used by
|
103
|
-
<a class="link" href="ar01s30.html#X43" title="a2x Toolchain Wrapper">a2x(1)</a>.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_asciidoc_docbook_xsl_stylesheets_drivers"></a>AsciiDoc DocBook XSL Stylesheets drivers</h3></div></div></div><p>You will have noticed that the distributed HTML and HTML Help
|
104
|
-
documentation files (for example <code class="literal">./doc/asciidoc.html</code>) are not the
|
105
|
-
plain outputs produced using the default <span class="emphasis"><em>DocBook XSL Stylesheets</em></span>
|
106
|
-
configuration. This is because they have been processed using
|
107
|
-
customized DocBook XSL Stylesheets along with (in the case of HTML
|
108
|
-
outputs) the custom <code class="literal">./stylesheets/docbook.css</code> CSS stylesheet.</p><p>You’ll find the customized DocBook XSL drivers along with additional
|
109
|
-
documentation in the distribution <code class="literal">./docbook-xsl</code> directory. The
|
110
|
-
examples that follow are executed from the distribution documentation
|
111
|
-
(<code class="literal">./doc</code>) directory. These drivers are also used by <a class="link" href="ar01s30.html#X43" title="a2x Toolchain Wrapper">a2x(1)</a>.</p><div class="variablelist"><dl><dt><span class="term">
|
112
|
-
<code class="literal">common.xsl</code>
|
113
|
-
</span></dt><dd>
|
114
|
-
Shared driver parameters. This file is not used directly but is
|
115
|
-
included in all the following drivers.
|
116
|
-
</dd><dt><span class="term">
|
117
|
-
<code class="literal">chunked.xsl</code>
|
118
|
-
</span></dt><dd><p>
|
119
|
-
Generate chunked XHTML (separate HTML pages for each document
|
120
|
-
section) in the <code class="literal">./doc/chunked</code> directory. For example:
|
121
|
-
</p><pre class="literallayout">$ python ../asciidoc.py -b docbook asciidoc.txt
|
122
|
-
$ xsltproc --nonet ../docbook-xsl/chunked.xsl asciidoc.xml</pre></dd><dt><span class="term">
|
123
|
-
<code class="literal">epub.xsl</code>
|
124
|
-
</span></dt><dd>
|
125
|
-
Used by <a class="link" href="ar01s30.html#X43" title="a2x Toolchain Wrapper">a2x(1)</a> to generate EPUB formatted documents.
|
126
|
-
</dd><dt><span class="term">
|
127
|
-
<code class="literal">fo.xsl</code>
|
128
|
-
</span></dt><dd><p>
|
129
|
-
Generate XSL Formatting Object (<code class="literal">.fo</code>) files for subsequent PDF
|
130
|
-
file generation using FOP. For example:
|
131
|
-
</p><pre class="literallayout">$ python ../asciidoc.py -b docbook article.txt
|
132
|
-
$ xsltproc --nonet ../docbook-xsl/fo.xsl article.xml > article.fo
|
133
|
-
$ fop article.fo article.pdf</pre></dd><dt><span class="term">
|
134
|
-
<code class="literal">htmlhelp.xsl</code>
|
135
|
-
</span></dt><dd><p>
|
136
|
-
Generate Microsoft HTML Help source files for the MS HTML Help
|
137
|
-
Compiler in the <code class="literal">./doc/htmlhelp</code> directory. This example is run on
|
138
|
-
MS Windows from a Cygwin shell prompt:
|
139
|
-
</p><pre class="literallayout">$ python ../asciidoc.py -b docbook asciidoc.txt
|
140
|
-
$ xsltproc --nonet ../docbook-xsl/htmlhelp.xsl asciidoc.xml
|
141
|
-
$ c:/Program\ Files/HTML\ Help\ Workshop/hhc.exe htmlhelp.hhp</pre></dd><dt><span class="term">
|
142
|
-
<code class="literal">manpage.xsl</code>
|
143
|
-
</span></dt><dd><p>
|
144
|
-
Generate a <code class="literal">roff(1)</code> format UNIX man page from a DocBook XML
|
145
|
-
<span class="emphasis"><em>refentry</em></span> document. This example generates an <code class="literal">asciidoc.1</code> man
|
146
|
-
page file:
|
147
|
-
</p><pre class="literallayout">$ python ../asciidoc.py -d manpage -b docbook asciidoc.1.txt
|
148
|
-
$ xsltproc --nonet ../docbook-xsl/manpage.xsl asciidoc.1.xml</pre></dd><dt><span class="term">
|
149
|
-
<code class="literal">xhtml.xsl</code>
|
150
|
-
</span></dt><dd><p>
|
151
|
-
Convert a DocBook XML file to a single XHTML file. For example:
|
152
|
-
</p><pre class="literallayout">$ python ../asciidoc.py -b docbook asciidoc.txt
|
153
|
-
$ xsltproc --nonet ../docbook-xsl/xhtml.xsl asciidoc.xml > asciidoc.html</pre></dd></dl></div><p>If you want to see how the complete documentation set is processed
|
154
|
-
take a look at the A-A-P script <code class="literal">./doc/main.aap</code>.</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s29.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ar01s31.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Filters </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Generating Plain Text Files</td></tr></table></div></body></html>
|