<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"> <html xmlns:svg='http://www.w3.org/2000/svg' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'> <head><meta content='application/xhtml+xml;charset=utf-8' http-equiv='Content-type' /><title></title><link href='style.css' rel='stylesheet' type='text/css' /> </head> <body> <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> <p>It is copied as a standard HTML attribute.</p> <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 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> <p>for <strong>HTML output</strong>, the value is put straight in the <code>background-color</code> CSS property of the block.</p> </li> <li> <p>for <strong>LaTeX output</strong>, if it is a named color, it must be a color accepted by the LaTeX <code>color</code> packages. If it is of the form <code>#ff00ff</code>, Maruku defines a color using the <code>\color[rgb]{r,g,b}</code> macro.</p> <p>For example, for <code>#0000ff</code>, the macro is called as: <code>\color[rgb]{0,0,1}</code>.</p> </li> </ul> <h3 id='code_show_spaces'>Attribute <code>code_show_spaces</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 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> <p>Conversion happens using the <code>iconv</code> library.</p> <h3 id='html_math_engine'>Attribute <code>html_math_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 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 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 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 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><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><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> <p>Moreover, it used as a label name for hyperlinks in both HTML and in PDF.</p> <h3 id='latex_cjk'>Attribute <code>latex_cjk</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 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> <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> <li> <p>The background color is given by <code>code_background_color</code>.</p> </li> </ul> <h3 id='maruku_signature'>Attribute <code>maruku_signature</code></h3> <p class='maruku-att-default'>Default: <code>true</code></p> <p class='maruku-att-origin'>Read from file <code>output/to_latex.rb</code>, line 45:</p> <p>If false, Maruku does not append a signature to the generated file.</p> <h3 id='style'>Attribute <code>style</code></h3> <p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line 311:</p> <p>It is copied as a standard HTML attribute.</p> <h3 id='subject'>Attribute <code>subject</code></h3> <p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line 126:</p> <p>Synonim for <code>title</code>.</p> <h3 id='title'>Attribute <code>title</code></h3> <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> <p class='maruku-att-origin'>Read from file <code>input/parse_doc.rb</code>, line 86:</p> <p>Disabled by default because of security concerns.</p> <h3 id='use_numbered_headers'>Attribute <code>use_numbered_headers</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 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 13:49 on Wednesday, January 24th, 2007.</span></div></body></html>