maruku 0.5.3 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/maruku +14 -6
- data/bin/marutest +19 -10
- data/docs/changelog.html +49 -8
- data/docs/changelog.md +26 -1
- data/docs/entity_test.html +1 -1
- data/docs/exd.html +43 -24
- data/docs/index.html +4 -6
- data/docs/markdown_syntax.html +81 -170
- data/docs/maruku.html +4 -6
- data/docs/maruku.md +1 -1
- data/docs/proposal.html +21 -41
- data/lib/maruku.rb +5 -0
- data/lib/maruku/attributes.rb +3 -2
- data/lib/maruku/defaults.rb +3 -1
- data/lib/maruku/ext/math.rb +30 -0
- data/lib/maruku/ext/math/elements.rb +3 -2
- data/lib/maruku/ext/math/parsing.rb +81 -58
- data/lib/maruku/ext/math/to_html.rb +5 -5
- data/lib/maruku/helpers.rb +2 -0
- data/lib/maruku/input/charsource.rb +1 -1
- data/lib/maruku/input/extensions.rb +6 -5
- data/lib/maruku/input/parse_block.rb +7 -8
- data/lib/maruku/input/parse_doc.rb +1 -1
- data/lib/maruku/input/parse_span_better.rb +4 -4
- data/lib/maruku/input_textile2/t2_parser.rb +163 -0
- data/lib/maruku/maruku.rb +1 -1
- data/lib/maruku/output/s5/fancy.rb +756 -0
- data/lib/maruku/output/s5/to_s5.rb +104 -0
- data/lib/maruku/output/to_html.rb +103 -49
- data/lib/maruku/string_utils.rb +1 -1
- data/lib/maruku/textile2.rb +1 -0
- data/lib/maruku/version.rb +3 -1
- data/maruku_gem.rb +33 -0
- data/tests/s5/s5profiling.md +48 -0
- data/tests/unittest/blanks_in_code.md +6 -12
- data/tests/unittest/code3.md +3 -5
- data/tests/unittest/data_loss.md +53 -0
- data/tests/unittest/email.md +2 -2
- data/tests/unittest/entities.md +3 -5
- data/tests/unittest/footnotes.md +5 -5
- data/tests/unittest/ie.md +1 -1
- data/tests/unittest/images.md +2 -2
- data/tests/unittest/inline_html.md +6 -10
- data/tests/unittest/links.md +1 -1
- data/tests/unittest/list2.md +5 -5
- data/tests/unittest/lists.md +13 -13
- data/tests/unittest/lists_ol.md +13 -13
- data/tests/unittest/math/math2.md +84 -0
- data/tests/unittest/math/notmath.md +48 -0
- data/tests/unittest/syntax_hl.md +3 -5
- metadata +11 -2
data/bin/maruku
CHANGED
@@ -23,11 +23,15 @@ opt = OptionParser.new do |opts|
|
|
23
23
|
|
24
24
|
opts.on("-i", "--math-images ENGINE", "Uses ENGINE to render TeX to PNG.") do |s|
|
25
25
|
using_math = true
|
26
|
+
MaRuKu::Globals[:html_math_output_png] = true
|
27
|
+
MaRuKu::Globals[:html_math_output_mathml] = false
|
26
28
|
MaRuKu::Globals[:html_png_engine] = s
|
27
29
|
$stderr.puts "Using png engine #{s}."
|
28
30
|
end
|
29
31
|
|
30
32
|
opts.on("-m", "--math-engine ENGINE", "Uses ENGINE to render MathML") do |s|
|
33
|
+
MaRuKu::Globals[:html_math_output_png] = false
|
34
|
+
MaRuKu::Globals[:html_math_output_mathml] = true
|
31
35
|
using_math = true
|
32
36
|
using_mathml = true
|
33
37
|
MaRuKu::Globals[:html_math_engine] = s
|
@@ -38,6 +42,7 @@ opt = OptionParser.new do |opts|
|
|
38
42
|
end
|
39
43
|
|
40
44
|
opts.on_tail("--pdf", "Write PDF","First writes LaTeX, then calls pdflatex." ) do export = :pdf end
|
45
|
+
opts.on_tail("--s5", "Write S5 slideshow") do export = :s5 end
|
41
46
|
opts.on_tail("--html", "Write HTML") do export = :html end
|
42
47
|
opts.on_tail("--html-frag", "Write the contents of the BODY.") do export = :html_frag end
|
43
48
|
opts.on_tail("--tex", "Write LaTeX" ) do export = :tex end
|
@@ -101,23 +106,26 @@ inputs.each do |f, input|
|
|
101
106
|
t = Time.now
|
102
107
|
case export
|
103
108
|
when :html
|
104
|
-
suffix = using_mathml ? 'xhtml' : 'html'
|
109
|
+
suffix = using_mathml ? '.xhtml' : '.html'
|
105
110
|
out = doc.to_html_document( {:indent => -1})
|
106
111
|
when :html_frag
|
107
|
-
suffix='html_frag'
|
112
|
+
suffix='.html_frag'
|
108
113
|
out = doc.to_html( {:indent => -1})
|
109
114
|
when :pdf, :tex
|
110
|
-
suffix='tex'
|
115
|
+
suffix='.tex'
|
111
116
|
out = doc.to_latex_document
|
112
117
|
when :tex_frag
|
113
|
-
suffix='html_frag'
|
118
|
+
suffix='.html_frag'
|
114
119
|
out = doc.to_latex
|
115
120
|
when :inspect
|
116
121
|
suffix='.txt'
|
117
122
|
out = doc.inspect
|
118
123
|
when :markdown
|
119
|
-
suffix='pretty_md'
|
124
|
+
suffix='.pretty_md'
|
120
125
|
out = doc.to_markdown
|
126
|
+
when :s5
|
127
|
+
suffix='_s5slides.html'
|
128
|
+
out = doc.to_s5
|
121
129
|
end
|
122
130
|
$stderr.puts "Rendering in %.2f seconds." % (Time.now-t)
|
123
131
|
|
@@ -127,7 +135,7 @@ inputs.each do |f, input|
|
|
127
135
|
if not output_file
|
128
136
|
dir = File.dirname(f)
|
129
137
|
job = File.join(dir, File.basename(f, File.extname(f)))
|
130
|
-
output_file = job
|
138
|
+
output_file = job + suffix
|
131
139
|
end
|
132
140
|
|
133
141
|
$stderr.puts "Writing to #{output_file}"
|
data/bin/marutest
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
require 'maruku'
|
4
|
+
require 'maruku/textile2'
|
5
|
+
|
6
|
+
$marutest_language = :markdown
|
4
7
|
|
5
8
|
#MARKER = "\n***EOF***\n"
|
6
9
|
SPLIT = %r{\n\*\*\*[^\*]+\*\*\*\n}m
|
@@ -9,6 +12,16 @@ def marker(x)
|
|
9
12
|
"\n*** Output of #{x} ***\n"
|
10
13
|
end
|
11
14
|
|
15
|
+
def write_lines(i, j, lines, prefix, i_star)
|
16
|
+
i = [i, 0].max
|
17
|
+
j = [j, lines.size-1].min
|
18
|
+
for a in i..j
|
19
|
+
l = lines[a].gsub(/\t/,' ')
|
20
|
+
puts( ("%s %3d" % [prefix, a]) +
|
21
|
+
(a==i_star ? " -->" : " ")+lines[a])
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
12
25
|
# a = expected b = found
|
13
26
|
def equals(a, b)
|
14
27
|
a = a.split("\n")
|
@@ -20,15 +33,6 @@ def equals(a, b)
|
|
20
33
|
if la != lb
|
21
34
|
puts "\n"
|
22
35
|
|
23
|
-
def write_lines(i, j, lines, prefix, i_star)
|
24
|
-
i = [i, 0].max
|
25
|
-
j = [j, lines.size-1].min
|
26
|
-
for a in i..j
|
27
|
-
l = lines[a].gsub(/\t/,' ')
|
28
|
-
puts ("%s %3d" % [prefix, a]) +
|
29
|
-
(a==i_star ? " -->" : " ")+lines[a]
|
30
|
-
end
|
31
|
-
end
|
32
36
|
|
33
37
|
write_lines(i-3, i+3, a, "expected", i )
|
34
38
|
write_lines(i-3, i+3, b, " found", i )
|
@@ -74,7 +78,12 @@ def run_test(filename, its_ok, verbose=true)
|
|
74
78
|
crashed = []
|
75
79
|
actual = {}
|
76
80
|
|
77
|
-
doc =
|
81
|
+
doc =
|
82
|
+
if $marutest_language == :markdown
|
83
|
+
Maruku.new(markdown, params)
|
84
|
+
else
|
85
|
+
MaRuKu.textile2(markdown, params)
|
86
|
+
end
|
78
87
|
|
79
88
|
for s in TOTEST
|
80
89
|
begin
|
data/docs/changelog.html
CHANGED
@@ -86,7 +86,51 @@ Maruku (to_latex): parsing 4.04 sec + rendering 1.12 sec = 5.16 sec</code></pre>
|
|
86
86
|
</li>
|
87
87
|
</ul>
|
88
88
|
|
89
|
-
<h4 id='stable'>Changes in 0.5.
|
89
|
+
<h4 id='stable'>Changes in 0.5.4</h4>
|
90
|
+
|
91
|
+
<ul>
|
92
|
+
<li>
|
93
|
+
<p>Features:</p>
|
94
|
+
|
95
|
+
<ul>
|
96
|
+
<li>
|
97
|
+
<p><a href='http://www.w3.org/TR/html4/index/attributes.html'>All HTML attributes</a> are supported.</p>
|
98
|
+
|
99
|
+
<pre><code>> Science is a wonderful thing if one does not
|
100
|
+
> have to earn one's living at it.
|
101
|
+
{: cite="http://en.wikiquote.org/wiki/Albert_Einstein"}</code></pre>
|
102
|
+
</li>
|
103
|
+
|
104
|
+
<li>
|
105
|
+
<p>Attribute <code>doc_prefix</code>.</p>
|
106
|
+
</li>
|
107
|
+
|
108
|
+
<li>
|
109
|
+
<p>Math:</p>
|
110
|
+
|
111
|
+
<ul>
|
112
|
+
<li><code>\begin{equation}</code> and <code>\end{equation}</code> are understood.</li>
|
113
|
+
|
114
|
+
<li>Math parsing enabled per-instance using the <code>math_enabled</code> attribute.</li>
|
115
|
+
|
116
|
+
<li><code>math_numbered</code> attribute.</li>
|
117
|
+
</ul>
|
118
|
+
</li>
|
119
|
+
</ul>
|
120
|
+
</li>
|
121
|
+
|
122
|
+
<li>
|
123
|
+
<p>Bug fixes:</p>
|
124
|
+
|
125
|
+
<ul>
|
126
|
+
<li>Runs quietly with <code>ruby -w</code>.</li>
|
127
|
+
|
128
|
+
<li>Fixed a bug which could cause data-loss when reading indented lines.</li>
|
129
|
+
</ul>
|
130
|
+
</li>
|
131
|
+
</ul>
|
132
|
+
|
133
|
+
<h4 id='changes_in_053'>Changes in 0.5.3</h4>
|
90
134
|
|
91
135
|
<ul>
|
92
136
|
<li>
|
@@ -177,8 +221,7 @@ Maruku (to_latex): parsing 4.04 sec + rendering 1.12 sec = 5.16 sec</code></pre>
|
|
177
221
|
---------------+-------+--
|
178
222
|
{:r} Hello + ...
|
179
223
|
|
180
|
-
{:r: scope='row'}
|
181
|
-
</code></pre>
|
224
|
+
{:r: scope='row'}</code></pre>
|
182
225
|
|
183
226
|
<p>The first cell will have the <code>scope</code> attribute set to <code>row</code>.</p>
|
184
227
|
</li>
|
@@ -291,8 +334,7 @@ Content</code></pre>
|
|
291
334
|
|
292
335
|
<pre><code>\usepackage[C40]{fontenc}
|
293
336
|
\usepackage[cjkjis]{ucs}
|
294
|
-
\usepackage[utf8x]{inputenc}
|
295
|
-
</code></pre>
|
337
|
+
\usepackage[utf8x]{inputenc}</code></pre>
|
296
338
|
|
297
339
|
<p>Nevertheless, I could only get bitmap fonts working – probably it’s a problem with my setup.</p>
|
298
340
|
|
@@ -358,8 +400,7 @@ Maruku (to_latex): parsing 0.49 sec + rendering 0.25 sec = 0.73 sec</code></pr
|
|
358
400
|
|
359
401
|
<p>The default action is to warn and try to continue. If you do this:</p>
|
360
402
|
|
361
|
-
<pre><code>Maruku.new(string, {:on_error => :raise})
|
362
|
-
</code></pre>
|
403
|
+
<pre><code>Maruku.new(string, {:on_error => :raise})</code></pre>
|
363
404
|
|
364
405
|
<p>then syntax errors will cause an exception to be raised (you can catch this and retry).</p>
|
365
406
|
</li>
|
@@ -412,4 +453,4 @@ Maruku (to_latex): parsing 0.49 sec + rendering 0.25 sec = 0.73 sec</code></pr
|
|
412
453
|
<p>Support for images in PDF.</p>
|
413
454
|
</li>
|
414
455
|
</ul>
|
415
|
-
<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
|
456
|
+
<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:34 on Sunday, February 18th, 2007.</span></div></body></html>
|
data/docs/changelog.md
CHANGED
@@ -60,7 +60,31 @@ HTML use syntax: true
|
|
60
60
|
|
61
61
|
* There are a couple of hidden, unsafe, features that are not enabled by default.
|
62
62
|
|
63
|
-
#### Changes in 0.5.
|
63
|
+
#### Changes in 0.5.4 #### {#stable}
|
64
|
+
|
65
|
+
* Features:
|
66
|
+
|
67
|
+
* [All HTML attributes](http://www.w3.org/TR/html4/index/attributes.html) are supported.
|
68
|
+
|
69
|
+
> Science is a wonderful thing if one does not
|
70
|
+
> have to earn one's living at it.
|
71
|
+
{: cite="http://en.wikiquote.org/wiki/Albert_Einstein"}
|
72
|
+
|
73
|
+
* Attribute `doc_prefix`.
|
74
|
+
|
75
|
+
* Math:
|
76
|
+
|
77
|
+
* `\begin{equation}` and `\end{equation}` are understood.
|
78
|
+
* Math parsing enabled per-instance using the `math_enabled` attribute.
|
79
|
+
* `math_numbered` attribute.
|
80
|
+
|
81
|
+
* Bug fixes:
|
82
|
+
|
83
|
+
* Runs quietly with `ruby -w`.
|
84
|
+
* Fixed a bug which could cause data-loss when reading indented lines.
|
85
|
+
|
86
|
+
|
87
|
+
#### Changes in 0.5.3 ####
|
64
88
|
|
65
89
|
* Features:
|
66
90
|
|
@@ -69,6 +93,7 @@ HTML use syntax: true
|
|
69
93
|
`border`, `cellspacing`, `cellpadding`).
|
70
94
|
|
71
95
|
The next version will hopefully use all HTML attributes.
|
96
|
+
|
72
97
|
|
73
98
|
<!-- A version of Markdown that is more Japanese or something -->
|
74
99
|
|
data/docs/entity_test.html
CHANGED
@@ -255,4 +255,4 @@
|
|
255
255
|
   <code style='background-color: #eef;'>&mu;</code> μ (<code style='background-color: #ffe;'>$\mu$</code>)
