mizuho 0.9.6 → 0.9.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. data/README.markdown +4 -2
  2. data/Rakefile +0 -37
  3. data/asciidoc/BUGS +9 -18
  4. data/asciidoc/BUGS.txt +5 -14
  5. data/asciidoc/CHANGELOG +1433 -266
  6. data/asciidoc/CHANGELOG.txt +2821 -1810
  7. data/asciidoc/COPYING +339 -339
  8. data/asciidoc/COPYRIGHT +18 -18
  9. data/asciidoc/INSTALL +189 -30
  10. data/asciidoc/INSTALL.txt +175 -19
  11. data/asciidoc/MANIFEST +88 -0
  12. data/asciidoc/Makefile.in +29 -13
  13. data/asciidoc/README +16 -17
  14. data/asciidoc/README.txt +35 -36
  15. data/asciidoc/a2x.py +902 -0
  16. data/asciidoc/asciidoc.conf +610 -455
  17. data/asciidoc/asciidoc.py +1965 -1061
  18. data/asciidoc/asciidocapi.py +257 -0
  19. data/asciidoc/common.aap +2 -2
  20. data/asciidoc/configure +1170 -1023
  21. data/asciidoc/configure.ac +1 -1
  22. data/asciidoc/dblatex/asciidoc-dblatex.xsl +42 -0
  23. data/asciidoc/doc/a2x.1 +559 -102
  24. data/asciidoc/doc/a2x.1.txt +233 -91
  25. data/asciidoc/doc/article-docinfo.xml +87 -0
  26. data/asciidoc/doc/article.pdf +0 -0
  27. data/asciidoc/doc/article.txt +139 -122
  28. data/asciidoc/doc/asciidoc.1 +157 -46
  29. data/asciidoc/doc/asciidoc.1.txt +171 -118
  30. data/asciidoc/doc/asciidoc.conf +7 -8
  31. data/asciidoc/doc/asciidoc.dict +960 -635
  32. data/asciidoc/doc/asciidoc.txt +2335 -1464
  33. data/asciidoc/doc/asciidocapi.txt +189 -0
  34. data/asciidoc/doc/asciimathml.txt +14 -17
  35. data/asciidoc/doc/book-multi.txt +181 -155
  36. data/asciidoc/doc/book.epub +0 -0
  37. data/asciidoc/doc/book.txt +156 -131
  38. data/asciidoc/doc/customers.csv +18 -18
  39. data/asciidoc/doc/epub-notes.txt +210 -0
  40. data/asciidoc/doc/faq.txt +1122 -547
  41. data/asciidoc/doc/latex-backend.txt +192 -191
  42. data/asciidoc/doc/latex-bugs.txt +134 -0
  43. data/asciidoc/doc/latex-filter.pdf +0 -0
  44. data/asciidoc/doc/latex-filter.txt +196 -0
  45. data/asciidoc/doc/latexmath.txt +13 -136
  46. data/asciidoc/doc/latexmathml.txt +2 -2
  47. data/asciidoc/doc/main.aap +233 -297
  48. data/asciidoc/doc/music-filter.pdf +0 -0
  49. data/asciidoc/doc/music-filter.txt +55 -65
  50. data/asciidoc/doc/publishing-ebooks-with-asciidoc.txt +398 -0
  51. data/asciidoc/doc/slidy-example.txt +167 -0
  52. data/asciidoc/doc/slidy.txt +113 -0
  53. data/asciidoc/doc/source-highlight-filter.pdf +0 -0
  54. data/asciidoc/doc/source-highlight-filter.txt +45 -20
  55. data/asciidoc/doc/testasciidoc.txt +231 -0
  56. data/asciidoc/docbook-xsl/asciidoc-docbook-xsl.txt +30 -8
  57. data/asciidoc/docbook-xsl/chunked.xsl +17 -19
  58. data/asciidoc/docbook-xsl/common.xsl +106 -67
  59. data/asciidoc/docbook-xsl/epub.xsl +35 -0
  60. data/asciidoc/docbook-xsl/fo.xsl +3 -0
  61. data/asciidoc/docbook-xsl/htmlhelp.xsl +16 -17
  62. data/asciidoc/docbook-xsl/manpage.xsl +31 -31
  63. data/asciidoc/docbook-xsl/text.xsl +6 -1
  64. data/asciidoc/docbook-xsl/xhtml.xsl +14 -14
  65. data/asciidoc/docbook45.conf +759 -0
  66. data/asciidoc/filters/code/code-filter-readme.txt +37 -37
  67. data/asciidoc/filters/code/code-filter-test.txt +15 -15
  68. data/asciidoc/filters/code/code-filter.conf +8 -8
  69. data/asciidoc/filters/graphviz/asciidoc-graphviz-sample.txt +104 -64
  70. data/asciidoc/filters/graphviz/graphviz-filter.conf +20 -16
  71. data/asciidoc/filters/graphviz/graphviz2png.py +54 -39
  72. data/asciidoc/filters/latex/latex-filter.conf +18 -0
  73. data/asciidoc/filters/latex/latex2png.py +216 -0
  74. data/asciidoc/filters/music/music-filter.conf +8 -17
  75. data/asciidoc/filters/music/music2png.py +40 -32
  76. data/asciidoc/filters/source/source-highlight-filter.conf +40 -34
  77. data/asciidoc/help.conf +261 -96
  78. data/asciidoc/html4.conf +505 -460
  79. data/asciidoc/html5.conf +686 -0
  80. data/asciidoc/images/highlighter.png +0 -0
  81. data/asciidoc/images/icons/caution.png +0 -0
  82. data/asciidoc/images/icons/example.png +0 -0
  83. data/asciidoc/images/icons/important.png +0 -0
  84. data/asciidoc/images/icons/note.png +0 -0
  85. data/asciidoc/images/icons/tip.png +0 -0
  86. data/asciidoc/images/icons/warning.png +0 -0
  87. data/asciidoc/images/smallnew.png +0 -0
  88. data/asciidoc/javascripts/asciidoc.js +189 -0
  89. data/asciidoc/javascripts/slidy.js +2845 -0
  90. data/asciidoc/javascripts/toc.js +8 -0
  91. data/asciidoc/lang-de.conf +57 -0
  92. data/asciidoc/lang-en.conf +54 -0
  93. data/asciidoc/lang-es.conf +49 -9
  94. data/asciidoc/lang-fr.conf +59 -0
  95. data/asciidoc/lang-hu.conf +55 -0
  96. data/asciidoc/lang-it.conf +55 -0
  97. data/asciidoc/lang-nl.conf +57 -0
  98. data/asciidoc/lang-pt-BR.conf +56 -0
  99. data/asciidoc/lang-ru.conf +60 -0
  100. data/asciidoc/lang-uk.conf +60 -0
  101. data/asciidoc/latex.conf +700 -663
  102. data/asciidoc/main.aap +77 -0
  103. data/asciidoc/slidy.conf +136 -0
  104. data/asciidoc/{examples/website/xhtml11-manpage.css → stylesheets/asciidoc-manpage.css} +1 -1
  105. data/asciidoc/stylesheets/asciidoc.css +508 -0
  106. data/asciidoc/stylesheets/docbook-xsl.css +322 -272
  107. data/asciidoc/stylesheets/flask-manpage.css +1 -0
  108. data/asciidoc/stylesheets/flask.css +584 -0
  109. data/asciidoc/stylesheets/pygments.css +66 -0
  110. data/asciidoc/stylesheets/slidy.css +445 -0
  111. data/asciidoc/stylesheets/toc2.css +33 -0
  112. data/asciidoc/stylesheets/volnitsky-manpage.css +1 -0
  113. data/asciidoc/stylesheets/volnitsky.css +435 -0
  114. data/asciidoc/stylesheets/xhtml11-quirks.css +5 -3
  115. data/asciidoc/tests/asciidocapi.py +257 -0
  116. data/asciidoc/tests/data/deprecated-quotes.txt +12 -0
  117. data/asciidoc/tests/data/filters-test.txt +90 -0
  118. data/asciidoc/tests/data/lang-de-test.txt +106 -0
  119. data/asciidoc/tests/data/lang-en-test.txt +114 -0
  120. data/asciidoc/tests/data/lang-es-test.txt +106 -0
  121. data/asciidoc/tests/data/lang-fr-test.txt +106 -0
  122. data/asciidoc/tests/data/lang-hu-test.txt +106 -0
  123. data/asciidoc/tests/data/lang-nl-test.txt +94 -0
  124. data/asciidoc/tests/data/lang-pt-BR-test.txt +106 -0
  125. data/asciidoc/tests/data/lang-ru-test.txt +106 -0
  126. data/asciidoc/tests/data/lang-uk-test.txt +106 -0
  127. data/asciidoc/tests/data/oldtables.txt +64 -0
  128. data/asciidoc/tests/data/rcs-id-marker-test.txt +6 -0
  129. data/asciidoc/tests/data/testcases.conf +2 -0
  130. data/asciidoc/tests/data/testcases.txt +740 -0
  131. data/asciidoc/tests/data/utf8-bom-test.txt +9 -0
  132. data/asciidoc/tests/data/utf8-examples.txt +217 -0
  133. data/asciidoc/tests/testasciidoc.conf +520 -0
  134. data/asciidoc/tests/testasciidoc.py +411 -0
  135. data/asciidoc/text.conf +16 -16
  136. data/asciidoc/vim/syntax/asciidoc.vim +99 -91
  137. data/asciidoc/wordpress.conf +43 -3
  138. data/asciidoc/xhtml11-quirks.conf +61 -57
  139. data/asciidoc/xhtml11.conf +684 -645
  140. data/lib/mizuho.rb +2 -0
  141. data/lib/mizuho/generator.rb +2 -2
  142. data/test/generator_spec.rb +1 -1
  143. data/test/parser_spec.rb +1 -1
  144. data/test/spec_helper.rb +3 -4
  145. metadata +87 -88
  146. data/asciidoc/a2x +0 -674
  147. data/asciidoc/doc/article.css-embedded.html +0 -602
  148. data/asciidoc/doc/article.html +0 -46
  149. data/asciidoc/doc/asciidoc-revhistory.xml +0 -27
  150. data/asciidoc/doc/asciidoc.1.css-embedded.html +0 -598
  151. data/asciidoc/doc/asciidoc.1.css.html +0 -212
  152. data/asciidoc/doc/asciidoc.1.html +0 -190
  153. data/asciidoc/doc/asciidoc.css-embedded.html +0 -7853
  154. data/asciidoc/doc/asciidoc.css.html +0 -7416
  155. data/asciidoc/doc/asciidoc.html +0 -3339
  156. data/asciidoc/doc/book-multi.css-embedded.html +0 -575
  157. data/asciidoc/doc/book-multi.html +0 -55
  158. data/asciidoc/doc/book.css-embedded.html +0 -607
  159. data/asciidoc/doc/book.html +0 -43
  160. data/asciidoc/doc/docbook-xsl.css +0 -272
  161. data/asciidoc/doc/latex-backend.html +0 -117
  162. data/asciidoc/doc/music-filter.html +0 -566
  163. data/asciidoc/doc/source-highlight-filter.html +0 -214
  164. data/asciidoc/docbook.conf +0 -721
  165. data/asciidoc/examples/website/ASCIIMathML.js +0 -938
  166. data/asciidoc/examples/website/CHANGELOG.html +0 -4389
  167. data/asciidoc/examples/website/CHANGELOG.txt +0 -1810
  168. data/asciidoc/examples/website/INSTALL.html +0 -161
  169. data/asciidoc/examples/website/INSTALL.txt +0 -71
  170. data/asciidoc/examples/website/LaTeXMathML.js +0 -1223
  171. data/asciidoc/examples/website/README-website.html +0 -118
  172. data/asciidoc/examples/website/README-website.txt +0 -29
  173. data/asciidoc/examples/website/README.html +0 -125
  174. data/asciidoc/examples/website/README.txt +0 -36
  175. data/asciidoc/examples/website/a2x.1.html +0 -419
  176. data/asciidoc/examples/website/a2x.1.txt +0 -204
  177. data/asciidoc/examples/website/asciidoc-docbook-xsl.html +0 -130
  178. data/asciidoc/examples/website/asciidoc-docbook-xsl.txt +0 -43
  179. data/asciidoc/examples/website/asciidoc-graphviz-sample.txt +0 -130
  180. data/asciidoc/examples/website/asciimathml.txt +0 -64
  181. data/asciidoc/examples/website/build-website.sh +0 -25
  182. data/asciidoc/examples/website/customers.csv +0 -18
  183. data/asciidoc/examples/website/downloads.html +0 -257
  184. data/asciidoc/examples/website/downloads.txt +0 -121
  185. data/asciidoc/examples/website/faq.html +0 -673
  186. data/asciidoc/examples/website/faq.txt +0 -547
  187. data/asciidoc/examples/website/index.html +0 -419
  188. data/asciidoc/examples/website/index.txt +0 -245
  189. data/asciidoc/examples/website/latex-backend.html +0 -535
  190. data/asciidoc/examples/website/latex-backend.txt +0 -191
  191. data/asciidoc/examples/website/latexmathml.txt +0 -41
  192. data/asciidoc/examples/website/layout1.conf +0 -161
  193. data/asciidoc/examples/website/layout1.css +0 -65
  194. data/asciidoc/examples/website/layout2.conf +0 -158
  195. data/asciidoc/examples/website/layout2.css +0 -93
  196. data/asciidoc/examples/website/manpage.html +0 -266
  197. data/asciidoc/examples/website/manpage.txt +0 -118
  198. data/asciidoc/examples/website/music-filter.html +0 -242
  199. data/asciidoc/examples/website/music-filter.txt +0 -158
  200. data/asciidoc/examples/website/music1.abc +0 -12
  201. data/asciidoc/examples/website/music1.png +0 -0
  202. data/asciidoc/examples/website/music2.ly +0 -9
  203. data/asciidoc/examples/website/music2.png +0 -0
  204. data/asciidoc/examples/website/newlists.txt +0 -40
  205. data/asciidoc/examples/website/newtables.txt +0 -397
  206. data/asciidoc/examples/website/sample1.png +0 -0
  207. data/asciidoc/examples/website/sample3.png +0 -0
  208. data/asciidoc/examples/website/sample4.png +0 -0
  209. data/asciidoc/examples/website/source-highlight-filter.html +0 -286
  210. data/asciidoc/examples/website/source-highlight-filter.txt +0 -203
  211. data/asciidoc/examples/website/support.html +0 -78
  212. data/asciidoc/examples/website/support.txt +0 -5
  213. data/asciidoc/examples/website/toc.js +0 -69
  214. data/asciidoc/examples/website/userguide.html +0 -7460
  215. data/asciidoc/examples/website/userguide.txt +0 -4979
  216. data/asciidoc/examples/website/version83.txt +0 -37
  217. data/asciidoc/examples/website/version9.html +0 -143
  218. data/asciidoc/examples/website/version9.txt +0 -48
  219. data/asciidoc/examples/website/xhtml11-quirks.css +0 -41
  220. data/asciidoc/examples/website/xhtml11.css +0 -328
  221. data/asciidoc/stylesheets/xhtml11-manpage.css +0 -18
  222. data/asciidoc/stylesheets/xhtml11.css +0 -328
