mizuho 0.9.6 → 0.9.8

Sign up to get free protection for your applications and to get access to all the features.
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,191 +1,192 @@
1
- LaTeX backend for Asciidoc
2
- ==========================
3
- Benjamin Klum <benjamin.klum@gmail.com>
4
- v1.0, June 2006
5
-
6
- == Introduction
7
-
8
-
9
- LaTeX backend is a configuration file for Stuart Rackham's http://www.methods.co.nz/asciidoc/[Asciidoc]. It generates high-level LaTeX markup from Asciidoc documents. LaTeX is a document preparation system for TeX which in turn is a popular typesetting system. It is well known for producing excellently typesetted high quality printouts, especially suited for scientific text.
10
-
11
- == Tutorial
12
- Getting a ready-to-print document from an Asciidoc document using the LaTeX backend involves at least two steps:
13
-
14
- 1. Conversion of the Asciidoc document into a LaTeX document (this is done by Asciidoc using the LaTeX backend)
15
- 2. Conversion of the LaTeX document into a PDF document (this is done by the TeX system)
16
-
17
- Try to create a PDF document from the Asciidoc document `article.txt` which resides in the `doc` directory of Asciidoc:
18
-
19
- .. Make a copy of `article.txt` in a directory of your choice, let's call it `latex-test`.
20
- .. Make sure that all images referenced in `article.txt` exist in `latex-test`. Brute force approach: Copy the whole `images` directory from Asciidoc directory into `latex-test`.
21
- .. Change directory to `latex-test` and type following commands:
22
- +
23
- asciidoc --unsafe --backend=latex article.txt
24
- pdflatex article.tex
25
- +
26
- .. Now there should be a file `article.pdf` in the `latex-test` directory.
27
-
28
- [IMPORTANT]
29
- ==============================
30
- - Asciidoc has to be started in 'unsafe mode' when using LaTeX backend.
31
- - Note that some special LaTeX packages are necessary, see <<packageRequirements,here>>.
32
- ==============================
33
-
34
- == General notes
35
-
36
- === Quality of LaTeX output
37
- High-level LaTeX is not very straightforward to generate. Therefore there's no guarantee that the generated output is valid and compiles successfully. At all, this backend should be considered as rather experimental. You should have been already in touch with LaTeX in order to use the backend effectively because LaTeX compilation errors can be really nasty.
38
-
39
- Nevertheless good results can be achieved by using LaTeX backend. Try for example to compile Stuart Rackham's Asciidoc documentation, a rather large document. It should compile without problems. However, the code filter might have to be reconfigured for the code filter example to work.
40
-
41
- === Configuration file customization
42
- Like every other Asciidoc backend the LaTeX backend can be customized easily to fit the user's needs. Actually it is very important to have this option since LaTeX doesn't have a companion language like CSS which allows to put styling information in a separate file. Read more about the LaTeX backend configuration file <<configurationFile,here>>.
43
-
44
- === Output optimization
45
- The LaTeX output is optimized for creating PDF documents using 'pdflatex'.
46
-
47
- [[unicodeSupport]]
48
- === Unicode support
49
- Unfortunately TeX/LaTeX does not have native unicode support. The package 'ucs' adds elementary unicode support by introducing UTF-8 input encoding recognition and by defining lookup tables which contain the corresponding LaTeX commands for unicode characters. But these lookup tables are far from being complete. When a unicode character is found which is not defined in the lookup tables an error is raised by the TeX/LaTeX compiler. Note that TeX/LaTeX compilation errors caused by missing unicode character definitions are not fatal, that means the result is probably readable but undefined unicode characters are replaced with `[U+...]`. You may (de)activate the recognition of escaped unicode characters. See the <<latex-recognize-escaped-unicode>> backend option.
50
-
51
- == Backend specific features
52
-
53
- === Special sections
54
-
55
- LaTeX backend supports the following special sections and replaces them with corresponding LaTeX commands or environments:
56
-
57
- - Abstract (only for document type 'article')
58
- - Dedication (only for document type 'book')
59
- - Index
60
- - Bibliography (only when the attribute 'latex-use-bibliography-environment' is set)
61
- - Appendix
62
- - Contents
63
-
64
- [[internalCrossReferences]]
65
- === Internal cross references
66
-
67
- Macros for internal cross references have been extended by the attribute 'style'.
68
-
69
- xref:<id>[<caption>, style=<style>]
70
-
71
- or
72
-
73
- <<<id>,<caption>,<style>>>
74
-
75
-
76
- The additional attribute 'style' can have following values:
77
-
78
- page::
79
- Let's LaTeX print the page number of the referenced anchor.
80
-
81
- ref::
82
- Let's LaTeX print the number of the section, subsection, figure, table or theorem the referenced anchor resides.
83
-
84
- autoref::
85
- Let's LaTeX print the number of the section, subsection, figure, table or theorem the referenced anchor resides preceded with a contextual label.
86
-
87
- cite::
88
- Let's LaTeX interprete this reference as a reference to a bibliography entry. If the attribute 'latex-use-bibliography-environment' is set, references with 'cite' style as well as their corresponding bibliography anchors are presented as automatically generated numbers.
89
-
90
- If the 'style' attribute is not set the reference is printed the common way.
91
-
92
-
93
- === Options
94
- LaTeX document generation is influenced by the following attributes:
95
-
96
- latex-table-rowlimit::
97
- The maximum number of rows for typesetting tables using the 'tabular' environment. If a table has more rows than 'latex-table-rowlimit', 'longtable' environment is used instead of 'tabular' environment. 'longtable' environment supports tables spanning over several pages.
98
-
99
- latex-use-bibliography-environment::
100
- If 'latex-use-bibliography-environment' is defined, 'thebibliography' environment is used for the bibliography section. As a result bibliography entries are automatically numbered. Note that this works only if the bibliography section contains exclusively bibliography list items which start with a bibliography entry ([[[...]]]). Otherwise a TeX/LaTeX compilation error will occur. In order to display bibliography references correctly their 'style' attribute must be set to 'cite'. For more information see <<internalCrossReferences,Internal cross references>>.
101
-
102
- latex-indent-paragraphs::
103
- If 'latex-indent-paragraphs' is defined, the first line of paragraphs will be indented. By default LaTeX backend prevents paragraph indentation and prints paragraphs with preceding vertical space.
104
-
105
- [[latex-recognize-escaped-unicode]] latex-recognize-escaped-unicode::
106
- If 'latex-recognize-escaped-unicode' is defined, escaped unicode characters (e.g. `$${amp}#960;$$` or `$${amp}#x3C0;$$`) will be recognized. This can lead to LaTeX compilation errors since LaTeX unicode support is only rudimentary. For more information see <<unicodeSupport, Unicode support>>.
107
-
108
- latex-use-custom-list-items::
109
- If 'latex-use-custom-list-items' is defined, lists will be bulleted or enumerated the way you have typed them in the original Asciidoc document. That means, `*` turns into a circle bullet, `-` turns into a dash, `.` turns into a number and `..` turns into a letter. Otherwise LaTeX will use different bullets and enumeration characters depending on the level of nesting.
110
-
111
- latex-use-colored-tables::
112
- If 'latex-use-colored-tables' is defined, tables will be printed colored.
113
-
114
- latex-use-running-title-headings::
115
- If 'latex-use-running-title-headings' is defined, 'pagestyle' will be set to 'headings' which results in running titles in the head.
116
-
117
- latex-use-colored-sidebar-blocks::
118
- If 'latex-use-colored-sidebar-blocks' is defined, sidebar block content will be put in a color box instead of being indented by a vertical bar.
119
-
120
- icons::
121
- Link admonition paragraph and admonition block icon images and badge images. By default icons is undefined and text is used in place of icon images.
122
-
123
- encoding::
124
- Set the input and output document character set encoding. Currently `ISO-8859-1` and `UTF-8` are supported.
125
-
126
- == Requirements
127
-
128
- === General
129
-
130
- The following software is necessary for using the LaTeX backend:
131
-
132
- - An up-to-date version of http://www.methods.co.nz/asciidoc/[Asciidoc]
133
- - An up-to-date TeX distribution, e.g.:
134
- * http://www.miktex.org/[MiKTeX] for Windows
135
- * http://www.tug.org/tetex/[teTeX] for Linux
136
-
137
- [[packageRequirements]]
138
- === TeX/LaTeX Package requirements
139
-
140
- LaTeX backend makes use of some LaTeX specialities which don't belong to a minimal TeX/LaTeX distribution. However, I took special care not to employ exotic packages. Hence the following packages should be available in most package repositories. The table is not complete yet because I don't know the package names for all TeX distributions.
141
-
142
- [cols="4*,4",options="header"]
143
- |====================================================================
144
- |Speciality | MiKTeX package name | teTeX package name | TeX Live package name | Description
145
- |KOMA-Script | koma-script | | | LaTeX backend uses the document classes 'scrartcl' and 'scrbook' as well as some other specialities defined in the 'KOMA-Script' package, e.g. the commands `\\addmargin{}` and `\minisec{}`.
146
- |xcolor.sty | xcolor | | | Used to produce colored boxes and tables.
147
- |colortbl.sty | colortbl | | | Used to produce colored tables.
148
- |type1ec.sty | cm-super | | | Enables high quality fonts for PDF output.
149
- |hyperref.sty | hyperref | | | Extensive support for hypertext in PDF documents.
150
- |enumerate.sty | tools | | | When 'latex-use-custom-list-items' is defined this package is used for determining the enumeration character.
151
- |graphicx.sty | graphics | | | Used for including images.
152
- |longtable.sty | tools | | | Enables page spanning tables.
153
- |ucs.sty | unicode | | | Enables support for unicode characters.
154
- |textcomp | ltxbase | | | Used for printing various symbols like arrows. Should be already installed.
155
- |alltt | ltxbase | | | Used in literal-like blocks for retaining line and whitespace formatting. Should be already installed.
156
- |listings.sty | listings | | | Used for listing blocks.
157
- |====================================================================
158
-
159
- [[configurationFile]]
160
- == About the LaTeX backend configuration file
161
- An important note for people who want to adapt the LaTeX backend configuration file to their own needs:
162
-
163
- LaTeX markup has a lot of special characters, most importantly `\`, `{`, `}`. In order to make things less complicated, I changed the default substitution order (see entry 'subsnormal' in the `[miscellaneous]` section). In contrast to the backends 'docbook' and 'xhtml11', the 'specialcharacters' substitution is applied very late. As a result all special characters produced by 'quotes', 'specialwords', 'replacements', 'attributes' and 'macros' become escaped at the end. If you don't want special characters in the corresponding sections to get escaped, you've to use following symbols instead of the special characters.
164
-
165
- - `$$!..backslash..!$$` instead of `\`
166
- - `$$!..braceleft..!$$` instead of `{`
167
- - `$$!..braceright..!$$` instead of `}`
168
-
169
-
170
- For more special characters take a look in the `[replacements2]` sections. `[replacements2]` section is responsible for replacing the symbols with their corresponding special characters.
171
-
172
-
173
- == Ideas
174
-
175
- === Code listing block
176
-
177
- For creating highlighted code listings I suggest the use of http://www.andre-simon.de/[Highlight] or http://www.gnu.org/software/src-highlite/[GNU Source Highlight]. Both are suited for use as Asciidoc filters.
178
-
179
- == Known Bugs
180
-
181
- - Sometimes LaTeX backend handles things differently from the default backends
182
- - A lot of little bugs
183
-
184
- == Todo List
185
-
186
- - Remove bugs
187
- - Support for 'grid' attribute in tables
188
- - Better looking tables
189
- - Option for squeezing output (smaller lists)
190
- - Support for different languages (That would be a nice feature for Asciidoc in general)
191
- - Option for switching titlepage on and off
1
+ LaTeX backend for Asciidoc
2
+ ==========================
3
+ Benjamin Klum <benjamin.klum@gmail.com>
4
+ v1.0, June 2006
5
+
6
+ == Introduction
7
+
8
+
9
+ LaTeX backend is a configuration file for Stuart Rackham's http://www.methods.co.nz/asciidoc/[Asciidoc]. It generates high-level LaTeX markup from Asciidoc documents. LaTeX is a document preparation system for TeX which in turn is a popular typesetting system. It is well known for producing excellently typesetted high quality printouts, especially suited for scientific text.
10
+
11
+ == Tutorial
12
+ Getting a ready-to-print document from an Asciidoc document using the LaTeX backend involves at least two steps:
13
+
14
+ 1. Conversion of the Asciidoc document into a LaTeX document (this is done by Asciidoc using the LaTeX backend)
15
+ 2. Conversion of the LaTeX document into a PDF document (this is done by the TeX system)
16
+
17
+ Try to create a PDF document from the Asciidoc document `article.txt` which resides in the `doc` directory of Asciidoc:
18
+
19
+ .. Make a copy of `article.txt` in a directory of your choice, let's call it `latex-test`.
20
+ .. Make sure that all images referenced in `article.txt` exist in `latex-test`. Brute force approach: Copy the whole `images` directory from Asciidoc directory into `latex-test`.
21
+ .. Change directory to `latex-test` and type following commands:
22
+ +
23
+ asciidoc --unsafe --backend=latex article.txt
24
+ pdflatex article.tex
25
+ +
26
+ .. Now there should be a file `article.pdf` in the `latex-test` directory.
27
+
28
+ [IMPORTANT]
29
+ ==============================
30
+ - Asciidoc has to be started in 'unsafe mode' when using LaTeX backend.
31
+ - Note that some special LaTeX packages are necessary, see <<packageRequirements,here>>.
32
+ ==============================
33
+
34
+ == General notes
35
+
36
+ === Quality of LaTeX output
37
+ High-level LaTeX is not very straightforward to generate. Therefore there's no guarantee that the generated output is valid and compiles successfully. At all, this backend should be considered as rather experimental. You should have been already in touch with LaTeX in order to use the backend effectively because LaTeX compilation errors can be really nasty.
38
+
39
+ Nevertheless good results can be achieved by using LaTeX backend. Try for example to compile Stuart Rackham's Asciidoc documentation, a rather large document. It should compile without problems. However, the code filter might have to be reconfigured for the code filter example to work.
40
+
41
+ === Configuration file customization
42
+ Like every other Asciidoc backend the LaTeX backend can be customized easily to fit the user's needs. Actually it is very important to have this option since LaTeX doesn't have a companion language like CSS which allows to put styling information in a separate file. Read more about the LaTeX backend configuration file <<configurationFile,here>>.
43
+
44
+ === Output optimization
45
+ The LaTeX output is optimized for creating PDF documents using 'pdflatex'.
46
+
47
+ [[unicodeSupport]]
48
+ === Unicode support
49
+ Unfortunately TeX/LaTeX does not have native unicode support. The package 'ucs' adds elementary unicode support by introducing UTF-8 input encoding recognition and by defining lookup tables which contain the corresponding LaTeX commands for unicode characters. But these lookup tables are far from being complete. When a unicode character is found which is not defined in the lookup tables an error is raised by the TeX/LaTeX compiler. Note that TeX/LaTeX compilation errors caused by missing unicode character definitions are not fatal, that means the result is probably readable but undefined unicode characters are replaced with `[U+...]`. You may (de)activate the recognition of escaped unicode characters. See the <<latex-recognize-escaped-unicode>> backend option.
50
+
51
+ == Backend specific features
52
+
53
+ === Special sections
54
+
55
+ LaTeX backend supports the following special sections and replaces them with corresponding LaTeX commands or environments:
56
+
57
+ - Abstract (only for document type 'article')
58
+ - Dedication (only for document type 'book')
59
+ - Index
60
+ - Bibliography (only when the attribute 'latex-use-bibliography-environment' is set)
61
+ - Appendix
62
+ - Contents
63
+
64
+ [[internalCrossReferences]]
65
+ === Internal cross references
66
+
67
+ Macros for internal cross references have been extended by the attribute 'style'.
68
+
69
+ xref:<id>[<caption>, style=<style>]
70
+
71
+ or
72
+
73
+ <<<id>,<caption>,<style>>>
74
+
75
+
76
+ The additional attribute 'style' can have following values:
77
+
78
+ page::
79
+ Let's LaTeX print the page number of the referenced anchor.
80
+
81
+ ref::
82
+ Let's LaTeX print the number of the section, subsection, figure, table or theorem the referenced anchor resides.
83
+
84
+ autoref::
85
+ Let's LaTeX print the number of the section, subsection, figure, table or theorem the referenced anchor resides preceded with a contextual label.
86
+
87
+ cite::
88
+ Let's LaTeX interprete this reference as a reference to a bibliography entry. If the attribute 'latex-use-bibliography-environment' is set, references with 'cite' style as well as their corresponding bibliography anchors are presented as automatically generated numbers.
89
+
90
+ If the 'style' attribute is not set the reference is printed the common way.
91
+
92
+
93
+ === Options
94
+ LaTeX document generation is influenced by the following attributes:
95
+
96
+ latex-table-rowlimit::
97
+ The maximum number of rows for typesetting tables using the 'tabular' environment. If a table has more rows than 'latex-table-rowlimit', 'longtable' environment is used instead of 'tabular' environment. 'longtable' environment supports tables spanning over several pages.
98
+
99
+ latex-use-bibliography-environment::
100
+ If 'latex-use-bibliography-environment' is defined, 'thebibliography' environment is used for the bibliography section. As a result bibliography entries are automatically numbered. Note that this works only if the bibliography section contains exclusively bibliography list items which start with a bibliography entry ([[[...]]]). Otherwise a TeX/LaTeX compilation error will occur. In order to display bibliography references correctly their 'style' attribute must be set to 'cite'. For more information see <<internalCrossReferences,Internal cross references>>.
101
+
102
+ latex-indent-paragraphs::
103
+ If 'latex-indent-paragraphs' is defined, the first line of paragraphs will be indented. By default LaTeX backend prevents paragraph indentation and prints paragraphs with preceding vertical space.
104
+
105
+ [[latex-recognize-escaped-unicode]] latex-recognize-escaped-unicode::
106
+ If 'latex-recognize-escaped-unicode' is defined, escaped unicode
107
+ characters (e.g. `\$${amp}#960;$$` or `\$${amp}#x3C0;$$`) will be recognized. This can lead to LaTeX compilation errors since LaTeX unicode support is only rudimentary. For more information see <<unicodeSupport, Unicode support>>.
108
+
109
+ latex-use-custom-list-items::
110
+ If 'latex-use-custom-list-items' is defined, lists will be bulleted or enumerated the way you have typed them in the original Asciidoc document. That means, `*` turns into a circle bullet, `-` turns into a dash, `.` turns into a number and `..` turns into a letter. Otherwise LaTeX will use different bullets and enumeration characters depending on the level of nesting.
111
+
112
+ latex-use-colored-tables::
113
+ If 'latex-use-colored-tables' is defined, tables will be printed colored.
114
+
115
+ latex-use-running-title-headings::
116
+ If 'latex-use-running-title-headings' is defined, 'pagestyle' will be set to 'headings' which results in running titles in the head.
117
+
118
+ latex-use-colored-sidebar-blocks::
119
+ If 'latex-use-colored-sidebar-blocks' is defined, sidebar block content will be put in a color box instead of being indented by a vertical bar.
120
+
121
+ icons::
122
+ Link admonition paragraph and admonition block icon images and badge images. By default icons is undefined and text is used in place of icon images.
123
+
124
+ encoding::
125
+ Set the input and output document character set encoding. Currently `ISO-8859-1` and `UTF-8` are supported.
126
+
127
+ == Requirements
128
+
129
+ === General
130
+
131
+ The following software is necessary for using the LaTeX backend:
132
+
133
+ - An up-to-date version of http://www.methods.co.nz/asciidoc/[Asciidoc]
134
+ - An up-to-date TeX distribution, e.g.:
135
+ * http://www.miktex.org/[MiKTeX] for Windows
136
+ * http://www.tug.org/tetex/[teTeX] for Linux
137
+
138
+ [[packageRequirements]]
139
+ === TeX/LaTeX Package requirements
140
+
141
+ LaTeX backend makes use of some LaTeX specialities which don't belong to a minimal TeX/LaTeX distribution. However, I took special care not to employ exotic packages. Hence the following packages should be available in most package repositories. The table is not complete yet because I don't know the package names for all TeX distributions.
142
+
143
+ [cols="4*,4",options="header"]
144
+ |====================================================================
145
+ |Speciality | MiKTeX package name | teTeX package name | TeX Live package name | Description
146
+ |KOMA-Script | koma-script | | | LaTeX backend uses the document classes 'scrartcl' and 'scrbook' as well as some other specialities defined in the 'KOMA-Script' package, e.g. the commands `\addmargin{}` and `\minisec{}`.
147
+ |xcolor.sty | xcolor | | | Used to produce colored boxes and tables.
148
+ |colortbl.sty | colortbl | | | Used to produce colored tables.
149
+ |type1ec.sty | cm-super | | | Enables high quality fonts for PDF output.
150
+ |hyperref.sty | hyperref | | | Extensive support for hypertext in PDF documents.
151
+ |enumerate.sty | tools | | | When 'latex-use-custom-list-items' is defined this package is used for determining the enumeration character.
152
+ |graphicx.sty | graphics | | | Used for including images.
153
+ |longtable.sty | tools | | | Enables page spanning tables.
154
+ |ucs.sty | unicode | | | Enables support for unicode characters.
155
+ |textcomp | ltxbase | | | Used for printing various symbols like arrows. Should be already installed.
156
+ |alltt | ltxbase | | | Used in literal-like blocks for retaining line and whitespace formatting. Should be already installed.
157
+ |listings.sty | listings | | | Used for listing blocks.
158
+ |====================================================================
159
+
160
+ [[configurationFile]]
161
+ == About the LaTeX backend configuration file
162
+ An important note for people who want to adapt the LaTeX backend configuration file to their own needs:
163
+
164
+ LaTeX markup has a lot of special characters, most importantly ``, `{`, `}`. In order to make things less complicated, I changed the default substitution order (see entry 'subsnormal' in the `[miscellaneous]` section). In contrast to the backends 'docbook' and 'xhtml11', the 'specialcharacters' substitution is applied very late. As a result all special characters produced by 'quotes', 'specialwords', 'replacements', 'attributes' and 'macros' become escaped at the end. If you don't want special characters in the corresponding sections to get escaped, you've to use following symbols instead of the special characters.
165
+
166
+ - `\$$!..backslash..!$$` instead of ``
167
+ - `\$$!..braceleft..!$$` instead of `{`
168
+ - `\$$!..braceright..!$$` instead of `}`
169
+
170
+
171
+ For more special characters take a look in the `[replacements2]` sections. `[replacements2]` section is responsible for replacing the symbols with their corresponding special characters.
172
+
173
+
174
+ == Ideas
175
+
176
+ === Code listing block
177
+
178
+ For creating highlighted code listings I suggest the use of http://www.andre-simon.de/[Highlight] or http://www.gnu.org/software/src-highlite/[GNU Source Highlight]. Both are suited for use as Asciidoc filters.
179
+
180
+ == Known Bugs
181
+
182
+ - Sometimes LaTeX backend handles things differently from the default backends
183
+ - A lot of little bugs
184
+
185
+ == Todo List
186
+
187
+ - Remove bugs
188
+ - Support for 'grid' attribute in tables
189
+ - Better looking tables
190
+ - Option for squeezing output (smaller lists)
191
+ - Support for different languages (That would be a nice feature for Asciidoc in general)
192
+ - Option for switching titlepage on and off
@@ -0,0 +1,134 @@
1
+ Bugs in asciidoc latex backend
2
+ ==============================
3
+ Geoff Eddy
4
+
5
+ Benjamin Klum was unable to maintain the LaTeX backend beyond version
6
+ 8.2.7, and as a consequence the `latex.conf` file ceased to work with
7
+ `asciidoc` sometime after this. For version 8.4.3 I made some changes
8
+ to the file to get it working again. This document summarises the
9
+ remaining issues which I have found with generating LaTeX and thence
10
+ PDF output with `asciidoc`, which is done as follows:
11
+
12
+ - `asciidoc --backend=latex --unsafe FILE.txt`
13
+ - `latex FILE.tex`
14
+ - `kpdf FILE.pdf`
15
+
16
+ Many of these were found by processing the `asciidoc.txt` file and
17
+ comparing the HTML output with the PDF.
18
+
19
+ == Footnotes
20
+
21
+ Priority:: Low.
22
+
23
+ Problem:: References to footnotes, and a sensible value for the
24
+ `[footnoteref-inlinemacro]` section, don't seem to be possible.
25
+
26
+ Cause:: LaTeX doesn't support footnoting much beyond creating a
27
+ footnote at a certain point in text and displaying the footnote
28
+ itself.
29
+
30
+ Solution:: Unclear. How important or necessary is this, anyway?
31
+
32
+ == Spurious text at starts of paragraphs
33
+
34
+ Priority:: Medium
35
+
36
+ Problem:: It is necessary to insert spurious text in paragraphs.
37
+
38
+ Cause:: This `asciidoc` input:
39
+ +
40
+ -------------------------------------------------------------------
41
+ Text
42
+ -------------------------------------------------------------------
43
+ +
44
+ generates this LaTeX code:
45
+ +
46
+ \begin{lstlisting}
47
+ SPURIOUS TEXTText\end{lstlisting}
48
+ +
49
+ which should be:
50
+ +
51
+ \begin{lstlisting}[]
52
+ Text\end{lstlisting}
53
+
54
+ Solution:: Find out a way to generate the correct LaTeX output as
55
+ above. The obvious solution, as explained in `latet.conf`, doesn't
56
+ work.
57
+
58
+ == Tables
59
+
60
+ Priority:: Rather high.
61
+
62
+ Problem:: Not all of the table configuration options can be passed
63
+ through to the LaTeX backend. In particular, I've had to assume that
64
+ all tables will be fifteen or fewer left-justified columns wide.
65
+
66
+ Cause:: The table models in LaTeX and HTML are too dissimilar for one
67
+ `asciidoc` specification to generate valid output in both formats by
68
+ simple regexp replacement. Related to this is the unfortunate fact
69
+ that `<COLGROUP>` and related tags aren't a required part of HTML4,
70
+ and some broswers (at least Firefox and Konqueror) don't implement
71
+ them.
72
+
73
+ Solution:: Perhaps table processing could be handled by a Python
74
+ plugin, which would read in a table spec and generate the appropriate
75
+ text?
76
+
77
+ == Unicode escaping
78
+
79
+ Priority:: Rather high, to me at least.
80
+
81
+ Problem:: The commented-out section in `latex.conf`, if uncommented,
82
+ converts `&#960;` to `\unichar{960}`, which then causes LaTeX to
83
+ complain that the resulting command is unavailable in encoding T1. The
84
+ more common non-ASCII characters, such as those in `félicité` and
85
+ `świeca`, are handled properly, but some - such as the IPA characters
86
+ in the `tipa` package - are not.
87
+
88
+ Cause:: The encodings in the LaTeX output are wrong.
89
+
90
+ Solution:: Correct the encodings.
91
+
92
+ == Text colours
93
+
94
+ Priority:: Probably low
95
+
96
+ Problem:: The text colour options are not processed by LaTeX; for
97
+ example `[#ff0000]#Red text#` is not rendered in red.
98
+
99
+ Cause:: LaTeX and HTML represent RGB triads differently: HTML is happy
100
+ with `#ff8000`, but LaTeX needs `[rgb]{1,0.5,0}`.
101
+
102
+ Solution:: Provide some sort of internal RGB conversion mechanism
103
+ which can convert RGB triads to different representations.
104
+
105
+ == Text sizes
106
+
107
+ Priority:: Probably low
108
+
109
+ Problem:: The text size options are not processed by LaTeX:
110
+ `[,,1]#text#` is rendered in the same size as normal text.
111
+
112
+ Cause:: HTML size tags - `h1` through `h7` - are directly derivable
113
+ from the size number, whereas LaTeX has a series of descriptive words
114
+ (`HUGE` through `normalsize` to `scriptsize`).
115
+
116
+ Solution:: Provide a way to treat the number as an index into an
117
+ array.
118
+
119
+ == Background colour in paragraphs
120
+
121
+ Priority:: Medium
122
+
123
+ Problem:: If the `backgroundcolor` attribute is specified in the
124
+ `lstset` command, all paragraphs are displayed as black rectangles by
125
+ `kpdf`, `xpdf`, and `evince`, although `kdvi` has no problems. I've
126
+ had to remove the attribute, and so paragraphs all appear on white
127
+ backgrounds. The PDF viewers also complain:
128
+
129
+ Error (NNNN): Unknown operator 'rgb'
130
+
131
+ Cause:: Apparently a known bug in the output of `pdflatex`. Not a bug
132
+ in `asciidoc`.
133
+
134
+ Solution:: Wait until this bug is fixed?