docs/index.html in maruku-0.2 vs docs/index.html in maruku-0.2.1
- old
+ new
@@ -1,9 +1,11 @@
<?xml version='1.0'?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
-<html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'><head><title>Maruku, a Markdown interpreter</title><link href='style.css' rel='stylesheet' type='text/css' /></head><head><title>Maruku, a Markdown interpreter</title><link href='style.css' rel='stylesheet' type='text/css' /></head><body><h1>Mar<strong>u</strong>k<strong>u</strong>: a Markdown interpreter</h1><p>Maruku is a Markdown interpreter written in <a href='http://www.ruby-lang.org'>Ruby</a>.</p><p>Maruku allows you to write in an easy-to-read-and-write syntax, like this:</p><blockquote><p><a href='http://maruku.rubyforge.org/maruku.md'>This document in Markdown</a></p></blockquote><p>Then it can be translated to HTML:</p><blockquote><p><a href='http://maruku.rubyforge.org/maruku.html'>This document in HTML</a></p></blockquote><p>or Latex, which is then converted to PDF:</p><blockquote><p><a href='http://maruku.rubyforge.org/maruku.pdf'>This document in PDF</a></p></blockquote><p>Maruku implements the original <a href='http://daringfireball.net/projects/markdown/syntax'>Markdown syntax</a> (<a href='http://maruku.rubyforge.org/markdown_syntax.html'>HTML</a> or <a href='http://maruku.rubyforge.org/markdown_syntax.pdf'>PDF</a>, translated by Maruku).</p><p>Markdown implements also all the improvements in <a href='http://www.michelf.com/projects/php-markdown/extra/'>PHP Markdown Extra</a>.</p><p>Moreover, it implements ideas from <a href='http://fletcher.freeshell.org/wiki/MultiMarkdown'>MultiMarkdown</a>.</p><hr /><p><em>Table of contents</em>:</p><ul><li><p><a href='#download'>Download</a></p></li><li><p><a href='#usage'>Usage</a></p></li><li><p><a href='#extra'>Examples of PHP Markdown extra syntax</a></p></li><li><p><a href='#meta'>New metadata syntax</a></p></li><li><p><a href='#metalist'>List of metadata</a></p></li><li><p><a href='#maruku-and-bluecloth'>Maruku and Bluecloth</a></p></li><li><p><a href='#future'>Future developments</a></p><ul><li><a href='#future-export'>Export to other formats</a></li><li><a href='#future-syntax'>Syntax additions</a></li></ul></li></ul><hr /><h2 class='head' id='download'>Download</h2><p>The development site is <a href='http://maruku.rubyforge.net/'>http://maruku.rubyforge.net/</a>.</p><p>Download current <a href='http://rubygems.rubyforge.org/'>gem</a> at <a href='http://maruku.rubyforge.net/gem1.0'>http://maruku.rubyforge.net/gem1.0</a></p><h2>Usage</h2><p>This is the basic usage:</p><pre class='ruby' style='background-color: #f0f0e0;'><span class='ident'>require</span> <span class='punct'>'</span><span class='string'>maruku</span><span class='punct'>'</span>
+<html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'><head><title>Maruku, a Markdown interpreter</title><link href='style.css' rel='stylesheet' type='text/css' /></head><head><title>Maruku, a Markdown interpreter</title><link href='style.css' rel='stylesheet' type='text/css' /></head><body><h1>Mar<strong>u</strong>k<strong>u</strong>: a Markdown interpreter</h1><p><a href='http://maruku.rubyforge.org/>'>Maruku</a> is a Markdown interpreter written in <a href='http://www.ruby-lang.org'>Ruby</a>.</p><p>Maruku allows you to write in an easy-to-read-and-write syntax, like this:</p><blockquote><p><a href='http://maruku.rubyforge.org/maruku.md'>This document in Markdown</a></p></blockquote><p>Then it can be translated to HTML:</p><blockquote><p><a href='http://maruku.rubyforge.org/maruku.html'>This document in HTML</a></p></blockquote><p>or Latex, which is then converted to PDF:</p><blockquote><p><a href='http://maruku.rubyforge.org/maruku.pdf'>This document in PDF</a></p></blockquote><p>Maruku implements the original <a href='http://daringfireball.net/projects/markdown/syntax'>Markdown syntax</a> (<a href='http://maruku.rubyforge.org/markdown_syntax.html'>HTML</a> or <a href='http://maruku.rubyforge.org/markdown_syntax.pdf'>PDF</a>, translated by Maruku).</p><p>Markdown implements also all the improvements in <a href='http://www.michelf.com/projects/php-markdown/extra/'>PHP Markdown Extra</a>.</p><p>Moreover, it implements ideas from <a href='http://fletcher.freeshell.org/wiki/MultiMarkdown'>MultiMarkdown</a>.</p><h3>Authors</h3><p>Maruku has been developed so far by <a href='http://www.dis.uniroma1.it/~acensi/'>Andrea Censi</a>. Contributors are most welcome!</p><hr /><p><em>Table of contents</em>:</p><ul><li><p><a href='#download'>Download</a></p></li><li><p><a href='#usage'>Usage</a></p></li><li><p><a href='#extra'>Examples of PHP Markdown extra syntax</a></p></li><li><p><a href='#meta'>New metadata syntax</a></p></li><li><p><a href='#metalist'>List of metadata</a></p></li><li><p><a href='#maruku-and-bluecloth'>Maruku and Bluecloth</a></p></li><li><p><a href='#future'>Future developments</a></p><ul><li><a href='#future-export'>Export to other formats</a></li><li><a href='#future-syntax'>Syntax additions</a></li></ul></li></ul><hr /><h2 class='head' id='download'>Download</h2><p>The development site is <a href='http://rubyforge.org/projects/maruku/'>http://rubyforge.org/projects/maruku/</a>.</p><p>Download current <a href='http://rubygems.rubyforge.org/'>gem</a> at <a href='http://rubyforge.org/frs/?group_id=2795'>http://rubyforge.org/frs/?group_id=2795</a> or try to install with:</p><pre style='background-color: #f0f0e0;'>$ gem install maruku
+</pre><p>Anonymous access to the repository is possible with:</p><pre style='background-color: #f0f0e0;'>$ svn checkout svn://rubyforge.org/var/svn/maruku
+</pre><p>If you want commit-access, just create an account on Rubyforge and <a href='http://www.dis.uniroma1.it/~acensi/contact.html'>drop me a mail</a>.</p><h2>Usage</h2><p>This is the basic usage:</p><pre class='ruby' style='background-color: #f0f0e0;'><span class='ident'>require</span> <span class='punct'>'</span><span class='string'>maruku</span><span class='punct'>'</span>
<span class='ident'>doc</span> <span class='punct'>=</span> <span class='constant'>Maruku</span><span class='punct'>.</span><span class='ident'>new</span><span class='punct'>(</span><span class='ident'>markdown_string</span><span class='punct'>)</span>
<span class='ident'>puts</span> <span class='ident'>doc</span><span class='punct'>.</span><span class='ident'>to_html</span>
</pre><p>or, if you install through RubyGems,</p><pre class='ruby' style='background-color: #f0f0e0;'><span class='ident'>require</span> <span class='punct'>'</span><span class='string'>rubygems</span><span class='punct'>'</span>
<span class='ident'>require</span> <span class='punct'>'</span><span class='string'>maruku</span><span class='punct'>'</span>
@@ -12,18 +14,18 @@
</pre><p><tt style='background-color: #f0f0e0;'>marutex</tt> converts Markdown in TeX, then calls <tt style='background-color: #f0f0e0;'>pdflatex</tt> to transform to PDF:</p><pre style='background-color: #f0f0e0;'>$ marutex file.md # creates file.tex and file.pdf
</pre><h2 id='extra'>Examples of PHP Markdown Extra syntax</h2><ul><li><p>tables</p><pre style='background-color: #f0f0e0;'>Col1 | Very very long head | Very very long head|
-----|:-------------------:|-------------------:|
cell | center-align | right-align |
-</pre><table class='example'><thead><tr><th>Col1</th><th>Very very long head</th><th>Very very long head</th></tr></thead><tbody><tr><td style='text-align: left;'>cell</td><td style='text-align: center;'>center-align</td><td style='text-align: right;'>right-align</td></tr></tbody></table></li><li><p>footnotes <sup id='fnref:1'><a href='#fn:1' rel='footnote'>1</a></sup></p><pre style='background-color: #f0f0e0;'>*footnotes [^foot]
+</pre><table class='example'><thead><tr><th>Col1</th><th>Very very long head</th><th>Very very long head</th></tr></thead><tbody><tr><td style='text-align: left;'>cell</td><td style='text-align: center;'>center-align</td><td style='text-align: right;'>right-align</td></tr></tbody></table></li><li><p>footnotes <sup id='fnref:1'><a href='#fn:1' rel='footnote'>1</a></sup></p><pre style='background-color: #f0f0e0;'>* footnotes [^foot]
[^foot]: I really was missing those.</pre></li><li><p>Markdown inside HTML elememnts</p></li></ul><pre class='xml' style='background-color: #f0f0e0;'><span class='punct'><</span><span class='tag'>div</span> <span class='attribute'>markdown</span><span class='punct'>="</span><span class='string'>1</span><span class='punct'>"</span> <span class='attribute'>style</span><span class='punct'>="</span><span class='string'>border: solid 1px black</span><span class='punct'>"></span>
This is a div with Markdown **strong text**
<span class='punct'></</span><span class='tag'>div</span><span class='punct'>></span>
</pre><div style='border: solid 1px black'><p>This is a div with Markdown <strong>strong text</strong></p></div><ul><li><p>header ids</p><pre style='background-color: #f0f0e0;'>## Header ## {#id}</pre><p>For example, <a href='#download'>a link to the download</a> header.</p></li><li><p>definition lists</p><pre style='background-color: #f0f0e0;'>Definition list
: something very hard to parse
-</pre><dl><dt>Definition list</dt><dd>something very hard to parse</dd></dl></li><li><p>abbreviations or <abbr title='Simple an abbreviation'>ABB</abbr> for short.</p></li></ul><h2 id='maruku-and-bluecloth'>Maruku and Bluecloth</h2><p>The other Ruby implementation of Markdown is <a href='http://www.deveiate.org/projects/BlueCloth'>Bluecloth</a>.</p><p>Maruku is much different in philosophy from Bluecloth: the biggest difference is that <em>parsing</em> is separated from <em>rendering</em>. In Maruku, an in-memory representation of the Markdown document is created. Instead, Bluecloth mantains the document in memory as a String at all times, and does a series of <tt style='background-color: #f0f0e0;'>gsub</tt> to transform to HTML.<sup id='fnref:2'><a href='#fn:2' rel='footnote'>2</a></sup></p><p>The in-memory representation makes it very easy to export to various formats (altough, for, now)</p><p>Other improvements over Bluecloth:</p><ul><li><p>the HTML output is provided also as a <tt style='background-color: #f0f0e0;'>REXML</tt> document tree.</p></li><li><p>PHP Markdown Syntax support.</p></li></ul><h2 id='meta'>New meta-data syntax</h2><p>Maruku implements a syntax that allows to attach "meta" information to objects.</p><h3>Meta-data for the document</h3><p>Meta-data for the document itself is specified through the use of email headers:</p><pre style='background-color: #f0f0e0;'>Title: A simple document containing meta-headers
+</pre><dl><dt>Definition list</dt><dd>something very hard to parse</dd></dl></li><li><p>abbreviations or <abbr title='Simple an abbreviation'>ABB</abbr> for short.</p></li></ul><h2 id='maruku-and-bluecloth'>Maruku and Bluecloth</h2><p>The other Ruby implementation of Markdown is <a href='http://www.deveiate.org/projects/BlueCloth'>Bluecloth</a>.</p><p>Maruku is much different in philosophy from Bluecloth: the biggest difference is that <em>parsing</em> is separated from <em>rendering</em>. In Maruku, an in-memory representation of the Markdown document is created. Instead, Bluecloth mantains the document in memory as a String at all times, and does a series of <tt style='background-color: #f0f0e0;'>gsub</tt> to transform to HTML.</p><p>The in-memory representation makes it very easy to export to various formats (altough, for, now)</p><p>Other improvements over Bluecloth:</p><ul><li><p>the HTML output is provided also as a <tt style='background-color: #f0f0e0;'>REXML</tt> document tree.</p></li><li><p>PHP Markdown Syntax support.</p></li></ul><h2 id='meta'>New meta-data syntax</h2><p>Maruku implements a syntax that allows to attach "meta" information to objects.</p><h3>Meta-data for the document</h3><p>Meta-data for the document itself is specified through the use of email headers:</p><pre style='background-color: #f0f0e0;'>Title: A simple document containing meta-headers
CSS: style.css
Content of the document
</pre><p>When creating the document through</p><pre class='ruby' style='background-color: #f0f0e0;'><span class='constant'>Maruku</span><span class='punct'>.</span><span class='ident'>new</span><span class='punct'>(</span><span class='ident'>s</span><span class='punct'>).</span><span class='ident'>to_html_document</span>
</pre><p>the title and stylesheet are added as expected.</p><h3>Meta-data for elements</h3><p>Maruku introduces a new syntax for attaching metadata to paragraphs, tables, and so on.</p><p>For example, consider the creation of two paragraphs:</p><pre style='background-color: #f0f0e0;'>Paragraph 1 is a warning.
@@ -45,11 +47,11 @@
Paragraph 1 is a warning
</pre><p>Also, if the value is not present, it defaults to <tt style='background-color: #f0f0e0;'>true</tt>:</p><pre style='background-color: #f0f0e0;'>@ test
This paragraph has the attribute 'test' set.
-</pre><hr /><h2 id='metalist'>List of meta-data</h2><dl><dt><strong><tt style='background-color: #f0f0e0;'>title</tt>, <tt style='background-color: #f0f0e0;'>subject</tt></strong></dt><dd><p>(document) Sets the title of the document use in <tt style='background-color: #f0f0e0;'>title</tt> element.</p></dd><dt><strong><tt style='background-color: #f0f0e0;'>css</tt></strong></dt><dd><p>(document, HTML) Url of stylesheet.</p></dd><dt><strong><tt style='background-color: #f0f0e0;'>latex_use_syntax</tt></strong></dt><dd><p>(document, HTML) Use the [<tt style='background-color: #f0f0e0;'>syntax</tt> library][syntax] to add source highlighting.</p></dd><dt><strong><tt style='background-color: #f0f0e0;'>latex_use_listings</tt></strong></dt><dd><p>(document, LaTex) Use fancy <tt style='background-color: #f0f0e0;'>listing</tt> package for better displaying code blocks.</p></dd><dt><strong><tt style='background-color: #f0f0e0;'>style</tt>, <tt style='background-color: #f0f0e0;'>id</tt>, <tt style='background-color: #f0f0e0;'>class</tt></strong></dt><dd><p>(any block object, HTML) Standard CSS attributes are copied.</p></dd><dt><strong><tt style='background-color: #f0f0e0;'>lang</tt></strong></dt><dd><p>(code blocks) Name of programming language (<tt style='background-color: #f0f0e0;'>ruby</tt>) for syntax highlighting (does not work yet)</p><p>Default for this is <tt style='background-color: #f0f0e0;'>code_lang</tt> in document.</p></dd><dt><strong><tt style='background-color: #f0f0e0;'>code_show_spaces</tt></strong></dt><dd><p>Shows tabs and newlines (default is read in the document object).</p></dd><dt><strong><tt style='background-color: #f0f0e0;'>code_background_color</tt></strong></dt><dd><p>Background color for code blocks. (default is read in the document object).</p><p>The format is either a named color (<tt style='background-color: #f0f0e0;'>green</tt>, <tt style='background-color: #f0f0e0;'>red</tt>) or a CSS color of the form <tt style='background-color: #f0f0e0;'>#ff00ff</tt>.</p><ul><li><p>for <strong>HTML output</strong>, the value is put straight in the <tt style='background-color: #f0f0e0;'>background-color</tt> 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 <tt style='background-color: #f0f0e0;'>color</tt> packages. If it is of the form <tt style='background-color: #f0f0e0;'>#ff00ff</tt>, Maruku defines a color using the <tt style='background-color: #f0f0e0;'>\definecolor</tt> macro.</p><p>For example, for <tt style='background-color: #f0f0e0;'>#0000ff</tt>, the macro is called as:</p><pre class='tex' style='background-color: #f0f0e0;'>\definecolor{DummyName}{rgb}{0,0,1} </pre></li></ul></dd></dl><h3>Examples</h3><p>An example of this is the following:</p><pre style='background-color: #f0f0e0;'>@¬code_show_spaces;¬code_background_color:¬green
+</pre><hr /><h2 id='metalist'>List of meta-data</h2><dl><dt><strong><tt style='background-color: #f0f0e0;'>title</tt>, <tt style='background-color: #f0f0e0;'>subject</tt></strong></dt><dd><p>(document) Sets the title of the document (HTML: used in the <tt style='background-color: #f0f0e0;'>TITLE</tt> element).</p></dd><dt><strong><tt style='background-color: #f0f0e0;'>css</tt></strong></dt><dd><p>(document, HTML) Url of stylesheet.</p></dd><dt><strong><tt style='background-color: #f0f0e0;'>html_use_syntax</tt></strong></dt><dd><p>(document, HTML) Use the <a href='http://syntax.rubyforge.org/'><tt style='background-color: #f0f0e0;'>syntax</tt> library</a> to add source highlighting.</p></dd><dt><strong><tt style='background-color: #f0f0e0;'>latex_use_listings</tt></strong></dt><dd><p>(document, LaTex) Use fancy <tt style='background-color: #f0f0e0;'>listing</tt> package for better displaying code blocks.</p></dd><dt><strong><tt style='background-color: #f0f0e0;'>style</tt>, <tt style='background-color: #f0f0e0;'>id</tt>, <tt style='background-color: #f0f0e0;'>class</tt></strong></dt><dd><p>(any block object, HTML) Standard CSS attributes are copied.</p></dd><dt><strong><tt style='background-color: #f0f0e0;'>lang</tt></strong></dt><dd><p>(code blocks) Name of programming language (<tt style='background-color: #f0f0e0;'>ruby</tt>) for syntax highlighting (does not work yet)</p><p>Default for this is <tt style='background-color: #f0f0e0;'>code_lang</tt> in document.</p></dd><dt><strong><tt style='background-color: #f0f0e0;'>code_show_spaces</tt></strong></dt><dd><p>Shows tabs and newlines (default is read in the document object).</p></dd><dt><strong><tt style='background-color: #f0f0e0;'>code_background_color</tt></strong></dt><dd><p>Background color for code blocks. (default is read in the document object).</p><p>The format is either a named color (<tt style='background-color: #f0f0e0;'>green</tt>, <tt style='background-color: #f0f0e0;'>red</tt>) or a CSS color of the form <tt style='background-color: #f0f0e0;'>#ff00ff</tt>.</p><ul><li><p>for <strong>HTML output</strong>, the value is put straight in the <tt style='background-color: #f0f0e0;'>background-color</tt> 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 <tt style='background-color: #f0f0e0;'>color</tt> packages. If it is of the form <tt style='background-color: #f0f0e0;'>#ff00ff</tt>, Maruku defines a color using the <tt style='background-color: #f0f0e0;'>\color[rgb]{r,g,b}</tt> macro.</p><p>For example, for <tt style='background-color: #f0f0e0;'>#0000ff</tt>, the macro is called as: <tt style='background-color: #f0f0e0;'>\color[rgb]{0,0,1}</tt>.</p></li></ul></dd></dl><h3>Examples</h3><p>An example of this is the following:</p><pre style='background-color: #f0f0e0;'>@¬code_show_spaces;¬code_background_color:¬green
» ¬One¬space
» ¬¬Two¬spaces
» » ¬» Tab,¬space,¬tab
» » » » Tab,¬tab,¬tab¬and¬all¬is¬green!
@@ -69,6 +71,6 @@
This is an equation with label:
$ \alpha = \beta + \gamma $ (eq:1)
-This is a reference to equation: please see (eq:1)</pre></li></ul><div class='footnotes'><hr /><ol><li id='fn:1'><p>I really was missing those.<a href='#fnref:1' rev='footnote'>↩</a></p></li><li id='fn:2'><p>"a different philosophy" stands for "ugly" <tt style='background-color: #f0f0e0;'>:-)</tt><a href='#fnref:2' rev='footnote'>↩</a></p></li></ol></div></body></html>
+This is a reference to equation: please see (eq:1)</pre></li></ul><div class='footnotes'><hr /><ol><li id='fn:1'><p>I really was missing those.<a href='#fnref:1' rev='footnote'>↩</a></p></li></ol></div></body></html>