@@ -1,49 +1,44 @@
1
1
  A2X(1)
2
2
  ======
3
- Stuart Rackham <srackham@gmail.com>
3
+ :doctype: manpage
4
4
 
5
5
 
6
6
  NAME
7
7
  ----
8
- a2x - convert Asciidoc text file to PDF, XHTML, HTML Help, manpage or
9
- plain text
8
+ a2x - A toolchain manager for AsciiDoc (converts Asciidoc text files to other
9
+ file formats)
10
10
 
11
11
 
12
12
  SYNOPSIS
13
13
  --------
14
- *a2x* ['OPTIONS'] 'FILE'
14
+ *a2x* ['OPTIONS'] 'SOURCE_FILE'
15
15
 
16
16
 
17
17
  DESCRIPTION
18
18
  -----------
19
- A DocBook toolchain wrapper script that translates an AsciiDoc text
20
- file 'FILE' to PDF, DVI, PS, LaTeX, XHTML (single page or chunked),
21
- man page, HTML Help or plain text formats. PDF, XHTML, man page and
22
- HTML Help formats are are generated using the asciidoc(1),
23
- xsltproc(1), DocBook XSL Stylesheets, dblatex (or FOP) toolchain.
24
- Plain text is produced by passing asciidoc(1) generated HTML through
25
- lynx(1). The htmlhelp format option generates .hhp, .hhc and .html
26
- files suitable for compilation to an HTML Help .chm file.
19
+ A DocBook toolchain manager that translates an AsciiDoc text file
20
+ 'SOURCE_FILE' to PDF, EPUB, DVI, PS, LaTeX, XHTML (single page or
21
+ chunked), man page, HTML Help or plain text formats using
22
+ 'asciidoc(1)' and other applications (see <<X1,REQUISITES section>>).
23
+ 'SOURCE_FILE' can also be a DocBook file with an .xml extension.
27
24
 
