docs/exd.html in maruku-0.5.0 vs docs/exd.html in maruku-0.5.1
- old
+ new
@@ -9,18 +9,20 @@
<h1>Auto-extracted documentation</h1>
<p>This documentation is auto-generated by reading from the Ruby source for <code>maruku</code> by the program <code>docs/exd/exd.rb</code>. It is important to have documentation near the code!</p>
<p>Each block is delimited by <code>=begin</code> and <code>=end</code> blocks and is a Markdown document:</p>
+
<pre><code>...
=begin maruku_doc
Attribute: att1
Summary: summary for attribute
Expanded documentation (Markdown format)
=end
...</code></pre>
+
<h2>Attribute documentation</h2>
<h3 id='class'>Attribute <code>class</code></h3>
<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line 303:</p>
@@ -29,11 +31,11 @@
<h3 id='code_background_color'>Attribute <code>code_background_color</code></h3>
<p class='maruku-att-default'>Default: <code>"#fef"</code></p>
-<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line 486:</p>
+<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line 495:</p>
<p>The format is either a named color (<code>green</code>, <code>red</code>) or a CSS color of the form <code>#ff00ff</code>.</p>
<ul>
<li>
@@ -54,28 +56,34 @@
<p class='maruku-att-origin'>Read from file <code>output/to_latex.rb</code>, line 193:</p>
<p>If <code>true</code>, shows spaces and tabs in code blocks.</p>
<p>Example:</p>
+
<pre><code> One space
Two spaces
Tab, space, tab
Tab, tab, tab and all is green!
{:code_show_spaces code_background_color=#ffeedd}</code></pre>
+
<p>That will produce:</p>
+
<pre style='background-color: #ffeedd;'><code>¬One¬space
¬¬Two¬spaces
»   ¬»   Tab,¬space,¬tab
»   »   »   Tab,¬tab,¬tab¬and¬all¬is¬green!</code></pre>
+
<h3 id='css'>Attribute <code>css</code></h3>
<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line 134:</p>
<p><code>css</code> should be a space-separated list of urls.</p>
<p>Example:</p>
+
<pre><code>CSS: style.css math.css</code></pre>
+
<h3 id='encoding'>Attribute <code>encoding</code></h3>
<p class='maruku-att-origin'>Read from file <code>input/parse_doc.rb</code>, line 35:</p>
<p>If the <code>encoding</code> attribute is specified, then the content will be converted from the specified encoding to UTF-8.</p>
@@ -89,46 +97,60 @@
<p class='maruku-att-origin'>Read from file <code>ext/math/to_html.rb</code>, line 2:</p>
<p>Select the rendering engine for math.</p>
<p>If you want to use your custom engine <code>foo</code>, then set:</p>
-<pre><code>HTML math engine: foo</code></pre>
+
+<pre><code class='markdown' lang='markdown'>HTML math engine: foo</code></pre>
+
<p>and then implement two functions:</p>
+
<pre><code>def convert_to_mathml_foo(kind, tex)
...
end</code></pre>
+
<h3 id='html_png_engine'>Attribute <code>html_png_engine</code></h3>
<p class='maruku-att-default'>Default: <code>"none"</code></p>
<p class='maruku-att-origin'>Read from file <code>ext/math/to_html.rb</code>, line 24:</p>
<p>Same thing as <code>html_math_engine</code>, only for PNG output.</p>
-<pre><code>def convert_to_png_foo(kind, tex)
+
+<pre><code class='ruby' lang='ruby'>def convert_to_png_foo(kind, tex)
# same thing
...
end</code></pre>
+
<h3 id='html_use_syntax'>Attribute <code>html_use_syntax</code></h3>
<p class='maruku-att-default'>Default: <code>false</code></p>
-<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line 400:</p>
+<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line 402:</p>
<p>If true, the <code>syntax</code> package is used. It supports the <code>ruby</code> and <code>xml</code> languages. Remember to set the <code>lang</code> attribute of the code block.</p>
<p>Examples:</p>
+
<pre><code> require 'maruku'
{:lang=ruby html_use_syntax=true}
</code></pre>
+
<p>and</p>
+
<pre><code> <div style="text-align:center">Div</div>
{:lang=html html_use_syntax=true}
</code></pre>
+
<p>produces:</p>
-<pre class='ruby'><span class='ident'>require</span> <span class='punct'>'</span><span class='string'>maruku</span><span class='punct'>'</span></pre>
+
+<pre><code class='ruby' lang='ruby'><span class='ident'>require</span> <span class='punct'>'</span><span class='string'>maruku</span><span class='punct'>'</span></code></pre>
+
<p>and</p>
-<pre class='xml'><span class='punct'><</span><span class='tag'>div</span> <span class='attribute'>style</span><span class='punct'>="</span><span class='string'>text-align:center</span><span class='punct'>"></span>Div<span class='punct'></</span><span class='tag'>div</span><span class='punct'>></span></pre>
+
+<pre><code class='xml' lang='xml'><span class='punct'><</span><span class='tag'>div</span> <span class='attribute'>style</span><span class='punct'>="</span><span class='string'>text-align:center</span><span class='punct'>"></span>Div<span class='punct'></</span><span class='tag'>div</span><span class='punct'>></span></code></pre>
+
<h3 id='id'>Attribute <code>id</code></h3>
<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line 291:</p>
<p>It is copied as a standard HTML attribute.</p>
@@ -142,30 +164,38 @@
<p class='maruku-att-origin'>Read from file <code>output/to_latex.rb</code>, line 69:</p>
<p>If the <code>latex_cjk</code> attribute is specified, then appropriate headers are added to the LaTeX preamble to support Japanese fonts. You have to have these fonts installed – and this can be a pain.</p>
<p>If <code>latex_cjk</code> is specified, this is added to the preamble:</p>
+
<pre><code>\usepackage[C40]{fontenc}
\usepackage[cjkjis]{ucs}
\usepackage[utf8x]{inputenc}</code></pre>
+
<p>while the default is to add this:</p>
+
<pre><code>\usepackage{ucs}
\usepackage[utf8x]{inputenc}</code></pre>
+
<h3 id='latex_preamble'>Attribute <code>latex_preamble</code></h3>
<p class='maruku-att-origin'>Read from file <code>output/to_latex.rb</code>, line 94:</p>
<p>If the <code>latex_preamble</code> attribute is specified, then its value will be used as a custom preamble.</p>
<p>For example:</p>
+
<pre><code>Title: My document
Latex preamble: preamble.tex
</code></pre>
+
<p>will produce:</p>
+
<pre><code>...
\input{preamble.tex}
...</code></pre>
+
<h3 id='latex_use_listings'>Attribute <code>latex_use_listings</code></h3>
<p class='maruku-att-default'>Default: <code>false</code></p>
<p class='maruku-att-origin'>Read from file <code>output/to_latex.rb</code>, line 218:</p>
@@ -173,21 +203,25 @@
<p>If the <code>latex_use_listings</code> attribute is specified, then code block are rendered using the <code>listings</code> package. Otherwise, a standard <code>verbatim</code> environment is used.</p>
<ul>
<li>
<p>If the <code>lang</code> attribute for the code block has been specified, it gets passed to the <code>listings</code> package using the <code>lstset</code> macro. The default lang for code blocks is specified through the <code>code_lang</code> attribute.</p>
+
<pre><code>\lstset{language=ruby}
</code></pre>
+
<p>Please refer to the documentation of the <code>listings</code> package for supported languages.</p>
<p>If a language is not supported, the <code>listings</code> package will emit a warning during the compilation. Just press enter and nothing wrong will happen.</p>
</li>
<li>
<p>If the <code>code_show_spaces</code> is specified, than spaces and tabs will be shown using the macro:</p>
-<pre><code>\lstset{showspaces=true,showtabs=true}</code></pre></li>
+<pre><code>\lstset{showspaces=true,showtabs=true}</code></pre>
+</li>
+
<li>
<p>The background color is given by <code>code_background_color</code>.</p>
</li>
</ul>
@@ -216,20 +250,24 @@
<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line 103:</p>
<p>Sets the title of the document. If a title is not specified, the first header will be used.</p>
<p>These should be equivalent:</p>
+
<pre><code>Title: my document
Content
</code></pre>
+
<p>and</p>
+
<pre><code>my document
===========
Content
</code></pre>
+
<p>In both cases, the title is set to “my document”.</p>
<h3 id='unsafe_features'>Attribute <code>unsafe_features</code></h3>
<p class='maruku-att-default'>Default: <code>true</code></p>
@@ -245,6 +283,6 @@
<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line 348:</p>
<p>If <code>true</code>, section headers will be numbered.</p>
<p>In LaTeX export, the numbering of headers is managed by Maruku, to have the same results in both HTML and LaTeX.</p>
-<div class='maruku_signature'><hr /><span style='font-size: small; font-style: italic'>Created by <a href='http://maruku.rubyforge.org' title='Maruku: a Markdown-superset interpreter for Ruby'>Maruku</a> at 14:10 on Tuesday, January 23rd, 2007.</span></div></body></html>
+<div class='maruku_signature'><hr /><span style='font-size: small; font-style: italic'>Created by <a href='http://maruku.rubyforge.org' title='Maruku: a Markdown-superset interpreter for Ruby'>Maruku</a> at 13:49 on Wednesday, January 24th, 2007.</span></div></body></html>