maruku 0.5.0 → 0.5.1
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/docs/changelog.html +65 -6
- data/docs/changelog.md +31 -1
- data/docs/entity_test.html +17 -17
- data/docs/exd.html +46 -8
- data/docs/index.html +58 -31
- data/docs/markdown_syntax.html +170 -6
- data/docs/maruku.html +58 -31
- data/docs/maruku.md +9 -16
- data/docs/math.md +76 -25
- data/docs/proposal.html +65 -9
- data/lib/maruku/ext/diagrams/layout.rb +405 -2
- data/lib/maruku/ext/diagrams/to_latex.rb +0 -205
- data/lib/maruku/ext/math/to_html.rb +0 -8
- data/lib/maruku/input/charsource.rb +5 -4
- data/lib/maruku/input/parse_doc.rb +1 -0
- data/lib/maruku/input/parse_span_better.rb +7 -2
- data/lib/maruku/output/to_html.rb +50 -7
- data/lib/maruku/output/to_latex.rb +6 -2
- data/lib/maruku/output/to_latex_entities.rb +3 -3
- data/lib/maruku/version.rb +1 -1
- data/tests/unittest/attributes/attributes.md +8 -49
- data/tests/unittest/blanks_in_code.md +6 -0
- data/tests/unittest/code.md +2 -0
- data/tests/unittest/code2.md +3 -1
- data/tests/unittest/code3.md +8 -0
- data/tests/unittest/email.md +2 -2
- data/tests/unittest/entities.md +2 -0
- data/tests/unittest/ie.md +112 -0
- data/tests/unittest/images.md +2 -2
- data/tests/unittest/images2.md +55 -0
- data/tests/unittest/inline_html.md +4 -0
- data/tests/unittest/links.md +1 -1
- data/tests/unittest/list3.md +3 -1
- data/tests/unittest/misc_sw.md +3 -1
- data/tests/unittest/smartypants.md +8 -0
- data/tests/unittest/syntax_hl.md +7 -1
- data/tests/unittest/test.md +2 -0
- metadata +4 -3
- data/docs/a.md +0 -4
data/docs/changelog.html
CHANGED
@@ -17,13 +17,17 @@
|
|
17
17
|
<ul>
|
18
18
|
<li>
|
19
19
|
<p>G4 1.5GhZ, Ruby 1.8.5:</p>
|
20
|
+
|
20
21
|
<pre><code>Maruku (to_html): parsing 0.65 sec + rendering 0.40 sec = 1.04 sec
|
21
|
-
Maruku (to_latex): parsing 0.70 sec + rendering 0.21 sec = 0.91 sec</code></pre
|
22
|
+
Maruku (to_latex): parsing 0.70 sec + rendering 0.21 sec = 0.91 sec</code></pre>
|
23
|
+
</li>
|
22
24
|
|
23
25
|
<li>
|
24
26
|
<p>G4 1.5GhZ, JRuby 1.9.2:</p>
|
27
|
+
|
25
28
|
<pre><code>Maruku (to_html): parsing 4.77 sec + rendering 2.24 sec = 7.01 sec
|
26
|
-
Maruku (to_latex): parsing 4.04 sec + rendering 1.12 sec = 5.16 sec</code></pre
|
29
|
+
Maruku (to_latex): parsing 4.04 sec + rendering 1.12 sec = 5.16 sec</code></pre>
|
30
|
+
</li>
|
27
31
|
</ul>
|
28
32
|
</li>
|
29
33
|
|
@@ -53,6 +57,7 @@ Maruku (to_latex): parsing 4.04 sec + rendering 1.12 sec = 5.16 sec</code></pre>
|
|
53
57
|
|
54
58
|
<li>
|
55
59
|
<p>Command line options for the <code>maruku</code> command:</p>
|
60
|
+
|
56
61
|
<pre><code>Usage: maruku [options] [file1.md [file2.md ...
|
57
62
|
-v, --[no-]verbose Run verbosely
|
58
63
|
-u, --[no-]unsafe Use unsafe features
|
@@ -63,7 +68,8 @@ Maruku (to_latex): parsing 4.04 sec + rendering 1.12 sec = 5.16 sec</code></pre>
|
|
63
68
|
--tex Write LaTeX
|
64
69
|
--inspect Shows the parsing result
|
65
70
|
--version Show version
|
66
|
-
-h, --help Show this message</code></pre
|
71
|
+
-h, --help Show this message</code></pre>
|
72
|
+
</li>
|
67
73
|
|
68
74
|
<li>
|
69
75
|
<p>Other things:</p>
|
@@ -80,7 +86,48 @@ Maruku (to_latex): parsing 4.04 sec + rendering 1.12 sec = 5.16 sec</code></pre>
|
|
80
86
|
</li>
|
81
87
|
</ul>
|
82
88
|
|
83
|
-
<h4 id='stable'>Changes in 0.5.
|
89
|
+
<h4 id='stable'>Changes in 0.5.1</h4>
|
90
|
+
|
91
|
+
<ul>
|
92
|
+
<li>
|
93
|
+
<p>Bug fixes:</p>
|
94
|
+
|
95
|
+
<ul>
|
96
|
+
<li>
|
97
|
+
<p>Workaround for Internet Explorer bug: be very sure that <code>&apos;</code> is always written as <code>&#39;</code>.</p>
|
98
|
+
</li>
|
99
|
+
|
100
|
+
<li>
|
101
|
+
<p>Support for empty images ref: <code>![image]</code> and <code>![image][]</code>.</p>
|
102
|
+
</li>
|
103
|
+
|
104
|
+
<li>
|
105
|
+
<p>Fixed bug in parsing attribute lists definitions.</p>
|
106
|
+
</li>
|
107
|
+
</ul>
|
108
|
+
</li>
|
109
|
+
|
110
|
+
<li>
|
111
|
+
<p>Minor things:</p>
|
112
|
+
|
113
|
+
<ul>
|
114
|
+
<li>
|
115
|
+
<p>Now code blocks are written as a <code><code></code> element inside a <code><pre></code>, and <code><code></code> elements have both <code>class</code> and <code>lang</code> attributes set to the specified language.</p>
|
116
|
+
|
117
|
+
<p>Example:</p>
|
118
|
+
|
119
|
+
<pre><code class='markdown' lang='markdown'> Example
|
120
|
+
{:lang=ruby}</code></pre>
|
121
|
+
|
122
|
+
<p>produces:</p>
|
123
|
+
|
124
|
+
<pre><code class='xml' lang='xml'><span class='punct'><</span><span class='tag'>pre</span><span class='punct'>><</span><span class='tag'>code</span> <span class='attribute'>class</span><span class='punct'>='</span><span class='string'>ruby</span><span class='punct'>'</span> <span class='attribute'>lang</span><span class='punct'>='</span><span class='string'>ruby</span><span class='punct'>'></span>Example<span class='punct'></</span><span class='tag'>code</span><span class='punct'>></</span><span class='tag'>pre</span><span class='punct'>></span></code></pre>
|
125
|
+
</li>
|
126
|
+
</ul>
|
127
|
+
</li>
|
128
|
+
</ul>
|
129
|
+
|
130
|
+
<h4 id='changes_in_050'>Changes in 0.5.0</h4>
|
84
131
|
|
85
132
|
<ul>
|
86
133
|
<li>
|
@@ -93,12 +140,14 @@ Maruku (to_latex): parsing 4.04 sec + rendering 1.12 sec = 5.16 sec</code></pre>
|
|
93
140
|
|
94
141
|
<li>
|
95
142
|
<p>Meta data: the first IAL in a span environment now refers to the parent. This makes it possible to set attributes for cells:</p>
|
143
|
+
|
96
144
|
<pre><code>Head | Head |
|
97
145
|
---------------+-------+--
|
98
146
|
{:r} Hello + ...
|
99
147
|
|
100
148
|
{:r: scope='row'}
|
101
149
|
</code></pre>
|
150
|
+
|
102
151
|
<p>The first cell will have the <code>scope</code> attribute set to <code>row</code>.</p>
|
103
152
|
</li>
|
104
153
|
</ul>
|
@@ -156,11 +205,13 @@ Maruku (to_latex): parsing 4.04 sec + rendering 1.12 sec = 5.16 sec</code></pre>
|
|
156
205
|
|
157
206
|
<li>
|
158
207
|
<p>New attributes: <code>latex_preamble</code> to add a custom preamble, and <code>latex_cjk</code> to add packages for UTF-8 Japanese characters. (<strong>support for this is still shaky</strong>). Example:</p>
|
208
|
+
|
159
209
|
<pre><code>Title: my document
|
160
210
|
LaTeX CJK: true
|
161
211
|
LaTeX preamble: preamble.tex
|
162
212
|
|
163
|
-
Content</code></pre
|
213
|
+
Content</code></pre>
|
214
|
+
</li>
|
164
215
|
</ul>
|
165
216
|
</li>
|
166
217
|
|
@@ -184,8 +235,10 @@ Content</code></pre></li>
|
|
184
235
|
<ul>
|
185
236
|
<li>
|
186
237
|
<p>Implemented SmartyPants support:</p>
|
238
|
+
|
187
239
|
<pre><code>'Twas a "test" to 'remember' -- in the '90s
|
188
240
|
--- while I was <<ok>>. She was 6\"12\'.</code></pre>
|
241
|
+
|
189
242
|
<blockquote>
|
190
243
|
<p>‘Twas a “test” to ‘remember’ – in the ’90s — while I was «ok». She was 6"12'.</p>
|
191
244
|
</blockquote>
|
@@ -203,10 +256,12 @@ Content</code></pre></li>
|
|
203
256
|
<ul>
|
204
257
|
<li>
|
205
258
|
<p>Now Japanese text rendering sort of works, using the following packages:</p>
|
259
|
+
|
206
260
|
<pre><code>\usepackage[C40]{fontenc}
|
207
261
|
\usepackage[cjkjis]{ucs}
|
208
262
|
\usepackage[utf8x]{inputenc}
|
209
263
|
</code></pre>
|
264
|
+
|
210
265
|
<p>Nevertheless, I could only get bitmap fonts working – probably it’s a problem with my setup.</p>
|
211
266
|
|
212
267
|
<p>A quick test: 日本、中国、ひらがな、カタカナ。</p>
|
@@ -250,9 +305,11 @@ Content</code></pre></li>
|
|
250
305
|
<p>Now Maruku is almost 2x faster than Bluecloth, while having more features.</p>
|
251
306
|
|
252
307
|
<p>Here are some benchmarks:</p>
|
308
|
+
|
253
309
|
<pre><code>BlueCloth (to_html): parsing 0.00 sec + rendering 1.54 sec = 1.55 sec
|
254
310
|
Maruku (to_html): parsing 0.47 sec + rendering 0.38 sec = 0.85 sec
|
255
311
|
Maruku (to_latex): parsing 0.49 sec + rendering 0.25 sec = 0.73 sec</code></pre>
|
312
|
+
|
256
313
|
<p>This is the result of running <code>lib/maruku/tests/benchmark.rb</code> on the Markdown specification.</p>
|
257
314
|
</li>
|
258
315
|
|
@@ -268,8 +325,10 @@ Maruku (to_latex): parsing 0.49 sec + rendering 0.25 sec = 0.73 sec</code></pr
|
|
268
325
|
<p>Error management: Having a real parser, Maruku warns you about syntax issues.</p>
|
269
326
|
|
270
327
|
<p>The default action is to warn and try to continue. If you do this:</p>
|
328
|
+
|
271
329
|
<pre><code>Maruku.new(string, {:on_error => :raise})
|
272
330
|
</code></pre>
|
331
|
+
|
273
332
|
<p>then syntax errors will cause an exception to be raised (you can catch this and retry).</p>
|
274
333
|
</li>
|
275
334
|
|
@@ -321,4 +380,4 @@ Maruku (to_latex): parsing 0.49 sec + rendering 0.25 sec = 0.73 sec</code></pr
|
|
321
380
|
<p>Support for images in PDF.</p>
|
322
381
|
</li>
|
323
382
|
</ul>
|
324
|
-
<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
|
383
|
+
<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>
|
data/docs/changelog.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
CSS: style.css
|
2
2
|
LaTeX CJK: true
|
3
|
+
HTML use syntax: true
|
3
4
|
|
4
5
|
#### Changes in the development version and **experimental** features #### {#last}
|
5
6
|
|
@@ -59,7 +60,36 @@ LaTeX CJK: true
|
|
59
60
|
|
60
61
|
* There are a couple of hidden features...
|
61
62
|
|
62
|
-
|
63
|
+
|
64
|
+
#### Changes in 0.5.1 #### {#stable}
|
65
|
+
|
66
|
+
* Bug fixes:
|
67
|
+
|
68
|
+
* Workaround for Internet Explorer bug:
|
69
|
+
be very sure that `'` is always written as `'`.
|
70
|
+
|
71
|
+
* Support for empty images ref: `![image]` and `![image][]`.
|
72
|
+
|
73
|
+
* Fixed bug in parsing attribute lists definitions.
|
74
|
+
|
75
|
+
* Minor things:
|
76
|
+
|
77
|
+
* Now code blocks are written as a `<code>` element inside a `<pre>`, and
|
78
|
+
`<code>` elements have both `class` and `lang` attributes set
|
79
|
+
to the specified language.
|
80
|
+
|
81
|
+
Example:
|
82
|
+
|
83
|
+
Example
|
84
|
+
{:lang=ruby}
|
85
|
+
{:lang=markdown}
|
86
|
+
|
87
|
+
produces:
|
88
|
+
|
89
|
+
<pre><code class='ruby' lang='ruby'>Example</code></pre>
|
90
|
+
{:lang=xml}
|
91
|
+
|
92
|
+
#### Changes in 0.5.0 ####
|
63
93
|
|
64
94
|
* Syntax changes:
|
65
95
|
|
data/docs/entity_test.html
CHANGED
@@ -43,12 +43,12 @@
|
|
43
43
|
   <code style='background-color: #eef;'>&Egrave;</code> È (<code style='background-color: #ffe;'>\`E</code>)
|
44
44
|
   <code style='background-color: #eef;'>&para;</code> ¶ (<code style='background-color: #ffe;'>\P</code>)
|
45
45
|
   <code style='background-color: #eef;'>&ugrave;</code> ù (<code style='background-color: #ffe;'>\`u</code>)
|
46
|
-
   <code style='background-color: #eef;'>&Yacute;</code> Ý (<code style='background-color: #ffe;'
|
46
|
+
   <code style='background-color: #eef;'>&Yacute;</code> Ý (<code style='background-color: #ffe;'>\'Y</code>)
|
47
47
|
   <code style='background-color: #eef;'>&lsquo;</code> ‘ (<code style='background-color: #ffe;'>`</code>)
|
48
48
|
   <code style='background-color: #eef;'>&Phi;</code> Φ (<code style='background-color: #ffe;'>$\Phi$</code>)
|
49
49
|
   <code style='background-color: #eef;'>&euro;</code> € (<code style='background-color: #ffe;'>\euro</code>)
|
50
50
|
   <code style='background-color: #eef;'>&icirc;</code> î (<code style='background-color: #ffe;'>\^i</code>)
|
51
|
-
   <code style='background-color: #eef;'>&iacute;</code> í (<code style='background-color: #ffe;'
|
51
|
+
   <code style='background-color: #eef;'>&iacute;</code> í (<code style='background-color: #ffe;'>\'i</code>)
|
52
52
|
   <code style='background-color: #eef;'>&rArr;</code> ⇒ (<code style='background-color: #ffe;'>$\Rightarrow$</code>)
|
53
53
|
   <code style='background-color: #eef;'>&Ntilde;</code> Ñ (<code style='background-color: #ffe;'>\~N</code>)
|
54
54
|
   <code style='background-color: #eef;'>&sim;</code> ∼ (<code style='background-color: #ffe;'>$\sim$</code>)
|
@@ -109,11 +109,11 @@
|
|
109
109
|
   <code style='background-color: #eef;'>&Ccedil;</code> Ç (<code style='background-color: #ffe;'>\c{C}</code>)
|
110
110
|
   <code style='background-color: #eef;'>&igrave;</code> ì (<code style='background-color: #ffe;'>\`i</code>)
|
111
111
|
   <code style='background-color: #eef;'>&brvbar;</code> ¦ (<code style='background-color: #ffe;'>\brokenvert</code>)
|
112
|
-
   <code style='background-color: #eef;'>&acute;</code> ´ (<code style='background-color: #ffe;'
|
112
|
+
   <code style='background-color: #eef;'>&acute;</code> ´ (<code style='background-color: #ffe;'>'</code>)
|
113
113
|
   <code style='background-color: #eef;'>&sigmaf;</code> ς (<code style='background-color: #ffe;'>$\varsigma$</code>)
|
114
114
|
   <code style='background-color: #eef;'>&weierp;</code> ℘ (<code style='background-color: #ffe;'>$\wp$</code>)
|
115
115
|
   <code style='background-color: #eef;'>&Auml;</code> Ä (<code style='background-color: #ffe;'>\"A</code>)
|
116
|
-
   <code style='background-color: #eef;'>&apos;</code> ' (<code style='background-color: #ffe;'
|
116
|
+
   <code style='background-color: #eef;'>&apos;</code> ' (<code style='background-color: #ffe;'>'</code>)
|
117
117
|
   <code style='background-color: #eef;'>&micro;</code> µ (<code style='background-color: #ffe;'>$\mu$</code>)
|
118
118
|
   <code style='background-color: #eef;'>&Icirc;</code> Î (<code style='background-color: #ffe;'>\^I</code>)
|
119
119
|
   <code style='background-color: #eef;'>&xi;</code> ξ (<code style='background-color: #ffe;'>$\xi$</code>)
|
@@ -125,7 +125,7 @@
|
|
125
125
|
   <code style='background-color: #eef;'>&Zeta;</code> Ζ (<code style='background-color: #ffe;'>$Z$</code>)
|
126
126
|
   <code style='background-color: #eef;'>&empty;</code> ∅ (<code style='background-color: #ffe;'>$\emptyset$</code>)
|
127
127
|
   <code style='background-color: #eef;'>&image;</code> ℑ (<code style='background-color: #ffe;'>$\Im$</code>)
|
128
|
-
   <code style='background-color: #eef;'>&Oacute;</code> Ó (<code style='background-color: #ffe;'
|
128
|
+
   <code style='background-color: #eef;'>&Oacute;</code> Ó (<code style='background-color: #ffe;'>\' O</code>)
|
129
129
|
   <code style='background-color: #eef;'>&nu;</code> ν (<code style='background-color: #ffe;'>$\nu$</code>)
|
130
130
|
   <code style='background-color: #eef;'>&Xi;</code> Ξ (<code style='background-color: #ffe;'>$\Xi$</code>)
|
131
131
|
   <code style='background-color: #eef;'>&Igrave;</code> Ì (<code style='background-color: #ffe;'>\`I</code>)
|
@@ -139,17 +139,17 @@
|
|
139
139
|
   <code style='background-color: #eef;'>&ge;</code> ≥ (<code style='background-color: #ffe;'>$\geq$</code>)
|
140
140
|
   <code style='background-color: #eef;'>&lang;</code> 〉 (<code style='background-color: #ffe;'>$\langle$</code>)
|
141
141
|
   <code style='background-color: #eef;'>&le;</code> ≤ (<code style='background-color: #ffe;'>$\leq$</code>)
|
142
|
-
   <code style='background-color: #eef;'>&rdquo;</code> ” (<code style='background-color: #ffe;'
|
142
|
+
   <code style='background-color: #eef;'>&rdquo;</code> ” (<code style='background-color: #ffe;'>''</code>)
|
143
143
|
   <code style='background-color: #eef;'>&otimes;</code> ⊗ (<code style='background-color: #ffe;'>$\otimes$</code>)
|
144
144
|
   <code style='background-color: #eef;'>&Nu;</code> Ν (<code style='background-color: #ffe;'>$N$</code>)
|
145
145
|
   <code style='background-color: #eef;'>&real;</code> ℜ (<code style='background-color: #ffe;'>$\Re$</code>)
|
146
146
|
   <code style='background-color: #eef;'>&lfloor;</code> ⌊ (<code style='background-color: #ffe;'>$\lfloor$</code>)
|
147
|
-
   <code style='background-color: #eef;'>&rsquo;</code> ’ (<code style='background-color: #ffe;'
|
147
|
+
   <code style='background-color: #eef;'>&rsquo;</code> ’ (<code style='background-color: #ffe;'>'</code>)
|
148
148
|
   <code style='background-color: #eef;'>&equiv;</code> ≡ (<code style='background-color: #ffe;'>$\equiv$</code>)
|
149
|
-
   <code style='background-color: #eef;'>&aacute;</code> á (<code style='background-color: #ffe;'
|
149
|
+
   <code style='background-color: #eef;'>&aacute;</code> á (<code style='background-color: #ffe;'>\'a</code>)
|
150
150
|
   <code style='background-color: #eef;'>&permil;</code> ‰ (<code style='background-color: #ffe;'>\permil</code>)
|
151
151
|
   <code style='background-color: #eef;'>&sigma;</code> σ (<code style='background-color: #ffe;'>$\sigma$</code>)
|
152
|
-
   <code style='background-color: #eef;'>&oacute;</code> ó (<code style='background-color: #ffe;'
|
152
|
+
   <code style='background-color: #eef;'>&oacute;</code> ó (<code style='background-color: #ffe;'>\'o</code>)
|
153
153
|
   <code style='background-color: #eef;'>&supe;</code> ⊇ (<code style='background-color: #ffe;'>$\supseteq$</code>)
|
154
154
|
   <code style='background-color: #eef;'>&ordf;</code> ª (<code style='background-color: #ffe;'>\textordfeminine</code>)
|
155
155
|
   <code style='background-color: #eef;'>&Beta;</code> Β (<code style='background-color: #ffe;'>$B$</code>)
|
@@ -169,7 +169,7 @@
|
|
169
169
|
   <code style='background-color: #eef;'>&ordm;</code> º (<code style='background-color: #ffe;'>\textordmasculine</code>)
|
170
170
|
   <code style='background-color: #eef;'>&copy;</code> © (<code style='background-color: #ffe;'>\copyright</code>)
|
171
171
|
   <code style='background-color: #eef;'>&infin;</code> ∞ (<code style='background-color: #ffe;'>$\infty$</code>)
|
172
|
-
   <code style='background-color: #eef;'>&Aacute;</code> Á (<code style='background-color: #ffe;'
|
172
|
+
   <code style='background-color: #eef;'>&Aacute;</code> Á (<code style='background-color: #ffe;'>\'A</code>)
|
173
173
|
   <code style='background-color: #eef;'>&rarr;</code> → (<code style='background-color: #ffe;'>$\rightarrow$</code>)
|
174
174
|
   <code style='background-color: #eef;'>&lt;</code> < (<code style='background-color: #ffe;'>$<$</code>)
|
175
175
|
   <code style='background-color: #eef;'>&cong;</code> ≅ (<code style='background-color: #ffe;'>$\cong$</code>)
|
@@ -193,13 +193,13 @@
|
|
193
193
|
   <code style='background-color: #eef;'>&loz;</code> ◊ (<code style='background-color: #ffe;'>$\lozenge$</code>)
|
194
194
|
   <code style='background-color: #eef;'>&yen;</code> ¥ (<code style='background-color: #ffe;'>\textyen</code>)
|
195
195
|
   <code style='background-color: #eef;'>&uuml;</code> ü (<code style='background-color: #ffe;'>\"u</code>)
|
196
|
-
   <code style='background-color: #eef;'>&Eacute;</code> É (<code style='background-color: #ffe;'
|
196
|
+
   <code style='background-color: #eef;'>&Eacute;</code> É (<code style='background-color: #ffe;'>\'E</code>)
|
197
197
|
   <code style='background-color: #eef;'>&Ocirc;</code> Ô (<code style='background-color: #ffe;'>\^O</code>)
|
198
198
|
   <code style='background-color: #eef;'>&nbsp;</code>   (<code style='background-color: #ffe;'>~</code>)
|
199
199
|
   <code style='background-color: #eef;'>&reg;</code> ® (<code style='background-color: #ffe;'>\textregistered</code>)
|
200
200
|
   <code style='background-color: #eef;'>&cup;</code> ∩ (<code style='background-color: #ffe;'>$\cup$</code>)
|
201
201
|
   <code style='background-color: #eef;'>&frasl;</code> ⁄ (<code style='background-color: #ffe;'>/</code>)
|
202
|
-
   <code style='background-color: #eef;'>&Uacute;</code> Ú (<code style='background-color: #ffe;'
|
202
|
+
   <code style='background-color: #eef;'>&Uacute;</code> Ú (<code style='background-color: #ffe;'>\'U</code>)
|
203
203
|
   <code style='background-color: #eef;'>&hArr;</code> ⇔ (<code style='background-color: #ffe;'>$\Leftrightarrow$</code>)
|
204
204
|
   <code style='background-color: #eef;'>&delta;</code> δ (<code style='background-color: #ffe;'>$\delta$</code>)
|
205
205
|
   <code style='background-color: #eef;'>&Ouml;</code> Ö (<code style='background-color: #ffe;'>\"O</code>)
|
@@ -214,9 +214,9 @@
|
|
214
214
|
   <code style='background-color: #eef;'>&lambda;</code> λ (<code style='background-color: #ffe;'>$\lambda$</code>)
|
215
215
|
   <code style='background-color: #eef;'>&prod;</code> ∏ (<code style='background-color: #ffe;'>$\prod$</code>)
|
216
216
|
   <code style='background-color: #eef;'>&laquo;</code> « (<code style='background-color: #ffe;'>\guillemotleft</code>)
|
217
|
-
   <code style='background-color: #eef;'>&eacute;</code> é (<code style='background-color: #ffe;'
|
217
|
+
   <code style='background-color: #eef;'>&eacute;</code> é (<code style='background-color: #ffe;'>\'e</code>)
|
218
218
|
   <code style='background-color: #eef;'>&plusmn;</code> ± (<code style='background-color: #ffe;'>$\pm$</code>)
|
219
|
-
   <code style='background-color: #eef;'>&uacute;</code> ú (<code style='background-color: #ffe;'
|
219
|
+
   <code style='background-color: #eef;'>&uacute;</code> ú (<code style='background-color: #ffe;'>\'u</code>)
|
220
220
|
   <code style='background-color: #eef;'>&lsaquo;</code> ‹ (<code style='background-color: #ffe;'>\guilsinglleft</code>)
|
221
221
|
   <code style='background-color: #eef;'>&Aring;</code> Å (<code style='background-color: #ffe;'>\AA</code>)
|
222
222
|
   <code style='background-color: #eef;'>&frac12;</code> ½ (<code style='background-color: #ffe;'>$\frac{1}{2}$</code>)
|
@@ -242,7 +242,7 @@
|
|
242
242
|
   <code style='background-color: #eef;'>&zeta;</code> ζ (<code style='background-color: #ffe;'>$\zeta$</code>)
|
243
243
|
   <code style='background-color: #eef;'>&sum;</code> ∑ (<code style='background-color: #ffe;'>$\sum$</code>)
|
244
244
|
   <code style='background-color: #eef;'>&nabla;</code> ∇ (<code style='background-color: #ffe;'>$\nabla$</code>)
|
245
|
-
   <code style='background-color: #eef;'>&Iacute;</code> Í (<code style='background-color: #ffe;'
|
245
|
+
   <code style='background-color: #eef;'>&Iacute;</code> Í (<code style='background-color: #ffe;'>\'I</code>)
|
246
246
|
   <code style='background-color: #eef;'>&Upsilon;</code> Υ (<code style='background-color: #ffe;'>$Y$</code>)
|
247
247
|
   <code style='background-color: #eef;'>&sup;</code> ⊃ (<code style='background-color: #ffe;'>$\supset$</code>)
|
248
248
|
   <code style='background-color: #eef;'>&auml;</code> ä (<code style='background-color: #ffe;'>\"a</code>)
|
@@ -250,9 +250,9 @@
|
|
250
250
|
   <code style='background-color: #eef;'>&Delta;</code> Δ (<code style='background-color: #ffe;'>$\Delta$</code>)
|
251
251
|
   <code style='background-color: #eef;'>&circ;</code> ˆ (<code style='background-color: #ffe;'>\textasciicircum</code>)
|
252
252
|
   <code style='background-color: #eef;'>&pound;</code> £ (<code style='background-color: #ffe;'>\pounds</code>)
|
253
|
-
   <code style='background-color: #eef;'>&yacute;</code> ý (<code style='background-color: #ffe;'
|
253
|
+
   <code style='background-color: #eef;'>&yacute;</code> ý (<code style='background-color: #ffe;'>\'y</code>)
|
254
254
|
   <code style='background-color: #eef;'>&perp;</code> ⊥ (<code style='background-color: #ffe;'>$\perp$</code>)
|
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:49 on Wednesday, January 24th, 2007.</span></div></body></html>
|
data/docs/exd.html
CHANGED
@@ -11,6 +11,7 @@
|
|
11
11
|
<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>
|
12
12
|
|
13
13
|
<p>Each block is delimited by <code>=begin</code> and <code>=end</code> blocks and is a Markdown document:</p>
|
14
|
+
|
14
15
|
<pre><code>...
|
15
16
|
=begin maruku_doc
|
16
17
|
Attribute: att1
|
@@ -19,6 +20,7 @@ Summary: summary for attribute
|
|
19
20
|
Expanded documentation (Markdown format)
|
20
21
|
=end
|
21
22
|
...</code></pre>
|
23
|
+
|
22
24
|
<h2>Attribute documentation</h2>
|
23
25
|
|
24
26
|
<h3 id='class'>Attribute <code>class</code></h3>
|
@@ -31,7 +33,7 @@ Expanded documentation (Markdown format)
|
|
31
33
|
|
32
34
|
<p class='maruku-att-default'>Default: <code>"#fef"</code></p>
|
33
35
|
|
34
|
-
<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 495:</p>
|
35
37
|
|
36
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>
|
37
39
|
|
@@ -56,16 +58,20 @@ Expanded documentation (Markdown format)
|
|
56
58
|
<p>If <code>true</code>, shows spaces and tabs in code blocks.</p>
|
57
59
|
|
58
60
|
<p>Example:</p>
|
61
|
+
|
59
62
|
<pre><code> One space
|
60
63
|
Two spaces
|
61
64
|
Tab, space, tab
|
62
65
|
Tab, tab, tab and all is green!
|
63
66
|
{:code_show_spaces code_background_color=#ffeedd}</code></pre>
|
67
|
+
|
64
68
|
<p>That will produce:</p>
|
69
|
+
|
65
70
|
<pre style='background-color: #ffeedd;'><code>¬One¬space
|
66
71
|
¬¬Two¬spaces
|
67
72
|
»   ¬»   Tab,¬space,¬tab
|
68
73
|
»   »   »   Tab,¬tab,¬tab¬and¬all¬is¬green!</code></pre>
|
74
|
+
|
69
75
|
<h3 id='css'>Attribute <code>css</code></h3>
|
70
76
|
|
71
77
|
<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line 134:</p>
|
@@ -73,7 +79,9 @@ Expanded documentation (Markdown format)
|
|
73
79
|
<p><code>css</code> should be a space-separated list of urls.</p>
|
74
80
|
|
75
81
|
<p>Example:</p>
|
82
|
+
|
76
83
|
<pre><code>CSS: style.css math.css</code></pre>
|
84
|
+
|
77
85
|
<h3 id='encoding'>Attribute <code>encoding</code></h3>
|
78
86
|
|
79
87
|
<p class='maruku-att-origin'>Read from file <code>input/parse_doc.rb</code>, line 35:</p>
|
@@ -91,11 +99,15 @@ Expanded documentation (Markdown format)
|
|
91
99
|
<p>Select the rendering engine for math.</p>
|
92
100
|
|
93
101
|
<p>If you want to use your custom engine <code>foo</code>, then set:</p>
|
94
|
-
|
102
|
+
|
103
|
+
<pre><code class='markdown' lang='markdown'>HTML math engine: foo</code></pre>
|
104
|
+
|
95
105
|
<p>and then implement two functions:</p>
|
106
|
+
|
96
107
|
<pre><code>def convert_to_mathml_foo(kind, tex)
|
97
108
|
...
|
98
109
|
end</code></pre>
|
110
|
+
|
99
111
|
<h3 id='html_png_engine'>Attribute <code>html_png_engine</code></h3>
|
100
112
|
|
101
113
|
<p class='maruku-att-default'>Default: <code>"none"</code></p>
|
@@ -103,30 +115,40 @@ end</code></pre>
|
|
103
115
|
<p class='maruku-att-origin'>Read from file <code>ext/math/to_html.rb</code>, line 24:</p>
|
104
116
|
|
105
117
|
<p>Same thing as <code>html_math_engine</code>, only for PNG output.</p>
|
106
|
-
|
118
|
+
|
119
|
+
<pre><code class='ruby' lang='ruby'>def convert_to_png_foo(kind, tex)
|
107
120
|
# same thing
|
108
121
|
...
|
109
122
|
end</code></pre>
|
123
|
+
|
110
124
|
<h3 id='html_use_syntax'>Attribute <code>html_use_syntax</code></h3>
|
111
125
|
|
112
126
|
<p class='maruku-att-default'>Default: <code>false</code></p>
|
113
127
|
|
114
|
-
<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line
|
128
|
+
<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line 402:</p>
|
115
129
|
|
116
130
|
<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>
|
117
131
|
|
118
132
|
<p>Examples:</p>
|
133
|
+
|
119
134
|
<pre><code> require 'maruku'
|
120
135
|
{:lang=ruby html_use_syntax=true}
|
121
136
|
</code></pre>
|
137
|
+
|
122
138
|
<p>and</p>
|
139
|
+
|
123
140
|
<pre><code> <div style="text-align:center">Div</div>
|
124
141
|
{:lang=html html_use_syntax=true}
|
125
142
|
</code></pre>
|
143
|
+
|
126
144
|
<p>produces:</p>
|
127
|
-
|
145
|
+
|
146
|
+
<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>
|
147
|
+
|
128
148
|
<p>and</p>
|
129
|
-
|
149
|
+
|
150
|
+
<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>
|
151
|
+
|
130
152
|
<h3 id='id'>Attribute <code>id</code></h3>
|
131
153
|
|
132
154
|
<p class='maruku-att-origin'>Read from file <code>output/to_html.rb</code>, line 291:</p>
|
@@ -144,12 +166,16 @@ end</code></pre>
|
|
144
166
|
<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>
|
145
167
|
|
146
168
|
<p>If <code>latex_cjk</code> is specified, this is added to the preamble:</p>
|
169
|
+
|
147
170
|
<pre><code>\usepackage[C40]{fontenc}
|
148
171
|
\usepackage[cjkjis]{ucs}
|
149
172
|
\usepackage[utf8x]{inputenc}</code></pre>
|
173
|
+
|
150
174
|
<p>while the default is to add this:</p>
|
175
|
+
|
151
176
|
<pre><code>\usepackage{ucs}
|
152
177
|
\usepackage[utf8x]{inputenc}</code></pre>
|
178
|
+
|
153
179
|
<h3 id='latex_preamble'>Attribute <code>latex_preamble</code></h3>
|
154
180
|
|
155
181
|
<p class='maruku-att-origin'>Read from file <code>output/to_latex.rb</code>, line 94:</p>
|
@@ -157,13 +183,17 @@ end</code></pre>
|
|
157
183
|
<p>If the <code>latex_preamble</code> attribute is specified, then its value will be used as a custom preamble.</p>
|
158
184
|
|
159
185
|
<p>For example:</p>
|
186
|
+
|
160
187
|
<pre><code>Title: My document
|
161
188
|
Latex preamble: preamble.tex
|
162
189
|
</code></pre>
|
190
|
+
|
163
191
|
<p>will produce:</p>
|
192
|
+
|
164
193
|
<pre><code>...
|
165
194
|
\input{preamble.tex}
|
166
195
|
...</code></pre>
|
196
|
+
|
167
197
|
<h3 id='latex_use_listings'>Attribute <code>latex_use_listings</code></h3>
|
168
198
|
|
169
199
|
<p class='maruku-att-default'>Default: <code>false</code></p>
|
@@ -175,8 +205,10 @@ Latex preamble: preamble.tex
|
|
175
205
|
<ul>
|
176
206
|
<li>
|
177
207
|
<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
|
+
|
178
209
|
<pre><code>\lstset{language=ruby}
|
179
210
|
</code></pre>
|
211
|
+
|
180
212
|
<p>Please refer to the documentation of the <code>listings</code> package for supported languages.</p>
|
181
213
|
|
182
214
|
<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>
|
@@ -184,7 +216,9 @@ Latex preamble: preamble.tex
|
|
184
216
|
|
185
217
|
<li>
|
186
218
|
<p>If the <code>code_show_spaces</code> is specified, than spaces and tabs will be shown using the macro:</p>
|
187
|
-
|
219
|
+
|
220
|
+
<pre><code>\lstset{showspaces=true,showtabs=true}</code></pre>
|
221
|
+
</li>
|
188
222
|
|
189
223
|
<li>
|
190
224
|
<p>The background color is given by <code>code_background_color</code>.</p>
|
@@ -218,16 +252,20 @@ Latex preamble: preamble.tex
|
|
218
252
|
<p>Sets the title of the document. If a title is not specified, the first header will be used.</p>
|
219
253
|
|
220
254
|
<p>These should be equivalent:</p>
|
255
|
+
|
221
256
|
<pre><code>Title: my document
|
222
257
|
|
223
258
|
Content
|
224
259
|
</code></pre>
|
260
|
+
|
225
261
|
<p>and</p>
|
262
|
+
|
226
263
|
<pre><code>my document
|
227
264
|
===========
|
228
265
|
|
229
266
|
Content
|
230
267
|
</code></pre>
|
268
|
+
|
231
269
|
<p>In both cases, the title is set to “my document”.</p>
|
232
270
|
|
233
271
|
<h3 id='unsafe_features'>Attribute <code>unsafe_features</code></h3>
|
@@ -247,4 +285,4 @@ Content
|
|
247
285
|
<p>If <code>true</code>, section headers will be numbered.</p>
|
248
286
|
|
249
287
|
<p>In LaTeX export, the numbering of headers is managed by Maruku, to have the same results in both HTML and LaTeX.</p>
|
250
|
-
<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
|
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 13:49 on Wednesday, January 24th, 2007.</span></div></body></html>
|