28
25
 
29
26
  OPTIONS
30
27
  -------
31
28
  *-a, --attribute*='ATTRIBUTE'::
32
29
  Set asciidoc(1) attribute value (shortcut for *--asciidoc-opts*='"-a
33
- ATTRIBUTE"' option). This option may be specified more than once.
30
+ ATTRIBUTE"' option).
31
+ This option may be specified more than once.
34
32
 
35
33
  *--asciidoc-opts*='ASCIIDOC_OPTS'::
36
- Additional asciidoc(1) options. This option may be specified more
37
- than once.
34
+ Additional 'asciidoc(1)' options.
35
+ This option may be specified more than once.
38
36
 
39
- *--copy*::
40
- Copy distributed docbook-xsl CSS stylesheet admonition and
41
- navigation icons to their respective destinations. Applies to
42
- 'xhtml', 'chunked', 'htmlhelp' formats. The default behavior is to
43
- suppress copying.
37
+ *--conf-file*='CONF_FILE'::
38
+ Load configuration file. See <<X2,CONF FILES section>>.
44
39
 
45
- *-D, --destination-dir*='PATH'::
46
- Output directory. Defaults to source 'FILE' directory.
40
+ *-D, --destination-dir*='DESTINATION_DIR'::
41
+ Output directory. Defaults to 'SOURCE_FILE' directory.
47
42
 
48
43
  *-d, --doctype*='DOCTYPE'::
49
44
  DocBook document type: 'article', 'manpage' or 'book'. Default
@@ -51,8 +46,8 @@ OPTIONS
51
46
  case it defaults to 'manpage').
