FooBarWidget-mizuho 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (175) hide show
  1. data/LICENSE.txt +20 -0
  2. data/README.markdown +68 -0
  3. data/Rakefile +9 -0
  4. data/asciidoc/BUGS +34 -0
  5. data/asciidoc/BUGS.txt +28 -0
  6. data/asciidoc/CHANGELOG +1585 -0
  7. data/asciidoc/CHANGELOG.txt +1595 -0
  8. data/asciidoc/COPYING +339 -0
  9. data/asciidoc/COPYRIGHT +18 -0
  10. data/asciidoc/INSTALL +82 -0
  11. data/asciidoc/INSTALL.txt +71 -0
  12. data/asciidoc/README +46 -0
  13. data/asciidoc/README.txt +36 -0
  14. data/asciidoc/a2x +641 -0
  15. data/asciidoc/asciidoc.conf +404 -0
  16. data/asciidoc/asciidoc.py +4255 -0
  17. data/asciidoc/common.aap +9 -0
  18. data/asciidoc/dblatex/asciidoc-dblatex.sty +18 -0
  19. data/asciidoc/dblatex/asciidoc-dblatex.xsl +17 -0
  20. data/asciidoc/dblatex/dblatex-readme.txt +22 -0
  21. data/asciidoc/doc/a2x.1 +246 -0
  22. data/asciidoc/doc/a2x.1.txt +195 -0
  23. data/asciidoc/doc/article.css-embedded.html +579 -0
  24. data/asciidoc/doc/article.html +62 -0
  25. data/asciidoc/doc/article.pdf +0 -0
  26. data/asciidoc/doc/article.txt +124 -0
  27. data/asciidoc/doc/asciidoc-revhistory.xml +27 -0
  28. data/asciidoc/doc/asciidoc.1 +161 -0
  29. data/asciidoc/doc/asciidoc.1.css-embedded.html +562 -0
  30. data/asciidoc/doc/asciidoc.1.css.html +212 -0
  31. data/asciidoc/doc/asciidoc.1.html +190 -0
  32. data/asciidoc/doc/asciidoc.1.txt +118 -0
  33. data/asciidoc/doc/asciidoc.conf +8 -0
  34. data/asciidoc/doc/asciidoc.css-embedded.html +7954 -0
  35. data/asciidoc/doc/asciidoc.css.html +7553 -0
  36. data/asciidoc/doc/asciidoc.dict +673 -0
  37. data/asciidoc/doc/asciidoc.html +3502 -0
  38. data/asciidoc/doc/asciidoc.txt +4757 -0
  39. data/asciidoc/doc/asciimath.txt +47 -0
  40. data/asciidoc/doc/book-multi.css-embedded.html +575 -0
  41. data/asciidoc/doc/book-multi.html +72 -0
  42. data/asciidoc/doc/book-multi.txt +159 -0
  43. data/asciidoc/doc/book.css-embedded.html +585 -0
  44. data/asciidoc/doc/book.html +60 -0
  45. data/asciidoc/doc/book.txt +133 -0
  46. data/asciidoc/doc/customers.csv +18 -0
  47. data/asciidoc/doc/faq.txt +262 -0
  48. data/asciidoc/doc/latex-backend.html +224 -0
  49. data/asciidoc/doc/latex-backend.txt +193 -0
  50. data/asciidoc/doc/latexmath.txt +35 -0
  51. data/asciidoc/doc/main.aap +293 -0
  52. data/asciidoc/doc/music-filter.html +513 -0
  53. data/asciidoc/doc/music-filter.pdf +0 -0
  54. data/asciidoc/doc/music-filter.txt +158 -0
  55. data/asciidoc/doc/source-highlight-filter.html +183 -0
  56. data/asciidoc/doc/source-highlight-filter.pdf +0 -0
  57. data/asciidoc/doc/source-highlight-filter.txt +174 -0
  58. data/asciidoc/docbook-xsl/asciidoc-docbook-xsl.txt +71 -0
  59. data/asciidoc/docbook-xsl/chunked.xsl +19 -0
  60. data/asciidoc/docbook-xsl/common.xsl +67 -0
  61. data/asciidoc/docbook-xsl/fo.xsl +117 -0
  62. data/asciidoc/docbook-xsl/htmlhelp.xsl +17 -0
  63. data/asciidoc/docbook-xsl/manpage.xsl +28 -0
  64. data/asciidoc/docbook-xsl/shaded-literallayout.patch +32 -0
  65. data/asciidoc/docbook-xsl/xhtml.xsl +14 -0
  66. data/asciidoc/docbook.conf +606 -0
  67. data/asciidoc/examples/website/CHANGELOG.html +3828 -0
  68. data/asciidoc/examples/website/INSTALL.html +163 -0
  69. data/asciidoc/examples/website/README-website.html +129 -0
  70. data/asciidoc/examples/website/README-website.txt +29 -0
  71. data/asciidoc/examples/website/README.html +125 -0
  72. data/asciidoc/examples/website/a2x.1.html +395 -0
  73. data/asciidoc/examples/website/asciidoc-docbook-xsl.html +165 -0
  74. data/asciidoc/examples/website/asciimath.html +157 -0
  75. data/asciidoc/examples/website/build-website.sh +25 -0
  76. data/asciidoc/examples/website/downloads.html +219 -0
  77. data/asciidoc/examples/website/downloads.txt +98 -0
  78. data/asciidoc/examples/website/faq.html +372 -0
  79. data/asciidoc/examples/website/index.html +398 -0
  80. data/asciidoc/examples/website/index.txt +222 -0
  81. data/asciidoc/examples/website/latex-backend.html +640 -0
  82. data/asciidoc/examples/website/latexmath.html +119 -0
  83. data/asciidoc/examples/website/layout1.conf +161 -0
  84. data/asciidoc/examples/website/layout1.css +65 -0
  85. data/asciidoc/examples/website/layout2.conf +158 -0
  86. data/asciidoc/examples/website/layout2.css +93 -0
  87. data/asciidoc/examples/website/manpage.html +266 -0
  88. data/asciidoc/examples/website/music-filter.html +242 -0
  89. data/asciidoc/examples/website/music1.abc +12 -0
  90. data/asciidoc/examples/website/music1.png +0 -0
  91. data/asciidoc/examples/website/music2.ly +9 -0
  92. data/asciidoc/examples/website/music2.png +0 -0
  93. data/asciidoc/examples/website/source-highlight-filter.html +251 -0
  94. data/asciidoc/examples/website/support.html +78 -0
  95. data/asciidoc/examples/website/support.txt +5 -0
  96. data/asciidoc/examples/website/userguide.html +7597 -0
  97. data/asciidoc/examples/website/version9.html +143 -0
  98. data/asciidoc/examples/website/version9.txt +48 -0
  99. data/asciidoc/filters/code-filter-readme.txt +37 -0
  100. data/asciidoc/filters/code-filter-test-c++.txt +7 -0
  101. data/asciidoc/filters/code-filter-test.txt +15 -0
  102. data/asciidoc/filters/code-filter.conf +8 -0
  103. data/asciidoc/filters/code-filter.py +239 -0
  104. data/asciidoc/filters/music-filter-test.txt +40 -0
  105. data/asciidoc/filters/music-filter.conf +40 -0
  106. data/asciidoc/filters/music2png.py +189 -0
  107. data/asciidoc/filters/source-highlight-filter-test.txt +19 -0
  108. data/asciidoc/filters/source-highlight-filter.conf +100 -0
  109. data/asciidoc/help.conf +213 -0
  110. data/asciidoc/html4.conf +363 -0
  111. data/asciidoc/images/highlighter.png +0 -0
  112. data/asciidoc/images/icons/README +5 -0
  113. data/asciidoc/images/icons/callouts/1.png +0 -0
  114. data/asciidoc/images/icons/callouts/10.png +0 -0
  115. data/asciidoc/images/icons/callouts/11.png +0 -0
  116. data/asciidoc/images/icons/callouts/12.png +0 -0
  117. data/asciidoc/images/icons/callouts/13.png +0 -0
  118. data/asciidoc/images/icons/callouts/14.png +0 -0
  119. data/asciidoc/images/icons/callouts/15.png +0 -0
  120. data/asciidoc/images/icons/callouts/2.png +0 -0
  121. data/asciidoc/images/icons/callouts/3.png +0 -0
  122. data/asciidoc/images/icons/callouts/4.png +0 -0
  123. data/asciidoc/images/icons/callouts/5.png +0 -0
  124. data/asciidoc/images/icons/callouts/6.png +0 -0
  125. data/asciidoc/images/icons/callouts/7.png +0 -0
  126. data/asciidoc/images/icons/callouts/8.png +0 -0
  127. data/asciidoc/images/icons/callouts/9.png +0 -0
  128. data/asciidoc/images/icons/caution.png +0 -0
  129. data/asciidoc/images/icons/example.png +0 -0
  130. data/asciidoc/images/icons/home.png +0 -0
  131. data/asciidoc/images/icons/important.png +0 -0
  132. data/asciidoc/images/icons/next.png +0 -0
  133. data/asciidoc/images/icons/note.png +0 -0
  134. data/asciidoc/images/icons/prev.png +0 -0
  135. data/asciidoc/images/icons/tip.png +0 -0
  136. data/asciidoc/images/icons/up.png +0 -0
  137. data/asciidoc/images/icons/warning.png +0 -0
  138. data/asciidoc/images/smallnew.png +0 -0
  139. data/asciidoc/images/tiger.png +0 -0
  140. data/asciidoc/install.sh +55 -0
  141. data/asciidoc/javascripts/ASCIIMathML.js +938 -0
  142. data/asciidoc/javascripts/LaTeXMathML.js +1223 -0
  143. data/asciidoc/javascripts/toc.js +69 -0
  144. data/asciidoc/lang-es.conf +15 -0
  145. data/asciidoc/latex.conf +663 -0
  146. data/asciidoc/linuxdoc.conf +285 -0
  147. data/asciidoc/math.conf +50 -0
  148. data/asciidoc/stylesheets/docbook-xsl.css +271 -0
  149. data/asciidoc/stylesheets/xhtml-deprecated-manpage.css +21 -0
  150. data/asciidoc/stylesheets/xhtml-deprecated.css +247 -0
  151. data/asciidoc/stylesheets/xhtml11-manpage.css +18 -0
  152. data/asciidoc/stylesheets/xhtml11-quirks.css +49 -0
  153. data/asciidoc/stylesheets/xhtml11.css +284 -0
  154. data/asciidoc/t.conf +20 -0
  155. data/asciidoc/text.conf +16 -0
  156. data/asciidoc/vim/ftdetect/asciidoc_filetype.vim +53 -0
  157. data/asciidoc/vim/syntax/asciidoc.vim +139 -0
  158. data/asciidoc/xhtml-deprecated-css.conf +235 -0
  159. data/asciidoc/xhtml-deprecated.conf +351 -0
  160. data/asciidoc/xhtml11-quirks.conf +57 -0
  161. data/asciidoc/xhtml11.conf +514 -0
  162. data/bin/mizuho +40 -0
  163. data/lib/mizuho/chapter.rb +54 -0
  164. data/lib/mizuho/generator.rb +106 -0
  165. data/lib/mizuho/heading.rb +46 -0
  166. data/lib/mizuho/parser.rb +99 -0
  167. data/lib/mizuho/template.rb +50 -0
  168. data/mizuho.gemspec +34 -0
  169. data/templates/asciidoc.css +358 -0
  170. data/templates/asciidoc.html.erb +86 -0
  171. data/templates/manualsonrails.css +165 -0
  172. data/templates/manualsonrails.html.erb +97 -0
  173. data/test/parser_spec.rb +190 -0
  174. data/test/spec_helper.rb +43 -0
  175. metadata +234 -0
