FooBarWidget-mizuho 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE.txt +20 -0
- data/README.markdown +68 -0
- data/Rakefile +9 -0
- data/asciidoc/BUGS +34 -0
- data/asciidoc/BUGS.txt +28 -0
- data/asciidoc/CHANGELOG +1585 -0
- data/asciidoc/CHANGELOG.txt +1595 -0
- data/asciidoc/COPYING +339 -0
- data/asciidoc/COPYRIGHT +18 -0
- data/asciidoc/INSTALL +82 -0
- data/asciidoc/INSTALL.txt +71 -0
- data/asciidoc/README +46 -0
- data/asciidoc/README.txt +36 -0
- data/asciidoc/a2x +641 -0
- data/asciidoc/asciidoc.conf +404 -0
- data/asciidoc/asciidoc.py +4255 -0
- data/asciidoc/common.aap +9 -0
- data/asciidoc/dblatex/asciidoc-dblatex.sty +18 -0
- data/asciidoc/dblatex/asciidoc-dblatex.xsl +17 -0
- data/asciidoc/dblatex/dblatex-readme.txt +22 -0
- data/asciidoc/doc/a2x.1 +246 -0
- data/asciidoc/doc/a2x.1.txt +195 -0
- data/asciidoc/doc/article.css-embedded.html +579 -0
- data/asciidoc/doc/article.html +62 -0
- data/asciidoc/doc/article.pdf +0 -0
- data/asciidoc/doc/article.txt +124 -0
- data/asciidoc/doc/asciidoc-revhistory.xml +27 -0
- data/asciidoc/doc/asciidoc.1 +161 -0
- data/asciidoc/doc/asciidoc.1.css-embedded.html +562 -0
- data/asciidoc/doc/asciidoc.1.css.html +212 -0
- data/asciidoc/doc/asciidoc.1.html +190 -0
- data/asciidoc/doc/asciidoc.1.txt +118 -0
- data/asciidoc/doc/asciidoc.conf +8 -0
- data/asciidoc/doc/asciidoc.css-embedded.html +7954 -0
- data/asciidoc/doc/asciidoc.css.html +7553 -0
- data/asciidoc/doc/asciidoc.dict +673 -0
- data/asciidoc/doc/asciidoc.html +3502 -0
- data/asciidoc/doc/asciidoc.txt +4757 -0
- data/asciidoc/doc/asciimath.txt +47 -0
- data/asciidoc/doc/book-multi.css-embedded.html +575 -0
- data/asciidoc/doc/book-multi.html +72 -0
- data/asciidoc/doc/book-multi.txt +159 -0
- data/asciidoc/doc/book.css-embedded.html +585 -0
- data/asciidoc/doc/book.html +60 -0
- data/asciidoc/doc/book.txt +133 -0
- data/asciidoc/doc/customers.csv +18 -0
- data/asciidoc/doc/faq.txt +262 -0
- data/asciidoc/doc/latex-backend.html +224 -0
- data/asciidoc/doc/latex-backend.txt +193 -0
- data/asciidoc/doc/latexmath.txt +35 -0
- data/asciidoc/doc/main.aap +293 -0
- data/asciidoc/doc/music-filter.html +513 -0
- data/asciidoc/doc/music-filter.pdf +0 -0
- data/asciidoc/doc/music-filter.txt +158 -0
- data/asciidoc/doc/source-highlight-filter.html +183 -0
- data/asciidoc/doc/source-highlight-filter.pdf +0 -0
- data/asciidoc/doc/source-highlight-filter.txt +174 -0
- data/asciidoc/docbook-xsl/asciidoc-docbook-xsl.txt +71 -0
- data/asciidoc/docbook-xsl/chunked.xsl +19 -0
- data/asciidoc/docbook-xsl/common.xsl +67 -0
- data/asciidoc/docbook-xsl/fo.xsl +117 -0
- data/asciidoc/docbook-xsl/htmlhelp.xsl +17 -0
- data/asciidoc/docbook-xsl/manpage.xsl +28 -0
- data/asciidoc/docbook-xsl/shaded-literallayout.patch +32 -0
- data/asciidoc/docbook-xsl/xhtml.xsl +14 -0
- data/asciidoc/docbook.conf +606 -0
- data/asciidoc/examples/website/CHANGELOG.html +3828 -0
- data/asciidoc/examples/website/INSTALL.html +163 -0
- data/asciidoc/examples/website/README-website.html +129 -0
- data/asciidoc/examples/website/README-website.txt +29 -0
- data/asciidoc/examples/website/README.html +125 -0
- data/asciidoc/examples/website/a2x.1.html +395 -0
- data/asciidoc/examples/website/asciidoc-docbook-xsl.html +165 -0
- data/asciidoc/examples/website/asciimath.html +157 -0
- data/asciidoc/examples/website/build-website.sh +25 -0
- data/asciidoc/examples/website/downloads.html +219 -0
- data/asciidoc/examples/website/downloads.txt +98 -0
- data/asciidoc/examples/website/faq.html +372 -0
- data/asciidoc/examples/website/index.html +398 -0
- data/asciidoc/examples/website/index.txt +222 -0
- data/asciidoc/examples/website/latex-backend.html +640 -0
- data/asciidoc/examples/website/latexmath.html +119 -0
- data/asciidoc/examples/website/layout1.conf +161 -0
- data/asciidoc/examples/website/layout1.css +65 -0
- data/asciidoc/examples/website/layout2.conf +158 -0
- data/asciidoc/examples/website/layout2.css +93 -0
- data/asciidoc/examples/website/manpage.html +266 -0
- data/asciidoc/examples/website/music-filter.html +242 -0
- data/asciidoc/examples/website/music1.abc +12 -0
- data/asciidoc/examples/website/music1.png +0 -0
- data/asciidoc/examples/website/music2.ly +9 -0
- data/asciidoc/examples/website/music2.png +0 -0
- data/asciidoc/examples/website/source-highlight-filter.html +251 -0
- data/asciidoc/examples/website/support.html +78 -0
- data/asciidoc/examples/website/support.txt +5 -0
- data/asciidoc/examples/website/userguide.html +7597 -0
- data/asciidoc/examples/website/version9.html +143 -0
- data/asciidoc/examples/website/version9.txt +48 -0
- data/asciidoc/filters/code-filter-readme.txt +37 -0
- data/asciidoc/filters/code-filter-test-c++.txt +7 -0
- data/asciidoc/filters/code-filter-test.txt +15 -0
- data/asciidoc/filters/code-filter.conf +8 -0
- data/asciidoc/filters/code-filter.py +239 -0
- data/asciidoc/filters/music-filter-test.txt +40 -0
- data/asciidoc/filters/music-filter.conf +40 -0
- data/asciidoc/filters/music2png.py +189 -0
- data/asciidoc/filters/source-highlight-filter-test.txt +19 -0
- data/asciidoc/filters/source-highlight-filter.conf +100 -0
- data/asciidoc/help.conf +213 -0
- data/asciidoc/html4.conf +363 -0
- data/asciidoc/images/highlighter.png +0 -0
- data/asciidoc/images/icons/README +5 -0
- data/asciidoc/images/icons/callouts/1.png +0 -0
- data/asciidoc/images/icons/callouts/10.png +0 -0
- data/asciidoc/images/icons/callouts/11.png +0 -0
- data/asciidoc/images/icons/callouts/12.png +0 -0
- data/asciidoc/images/icons/callouts/13.png +0 -0
- data/asciidoc/images/icons/callouts/14.png +0 -0
- data/asciidoc/images/icons/callouts/15.png +0 -0
- data/asciidoc/images/icons/callouts/2.png +0 -0
- data/asciidoc/images/icons/callouts/3.png +0 -0
- data/asciidoc/images/icons/callouts/4.png +0 -0
- data/asciidoc/images/icons/callouts/5.png +0 -0
- data/asciidoc/images/icons/callouts/6.png +0 -0
- data/asciidoc/images/icons/callouts/7.png +0 -0
- data/asciidoc/images/icons/callouts/8.png +0 -0
- data/asciidoc/images/icons/callouts/9.png +0 -0
- data/asciidoc/images/icons/caution.png +0 -0
- data/asciidoc/images/icons/example.png +0 -0
- data/asciidoc/images/icons/home.png +0 -0
- data/asciidoc/images/icons/important.png +0 -0
- data/asciidoc/images/icons/next.png +0 -0
- data/asciidoc/images/icons/note.png +0 -0
- data/asciidoc/images/icons/prev.png +0 -0
- data/asciidoc/images/icons/tip.png +0 -0
- data/asciidoc/images/icons/up.png +0 -0
- data/asciidoc/images/icons/warning.png +0 -0
- data/asciidoc/images/smallnew.png +0 -0
- data/asciidoc/images/tiger.png +0 -0
- data/asciidoc/install.sh +55 -0
- data/asciidoc/javascripts/ASCIIMathML.js +938 -0
- data/asciidoc/javascripts/LaTeXMathML.js +1223 -0
- data/asciidoc/javascripts/toc.js +69 -0
- data/asciidoc/lang-es.conf +15 -0
- data/asciidoc/latex.conf +663 -0
- data/asciidoc/linuxdoc.conf +285 -0
- data/asciidoc/math.conf +50 -0
- data/asciidoc/stylesheets/docbook-xsl.css +271 -0
- data/asciidoc/stylesheets/xhtml-deprecated-manpage.css +21 -0
- data/asciidoc/stylesheets/xhtml-deprecated.css +247 -0
- data/asciidoc/stylesheets/xhtml11-manpage.css +18 -0
- data/asciidoc/stylesheets/xhtml11-quirks.css +49 -0
- data/asciidoc/stylesheets/xhtml11.css +284 -0
- data/asciidoc/t.conf +20 -0
- data/asciidoc/text.conf +16 -0
- data/asciidoc/vim/ftdetect/asciidoc_filetype.vim +53 -0
- data/asciidoc/vim/syntax/asciidoc.vim +139 -0
- data/asciidoc/xhtml-deprecated-css.conf +235 -0
- data/asciidoc/xhtml-deprecated.conf +351 -0
- data/asciidoc/xhtml11-quirks.conf +57 -0
- data/asciidoc/xhtml11.conf +514 -0
- data/bin/mizuho +40 -0
- data/lib/mizuho/chapter.rb +54 -0
- data/lib/mizuho/generator.rb +106 -0
- data/lib/mizuho/heading.rb +46 -0
- data/lib/mizuho/parser.rb +99 -0
- data/lib/mizuho/template.rb +50 -0
- data/mizuho.gemspec +34 -0
- data/templates/asciidoc.css +358 -0
- data/templates/asciidoc.html.erb +86 -0
- data/templates/manualsonrails.css +165 -0
- data/templates/manualsonrails.html.erb +97 -0
- data/test/parser_spec.rb +190 -0
- data/test/spec_helper.rb +43 -0
- metadata +234 -0
@@ -0,0 +1,224 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>LaTeX backend for Asciidoc</title><link rel="stylesheet" href="./docbook-xsl.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.72.0" /></head><body><div class="article" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="id2417888"></a>LaTeX backend for Asciidoc</h1></div><div><div class="author"><h3 class="author"><span class="firstname">Benjamin</span> <span class="surname">Klum</span></h3><div class="affiliation"><div class="address"><p><code class="email"><<a href="mailto:benjamin.klum@gmail.com">benjamin.klum@gmail.com</a>></code></p></div></div></div></div><div><div class="revhistory"><table border="1" width="100%" summary="Revision history"><tr><th align="left" valign="top" colspan="3"><b>Revision History</b></th></tr><tr><td align="left">Revision 1.0</td><td align="left">June 2006</td><td align="left">BK</td></tr></table></div></div></div><hr /></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#_introduction">1. Introduction</a></span></dt><dt><span class="section"><a href="#_tutorial">2. Tutorial</a></span></dt><dt><span class="section"><a href="#_general_notes">3. General notes</a></span></dt><dd><dl><dt><span class="section"><a href="#_quality_of_latex_output">3.1. Quality of LaTeX output</a></span></dt><dt><span class="section"><a href="#_configuration_file_customization">3.2. Configuration file customization</a></span></dt><dt><span class="section"><a href="#_output_optimization">3.3. Output optimization</a></span></dt><dt><span class="section"><a href="#unicodeSupport">3.4. Unicode support</a></span></dt></dl></dd><dt><span class="section"><a href="#_backend_specific_features">4. Backend specific features</a></span></dt><dd><dl><dt><span class="section"><a href="#_special_sections">4.1. Special sections</a></span></dt><dt><span class="section"><a href="#internalCrossReferences">4.2. Internal cross references</a></span></dt><dt><span class="section"><a href="#_options">4.3. Options</a></span></dt></dl></dd><dt><span class="section"><a href="#_requirements">5. Requirements</a></span></dt><dd><dl><dt><span class="section"><a href="#_general">5.1. General</a></span></dt><dt><span class="section"><a href="#packageRequirements">5.2. TeX/LaTeX Package requirements</a></span></dt></dl></dd><dt><span class="section"><a href="#configurationFile">6. About the LaTeX backend configuration file</a></span></dt><dt><span class="section"><a href="#_ideas">7. Ideas</a></span></dt><dd><dl><dt><span class="section"><a href="#_code_listing_block">7.1. Code listing block</a></span></dt></dl></dd><dt><span class="section"><a href="#_known_bugs">8. Known Bugs</a></span></dt><dt><span class="section"><a href="#_todo_list">9. Todo List</a></span></dt></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_introduction"></a>1. Introduction</h2></div></div></div><p>LaTeX backend is a configuration file for Stuart Rackham's <a href="http://www.methods.co.nz/asciidoc/" target="_top">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><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_tutorial"></a>2. Tutorial</h2></div></div></div><p>Getting a ready-to-print document from an Asciidoc document using the LaTeX backend involves at least two steps:</p><div class="orderedlist"><ol type="1"><li>
|
4
|
+
Conversion of the Asciidoc document into a LaTeX document (this is done by Asciidoc using the LaTeX backend)
|
5
|
+
</li><li>
|
6
|
+
Conversion of the LaTeX document into a PDF document (this is done by the TeX system)
|
7
|
+
</li></ol></div><p>Try to create a PDF document from the Asciidoc document <code class="literal">article.txt</code> which resides in the <code class="literal">doc</code> directory of Asciidoc:</p><div class="orderedlist"><ol type="a"><li>
|
8
|
+
Make a copy of <code class="literal">article.txt</code> in a directory of your choice, let's call it <code class="literal">latex-test</code>.
|
9
|
+
</li><li>
|
10
|
+
Make sure that all images referenced in <code class="literal">article.txt</code> exist in <code class="literal">latex-test</code>. Brute force approach: Copy the whole <code class="literal">images</code> directory from Asciidoc directory into <code class="literal">latex-test</code>.
|
11
|
+
</li><li><p>
|
12
|
+
Change directory to <code class="literal">latex-test</code> and type following commands:
|
13
|
+
</p><pre class="literallayout">asciidoc --unsafe --backend=latex article.txt
|
14
|
+
pdflatex article.tex</pre></li><li>
|
15
|
+
Now there should be a file <code class="literal">article.pdf</code> in the <code class="literal">latex-test</code> directory.
|
16
|
+
</li></ol></div><div class="important" style="margin-left: 0; margin-right: 10%;"><table border="0" summary="Important"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="./images/icons/important.png" /></td><th align="left"></th></tr><tr><td align="left" valign="top"><div class="itemizedlist"><ul type="disc"><li>
|
17
|
+
Asciidoc has to be started in <span class="emphasis"><em>unsafe mode</em></span> when using LaTeX backend.
|
18
|
+
</li><li>
|
19
|
+
Note that some special LaTeX packages are necessary, see <a href="#packageRequirements" title="5.2. TeX/LaTeX Package requirements">here</a>.
|
20
|
+
</li></ul></div></td></tr></table></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_general_notes"></a>3. General notes</h2></div></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_quality_of_latex_output"></a>3.1. Quality of LaTeX output</h3></div></div></div><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><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><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_configuration_file_customization"></a>3.2. Configuration file customization</h3></div></div></div><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" title="6. About the LaTeX backend configuration file">here</a>.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_output_optimization"></a>3.3. Output optimization</h3></div></div></div><p>The LaTeX output is optimized for creating PDF documents using <span class="emphasis"><em>pdflatex</em></span>.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="unicodeSupport"></a>3.4. Unicode support</h3></div></div></div><p>Unfortunately TeX/LaTeX does not have native unicode support. The package <span class="emphasis"><em>ucs</em></span> 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 <code class="literal">[U+…]</code>. 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></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_backend_specific_features"></a>4. Backend specific features</h2></div></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_special_sections"></a>4.1. Special sections</h3></div></div></div><p>LaTeX backend supports the following special sections and replaces them with corresponding LaTeX commands or environments:</p><div class="itemizedlist"><ul type="disc"><li>
|
21
|
+
Abstract (only for document type <span class="emphasis"><em>article</em></span>)
|
22
|
+
</li><li>
|
23
|
+
Dedication (only for document type <span class="emphasis"><em>book</em></span>)
|
24
|
+
</li><li>
|
25
|
+
Index
|
26
|
+
</li><li>
|
27
|
+
Bibliography (only when the attribute <span class="emphasis"><em>latex-use-bibliography-environment</em></span> is set)
|
28
|
+
</li><li>
|
29
|
+
Appendix
|
30
|
+
</li><li>
|
31
|
+
Contents
|
32
|
+
</li></ul></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="internalCrossReferences"></a>4.2. Internal cross references</h3></div></div></div><p>Macros for internal cross references have been extended by the attribute <span class="emphasis"><em>style</em></span>.</p><pre class="literallayout">xref:<id>[<caption>, style=<style>]</pre><p>or</p><pre class="literallayout"><<<id>,<caption>,<style>>></pre><p>The additional attribute <span class="emphasis"><em>style</em></span> can have following values:</p><div class="variablelist"><dl><dt><span class="term">
|
33
|
+
page
|
34
|
+
</span></dt><dd>
|
35
|
+
Let's LaTeX print the page number of the referenced anchor.
|
36
|
+
</dd><dt><span class="term">
|
37
|
+
ref
|
38
|
+
</span></dt><dd>
|
39
|
+
Let's LaTeX print the number of the section, subsection, figure, table or theorem the referenced anchor resides.
|
40
|
+
</dd><dt><span class="term">
|
41
|
+
autoref
|
42
|
+
</span></dt><dd>
|
43
|
+
Let's LaTeX print the number of the section, subsection, figure, table or theorem the referenced anchor resides preceded with a contextual label.
|
44
|
+
</dd><dt><span class="term">
|
45
|
+
cite
|
46
|
+
</span></dt><dd>
|
47
|
+
Let's LaTeX interprete this reference as a reference to a bibliography entry. If the attribute <span class="emphasis"><em>latex-use-bibliography-environment</em></span> is set, references with <span class="emphasis"><em>cite</em></span> style as well as their corresponding bibliography anchors are presented as automatically generated numbers.
|
48
|
+
</dd></dl></div><p>If the <span class="emphasis"><em>style</em></span> attribute is not set the reference is printed the common way.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_options"></a>4.3. Options</h3></div></div></div><p>LaTeX document generation is influenced by the following attributes:</p><div class="variablelist"><dl><dt><span class="term">
|
49
|
+
latex-table-rowlimit
|
50
|
+
</span></dt><dd>
|
51
|
+
The maximum number of rows for typesetting tables using the <span class="emphasis"><em>tabular</em></span> environment. If a table has more rows than <span class="emphasis"><em>latex-table-rowlimit</em></span>, <span class="emphasis"><em>longtable</em></span> environment is used instead of <span class="emphasis"><em>tabular</em></span> environment. <span class="emphasis"><em>longtable</em></span> environment supports tables spanning over several pages.
|
52
|
+
</dd><dt><span class="term">
|
53
|
+
latex-use-bibliography-environment
|
54
|
+
</span></dt><dd>
|
55
|
+
If <span class="emphasis"><em>latex-use-bibliography-environment</em></span> is defined, <span class="emphasis"><em>thebibliography</em></span> 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 <span class="emphasis"><em>style</em></span> attribute must be set to <span class="emphasis"><em>cite</em></span>. For more information see <a href="#internalCrossReferences" title="4.2. Internal cross references">Internal cross references</a>.
|
56
|
+
</dd><dt><span class="term">
|
57
|
+
latex-indent-paragraphs
|
58
|
+
</span></dt><dd>
|
59
|
+
If <span class="emphasis"><em>latex-indent-paragraphs</em></span> is defined, the first line of paragraphs will be indented. By default LaTeX backend prevents paragraph indentation and prints paragraphs with preceding vertical space.
|
60
|
+
</dd><dt><span class="term">
|
61
|
+
<a id="latex-recognize-escaped-unicode"></a> latex-recognize-escaped-unicode
|
62
|
+
</span></dt><dd>
|
63
|
+
If <span class="emphasis"><em>latex-recognize-escaped-unicode</em></span> is defined, escaped unicode characters (e.g. <code class="literal">{amp}#960;</code> or <code class="literal">{amp}#x3C0;</code>) will be recognized. This can lead to LaTeX compilation errors since LaTeX unicode support is only rudimentary. For more information see <a href="#unicodeSupport" title="3.4. Unicode support">Unicode support</a>.
|
64
|
+
</dd><dt><span class="term">
|
65
|
+
latex-use-custom-list-items
|
66
|
+
</span></dt><dd>
|
67
|
+
If <span class="emphasis"><em>latex-use-custom-list-items</em></span> is defined, lists will be bulleted or enumerated the way you have typed them in the original Asciidoc document. That means, <code class="literal">*</code> turns into a circle bullet, <code class="literal">-</code> turns into a dash, <code class="literal">.</code> turns into a number and <code class="literal">..</code> turns into a letter. Otherwise LaTeX will use different bullets and enumeration characters depending on the level of nesting.
|
68
|
+
</dd><dt><span class="term">
|
69
|
+
latex-use-colored-tables
|
70
|
+
</span></dt><dd>
|
71
|
+
If <span class="emphasis"><em>latex-use-colored-tables</em></span> is defined, tables will be printed colored.
|
72
|
+
</dd><dt><span class="term">
|
73
|
+
latex-use-running-title-headings
|
74
|
+
</span></dt><dd>
|
75
|
+
If <span class="emphasis"><em>latex-use-running-title-headings</em></span> is defined, <span class="emphasis"><em>pagestyle</em></span> will be set to <span class="emphasis"><em>headings</em></span> which results in running titles in the head.
|
76
|
+
</dd><dt><span class="term">
|
77
|
+
latex-use-colored-sidebar-blocks
|
78
|
+
</span></dt><dd>
|
79
|
+
If <span class="emphasis"><em>latex-use-colored-sidebar-blocks</em></span> is defined, sidebar block content will be put in a color box instead of being indented by a vertical bar.
|
80
|
+
</dd><dt><span class="term">
|
81
|
+
icons
|
82
|
+
</span></dt><dd>
|
83
|
+
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.
|
84
|
+
</dd><dt><span class="term">
|
85
|
+
encoding
|
86
|
+
</span></dt><dd>
|
87
|
+
Set the input and output document character set encoding. Currently <code class="literal">ISO-8859-1</code> and <code class="literal">UTF-8</code> are supported.
|
88
|
+
</dd></dl></div></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_requirements"></a>5. Requirements</h2></div></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_general"></a>5.1. General</h3></div></div></div><p>The following software is necessary for using the LaTeX backend:</p><div class="itemizedlist"><ul type="disc"><li>
|
89
|
+
An up-to-date version of <a href="http://www.methods.co.nz/asciidoc/" target="_top">Asciidoc</a>
|
90
|
+
</li><li><p>
|
91
|
+
An up-to-date TeX distribution, e.g.:
|
92
|
+
</p><div class="itemizedlist"><ul type="circle"><li>
|
93
|
+
<a href="http://www.miktex.org/" target="_top">MiKTeX</a> for Windows
|
94
|
+
</li><li>
|
95
|
+
<a href="http://www.tug.org/tetex/" target="_top">teTeX</a> for Linux
|
96
|
+
</li></ul></div></li></ul></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="packageRequirements"></a>5.2. TeX/LaTeX Package requirements</h3></div></div></div><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 class="informaltable"><table cellpadding="4px" border="0" style="border-collapse: collapse;border-top: 2px solid #527bbd; border-bottom: 2px solid #527bbd; border-left: 2px solid #527bbd; border-right: 2px solid #527bbd; "><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
97
|
+
Speciality
|
98
|
+
</th><th style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
99
|
+
MiKTeX package name
|
100
|
+
</th><th style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
101
|
+
teTeX package name
|
102
|
+
</th><th style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
103
|
+
TeX Live package name
|
104
|
+
</th><th style="border-bottom: 1px solid ; " align="left">
|
105
|
+
Description
|
106
|
+
</th></tr></thead><tbody><tr><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
107
|
+
KOMA-Script
|
108
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
109
|
+
koma-script
|
110
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
111
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
112
|
+
</td><td style="border-bottom: 1px solid ; " align="left">
|
113
|
+
LaTeX backend uses the document classes <span class="emphasis"><em>scrartcl</em></span> and <span class="emphasis"><em>scrbook</em></span> as well as some other specialities defined in the <span class="emphasis"><em>KOMA-Script</em></span> package, e.g. the commands <code class="literal">\addmargin{}</code> and <code class="literal">\minisec{}</code>.
|
114
|
+
</td></tr><tr><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
115
|
+
xcolor.sty
|
116
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
117
|
+
xcolor
|
118
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
119
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
120
|
+
</td><td style="border-bottom: 1px solid ; " align="left">
|
121
|
+
Used to produce colored boxes and tables.
|
122
|
+
</td></tr><tr><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
123
|
+
colortbl.sty
|
124
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
125
|
+
colortbl
|
126
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
127
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
128
|
+
</td><td style="border-bottom: 1px solid ; " align="left">
|
129
|
+
Used to produce colored tables.
|
130
|
+
</td></tr><tr><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
131
|
+
type1ec.sty
|
132
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
133
|
+
cm-super
|
134
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
135
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
136
|
+
</td><td style="border-bottom: 1px solid ; " align="left">
|
137
|
+
Enables high quality fonts for PDF output.
|
138
|
+
</td></tr><tr><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
139
|
+
hyperref.sty
|
140
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
141
|
+
hyperref
|
142
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
143
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
144
|
+
</td><td style="border-bottom: 1px solid ; " align="left">
|
145
|
+
Extensive support for hypertext in PDF documents.
|
146
|
+
</td></tr><tr><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
147
|
+
enumerate.sty
|
148
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
149
|
+
tools
|
150
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
151
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
152
|
+
</td><td style="border-bottom: 1px solid ; " align="left">
|
153
|
+
When <span class="emphasis"><em>latex-use-custom-list-items</em></span> is defined this package is used for determining the enumeration character.
|
154
|
+
</td></tr><tr><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
155
|
+
graphicx.sty
|
156
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
157
|
+
graphics
|
158
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
159
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
160
|
+
</td><td style="border-bottom: 1px solid ; " align="left">
|
161
|
+
Used for including images.
|
162
|
+
</td></tr><tr><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
163
|
+
longtable.sty
|
164
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
165
|
+
tools
|
166
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
167
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
168
|
+
</td><td style="border-bottom: 1px solid ; " align="left">
|
169
|
+
Enables page spanning tables.
|
170
|
+
</td></tr><tr><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
171
|
+
ucs.sty
|
172
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
173
|
+
unicode
|
174
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
175
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
176
|
+
</td><td style="border-bottom: 1px solid ; " align="left">
|
177
|
+
Enables support for unicode characters.
|
178
|
+
</td></tr><tr><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
179
|
+
textcomp
|
180
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
181
|
+
ltxbase
|
182
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
183
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
184
|
+
</td><td style="border-bottom: 1px solid ; " align="left">
|
185
|
+
Used for printing various symbols like arrows. Should be already installed.
|
186
|
+
</td></tr><tr><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
187
|
+
alltt
|
188
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
189
|
+
ltxbase
|
190
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
191
|
+
</td><td style="border-right: 1px solid ; border-bottom: 1px solid ; " align="left">
|
192
|
+
</td><td style="border-bottom: 1px solid ; " align="left">
|
193
|
+
Used in literal-like blocks for retaining line and whitespace formatting. Should be already installed.
|
194
|
+
</td></tr><tr><td style="border-right: 1px solid ; " align="left">
|
195
|
+
listings.sty
|
196
|
+
</td><td style="border-right: 1px solid ; " align="left">
|
197
|
+
listings
|
198
|
+
</td><td style="border-right: 1px solid ; " align="left">
|
199
|
+
</td><td style="border-right: 1px solid ; " align="left">
|
200
|
+
</td><td style="" align="left">
|
201
|
+
Used for listing blocks.
|
202
|
+
</td></tr></tbody></table></div></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="configurationFile"></a>6. About the LaTeX backend configuration file</h2></div></div></div><p>An important note for people who want to adapt the LaTeX backend configuration file to their own needs:</p><p>LaTeX markup has a lot of special characters, most importantly <code class="literal">\</code>, <code class="literal">{</code>, <code class="literal">}</code>. In order to make things less complicated, I changed the default substitution order (see entry <span class="emphasis"><em>subsnormal</em></span> in the <code class="literal">[miscellaneous]</code> section). In contrast to the backends <span class="emphasis"><em>docbook</em></span> and <span class="emphasis"><em>xhtml11</em></span>, the <span class="emphasis"><em>specialcharacters</em></span> substitution is applied very late. As a result all special characters produced by <span class="emphasis"><em>quotes</em></span>, <span class="emphasis"><em>specialwords</em></span>, <span class="emphasis"><em>replacements</em></span>, <span class="emphasis"><em>attributes</em></span> and <span class="emphasis"><em>macros</em></span> 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 class="itemizedlist"><ul type="disc"><li>
|
203
|
+
<code class="literal">!..backslash..!</code> instead of <code class="literal">\</code>
|
204
|
+
</li><li>
|
205
|
+
<code class="literal">!..braceleft..!</code> instead of <code class="literal">{</code>
|
206
|
+
</li><li>
|
207
|
+
<code class="literal">!..braceright..!</code> instead of <code class="literal">}</code>
|
208
|
+
</li></ul></div><p>For more special characters take a look in the <code class="literal">[replacements2]</code> sections. <code class="literal">[replacements2]</code> section is responsible for replacing the symbols with their corresponding special characters.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_ideas"></a>7. Ideas</h2></div></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_code_listing_block"></a>7.1. Code listing block</h3></div></div></div><p>For creating highlighted code listings I suggest the use of <a href="http://www.andre-simon.de/" target="_top">Highlight</a> or <a href="http://www.gnu.org/software/src-highlite/" target="_top">GNU Source Highlight</a>. Both are suited for use as Asciidoc filters.</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_known_bugs"></a>8. Known Bugs</h2></div></div></div><div class="itemizedlist"><ul type="disc"><li>
|
209
|
+
Sometimes LaTeX backend handles things differently from the default backends
|
210
|
+
</li><li>
|
211
|
+
A lot of little bugs
|
212
|
+
</li></ul></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_todo_list"></a>9. Todo List</h2></div></div></div><div class="itemizedlist"><ul type="disc"><li>
|
213
|
+
Remove bugs
|
214
|
+
</li><li>
|
215
|
+
Support for <span class="emphasis"><em>grid</em></span> attribute in tables
|
216
|
+
</li><li>
|
217
|
+
Better looking tables
|
218
|
+
</li><li>
|
219
|
+
Option for squeezing output (smaller lists)
|
220
|
+
</li><li>
|
221
|
+
Support for different languages (That would be a nice feature for Asciidoc in general)
|
222
|
+
</li><li>
|
223
|
+
Option for switching titlepage on and off
|
224
|
+
</li></ul></div></div></div></body></html>
|
@@ -0,0 +1,193 @@
|
|
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
|
+
[separator='|',frame="all",grid="all"]
|
143
|
+
`````___________________________________________________________1
|
144
|
+
Speciality | MiKTeX package name | teTeX package name | TeX Live package name | Description
|
145
|
+
______________________________________________________________
|
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
|
+
|
161
|
+
[[configurationFile]]
|
162
|
+
== About the LaTeX backend configuration file
|
163
|
+
An important note for people who want to adapt the LaTeX backend configuration file to their own needs:
|
164
|
+
|
165
|
+
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.
|
166
|
+
|
167
|
+
- `$$!..backslash..!$$` instead of `\`
|
168
|
+
- `$$!..braceleft..!$$` instead of `{`
|
169
|
+
- `$$!..braceright..!$$` instead of `}`
|
170
|
+
|
171
|
+
|
172
|
+
For more special characters take a look in the `[replacements2]` sections. `[replacements2]` section is responsible for replacing the symbols with their corresponding special characters.
|
173
|
+
|
174
|
+
|
175
|
+
== Ideas
|
176
|
+
|
177
|
+
=== Code listing block
|
178
|
+
|
179
|
+
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.
|
180
|
+
|
181
|
+
== Known Bugs
|
182
|
+
|
183
|
+
- Sometimes LaTeX backend handles things differently from the default backends
|
184
|
+
- A lot of little bugs
|
185
|
+
|
186
|
+
== Todo List
|
187
|
+
|
188
|
+
- Remove bugs
|
189
|
+
- Support for 'grid' attribute in tables
|
190
|
+
- Better looking tables
|
191
|
+
- Option for squeezing output (smaller lists)
|
192
|
+
- Support for different languages (That would be a nice feature for Asciidoc in general)
|
193
|
+
- Option for switching titlepage on and off
|
@@ -0,0 +1,35 @@
|
|
1
|
+
LaTeXMathML Formulae
|
2
|
+
====================
|
3
|
+
|
4
|
+
http://www.maths.nottingham.ac.uk/personal/drw/lm.html[LaTeXMathML]
|
5
|
+
capability has been added to AsciiDoc for users who are more familar
|
6
|
+
with or prefer LaTeX math formulas to the
|
7
|
+
http://www.methods.co.nz/asciidoc/asciimath.html[ASCIIMathML]
|
8
|
+
notation.
|
9
|
+
|
10
|
+
'LaTeXMathML' is a derivative of
|
11
|
+
http://www.methods.co.nz/asciidoc/asciimath.html[ASCIIMathML] -- in
|
12
|
+
terms of usage the only difference it that you use the `latexmath`
|
13
|
+
attribute instead of the `asciimath` attribute.
|
14
|
+
|
15
|
+
Here's the link:latexmath.txt[AsciiDoc source] that generated this
|
16
|
+
page.
|
17
|
+
|
18
|
+
Some example 'LaTeXMathML' formulas:
|
19
|
+
|
20
|
+
- $$$R_x = 10.0 \times \sin(R_\phi)$$$
|
21
|
+
|
22
|
+
- [,,2]##$$$\sum_{n=1}^\infty \frac{1}{2^n}$$$##
|
23
|
+
|
24
|
+
- $$$\lim_{x\to\infty} f(x) = k \choose r + \frac ab \sum_{n=1}^\infty
|
25
|
+
a_n + \displaystyle{ \left\{ \frac{1}{13} \sum_{n=1}^\infty b_n
|
26
|
+
\right\} }$$$
|
27
|
+
|
28
|
+
- $$$\$\alpha + \$\beta = \$(\alpha + \beta)$$$
|
29
|
+
|
30
|
+
- $$$\begin{eqnarray} x & = & \frac{-7 \pm \sqrt{49 - 24}}{6} \\ & = &
|
31
|
+
-2 \textrm{ or } -\frac13. \end{eqnarray}$$$
|
32
|
+
|
33
|
+
- $$$\displaystyle{ V_i = C_0 - C_3
|
34
|
+
\frac{C_1\cos(\theta_i+C_3)}{C_4+C_1\cos(\theta_i+C_2)} }$$$
|
35
|
+
|