52
47
 
53
48
  *-f, --format*='FORMAT'::
54
- Output format: 'chunked', 'dvi', 'htmlhelp', 'manpage', 'pdf', 'ps',
55
- 'tex', 'text' or 'xhtml'.
49
+ Output formats: 'chunked', 'docbook', 'dvi', 'epub', 'htmlhelp',
50
+ 'manpage', 'pdf' (default), 'ps', 'tex', 'text', 'xhtml'.
56
51
 
57
52
  *-h, --help*::
58
53
  Print command-line syntax and program options to stdout.
@@ -62,24 +57,42 @@ OPTIONS
62
57
  default behavior is to use text in place of icons.
63
58
 
64
59
  *--icons-dir*='PATH'::
65
- A path (relative to destination HTML files) containing admonition
66
- and navigation icons. Defaults to './images/icons/'.
67
- Applies to 'xhtml', 'chunked', 'htmlhelp' formats.
60
+ A path (relative to output files) containing admonition
61
+ and navigation icons. Defaults to `images/icons`.
62
+ The '--icons' option is implicit if this option is used.
63
+
64
+ *-k, --keep-artifacts*::
65
+ Do not delete temporary build files.
66
+
67
+ *--lynx*::
68
+ Use 'lynx(1)' to generate text formatted output. The default
69
+ behavior is to use 'w3m(1)'.
68
70
 