|
256
256
|
   <code style='background-color: #eef;'>&hellip;</code> … (<code style='background-color: #ffe;'>\ldots</code>)
|
257
257
|
   </p>
|
258
|
-
<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
|
258
|
+
<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:32 on Sunday, February 18th, 2007.</span></div></body></html>
|
data/docs/exd.html
CHANGED
@@ -25,7 +25,7 @@ Expanded documentation (Markdown format)
|
|
25
25
|
|
26
26
|
<h3 id='class'>Attribute <code>class</code></h3>
|
27
27
|
|
28
|
-
<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line
|
28
|
+
<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line 316:</p>
|
29
29
|
|
30
30
|
<p>It is copied as a standard HTML attribute.</p>
|
31
31
|
|
@@ -33,7 +33,7 @@ Expanded documentation (Markdown format)
|
|
33
33
|
|
34
34
|
<p class='maruku-att-default'>Default: <code>"#fef"</code></p>
|
35
35
|
|
36
|
-
<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line
|
36
|
+
<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line 553:</p>
|
37
37
|
|
38
38
|
<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>
|
39
39
|
|
@@ -74,7 +74,7 @@ Expanded documentation (Markdown format)
|
|
74
74
|
|
75
75
|
<h3 id='css'>Attribute <code>css</code></h3>
|
76
76
|
|
77
|
-
<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line
|
77
|
+
<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line 144:</p>
|
78
78
|
|
79
79
|
<p><code>css</code> should be a space-separated list of urls.</p>
|
80
80
|
|
@@ -82,6 +82,14 @@ Expanded documentation (Markdown format)
|
|
82
82
|
|
83
83
|
<pre><code>CSS: style.css math.css</code></pre>
|
84
84
|
|
85
|
+
<h3 id='doc_prefix'>Attribute <code>doc_prefix</code></h3>
|
86
|
+
|
87
|
+
<p class='maruku-att-default'>Default: <code>""</code></p>
|
88
|
+
|
89
|
+
<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line 128:</p>
|
90
|
+
|
91
|
+
<p>String to disambiguate footnote links.</p>
|
92
|
+
|
85
93
|
<h3 id='encoding'>Attribute <code>encoding</code></h3>
|
86
94
|
|
87
95
|
<p class='maruku-att-origin'>Read from file <code>input/parse_doc.rb</code>, line 35:</p>
|
@@ -100,7 +108,7 @@ Expanded documentation (Markdown format)
|
|
100
108
|
|
101
109
|
<p>If you want to use your custom engine <code>foo</code>, then set:</p>
|
102
110
|
|
103
|
-
<pre><code class='markdown' lang='markdown'>HTML math engine: foo</code></pre>
|
111
|
+
<pre lang='markdown'><code class='markdown' lang='markdown'>HTML math engine: foo</code></pre>
|
104
112
|
|
105
113
|
<p>and then implement two functions:</p>
|
106
114
|
|
@@ -116,7 +124,7 @@ end</code></pre>
|
|
116
124
|
|
117
125
|
<p>Same thing as <code>html_math_engine</code>, only for PNG output.</p>
|
118
126
|
|
119
|
-
<pre><code class='ruby' lang='ruby'>def convert_to_png_foo(kind, tex)
|
127
|
+
<pre lang='ruby'><code class='ruby' lang='ruby'>def convert_to_png_foo(kind, tex)
|
120
128
|
# same thing
|
121
129
|
...
|
122
130
|
end</code></pre>
|
@@ -125,21 +133,19 @@ end</code></pre>
|
|
125
133
|
|
126
134
|
<p class='maruku-att-default'>Default: <code>false</code></p>
|
127
135
|
|
128
|
-
<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line
|
136
|
+
<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line 459:</p>
|
129
137
|
|
130
138
|
<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>
|
131
139
|
|
132
140
|
<p>Examples:</p>
|
133
141
|
|
134
142
|
<pre><code> require 'maruku'
|
135
|
-
{:lang=ruby html_use_syntax=true}
|
136
|
-
</code></pre>
|
143
|
+
{:lang=ruby html_use_syntax=true}</code></pre>
|
137
144
|
|
138
145
|
<p>and</p>
|
139
146
|
|
140
147
|
<pre><code> <div style="text-align:center">Div</div>
|
141
|
-
{:lang=html html_use_syntax=true}
|
142
|
-
</code></pre>
|
148
|
+
{:lang=html html_use_syntax=true}</code></pre>
|
143
149
|
|
144
150
|
<p>produces:</p>
|
145
151
|
|
@@ -151,7 +157,7 @@ end</code></pre>
|
|
151
157
|
|
152
158
|
<h3 id='id'>Attribute <code>id</code></h3>
|
153
159
|
|
154
|
-
<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line
|
160
|
+
<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line 304:</p>
|
155
161
|
|
156
162
|
<p>It is copied as a standard HTML attribute.</p>
|
157
163
|
|
@@ -185,8 +191,7 @@ end</code></pre>
|
|
185
191
|
<p>For example:</p>
|
186
192
|
|
187
193
|
<pre><code>Title: My document
|
188
|
-
Latex preamble: preamble.tex
|
189
|
-
</code></pre>
|
194
|
+
Latex preamble: preamble.tex</code></pre>
|
190
195
|
|
191
196
|
<p>will produce:</p>
|
192
197
|
|
@@ -206,8 +211,7 @@ Latex preamble: preamble.tex
|
|
206
211
|
<li>
|
207
212
|
<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>
|
208
213
|
|
209
|
-
<pre><code>\lstset{language=ruby}
|
210
|
-
</code></pre>
|
214
|
+
<pre><code>\lstset{language=ruby}</code></pre>
|
211
215
|
|
212
216
|
<p>Please refer to the documentation of the <code>listings</code> package for supported languages.</p>
|
213
217
|
|
@@ -233,21 +237,38 @@ Latex preamble: preamble.tex
|
|
233
237
|
|
234
238
|
<p>If false, Maruku does not append a signature to the generated file.</p>
|
235
239
|
|
240
|
+
<h3 id='math_enabled'>Attribute <code>math_enabled</code></h3>
|
241
|
+
|
242
|
+
<p class='maruku-att-origin'>Read from file <code>ext/math.rb</code>, line 14:</p>
|
243
|
+
|
244
|
+
<p>To explicitly disable the math parsing:</p>
|
245
|
+
|
246
|
+
<pre><code>Maruku.new(string, {:math_enabled => false})
|
247
|
+
{:ruby}</code></pre>
|
248
|
+
|
249
|
+
<h3 id='math_numbered'>Attribute <code>math_numbered</code></h3>
|
250
|
+
|
251
|
+
<p class='maruku-att-origin'>Read from file <code>ext/math.rb</code>, line 29:</p>
|
252
|
+
|
253
|
+
<p>Array containing any of <code>'\\['</code>, <code>'\\begin{equation}'</code>, <code>'$$'</code>.</p>
|
254
|
+
|
255
|
+
<pre><code>MaRuKu::Globals[math_numbered] = ['\\[']</code></pre>
|
256
|
+
|
236
257
|
<h3 id='style'>Attribute <code>style</code></h3>
|
237
258
|
|
238
|
-
<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line
|
259
|
+
<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line 324:</p>
|
239
260
|
|
240
261
|
<p>It is copied as a standard HTML attribute.</p>
|
241
262
|
|
242
263
|
<h3 id='subject'>Attribute <code>subject</code></h3>
|
243
264
|
|
244
|
-
<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line
|
265
|
+
<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line 136:</p>
|
245
266
|
|
246
267
|
<p>Synonim for <code>title</code>.</p>
|
247
268
|
|
248
269
|
<h3 id='title'>Attribute <code>title</code></h3>
|
249
270
|
|
250
|
-
<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line
|
271
|
+
<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line 105:</p>
|
251
272
|
|
252
273
|
<p>Sets the title of the document. If a title is not specified, the first header will be used.</p>
|
253
274
|
|
@@ -255,16 +276,14 @@ Latex preamble: preamble.tex
|
|
255
276
|
|
256
277
|
<pre><code>Title: my document
|
257
278
|
|
258
|
-
Content
|
259
|
-
</code></pre>
|
279
|
+
Content</code></pre>
|
260
280
|
|
261
281
|
<p>and</p>
|
262
282
|
|
263
283
|
<pre><code>my document
|
264
284
|
===========
|
265
285
|
|
266
|
-
Content
|
267
|
-
</code></pre>
|
286
|
+
Content</code></pre>
|
268
287
|
|
269
288
|
<p>In both cases, the title is set to “my document”.</p>
|
270
289
|
|
@@ -280,9 +299,9 @@ Content
|
|
280
299
|
|
281
300
|
<p class='maruku-att-default'>Default: <code>false</code></p>
|
282
301
|
|
283
|
-
<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line
|
302
|
+
<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line 405:</p>
|
284
303
|
|
285
304
|
<p>If <code>true</code>, section headers will be numbered.</p>
|
286
305
|
|
287
306
|
<p>In LaTeX export, the numbering of headers is managed by Maruku, to have the same results in both HTML and LaTeX.</p>
|
288
|
-
<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
|
307
|
+
<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:32 on Sunday, February 18th, 2007.</span></div></body></html>
|
data/docs/index.html
CHANGED
@@ -13,7 +13,7 @@
|
|
13
13
|
<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>
|
14
14
|
|
15
15
|
<blockquote id='news'>
|
16
|
-
<p><a href='#release_notes'>Last release</a> is version 0.5.
|
16
|
+
<p><a href='#release_notes'>Last release</a> is version 0.5.4 – 2007-02-18.</p>
|
17
17
|
|
18
18
|
<p>Use this command to update:</p>
|
19
19
|
|
@@ -134,8 +134,7 @@
|
|
134
134
|
|
135
135
|
<pre><code>BlueCloth (to_html): parsing 0.01 sec + rendering 1.87 sec = 1.88 sec (1.00x)
|
136
136
|
Maruku (to_html): parsing 0.66 sec + rendering 0.43 sec = 1.09 sec (1.73x)
|
137
|
-
Maruku (to_latex): parsing 0.67 sec + rendering 0.23 sec = 0.90 sec (2.10x)
|
138
|
-
</code></pre>
|
137
|
+
Maruku (to_latex): parsing 0.67 sec + rendering 0.23 sec = 0.90 sec (2.10x)</code></pre>
|
139
138
|
|
140
139
|
<p>Please note that Maruku has a lot more features and therefore is looking for much more patterns in the file.</p>
|
141
140
|
|
@@ -233,8 +232,7 @@ Content of the document</code></pre>
|
|
233
232
|
<p>If you create a list, and then set the <code>toc</code> attribute, when rendering Maruku will create an auto-generated table of contents.</p>
|
234
233
|
|
235
234
|
<pre><code>* This will become a table of contents (this text will be scraped).
|
236
|
-
{:toc}
|
237
|
-
</code></pre>
|
235
|
+
{:toc}</code></pre>
|
238
236
|
|
239
237
|
<p>You can see an example of this at the beginning of this document.</p>
|
240
238
|
|
@@ -323,4 +321,4 @@ I would love to have an equivalent in Ruby.
|
|
323
321
|
|
324
322
|
--><div class='footnotes'><hr /><ol><li id='fn:1'>
|
325
323
|
<p>I really was missing those.</p>
|
326
|
-
<a href='#fnref:1' rev='footnote'>↩</a></li></ol></div><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
|
324
|
+
<a href='#fnref:1' rev='footnote'>↩</a></li></ol></div><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:32 on Sunday, February 18th, 2007.</span></div></body></html>
|