@@ -0,0 +1,222 @@
1
+ AsciiDoc Home Page
2
+ ==================
3
+
4
+ .{date}: AsciiDoc {revision} Released
5
+ ************************************************************************
6
+ Useful additions include:
7
+
8
+ - http://dblatex.sourceforge.net/[dblatex] is now fully supported by
9
+ a2x(1) and is the default a2x(1) PDF generator.
10
+ - Added `dvi`, `ps` and `tex` output format options to a2x(1)
11
+ (courtesy of `dblatex(1)`).
12
+ - URLs and email addresses are recognized without having to use the
13
+ macro syntax.
14
+ - link:source-highlight-filter.html[Source code paragraphs] make small
15
+ code examples easier to enter.
16
+
17
+ Read the link:CHANGELOG.html[CHANGELOG] for a full description of all
18
+ the other additions and changes.
19
+
20
+ mailto:srackham@gmail.com['Stuart Rackham']
21
+ ************************************************************************
22
+
23
+ Introduction
24
+ ------------
25
+ AsciiDoc is a text document format for writing short documents,
26
+ articles, books and UNIX man pages. AsciiDoc files can be translated
27
+ to HTML and DocBook markups using the asciidoc(1) command.
28
+
29
+ AsciiDoc is highly configurable: both the AsciiDoc source file syntax
30
+ and the backend output markups (which can be almost any type of
31
+ SGML/XML markup) can be customized and extended by the user.
32
+
33
+ TIP: The pages you are reading were written using AsciiDoc, to view
34
+ the corresponding AsciiDoc source click on the *Page Source* menu item
35
+ in the left hand margin.
36
+
37
+
38
+ Overview and Examples
39
+ ---------------------
40
+ You write an AsciiDoc document the same way you would write a
41
+ normal text document, there are no markup tags or weird format
42
+ notations. AsciiDoc files are designed to be viewed, edited and
43
+ printed directly or translated to other presentation formats using
44
+ the asciidoc(1) command.
45
+
46
+ The asciidoc(1) command translates AsciiDoc files to HTML, XHTML and
47
+ DocBook markups. DocBook can be post-processed to presentation
48
+ formats such as HTML, PDF, DVI, LaTeX, roff, and Postscript using
49
+ readily available Open Source tools.
50
+
51
+ Example Articles
52
+ ~~~~~~~~~~~~~~~~
53
+ - This version of the
54
+ link:asciidoc.css-embedded.html[AsciiDoc User Guide]
55
+ was generated by AsciiDoc from
56
+ link:asciidoc.txt[this AsciiDoc file].
57
+
58
+ - Here's the link:asciidoc.html[same document] created by first
59
+ generating DocBook markup using AsciiDoc and then converting the
60
+ DocBook markup to HTML using 'DocBook XSL Stylesheets'.
61
+
62
+ - The User Guide again, this time a
63
+ link:chunked/index.html[chunked version].
64
+
65
+ - This link:article.txt[AsciiDoc article template] produced
66
+ this link:article.html[HTML file] and this
67
+ link:article.pdf[PDF file] via DocBook markup generated by AsciiDoc.
68
+
69
+ - This link:asciidoc.pdf[PDF formatted User Guide] was generated from
70
+ asciidoc(1) DocBook output.
71
+
72
+ Example Books
73
+ ~~~~~~~~~~~~~
74
+ AsciiDoc markup supports all the standard DocBook frontmatter and
75
+ backmatter sections (dedication, preface, bibliography, glossary,
76
+ index, colophon) plus footnotes and index entries.
77
+
78
+ Book::
79
+ This link:book.txt[AsciiDoc book's] DocBook output
80
+ produced link:book.html[this HTML file] using the
81
+ 'DocBook XSL Stylesheets'.
82
+
83
+ Multi-part book::
84
+ This link:book-multi.txt[multi-part AsciiDoc book's]
85
+ DocBook output produced link:book-multi.html[this HTML file]
86
+ using the 'DocBook XSL Stylesheets'.
87
+
88
+ Example UNIX Man Pages
89
+ ~~~~~~~~~~~~~~~~~~~~~~
90
+ HTML formatted AsciiDoc man pages
91
+ link:asciidoc.1.css-embedded.html[with stylesheets] and
92
+ link:asciidoc.1.html[without stylesheets] were generated by AsciiDoc
93
+ from link:asciidoc.1.txt[this file].
94
+
95
+ This link:asciidoc.1[roff formatted man page] was generated from
96
+ asciidoc(1) DocBook output using `xsltproc(1)` and DocBook XSL
97
+ Stylesheets.
98
+
99
+ Example Web Site
100
+ ~~~~~~~~~~~~~~~~
101
+ The link:README-website.html[AsciiDoc website] is included in the
102
+ AsciiDoc distribution (in `./examples/website/`) as example website
103
+ built using AsciiDoc. See `./examples/website/README-website.txt`.
104
+
105
+
106
+ Music Filter
107
+ ------------
108
+ A link:music-filter.html[music filter] is included in the distribution
109
+ `./filters/` directory. It translates music in
110
+ http://lilypond.org/[LilyPond] or http://abcnotation.org.uk/[ABC]
111
+ notation to standard classical notation
112
+
113
+
114
+ Source Code Highlight Filter
115
+ ----------------------------
116
+ A link:source-highlight-filter.html[source code highlight filter] is
117
+ included in the distribution `./filters/` directory.
118
+
119
+
120
+ [[X3]]
121
+ Mathematical Formulae
122
+ ---------------------
123
+ You can include mathematical formulae in your AsciiDoc documents using
124
+ link:asciimath.html[ASCIIMathML] or link:latexmath.html[LaTeXMathML]
125
+ notation.
126
+
127
+
128
+ Vim Syntax Highlighter
129
+ ----------------------
130
+ An AsciiDoc syntax highlighter for the Vim text editor is included in
131
+ the AsciiDoc distribution (see 'Appendix F' of the 'AsciiDoc User
132
+ Guide' for details).
133
+
134
+ .Syntax highlighter screenshot
135
+ image::images/highlighter.png[height=250,caption="",link="images/highlighter.png"]
136
+
137
+ Dag Wieers has implemented an alternative Vim syntax file for AsciiDoc
138
+ which can be found here
139
+ http://svn.rpmforge.net/svn/trunk/tools/asciidoc-vim/.
140
+
141
+
142
+ [[X2]]
143
+ Resources
144
+ ---------
145
+ - Check the link:downloads.html[Downloads page] for packaged versions
146
+ of AsciiDoc.
147
+ - Alex Efros has written an HTML formatted
148
+ http://powerman.name/doc/asciidoc[AsciiDoc Cheatsheet] using
149
+ Asciidoc.
150
+ - Thomas Berker has written an
151
+ http://liksom.info/blog/?q=node/114[AsciiDoc Cheatsheet] in Open
152
+ Document and PDF formats.
153
+ - The http://www.wikimatrix.org/[WikiMatrix] website has an excellent
154
+ http://www.wikimatrix.org/syntax.php[web page] that compares the
155
+ various Wiki markup syntaxes. An interesting attempt at Wiki markup
156
+ standardization is http://www.wikicreole.org/[CREOLE].
157
+ - Terrence Brannon has written
158
+ http://www.metaperl.com/asciidoc-el/[AsciiDoc functions for Emacs].
159
+ - The http://xpt.sourceforge.net/[*Nix Power Tools project] has
160
+ released an http://xpt.sourceforge.net/tools/doc-mode/[AsciiDoc
161
+ syntax highlighter for Emacs].
162
+
163
+ - Franck Pommereau has written
164
+ http://www.univ-paris12.fr/lacl/pommereau/soft/asciidoctest.html[Asciidoctest],
165
+ a program that doctests snippets of Python code within your Asciidoc
166
+ documents.
167
+ - The http://remips.sourceforge.net/[ReMIPS] project website has been
168
+ built using AsciiDoc.
169
+ - Here are some link:asciidoc-docbook-xsl.html[DocBook XSL Stylesheets
170
+ Notes].
171
+ - Karl Mowatt-Wilson has developed an http://ikiwiki.info/[ikiwiki]
172
+ plugin for AsciiDoc which he uses to render
173
+ http://mowson.org/karl[his website]. The plugin is available
174
+ http://www.mowson.org/karl/colophon/[here] and there is some
175
+ discussion of the ikiwiki integration
176
+ http://ikiwiki.info/users/KarlMW/discussion/[here].
177
+
178
+
179
+ Blogpost weblog client
180
+ ----------------------
181
+ http://srackham.wordpress.com/blogpost-readme/[blogpost] is a
182
+ command-line weblog client for publishing AsciiDoc documents to
183
+ http://wordpress.org/[WordPress] blog hosts. It creates and updates
184
+ weblog posts and pages directly from AsciiDoc source documents.
185
+
186
+
187
+ [[X1]]
188
+ LaTeX Backend
189
+ -------------
190
+ An experimental LaTeX backend has been written for AsciiDoc by
191
+ Benjamin Klum. Benjamin has done a superhuman job (I admit it, I
192
+ didn't think this was doable due to AsciiDoc's SGML/XML bias).
193
+
194
+ Here's link:latex-backend.html[Benjamin's documentation].
195
+
196
+
197
+ Projects using AsciiDoc
198
+ -----------------------
199
+ Here are some projects I know of, if you know of more drop me a line
200
+ and I'll add them to the list.
201
+
202
+ - The Linux kernel
203
+ http://www.kernel.org/pub/software/scm/git/docs/git.html[git source
204
+ code management system].
205
+ - Some documentation about git by Nico Schottelius (in German)
206
+ http://nico.schotteli.us/papers/linux/git-firmen/.
207
+ - The http://www.netpromi.com/kirbybase_ruby.html[KirbyBase for Ruby]
208
+ database management system manual.
209
+ - The http://www.selenic.com/mercurial/[Mercurial distributed SCM]
210
+ uses asciidoc for its man pages.
211
+ - Pascal Rapaz has written a Python script to automate AsciiDoc
212
+ website generation. You can find it at
213
+ http://www.rapazp.ch/opensource/tools/asciidoc.html.
214
+ - The http://xpt.sourceforge.net/[*Nix Power Tools project] uses
215
+ AsciiDoc for documentation and has released an Emacs syntax
216
+ highlighter (see <<X2,Resources>> above).
217
+
218
+
219
+ AsciiDoc version 9
220
+ -----------------
221
+ The next version of AsciiDoc is underway -- details
222
+ link:version9.html[here].
@@ -0,0 +1,640 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6
+ <meta name="generator" content="AsciiDoc 8.2.7" />
7
+ <link rel="stylesheet" href="./xhtml11.css" type="text/css" />
8
+ <link rel="stylesheet" href="./xhtml11-quirks.css" type="text/css" />
9
+ <link rel="stylesheet" href="./layout1.css" type="text/css" />
10
+ <title>LaTeX backend for Asciidoc</title>
11
+ </head>
12
+ <body>
13
+ <div id="layout-banner">
14
+ <div id="layout-title">AsciiDoc</div>
15
+ <div id="layout-description">Text based document generation</div>
16
+ </div>
17
+ <table>
18
+ <tr valign="top">
19
+ <td id="layout-menu">
20
+ <div>&#187;<a href="index.html">Home</a></div>
21
+ <div>&#187;<a href="manpage.html">Man&nbsp;Page</a></div>
22
+ <div>&#187;<a href="userguide.html">User&nbsp;Guide</a></div>
23
+ <div>&#187;<a href="http://powerman.name/doc/asciidoc">Cheatsheet</a></div>
24
+ <div>&#187;<a href="a2x.1.html">a2x</a></div>
25
+ <div>&#187;<a href="README.html">README</a></div>
26
+ <div>&#187;<a href="CHANGELOG.html">ChangeLog</a></div>
27
+ <div>&#187;<a href="INSTALL.html">Installation</a></div>
28
+ <div>&#187;<a href="downloads.html">Downloads</a></div>
29
+ <div>&#187;<a href="faq.html">FAQ</a></div>
30
+ <div>&#187;<a href="support.html">Support</a></div>
31
+ <div id="page-source">&#187;<a href="latex-backend.txt">Page&nbsp;Source</a></div>
32
+ </td>
33
+ <td>
34
+ <div id="layout-content">
35
+ <div id="header">
36
+ <h1>LaTeX backend for Asciidoc</h1>
37
+ <span id="author">Benjamin Klum</span><br />
38
+ <span id="email"><tt>&lt;<a href="mailto:benjamin.klum@gmail.com">benjamin.klum@gmail.com</a>&gt;</tt></span><br />
39
+ <span id="revision">version 1.0,</span>
40
+ June 2006
41
+ </div>
42
+ <h2 id="_introduction">Introduction</h2>
43
+ <div class="sectionbody">
44
+ <div class="para"><p>LaTeX backend is a configuration file for Stuart Rackham's <a href="http://www.methods.co.nz/asciidoc/">Asciidoc</a>. 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.</p></div>
45
+ </div>
46
+ <h2 id="_tutorial">Tutorial</h2>
47
+ <div class="sectionbody">
48
+ <div class="para"><p>Getting a ready-to-print document from an Asciidoc document using the LaTeX backend involves at least two steps:</p></div>
49
+ <div class="olist"><ol>
50
+ <li>
51
+ <p>
52
+ Conversion of the Asciidoc document into a LaTeX document (this is done by Asciidoc using the LaTeX backend)
53
+ </p>
54
+ </li>
55
+ <li>
56
+ <p>
57
+ Conversion of the LaTeX document into a PDF document (this is done by the TeX system)
58
+ </p>
59
+ </li>
60
+ </ol></div>
61
+ <div class="para"><p>Try to create a PDF document from the Asciidoc document <tt>article.txt</tt> which resides in the <tt>doc</tt> directory of Asciidoc:</p></div>
62
+ <div class="olist2"><ol>
63
+ <li>
64
+ <p>
65
+ Make a copy of <tt>article.txt</tt> in a directory of your choice, let's call it <tt>latex-test</tt>.
66
+ </p>
67
+ </li>
68
+ <li>
69
+ <p>
70
+ Make sure that all images referenced in <tt>article.txt</tt> exist in <tt>latex-test</tt>. Brute force approach: Copy the whole <tt>images</tt> directory from Asciidoc directory into <tt>latex-test</tt>.
71
+ </p>
72
+ </li>
73
+ <li>
74
+ <p>
75
+ Change directory to <tt>latex-test</tt> and type following commands:
76
+ </p>
77
+ <div class="literalblock">
78
+ <div class="content">
79
+ <pre><tt>asciidoc --unsafe --backend=latex article.txt
80
+ pdflatex article.tex</tt></pre>
81
+ </div></div>
82
+ </li>
83
+ <li>
84
+ <p>
85
+ Now there should be a file <tt>article.pdf</tt> in the <tt>latex-test</tt> directory.
86
+ </p>
87
+ </li>
88
+ </ol></div>
89
+ <div class="admonitionblock">
90
+ <table><tr>
91
+ <td class="icon">
92
+ <img src="./images/icons/important.png" alt="Important" />
93
+ </td>
94
+ <td class="content">
95
+ <div class="ilist"><ul>
96
+ <li>
97
+ <p>
98
+ Asciidoc has to be started in <em>unsafe mode</em> when using LaTeX backend.
99
+ </p>
100
+ </li>
101
+ <li>
102
+ <p>
103
+ Note that some special LaTeX packages are necessary, see <a href="#packageRequirements">here</a>.
104
+ </p>
105
+ </li>
106
+ </ul></div>
107
+ </td>
108
+ </tr></table>
109
+ </div>
110
+ </div>
111
+ <h2 id="_general_notes">General notes</h2>
112
+ <div class="sectionbody">
113
+ <h3 id="_quality_of_latex_output">Quality of LaTeX output</h3><div style="clear:left"></div>
114
+ <div class="para"><p>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.</p></div>
115
+ <div class="para"><p>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.</p></div>
116
+ <h3 id="_configuration_file_customization">Configuration file customization</h3><div style="clear:left"></div>
117
+ <div class="para"><p>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 <a href="#configurationFile">here</a>.</p></div>
118
+ <h3 id="_output_optimization">Output optimization</h3><div style="clear:left"></div>
119
+ <div class="para"><p>The LaTeX output is optimized for creating PDF documents using <em>pdflatex</em>.</p></div>
120
+ <h3 id="unicodeSupport">Unicode support</h3><div style="clear:left"></div>
121
+ <div class="para"><p>Unfortunately TeX/LaTeX does not have native unicode support. The package <em>ucs</em> 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 <tt>[U+&#8230;]</tt>. You may (de)activate the recognition of escaped unicode characters. See the <a href="#latex-recognize-escaped-unicode">[latex-recognize-escaped-unicode]</a> backend option.</p></div>
122
+ </div>
123
+ <h2 id="_backend_specific_features">Backend specific features</h2>
124
+ <div class="sectionbody">
125
+ <h3 id="_special_sections">Special sections</h3><div style="clear:left"></div>
126
+ <div class="para"><p>LaTeX backend supports the following special sections and replaces them with corresponding LaTeX commands or environments:</p></div>
127
+ <div class="ilist"><ul>
128
+ <li>
129
+ <p>
130
+ Abstract (only for document type <em>article</em>)
131
+ </p>
132
+ </li>
133
+ <li>
134
+ <p>
135
+ Dedication (only for document type <em>book</em>)
136
+ </p>
137
+ </li>
138
+ <li>
139
+ <p>
140
+ Index
141
+ </p>
142
+ </li>
143
+ <li>
144
+ <p>
145
+ Bibliography (only when the attribute <em>latex-use-bibliography-environment</em> is set)
146
+ </p>
147
+ </li>
148
+ <li>
149
+ <p>
150
+ Appendix
151
+ </p>
152
+ </li>
153
+ <li>
154
+ <p>
155
+ Contents
156
+ </p>
157
+ </li>
158
+ </ul></div>
159
+ <h3 id="internalCrossReferences">Internal cross references</h3><div style="clear:left"></div>
160
+ <div class="para"><p>Macros for internal cross references have been extended by the attribute <em>style</em>.</p></div>
161
+ <div class="literalblock">
162
+ <div class="content">
163
+ <pre><tt>xref:&lt;id&gt;[&lt;caption&gt;, style=&lt;style&gt;]</tt></pre>
164
+ </div></div>
165
+ <div class="para"><p>or</p></div>
166
+ <div class="literalblock">
167
+ <div class="content">
168
+ <pre><tt>&lt;&lt;&lt;id&gt;,&lt;caption&gt;,&lt;style&gt;&gt;&gt;</tt></pre>
169
+ </div></div>
170
+ <div class="para"><p>The additional attribute <em>style</em> can have following values:</p></div>
171
+ <div class="vlist"><dl>
172
+ <dt>
173
+ page
174
+ </dt>
175
+ <dd>
176
+ <p>
177
+ Let's LaTeX print the page number of the referenced anchor.
178
+ </p>
179
+ </dd>
180
+ <dt>
181
+ ref
182
+ </dt>
183
+ <dd>
184
+ <p>
185
+ Let's LaTeX print the number of the section, subsection, figure, table or theorem the referenced anchor resides.
186
+ </p>
187
+ </dd>
188
+ <dt>
189
+ autoref
190
+ </dt>
191
+ <dd>
192
+ <p>
193
+ Let's LaTeX print the number of the section, subsection, figure, table or theorem the referenced anchor resides preceded with a contextual label.
194
+ </p>
195
+ </dd>
196
+ <dt>
197
+ cite
198
+ </dt>
199
+ <dd>
200
+ <p>
201
+ Let's LaTeX interprete this reference as a reference to a bibliography entry. If the attribute <em>latex-use-bibliography-environment</em> is set, references with <em>cite</em> style as well as their corresponding bibliography anchors are presented as automatically generated numbers.
202
+ </p>
203
+ </dd>
204
+ </dl></div>
205
+ <div class="para"><p>If the <em>style</em> attribute is not set the reference is printed the common way.</p></div>
206
+ <h3 id="_options">Options</h3><div style="clear:left"></div>
207
+ <div class="para"><p>LaTeX document generation is influenced by the following attributes:</p></div>
208
+ <div class="vlist"><dl>
209
+ <dt>
210
+ latex-table-rowlimit
211
+ </dt>
212
+ <dd>
213
+ <p>
214
+ The maximum number of rows for typesetting tables using the <em>tabular</em> environment. If a table has more rows than <em>latex-table-rowlimit</em>, <em>longtable</em> environment is used instead of <em>tabular</em> environment. <em>longtable</em> environment supports tables spanning over several pages.
215
+ </p>
216
+ </dd>
217
+ <dt>
218
+ latex-use-bibliography-environment
219
+ </dt>
220
+ <dd>
221
+ <p>
222
+ If <em>latex-use-bibliography-environment</em> is defined, <em>thebibliography</em> 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 ([[[&#8230;]]]). Otherwise a TeX/LaTeX compilation error will occur. In order to display bibliography references correctly their <em>style</em> attribute must be set to <em>cite</em>. For more information see <a href="#internalCrossReferences">Internal cross references</a>.
223
+ </p>
224
+ </dd>
225
+ <dt>
226
+ latex-indent-paragraphs
227
+ </dt>
228
+ <dd>
229
+ <p>
230
+ If <em>latex-indent-paragraphs</em> is defined, the first line of paragraphs will be indented. By default LaTeX backend prevents paragraph indentation and prints paragraphs with preceding vertical space.
231
+ </p>
232
+ </dd>
233
+ <dt>
234
+ <a id="latex-recognize-escaped-unicode"></a> latex-recognize-escaped-unicode
235
+ </dt>
236
+ <dd>
237
+ <p>
238
+ If <em>latex-recognize-escaped-unicode</em> is defined, escaped unicode characters (e.g. <tt><span>{amp}#960;</span></tt> or <tt><span>{amp}#x3C0;</span></tt>) will be recognized. This can lead to LaTeX compilation errors since LaTeX unicode support is only rudimentary. For more information see <a href="#unicodeSupport">Unicode support</a>.
239
+ </p>
240
+ </dd>
241
+ <dt>
242
+ latex-use-custom-list-items
243
+ </dt>
244
+ <dd>
245
+ <p>
246
+ If <em>latex-use-custom-list-items</em> is defined, lists will be bulleted or enumerated the way you have typed them in the original Asciidoc document. That means, <tt>*</tt> turns into a circle bullet, <tt>-</tt> turns into a dash, <tt>.</tt> turns into a number and <tt>..</tt> turns into a letter. Otherwise LaTeX will use different bullets and enumeration characters depending on the level of nesting.
247
+ </p>
248
+ </dd>
249
+ <dt>
250
+ latex-use-colored-tables
251
+ </dt>
252
+ <dd>
253
+ <p>
254
+ If <em>latex-use-colored-tables</em> is defined, tables will be printed colored.
255
+ </p>
256
+ </dd>
257
+ <dt>
258
+ latex-use-running-title-headings
259
+ </dt>
260
+ <dd>
261
+ <p>
262
+ If <em>latex-use-running-title-headings</em> is defined, <em>pagestyle</em> will be set to <em>headings</em> which results in running titles in the head.
263
+ </p>
264
+ </dd>
265
+ <dt>
266
+ latex-use-colored-sidebar-blocks
267
+ </dt>
268
+ <dd>
269
+ <p>
270
+ If <em>latex-use-colored-sidebar-blocks</em> is defined, sidebar block content will be put in a color box instead of being indented by a vertical bar.
271
+ </p>
272
+ </dd>
273
+ <dt>
274
+ icons
275
+ </dt>
276
+ <dd>
277
+ <p>
278
+ 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.
279
+ </p>
280
+ </dd>
281
+ <dt>
282
+ encoding
283
+ </dt>
284
+ <dd>
285
+ <p>
286
+ Set the input and output document character set encoding. Currently <tt>ISO-8859-1</tt> and <tt>UTF-8</tt> are supported.
287
+ </p>
288
+ </dd>
289
+ </dl></div>
290
+ </div>
291
+ <h2 id="_requirements">Requirements</h2>
292
+ <div class="sectionbody">
293
+ <h3 id="_general">General</h3><div style="clear:left"></div>
294
+ <div class="para"><p>The following software is necessary for using the LaTeX backend:</p></div>
295
+ <div class="ilist"><ul>
296
+ <li>
297
+ <p>
298
+ An up-to-date version of <a href="http://www.methods.co.nz/asciidoc/">Asciidoc</a>
299
+ </p>
300
+ </li>
301
+ <li>
302
+ <p>
303
+ An up-to-date TeX distribution, e.g.:
304
+ </p>
305
+ <div class="ilist"><ul>
306
+ <li>
307
+ <p>
308
+ <a href="http://www.miktex.org/">MiKTeX</a> for Windows
309
+ </p>
310
+ </li>
311
+ <li>
312
+ <p>
313
+ <a href="http://www.tug.org/tetex/">teTeX</a> for Linux
314
+ </p>
315
+ </li>
316
+ </ul></div>
317
+ </li>
318
+ </ul></div>
319
+ <h3 id="packageRequirements">TeX/LaTeX Package requirements</h3><div style="clear:left"></div>
320
+ <div class="para"><p>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.</p></div>
321
+ <div class="tableblock">
322
+ <table rules="all"
323
+ frame="border"
324
+ cellspacing="0" cellpadding="4">
325
+ <col width="160" />
326
+ <col width="160" />
327
+ <col width="160" />
328
+ <col width="160" />
329
+ <col width="160" />
330
+ <thead>
331
+ <tr>
332
+ <th align="left">
333
+ Speciality
334
+ </th>
335
+ <th align="left">
336
+ MiKTeX package name
337
+ </th>
338
+ <th align="left">
339
+ teTeX package name
340
+ </th>
341
+ <th align="left">
342
+ TeX Live package name
343
+ </th>
344
+ <th align="left">
345
+ Description
346
+ </th>
347
+ </tr>
348
+ </thead>
349
+ <tbody valign="top">
350
+ <tr>
351
+ <td align="left">
352
+ KOMA-Script
353
+ </td>
354
+ <td align="left">
355
+ koma-script
356
+ </td>
357
+ <td align="left">
358
+ </td>
359
+ <td align="left">
360
+ </td>
361
+ <td align="left">
362
+ LaTeX backend uses the document classes <em>scrartcl</em> and <em>scrbook</em> as well as some other specialities defined in the <em>KOMA-Script</em> package, e.g. the commands <tt>\addmargin{}</tt> and <tt>\minisec{}</tt>.
363
+ </td>
364
+ </tr>
365
+ <tr>
366
+ <td align="left">
367
+ xcolor.sty
368
+ </td>
369
+ <td align="left">
370
+ xcolor
371
+ </td>
372
+ <td align="left">
373
+ </td>
374
+ <td align="left">
375
+ </td>
376
+ <td align="left">
377
+ Used to produce colored boxes and tables.
378
+ </td>
379
+ </tr>
380
+ <tr>
381
+ <td align="left">
382
+ colortbl.sty
383
+ </td>
384
+ <td align="left">
385
+ colortbl
386
+ </td>
387
+ <td align="left">
388
+ </td>
389
+ <td align="left">
390
+ </td>
391
+ <td align="left">
392
+ Used to produce colored tables.
393
+ </td>
394
+ </tr>
395
+ <tr>
396
+ <td align="left">
397
+ type1ec.sty
398
+ </td>
399
+ <td align="left">
400
+ cm-super
401
+ </td>
402
+ <td align="left">
403
+ </td>
404
+ <td align="left">
405
+ </td>
406
+ <td align="left">
407
+ Enables high quality fonts for PDF output.
408
+ </td>
409
+ </tr>
410
+ <tr>
411
+ <td align="left">
412
+ hyperref.sty
413
+ </td>
414
+ <td align="left">
415
+ hyperref
416
+ </td>
417
+ <td align="left">
418
+ </td>
419
+ <td align="left">
420
+ </td>
421
+ <td align="left">
422
+ Extensive support for hypertext in PDF documents.
423
+ </td>
424
+ </tr>
425
+ <tr>
426
+ <td align="left">
427
+ enumerate.sty
428
+ </td>
429
+ <td align="left">
430
+ tools
431
+ </td>
432
+ <td align="left">
433
+ </td>
434
+ <td align="left">
435
+ </td>
436
+ <td align="left">
437
+ When <em>latex-use-custom-list-items</em> is defined this package is used for determining the enumeration character.
438
+ </td>
439
+ </tr>
440
+ <tr>
441
+ <td align="left">
442
+ graphicx.sty
443
+ </td>
444
+ <td align="left">
445
+ graphics
446
+ </td>
447
+ <td align="left">
448
+ </td>
449
+ <td align="left">
450
+ </td>
451
+ <td align="left">
452
+ Used for including images.
453
+ </td>
454
+ </tr>
455
+ <tr>
456
+ <td align="left">
457
+ longtable.sty
458
+ </td>
459
+ <td align="left">
460
+ tools
461
+ </td>
462
+ <td align="left">
463
+ </td>
464
+ <td align="left">
465
+ </td>
466
+ <td align="left">
467
+ Enables page spanning tables.
468
+ </td>
469
+ </tr>
470
+ <tr>
471
+ <td align="left">
472
+ ucs.sty
473
+ </td>
474
+ <td align="left">
475
+ unicode
476
+ </td>
477
+ <td align="left">
478
+ </td>
479
+ <td align="left">
480
+ </td>
481
+ <td align="left">
482
+ Enables support for unicode characters.
483
+ </td>
484
+ </tr>
485
+ <tr>
486
+ <td align="left">
487
+ textcomp
488
+ </td>
489
+ <td align="left">
490
+ ltxbase
491
+ </td>
492
+ <td align="left">
493
+ </td>
494
+ <td align="left">
495
+ </td>
496
+ <td align="left">
497
+ Used for printing various symbols like arrows. Should be already installed.
498
+ </td>
499
+ </tr>
500
+ <tr>
501
+ <td align="left">
502
+ alltt
503
+ </td>
504
+ <td align="left">
505
+ ltxbase
506
+ </td>
507
+ <td align="left">
508
+ </td>
509
+ <td align="left">
510
+ </td>
511
+ <td align="left">
512
+ Used in literal-like blocks for retaining line and whitespace formatting. Should be already installed.
513
+ </td>
514
+ </tr>
515
+ <tr>
516
+ <td align="left">
517
+ listings.sty
518
+ </td>
519
+ <td align="left">
520
+ listings
521
+ </td>
522
+ <td align="left">
523
+ </td>
524
+ <td align="left">
525
+ </td>
526
+ <td align="left">
527
+ Used for listing blocks.
528
+ </td>
529
+ </tr>
530
+ </tbody>
531
+ </table>
532
+ </div>
533
+ </div>
534
+ <h2 id="configurationFile">About the LaTeX backend configuration file</h2>
535
+ <div class="sectionbody">
536
+ <div class="para"><p>An important note for people who want to adapt the LaTeX backend configuration file to their own needs:</p></div>
537
+ <div class="para"><p>LaTeX markup has a lot of special characters, most importantly <tt>\</tt>, <tt>{</tt>, <tt>}</tt>. In order to make things less complicated, I changed the default substitution order (see entry <em>subsnormal</em> in the <tt>[miscellaneous]</tt> section). In contrast to the backends <em>docbook</em> and <em>xhtml11</em>, the <em>specialcharacters</em> substitution is applied very late. As a result all special characters produced by <em>quotes</em>, <em>specialwords</em>, <em>replacements</em>, <em>attributes</em> and <em>macros</em> 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.</p></div>
538
+ <div class="ilist"><ul>
539
+ <li>
540
+ <p>
541
+ <tt><span>!..backslash..!</span></tt> instead of <tt>\</tt>
542
+ </p>
543
+ </li>
544
+ <li>
545
+ <p>
546
+ <tt><span>!..braceleft..!</span></tt> instead of <tt>{</tt>
547
+ </p>
548
+ </li>
549
+ <li>
550
+ <p>
551
+ <tt><span>!..braceright..!</span></tt> instead of <tt>}</tt>
552
+ </p>
553
+ </li>
554
+ </ul></div>
555
+ <div class="para"><p>For more special characters take a look in the <tt>[replacements2]</tt> sections. <tt>[replacements2]</tt> section is responsible for replacing the symbols with their corresponding special characters.</p></div>
556
+ </div>
557
+ <h2 id="_ideas">Ideas</h2>
558
+ <div class="sectionbody">
559
+ <h3 id="_code_listing_block">Code listing block</h3><div style="clear:left"></div>
560
+ <div class="para"><p>For creating highlighted code listings I suggest the use of <a href="http://www.andre-simon.de/">Highlight</a> or <a href="http://www.gnu.org/software/src-highlite/">GNU Source Highlight</a>. Both are suited for use as Asciidoc filters.</p></div>
561
+ </div>
562
+ <h2 id="_known_bugs">Known Bugs</h2>
563
+ <div class="sectionbody">
564
+ <div class="ilist"><ul>
565
+ <li>
566
+ <p>
567
+ Sometimes LaTeX backend handles things differently from the default backends
568
+ </p>
569
+ </li>
570
+ <li>
571
+ <p>
572
+ A lot of little bugs
573
+ </p>
574
+ </li>
575
+ </ul></div>
576
+ </div>
577
+ <h2 id="_todo_list">Todo List</h2>
578
+ <div class="sectionbody">
579
+ <div class="ilist"><ul>
580
+ <li>
581
+ <p>
582
+ Remove bugs
583
+ </p>
584
+ </li>
585
+ <li>
586
+ <p>
587
+ Support for <em>grid</em> attribute in tables
588
+ </p>
589
+ </li>
590
+ <li>
591
+ <p>
592
+ Better looking tables
593
+ </p>
594
+ </li>
595
+ <li>
596
+ <p>
597
+ Option for squeezing output (smaller lists)
598
+ </p>
599
+ </li>
600
+ <li>
601
+ <p>
602
+ Support for different languages (That would be a nice feature for Asciidoc in general)
603
+ </p>
604
+ </li>
605
+ <li>
606
+ <p>
607
+ Option for switching titlepage on and off
608
+ </p>
609
+ </li>
610
+ </ul></div>
611
+ </div>
612
+ <div id="footer">
613
+ <div id="footer-text">
614
+ Version 1.0<br />
615
+ Last updated 2008-07-04 23:29:27 NZDT
616
+ </div>
617
+ <div id="footer-badges">
618
+ <a href="http://validator.w3.org/check?uri=referer">
619
+ <img style="border:none; width:88px; height:31px;"
620
+ src="http://www.w3.org/Icons/valid-xhtml11"
621
+ alt="Valid XHTML 1.1!" />
622
+ </a>
623
+ <a href="http://jigsaw.w3.org/css-validator/check/referer">
624
+ <img style="border:none; width:88px; height:31px;"
625
+ src="http://jigsaw.w3.org/css-validator/images/vcss"
626
+ alt="Valid CSS!" />
627
+ </a>
628
+ <a href="http://www.mozilla.org/products/firefox/">
629
+ <img style="border:none; width:110px; height:32px;"
630
+ src="http://www.spreadfirefox.com/community/images/affiliates/Buttons/110x32/safer.gif"
631
+ alt="Get Firefox!" />
632
+ </a>
633
+ </div>
634
+ </div>
635
+ </div>
636
+ </td>
637
+ </tr>
638
+ </table>
639
+ </body>
640
+ </html>