69
71
  *-L, --no-xmllint*::
70
- Don't check asciidoc output with 'xmllint(1)'.
72
+ Do not check asciidoc output with 'xmllint(1)'.
73
+
74
+ *---epubcheck*::
75
+ Check EPUB output with 'epubcheck(1)'.
71
76
 
72
77
  *-n, --dry-run*::
73
- Don't do anything just print what would have been done.
78
+ Do not do anything just print what would have been done.
74
79
 
75
- *-s, --skip-asciidoc*::
76
- Skip asciidoc execution. This is useful for converting DocBook XML
77
- files not derived from AsciiDoc sources. Ignored if '--format=text'.
80
+ *-r, --resource*='RESOURCE_SPEC'::
81
+ Specify a resource. This option may be specified more than once.
82
+ See the <<X3,*RESOURCES*>> section for more details.
78
83
 
79
- *--stylesheet*='PATH'::
80
- A path (relative to destination HTML files) specifying the
81
- docbook-xsl CSS stylesheet file. Defaults to './docbook-xsl.css'.
82
- Applies to 'xhtml', 'chunked', 'htmlhelp' formats.
84
+ *-m, --resource-manifest*='FILE'::
85
+ 'FILE' contains a list resources (one per line). Manifest 'FILE'
86
+ entries are formatted just like *--resource* option arguments.
87
+ Environment variables and tilde home directories are allowed.
88
+
89
+ *--stylesheet*='STYLESHEET'::
90
+ A space delimited list of one or more CSS stylesheet file names that
91
+ are used to style HTML output generated by DocBook XSL Stylesheets.
92
+ Defaults to 'docbook-xsl.css'. The stylesheets are processed in
93
+ list order. The stylesheets must reside in a valid <<X3, resource
94
+ file>> location. Applies to HTML formats: 'xhtml', 'epub',
95
+ 'chunked', 'htmlhelp' formats.
83
96
 
84
97
  *-v, --verbose*::
85
98
  Print operational details to stderr.
@@ -89,105 +102,234 @@ OPTIONS
89
102
  Print program version to stdout.
90
103
 
91
104
  *--xsltproc-opts*='XSLTPROC_OPTS'::
92
- Additional xsltproc(1) options. This option may be specified more
93
- than once.
105
+ Additional 'xsltproc(1)' options.
106
+ This option may be specified more than once.
107
+
108
+ *--xsl-file*='XSL_FILE'::
109
+ Override the built-in XSL stylesheet with the custom XSL stylesheet
110
+ 'XSL_FILE'.
94
111
 
95
112
  *--fop*::
96
- Use FOP to generate PDFs.
113
+ Use FOP to generate PDFs. The default behavior is to use
114
+ 'dblatex(1)'. The '--fop' option is implicit if this option is
115
+ used.
97
116
 
98
117
  *--fop-opts*='FOP_OPTS'::
99
- Additional fop options. This option may be specified more than
100
- once. If this option is specified FOP is used to generate PDFs.
118
+ Additional 'fop(1)' options. If this option is specified FOP is used
119
+ to generate PDFs.
120
+ This option may be specified more than once.
101
121
 
102
122
  *--dblatex-opts*='DBLATEX_OPTS'::
103
- Additional dblatex options. This option may be specified more than once.
123
+ Additional 'dblatex(1)' options.
124
+ This option may be specified more than once.
125
+
126
+ Options can also be set in the AsciiDoc source file. If 'SOURCE_FILE'
127
+ contains a comment line beginning with *// a2x:* then the remainder of
128
+ the line will be treated as 'a2x' command-line options. For example:
104
129
 
130
+ // a2x default options.
131
+ // a2x: -dbook --epubcheck
132
+ // Suppress revision history in dblatex outputs.
133
+ // a2x: --dblatex-opts "-P latex.output.revhistory=0"
105
134
 
135
+ - Options spanning multiple such comment lines will be concatenated.
136
+ - Zero or more white space characters can appear between the leading
137
+ *//* and *a2x:*.
138
+ - Command-line options take precedence over options set in the source
139
+ file.
140
+
141
+
142
+ [[X4]]
106
143
  OUTPUT FILES
107
144
  ------------
108
145
  Output files are written to the directory specified by the
109
146
  *--destination-dir* option. If no *--destination-dir* option is set
110
- output files are written to the source FILE directory.
147
+ output files are written to the 'SOURCE_FILE' directory.
111
148
 
112
- Output files have the same name as the source 'FILE' but with an
113
- appropriate file name extension: .html for 'xhtml'; .hhp for
114
- 'htmlhelp'; .pdf for 'pdf'; .text for 'text'. By convention manpages
115
- have no .man extension (man page section number only). Chunked HTML
116
- directory names have a .chunked extension; chunked HTML Help directory
117
- names have a .htmlhelp extension.
149
+ Output files have the same name as the 'SOURCE_FILE' but with an
150
+ appropriate file name extension: `.html` for 'xhtml'; `.epub` for
151
+ 'epub'; `.hhp` for 'htmlhelp'; `.pdf` for 'pdf'; `.text` for 'text',
152
+ `.xml` for 'docbook'. By convention manpages have no `.man` extension
153
+ (man page section number only). Chunked HTML directory names have a
154
+ `.chunked` extension; chunked HTML Help directory names have a
155
+ `.htmlhelp` extension.
118
156
 
119
157
  Same named existing files are overwritten.
120
158
 
121
- Intermediate output files are written to the source 'FILE' directory
122
- and are not automatically deleted.
123
-
124
- Intermediate DocBook XML files generated by AsciiDoc are only
125
- regenerated if out of date with respect to the AsciiDoc source 'FILE'.
159
+ In addition to generating HTML files the 'xhtml', 'epub', 'chunked'
160
+ and 'htmlhelp' formats ensure <<X3,resource files>> are copied to
161
+ their correct destination directory locations.
126
162
 
127
- In addition to generating HTML files the 'xhtml', 'chunked' and
128
- 'htmlhelp' formats copy the DocBook XSL stylesheet plus admonition and
129
- navigation icons distributed with AsciiDoc to their respective
130
- destination locations. Existing stylesheets and icons are only copied
131
- if they are newer than the destination files or if the destination
132
- files are missing.
133
163
 
134
- The 'xhtml' format generates a single XHTML output page. The
135
- 'chunked' format writes multiple per-section HTML pages to a chunked
136
- directory in the destination directory. The chunked directory has the
137
- same name as the source 'FILE' name plus a .chunked extension.
164
+ [[X3]]
165
+ RESOURCES
166
+ ---------
167
+ Resources are files (typically CSS and images) that are required by
168
+ HTML based outputs ('xhtml', 'epub', 'chunked', 'htmlhelp' formats).
169
+ 'a2x' scans the generated HTML files and builds a list of required CSS
170
+ and image files. Additional resource files can be specified explicitly
171
+ using the *--resource* option.
172
+
173
+ 'a2x' searches for resource files in the following locations in the
174
+ following order:
175
+
176
+ . The 'SOURCE_FILE' directory.
177
+ . Resource directories specified by the *--resource* option (searched
178
+ recursively).
179
+ . Resource directories specified by the *--resource-manifest* option
180
+ (searched recursively in the order they appear in the manifest
181
+ file).
182
+ . The stock `images` and `stylesheets` directories in the
183
+ 'asciidoc(1)' configuration files directories (searched
184
+ recursively).
185
+ . The destination directory.
186
+
187
+ When a resource file is found it is copied to the correct relative
188
+ destination directory. Missing destination sub-directories are created
189
+ automatically.
190
+
191
+ There are two distinct mechanisms for specifying additional resources:
192
+
193
+ . A resource directory which will be searched recursively for missing
194
+ resource files.
195
+ . A resource file which will be copied to the output destination
196
+ directory.
197
+
198
+ Resources are specified with *--resource* option values which can be
199
+ one of the following formats:
200
+
201
+ <resource_dir>
202
+ <resource_file>[=<destination_file>]
203
+ .<ext>=<mimetype>
204
+
205
+ Where:
206
+
207
+ `<resource_dir>`::
208
+ Specifies a directory (absolute or relative to the 'SOURCE_FILE')
209
+ which is searched recursively for missing resource files. To
210
+ eliminate ambiguity the `<resource_dir>` name should end with a
211
+ directory separator character.
212
+
213
+ `<resource_file>`::
214
+ Specifies a resource file (absolute or relative to the
215
+ 'SOURCE_FILE') which will be copied to `<destination_file>`. If
216
+ `<destination_file>` is not specified then it is the same as the
217
+ `<resource_file>`.
218
+
219
+ `<destination_file>`::
220
+ Specifies the destination of the copied source file. The
221
+ `<destination_file>` path is relative to the destination directory
222
+ (absolute paths are not allowed). The location of the destination
223
+ directory depends on the output 'FORMAT' (see the <<X4,*OUTPUT
224
+ FILES*>> section for details):
225
+
226
+ chunked, htmlhelp;; The chunked output directory.
227
+ epub;; The archived `OEBPS` directory.
228
+ xhtml;; The output *DESTINATION_DIR*.
229
+
230
+ `.<ext>=<mimetype>`::
231
+ When adding resources to EPUB files the mimetype is inferred from
232
+ the `<destination file>` extension, if the mimetype cannot be
233
+ guessed an error occurs. The `.<ext>=<mimetype>` resource syntax can
234
+ be used to explicitly set mimetypes. `<ext>` is the file name
235
+ extension, `<mimetype>` is the corresponding MIME type.
236
+
237
+ Resource option examples:
238
+
239
+ --resource ../images/
240
+ --resource doc/README.txt=README.txt
241
+ --resource ~/images/tiger.png=images/tiger.png
242
+ --resource .ttf=application/x-font-ttf
138
243
 
139
244
 
140
245
  EXAMPLES
141
246
  --------
142
247
  `a2x -f pdf doc/source-highlight-filter.txt`::
143
- Generates doc/source-highlight-filter.pdf file.
248
+ Generates `doc/source-highlight-filter.pdf` file.
144
249
 
145
- `a2x -f chunked -D ../webpages guide.txt`::
146
- Creates chunked directory `../webpages/guide.chunked` containing
147
- chunked HTML files. Also copies `docbook-xsl.css` stylesheet to the
148
- `../webpages/guide.chunked` directory plus admonition and navigation
149
- icons to the `../webpages/guide.chunked/images/icons` directory.
250
+ `a2x -f xhtml -D ../doc --icons -r ../images/ team.txt`::
251
+ Creates HTML file `../doc/team.html`, uses admonition icons and
252
+ recursively searches the `../images/` directory for any missing
253
+ resources.
150
254
 
255
+ `a2x -f manpage doc/asciidoc.1.txt`::
256
+ Generate `doc/asciidoc.1` manpage.
151
257
 
258
+
259
+ [[X1]]
152
260
  REQUISITES
153
261
  ----------
154
- This script runs under the bash(1) shell and requires the following
155
- programs (which may or may not be prepackaged with your Linux
156
- distribution):
262
+ 'a2x' uses the following programs:
157
263
 
158
- Asciidoc::
264
+ - *Asciidoc*:
159
265
  http://www.methods.co.nz/asciidoc/
160
-
161
- xsltproc::
266
+ - *xsltproc*: (all formats except text):
162
267
  http://xmlsoft.org/XSLT/
163
-
164
- DocBook XSL Stylesheets::
268
+ - *DocBook XSL Stylesheets* (all formats except text):
165
269
  http://docbook.sourceforge.net/projects/xsl/
166
-
167
- dblatex (for PDF, DVI, PostScript and LaTeX file generation)::
270
+ - *dblatex* (pdf, dvi, ps, tex formats):
168
271
  http://dblatex.sourceforge.net/
169
-
170
- FOP (alternative PDF file generation)::
272
+ - *FOP* (pdf format -- alternative PDF file generator):
171
273
  http://xmlgraphics.apache.org/fop/
172
-
173
- w3m (text file generation)::
274
+ - *w3m* (text format):
174
275
  http://w3m.sourceforge.net/index.en.html
175
-
176
- Lynx (used for text file generation if `w3m(1)` not installed)::
276
+ - *Lynx* (text format -- alternative text file generator):
177
277
  http://lynx.isc.org/
278
+ - *epubcheck* (epub format -- EPUB file validator):
279
+ http://code.google.com/p/epubcheck/
178
280
 
179
281
  See also the latest README file.
180
282
 
181
283
 
284
+ [[X2]]
285
+ CONF FILES
286
+ ----------
287
+ A configuration file contains executable Python code that overrides
288
+ the global configuration parameters in `a2x.py`. Optional configuration
289
+ files are loaded in the following order:
290
+
291
+ . `a2x.conf` from the directory containing the 'a2x.py' executable.
292
+ . `a2x.conf` from the AsciiDoc global configuration directory. Skip
293
+ this step if we are executing a locally installed (non system wide)
294
+ copy.
295
+ . `a2x.conf` from the AsciiDoc `$HOME/.asciidoc` configuration
296
+ directory.
297
+ . The 'CONF_FILE' specified in the '--conf-file' option.
298
+
299
+ Here are the default configuration file option values:
300
+
301
+ ---------------------------------------------------------------------
302
+ # Optional environment variable dictionary passed to
303
+ # executing programs. If set to None the existing
304
+ # environment is used.
305
+ ENV = None
306
+
307
+ # External executables.
308
+ ASCIIDOC = 'asciidoc'
309
+ XSLTPROC = 'xsltproc'
310
+ DBLATEX = 'dblatex' # pdf generation.
311
+ FOP = 'fop' # pdf generation (--fop option).
312
+ W3M = 'w3m' # text generation.
313
+ LYNX = 'lynx' # text generation (if no w3m).
314
+ XMLLINT = 'xmllint' # Set to '' to disable.
315
+ EPUBCHECK = 'epubcheck' # Set to '' to disable.
316
+ # External executable default options.
317
+ ASCIIDOC_OPTS = ''
318
+ DBLATEX_OPTS = ''
319
+ FOP_OPTS = ''
320
+ XSLTPROC_OPTS = ''
321
+ ---------------------------------------------------------------------
322
+
323
+
182
324
  BUGS
183
325
  ----
184
- - The odt output format is undocumented and experimental.
185
- - See also the AsciiDoc distribution BUGS file.
326
+ See the AsciiDoc distribution BUGS file.
186
327
 
187
328
 
188
329
  AUTHOR
189
330
  ------
190
- Written by Stuart Rackham, <srackham@gmail.com>
331
+ a2x was originally written by Stuart Rackham. Many people have
332
+ contributed to it.
191
333
 
192
334
 
193
335
  RESOURCES
@@ -199,6 +341,6 @@ Main web site: http://www.methods.co.nz/asciidoc/
199
341
 
200
342
  COPYING
201
343
  -------
202
- Copyright \(C) 2002-2008 Stuart Rackham. Free use of this software is
203
- granted under the terms of the GNU General Public License (GPL).
344
+ Copyright \(C) 2002-2011 Stuart Rackham. Free use of this software is
345
+ granted under the terms of the MIT license.
204
346
 
@@ -0,0 +1,87 @@
1
+ <!--
2
+ article-docinfo.xml
3
+ Example DocBook document information file for article.txt.
4
+ -->
5
+
6
+ <authorgroup>
7
+ <author>
8
+ <honorific>Dr</honorific>
9
+ <firstname>Lois</firstname>
10
+ <surname>Common-Demoninator</surname>
11
+ <affiliation>
12
+ <shortaffil>Director, M. Behn School of Coop. Eng.</shortaffil>
13
+ <jobtitle>Director of Cooperative Efforts</jobtitle>
14
+ <orgname>The Marguerite Behn International School of
15
+ Cooperative Engineering</orgname>
16
+ </affiliation>
17
+ </author>
18
+
19
+ <author>
20
+ <honorific>Mr</honorific>
21
+ <firstname>Steven</firstname>
22
+ <surname>Norman</surname>
23
+ <othername role='mi'>T</othername>
24
+ <affiliation>
25
+ <shortaffil>ATI</shortaffil>
26
+ <jobtitle>Senior Application Analyst</jobtitle>
27
+ <orgname>Foobar, Inc.</orgname>
28
+ <orgdiv>Application Development</orgdiv>
29
+ </affiliation>
30
+ </author>
31
+
32
+ <editor>
33
+ <firstname>Peter</firstname>
34
+ <surname>Pan</surname>
35
+ <lineage>Sr.</lineage>
36
+ <othername>Spiderman</othername>
37
+ <authorblurb>
38
+ <para>
39
+ Peter's a super hero in his spare time.
40
+ </para>
41
+ </authorblurb>
42
+ </editor>
43
+ </authorgroup>
44
+
45
+ <copyright>
46
+ <year>2009</year>
47
+ <holder>Behn International</holder>
48
+ </copyright>
49
+
50
+ <legalnotice>
51
+ <simpara>
52
+ This program is free software; you can redistribute it and/or modify
53
+ it under the terms of the GNU General Public License as published by
54
+ the Free Software Foundation; either version 2 of the License, or
55
+ (at your option) any later version.
56
+ </simpara>
57
+ <simpara>
58
+ This program is distributed in the hope that it will be useful,
59
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
60
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
61
+ GNU General Public License for more details.
62
+ </simpara>
63
+ <simpara>
64
+ You should have received a copy of the GNU General Public License
65
+ along with this program; if not, write to the Free Software
66
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
67
+ </simpara>
68
+ </legalnotice>
69
+
70
+ <revhistory>
71
+ <revision>
72
+ <revnumber>1.1</revnumber>
73
+ <date>May 2009</date>
74
+ <authorinitials>PP</authorinitials>
75
+ <revremark>
76
+ Updates.
77
+ </revremark>
78
+ </revision>
79
+ <revision>
80
+ <revnumber>1.0</revnumber>
81
+ <date>October 2003</date>
82
+ <authorinitials>PP</authorinitials>
83
+ <revremark>
84
+ First release.
85
+ </revremark>
86
+ </revision>
87
+ </revhistory>