maruku 0.4.2.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. data/bin/maruku +66 -20
  2. data/bin/marutest +12 -2
  3. data/docs/changelog.html +188 -23
  4. data/docs/changelog.md +128 -5
  5. data/docs/entity_test.html +245 -240
  6. data/docs/entity_test.md +2 -0
  7. data/docs/exd.html +181 -23
  8. data/docs/index.html +130 -349
  9. data/docs/markdown_syntax.html +55 -51
  10. data/docs/maruku.html +130 -349
  11. data/docs/maruku.md +154 -339
  12. data/docs/math.md +143 -0
  13. data/docs/proposal.html +16 -12
  14. data/lib/maruku.rb +6 -3
  15. data/lib/maruku/attributes.rb +7 -2
  16. data/lib/maruku/defaults.rb +27 -27
  17. data/lib/maruku/errors_management.rb +10 -9
  18. data/lib/maruku/ext/diagrams/diagrams.rb +8 -0
  19. data/lib/maruku/ext/diagrams/grid.rb +78 -0
  20. data/lib/maruku/ext/diagrams/inspect.rb +11 -0
  21. data/lib/maruku/ext/diagrams/layout.rb +105 -0
  22. data/lib/maruku/ext/diagrams/parser.rb +219 -0
  23. data/lib/maruku/ext/diagrams/structures.rb +168 -0
  24. data/lib/maruku/ext/diagrams/to_html.rb +37 -0
  25. data/lib/maruku/ext/diagrams/to_latex.rb +308 -0
  26. data/lib/maruku/ext/diagrams/unittest.rb +123 -0
  27. data/lib/maruku/ext/math.rb +11 -0
  28. data/lib/maruku/ext/math/elements.rb +26 -0
  29. data/lib/maruku/ext/math/mathml_engines/blahtex.rb +108 -0
  30. data/lib/maruku/ext/math/mathml_engines/itex2mml.rb +29 -0
  31. data/lib/maruku/ext/math/mathml_engines/none.rb +20 -0
  32. data/lib/maruku/ext/math/mathml_engines/ritex.rb +24 -0
  33. data/lib/maruku/ext/math/parsing.rb +82 -0
  34. data/lib/maruku/ext/math/to_html.rb +178 -0
  35. data/lib/maruku/ext/math/to_latex.rb +21 -0
  36. data/lib/maruku/helpers.rb +11 -0
  37. data/lib/maruku/input/charsource.rb +1 -1
  38. data/lib/maruku/input/extensions.rb +68 -0
  39. data/lib/maruku/input/html_helper.rb +91 -60
  40. data/lib/maruku/input/parse_block.rb +10 -9
  41. data/lib/maruku/input/parse_doc.rb +21 -13
  42. data/lib/maruku/input/parse_span_better.rb +19 -8
  43. data/lib/maruku/input/type_detection.rb +5 -3
  44. data/lib/maruku/output/to_html.rb +236 -67
  45. data/lib/maruku/output/to_latex.rb +69 -26
  46. data/lib/maruku/output/to_latex_entities.rb +14 -2
  47. data/lib/maruku/output/to_s.rb +8 -0
  48. data/lib/maruku/structures.rb +1 -1
  49. data/lib/maruku/tests/benchmark.rb +2 -2
  50. data/lib/maruku/tests/new_parser.rb +13 -5
  51. data/lib/maruku/version.rb +1 -1
  52. data/lib/sort_prof.rb +22 -0
  53. data/tests/diagrams/diagrams.md +54 -0
  54. data/tests/math/syntax.md +46 -0
  55. data/tests/math_usage/document.md +13 -0
  56. data/tests/unittest/attributes/attributes.md +50 -6
  57. data/tests/unittest/easy.md +1 -1
  58. data/tests/unittest/email.md +3 -3
  59. data/tests/unittest/entities.md +12 -7
  60. data/tests/unittest/escaping.md +4 -4
  61. data/tests/unittest/extra_table1.md +3 -1
  62. data/tests/unittest/footnotes.md +5 -5
  63. data/tests/unittest/headers.md +3 -3
  64. data/tests/unittest/images.md +7 -7
  65. data/tests/unittest/inline_html.md +51 -5
  66. data/tests/unittest/links.md +7 -7
  67. data/tests/unittest/list2.md +1 -1
  68. data/tests/unittest/lists.md +1 -1
  69. data/tests/unittest/lists_after_paragraph.md +1 -1
  70. data/tests/unittest/lists_ol.md +1 -1
  71. data/tests/unittest/math/equations.md +82 -0
  72. data/tests/unittest/math/inline.md +80 -0
  73. data/tests/unittest/math/table.md +51 -0
  74. data/tests/unittest/math/table2.md +67 -0
  75. data/tests/unittest/misc_sw.md +24 -24
  76. data/tests/unittest/notyet/ticks.md +1 -1
  77. data/tests/unittest/references/long_example.md +2 -2
  78. data/tests/unittest/smartypants.md +4 -4
  79. data/tests/unittest/xml.md +68 -0
  80. data/tests/unittest/xml2.md +36 -0
  81. data/tests/unittest/xml3.md +52 -0
  82. data/tests/unittest/xml_instruction.md +5 -5
  83. metadata +33 -4
  84. data/docs/a.html +0 -6
  85. data/docs/char.html +0 -1924
data/bin/maruku CHANGED
@@ -4,8 +4,12 @@ require 'maruku'
4
4
  require 'optparse'
5
5
 
6
6
  export = :html
7
+ break_on_error = false
8
+ using_math = false
9
+ using_mathml = false
10
+ output_file = nil
7
11
 
8
- OptionParser.new do |opts|
12
+ opt = OptionParser.new do |opts|
9
13
  opts.banner = "Usage: maruku [options] [file1.md [file2.md ..."
10
14
 
11
15
  opts.on("-v", "--[no-]verbose", "Run verbosely") do |v|
@@ -13,10 +17,29 @@ OptionParser.new do |opts|
13
17
  opts.on("-u", "--[no-]unsafe", "Use unsafe features") do |v|
14
18
  MaRuKu::Globals[:unsafe_features] = v end
15
19
 
16
-
20
+ opts.on("-b", "Break on error") do |v|
21
+ break_on_error = true end
22
+
23
+
24
+ opts.on("-i", "--math-images ENGINE", "Uses ENGINE to render TeX to PNG.") do |s|
25
+ using_math = true
26
+ MaRuKu::Globals[:html_png_engine] = s
27
+ $stderr.puts "Using png engine #{s}."
28
+ end
29
+
30
+ opts.on("-m", "--math-engine ENGINE", "Uses ENGINE to render MathML") do |s|
31
+ using_math = true
32
+ using_mathml = true
33
+ MaRuKu::Globals[:html_math_engine] = s
34
+ end
35
+
36
+ opts.on("-o", "--output FILE", "Output filename") do |s|
37
+ output_file = s
38
+ end
17
39
 
18
- opts.on_tail("--pdf", "Write PDF" ) do export = :pdf end
40
+ opts.on_tail("--pdf", "Write PDF","First writes LaTeX, then calls pdflatex." ) do export = :pdf end
19
41
  opts.on_tail("--html", "Write HTML") do export = :html end
42
+ opts.on_tail("--html-frag", "Write the contents of the BODY.") do export = :html_frag end
20
43
  opts.on_tail("--tex", "Write LaTeX" ) do export = :tex end
21
44
  opts.on_tail("--inspect", "Shows the parsing result" ) do export = :inspect end
22
45
 
@@ -30,7 +53,20 @@ OptionParser.new do |opts|
30
53
  exit
31
54
  end
32
55
 
33
- end.parse!
56
+ end
57
+
58
+ begin
59
+ opt.parse!
60
+ rescue OptionParser::InvalidOption=>e
61
+ $stderr.puts e
62
+ $stderr.puts opt
63
+ exit
64
+ end
65
+
66
+ if using_math
67
+ $stderr.puts "Using Math extensions."
68
+ require 'maruku/ext/math'
69
+ end
34
70
 
35
71
  #p ARGV
36
72
  #p MaRuKu::Globals
@@ -54,38 +90,48 @@ end
54
90
  inputs.each do |f, input|
55
91
 
56
92
  # create Maruku
57
- doc = Maruku.new(input, {:on_error=>:warning})
93
+ params = {}
94
+ params[:on_error] = break_on_error ? :raise : :warning
58
95
 
59
- out=""; prefix = "?"
96
+ t = Time.now
97
+ doc = Maruku.new(input, params)
98
+ $stderr.puts "Parsing in %.2f seconds." % (Time.now-t)
99
+
100
+ out=""; suffix = "?"
101
+ t = Time.now
60
102
  case export
61
103
  when :html
62
- prefix='html'
104
+ suffix = using_mathml ? 'xhtml' : 'html'
63
105
  out = doc.to_html_document( {:indent => -1})
64
106
  when :html_frag
65
- prefix='html_frag'
107
+ suffix='html_frag'
66
108
  out = doc.to_html( {:indent => -1})
67
109
  when :pdf, :tex
68
- prefix='tex'
110
+ suffix='tex'
69
111
  out = doc.to_latex_document
70
112
  when :tex_frag
71
- prefix='html_frag'
113
+ suffix='html_frag'
72
114
  out = doc.to_latex
73
115
  when :inspect
74
- prefix='.txt'
116
+ suffix='.txt'
75
117
  out = doc.inspect
76
118
  when :markdown
77
- prefix='pretty_md'
119
+ suffix='pretty_md'
78
120
  out = doc.to_markdown
79
121
  end
122
+ $stderr.puts "Rendering in %.2f seconds." % (Time.now-t)
80
123
 
81
124
  # write to file or stdout
82
125
  if f
83
- dir = File.dirname(f)
84
- job = File.join(dir, File.basename(f, File.extname(f)))
85
- filename = job + "." + prefix
86
-
87
- $stderr.puts "Writing to #{filename}"
88
- File.open(filename,'w') do |f| f.puts out end
126
+
127
+ if not output_file
128
+ dir = File.dirname(f)
129
+ job = File.join(dir, File.basename(f, File.extname(f)))
130
+ output_file = job + "." + suffix
131
+ end
132
+
133
+ $stderr.puts "Writing to #{output_file}"
134
+ File.open(output_file,'w') do |f| f.puts out end
89
135
 
90
136
  if export == :pdf
91
137
  cmd = "pdflatex '#{job}' -interaction=nonstopmode "+
@@ -95,7 +141,7 @@ inputs.each do |f, input|
95
141
  system cmd
96
142
  end
97
143
  else # write to stdout
98
- $stdout.write out
144
+ $stdout.puts out
99
145
  end
100
146
  end
101
-
147
+
@@ -50,6 +50,11 @@ def run_test(filename, its_ok, verbose=true)
50
50
  # split the input in sections
51
51
 
52
52
  stuff = input.split(SPLIT)
53
+ if stuff.size == 1
54
+ stuff[2] = stuff[0]
55
+ stuff[0] = "Write a comment here"
56
+ stuff[1] = "{} # params "
57
+ end
53
58
 
54
59
  comment = stuff.shift
55
60
  params_s = stuff.shift
@@ -87,7 +92,7 @@ def run_test(filename, its_ok, verbose=true)
87
92
  end
88
93
 
89
94
  File.open(output_html, 'w') do |f|
90
- f.write actual[:to_html]
95
+ f.write doc.to_html_document
91
96
  end
92
97
 
93
98
  begin
@@ -149,7 +154,7 @@ def run_test(filename, its_ok, verbose=true)
149
154
 
150
155
  f.write comment
151
156
  f.write "\n*** Parameters: ***\n"
152
- f.write params.inspect
157
+ f.write params_s
153
158
  f.write "\n*** Markdown input: ***\n"
154
159
  f.write markdown
155
160
 
@@ -312,6 +317,11 @@ def marutest
312
317
  end
313
318
 
314
319
 
320
+ if ARGV.empty?
321
+ puts "marutest is a tool for running Maruku's unittest."
322
+ exit
323
+ end
324
+
315
325
  marutest
316
326
 
317
327
 
@@ -1,8 +1,185 @@
1
- <?xml version='1.0' encoding='utf-8'?>
2
- <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
3
- 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
4
- <html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'><head><meta content='text/html; charset=utf-8' http-equiv='Content-type' /><title></title></head><body>
5
- <h4 id='changes_in_041_aka_typographer'>Changes in 0.4.1 aka &ldquo;Typographer&rdquo;</h4>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC
3
+ "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
4
+ "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
5
+ <html xmlns:svg='http://www.w3.org/2000/svg' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
6
+ <head><meta content='application/xhtml+xml;charset=utf-8' http-equiv='Content-type' /><title></title><link href='style.css' rel='stylesheet' type='text/css' />
7
+ </head>
8
+ <body>
9
+ <h4 id='last'>Changes in the development version and <strong>experimental</strong> features</h4>
10
+ <!-- This is the [math syntax specification][math]. -->
11
+ <ul>
12
+ <li>
13
+ <p><em>Jan. 22</em> With very minimal changes, Maruku now works in JRuby. It is very slow, though.</p>
14
+
15
+ <p>Some benchmarks:</p>
16
+
17
+ <ul>
18
+ <li>
19
+ <p>G4 1.5GhZ, Ruby 1.8.5:</p>
20
+ <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></li>
22
+
23
+ <li>
24
+ <p>G4 1.5GhZ, JRuby 1.9.2:</p>
25
+ <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></li>
27
+ </ul>
28
+ </li>
29
+
30
+ <li>
31
+ <p><em>Jan. 21</em> Integration of Blahtex. PNG export of formula and alignment works ok in Mozilla, Safari, Camino, Opera. IE7 is acting strangely.</p>
32
+ </li>
33
+
34
+ <li>
35
+ <p>Support for LaTeX-style formula input, and export to MathML.</p>
36
+
37
+ <p><a href='http://golem.ph.utexas.edu/~distler'>Jacques Distler</a> is integrating Maruku into Instiki (a Ruby On Rails-based wiki software), as to have a Ruby wiki with proper math support. You know, these physicists like all those funny symbols.</p>
38
+
39
+ <ul>
40
+ <li>
41
+ <p>To have the MathML export, it is needed to install one of:</p>
42
+
43
+ <ul>
44
+ <li><span>RiTeX</span> (<code>gem install ritex</code>)</li>
45
+
46
+ <li><a href='http://golem.ph.utexas.edu/~distler/blog/itex2MML.html'>itex2MML</a> supports much more complex formulas than Ritex.</li>
47
+
48
+ <li>PNG for old browser is not here yet. The plan is to use BlahTeX.</li>
49
+ </ul>
50
+ </li>
51
+ </ul>
52
+ </li>
53
+
54
+ <li>
55
+ <p>Command line options for the <code>maruku</code> command:</p>
56
+ <pre><code>Usage: maruku [options] [file1.md [file2.md ...
57
+ -v, --[no-]verbose Run verbosely
58
+ -u, --[no-]unsafe Use unsafe features
59
+ -b Break on error
60
+ -m, --math-engine ENGINE Uses ENGINE to render MathML
61
+ --pdf Write PDF
62
+ --html Write HTML
63
+ --tex Write LaTeX
64
+ --inspect Shows the parsing result
65
+ --version Show version
66
+ -h, --help Show this message</code></pre></li>
67
+
68
+ <li>
69
+ <p>Other things:</p>
70
+
71
+ <ul>
72
+ <li>
73
+ <p>Created the embryo of an extension system. Please don&#8217;t use it yet, as probably the API is bound to change.</p>
74
+ </li>
75
+
76
+ <li>
77
+ <p>There are a couple of hidden features&#8230;</p>
78
+ </li>
79
+ </ul>
80
+ </li>
81
+ </ul>
82
+
83
+ <h4 id='stable'>Changes in 0.5.0</h4>
84
+
85
+ <ul>
86
+ <li>
87
+ <p>Syntax changes:</p>
88
+
89
+ <ul>
90
+ <li>
91
+ <p>Compatibility with newest Markdown.pl: <code>[text]</code> as a synonim of <code>[text][]</code>.</p>
92
+ </li>
93
+
94
+ <li>
95
+ <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>
96
+ <pre><code>Head | Head |
97
+ ---------------+-------+--
98
+ {:r} Hello + ...
99
+
100
+ {:r: scope=&#39;row&#39;}
101
+ </code></pre>
102
+ <p>The first cell will have the <code>scope</code> attribute set to <code>row</code>.</p>
103
+ </li>
104
+ </ul>
105
+ </li>
106
+
107
+ <li>
108
+ <p>New settings:</p>
109
+
110
+ <ul>
111
+ <li>Disable the Maruku signature by setting <code>maruku signature: false</code></li>
112
+ </ul>
113
+ </li>
114
+
115
+ <li>
116
+ <p>Stricter doctype. By the way &#8211; did I mention it? &#8211; <strong>Maruku HTML has always been proper validating XHTML strict</strong> (if a page does not validate, please report it as a bug).</p>
117
+
118
+ <p>Of course, this only matters when using <code>maruku</code> as a standalone program.</p>
119
+
120
+ <ul>
121
+ <li>I have updated the XHTML DTD used to support MathML: currently using XHTML+MathML+SVG.</li>
122
+
123
+ <li>Content-type set to <code>application/xhtml+xml</code></li>
124
+
125
+ <li>All entities are written as numeric entities.</li>
126
+ </ul>
127
+ </li>
128
+
129
+ <li>
130
+ <p>Bug fixes</p>
131
+
132
+ <ul>
133
+ <li>Many fixes in the code handling the sanitizing of inline HTML.</li>
134
+
135
+ <li><code>markdown=1</code> did not propagate to children.</li>
136
+
137
+ <li>LaTeX: An exception was raised if an unknown entity was used.</li>
138
+ </ul>
139
+ </li>
140
+ </ul>
141
+
142
+ <h4 id='changes_in_042'>Changes in 0.4.2</h4>
143
+
144
+ <ul>
145
+ <li>
146
+ <p>Adapted syntax to the <a href='http://maruku.rubyforge.org/proposal.html'>new meta-data proposal</a>.</p>
147
+ </li>
148
+
149
+ <li>
150
+ <p>Changes in LaTeX export:</p>
151
+
152
+ <ul>
153
+ <li>
154
+ <p>Links to external URLs are blue by default.</p>
155
+ </li>
156
+
157
+ <li>
158
+ <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>
159
+ <pre><code>Title: my document
160
+ LaTeX CJK: true
161
+ LaTeX preamble: preamble.tex
162
+
163
+ Content</code></pre></li>
164
+ </ul>
165
+ </li>
166
+
167
+ <li>
168
+ <p>Bug fixes</p>
169
+
170
+ <ul>
171
+ <li>
172
+ <p>Images were not given <code>id</code> or <code>class</code> attributes.</p>
173
+ </li>
174
+
175
+ <li>
176
+ <p>Fixed bug in LaTeX export with handling of <code>&lt;</code>,<code>&gt;</code> enclosed URLs: <code>&lt;google.com&gt;</code>.</p>
177
+ </li>
178
+ </ul>
179
+ </li>
180
+ </ul>
181
+
182
+ <h4 id='changes_in_041_aka_typographer'>Changes in 0.4.1 aka &#8220;Typographer&#8221;</h4>
6
183
 
7
184
  <ul>
8
185
  <li>
@@ -10,7 +187,7 @@
10
187
  <pre><code>&#39;Twas a &quot;test&quot; to &#39;remember&#39; -- in the &#39;90s
11
188
  --- while I was &lt;&lt;ok&gt;&gt;. She was 6\&quot;12\&#39;.</code></pre>
12
189
  <blockquote>
13
- <p>&lsquo;Twas a &ldquo;test&rdquo; to &lsquo;remember&rsquo; &ndash; in the &rsquo;90s &mdash; while I was &laquo;ok&raquo;. She was 6&quot;12&#39;.</p>
190
+ <p>&#8216;Twas a &#8220;test&#8221; to &#8216;remember&#8217; &#8211; in the &#8217;90s &#8212; while I was &#171;ok&#187;. She was 6&#34;12&#39;.</p>
14
191
  </blockquote>
15
192
 
16
193
  <p>I adapted the code from RubyPants.</p>
@@ -30,7 +207,7 @@
30
207
  \usepackage[cjkjis]{ucs}
31
208
  \usepackage[utf8x]{inputenc}
32
209
  </code></pre>
33
- <p>Nevertheless, I could only get bitmap fonts working &ndash; probably it&rsquo;s a problem with my setup.</p>
210
+ <p>Nevertheless, I could only get bitmap fonts working &#8211; probably it&#8217;s a problem with my setup.</p>
34
211
 
35
212
  <p>A quick test: 日本、中国、ひらがな、カタカナ。</p>
36
213
  </li>
@@ -59,7 +236,7 @@
59
236
 
60
237
  <li>Created <a href='http://maruku.rubyforge.org/rdoc/'>the RDOC documentation</a>.</li>
61
238
 
62
- <li>The <code>add_whitespace</code> method took too much time &ndash; it was O(n^2).</li>
239
+ <li>The <code>add_whitespace</code> method took too much time &#8211; it was O(n^2).</li>
63
240
 
64
241
  <li>Added unit-tests for block-level elements.</li>
65
242
  </ul>
@@ -121,11 +298,11 @@ Maruku (to_latex): parsing 0.49 sec + rendering 0.25 sec = 0.73 sec</code></pr
121
298
  <p>(日本のガルは 大好き、でも、日本語は難しですから、そうぞ 英語話すガルを おしえてください).</p>
122
299
  </blockquote>
123
300
 
124
- <p>In the LaTeX version, these do not appear. I know how to do LaTeX with ISO-8859-1 encoding (European characters), but I&rsquo;m struggling with half-baked solutions for UTF-8 encoded documents.</p>
301
+ <p>In the LaTeX version, these do not appear. I know how to do LaTeX with ISO-8859-1 encoding (European characters), but I&#8217;m struggling with half-baked solutions for UTF-8 encoded documents.</p>
125
302
  </li>
126
303
 
127
304
  <li>
128
- <p>Implement the <span>new meta-data proposal</span>.</p>
305
+ <p>Implement the <a href='http://maruku.rubyforge.org/proposal.html'>new meta-data proposal</a>.</p>
129
306
  </li>
130
307
 
131
308
  <li>
@@ -144,16 +321,4 @@ Maruku (to_latex): parsing 0.49 sec + rendering 0.25 sec = 0.73 sec</code></pr
144
321
  <p>Support for images in PDF.</p>
145
322
  </li>
146
323
  </ul>
147
-
148
- <h4 id='changes_in_0213'>Changes in 0.2.13</h4>
149
-
150
- <ul>
151
- <li>better handling of inline HTML code.</li>
152
-
153
- <li>Handle HTML comments.</li>
154
-
155
- <li>Sanitizes HR and IMG tags if you don&rsquo;t close them.</li>
156
-
157
- <li>documentation included in HTML format</li>
158
- </ul>
159
- <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 interpreter for Ruby'>Maruku</a> at 20:19 on Thursday, January 11st, 2007.</span></div></body></html>
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 14:12 on Tuesday, January 23rd, 2007.</span></div></body></html>
@@ -1,3 +1,126 @@
1
+ CSS: style.css
2
+ LaTeX CJK: true
3
+
4
+ #### Changes in the development version and **experimental** features #### {#last}
5
+
6
+ [Jacques Distler]: http://golem.ph.utexas.edu/~distler
7
+ [itex2MML]: http://golem.ph.utexas.edu/~distler/blog/itex2MML.html
8
+ [math]: http://rubyforge.maruku.org/math.html
9
+ <!-- This is the [math syntax specification][math]. -->
10
+
11
+ * *Jan. 22* With very minimal changes, Maruku now works in JRuby.
12
+ It is very slow, though.
13
+
14
+ Some benchmarks:
15
+
16
+ * G4 1.5GhZ, Ruby 1.8.5:
17
+
18
+ Maruku (to_html): parsing 0.65 sec + rendering 0.40 sec = 1.04 sec
19
+ Maruku (to_latex): parsing 0.70 sec + rendering 0.21 sec = 0.91 sec
20
+
21
+ * G4 1.5GhZ, JRuby 1.9.2:
22
+
23
+ Maruku (to_html): parsing 4.77 sec + rendering 2.24 sec = 7.01 sec
24
+ Maruku (to_latex): parsing 4.04 sec + rendering 1.12 sec = 5.16 sec
25
+
26
+ * *Jan. 21* Integration of Blahtex. PNG export of formula and alignment works
27
+ ok in Mozilla, Safari, Camino, Opera. IE7 is acting strangely.
28
+
29
+ * Support for LaTeX-style formula input, and export to MathML.
30
+
31
+ [Jacques Distler] is integrating Maruku into Instiki (a Ruby On Rails-based wiki software), as to have a Ruby wiki with proper math support. You know, these physicists like all those funny symbols.
32
+
33
+ * To have the MathML export, it is needed to install one of:
34
+
35
+ * [RiTeX] (`gem install ritex`)
36
+ * [itex2MML] supports much more complex formulas than Ritex.
37
+ * PNG for old browser is not here yet. The plan is to use
38
+ BlahTeX.
39
+
40
+
41
+ * Command line options for the `maruku` command:
42
+
43
+ Usage: maruku [options] [file1.md [file2.md ...
44
+ -v, --[no-]verbose Run verbosely
45
+ -u, --[no-]unsafe Use unsafe features
46
+ -b Break on error
47
+ -m, --math-engine ENGINE Uses ENGINE to render MathML
48
+ --pdf Write PDF
49
+ --html Write HTML
50
+ --tex Write LaTeX
51
+ --inspect Shows the parsing result
52
+ --version Show version
53
+ -h, --help Show this message
54
+
55
+ * Other things:
56
+
57
+ * Created the embryo of an extension system. Please don't use it
58
+ yet, as probably the API is bound to change.
59
+
60
+ * There are a couple of hidden features...
61
+
62
+ #### Changes in 0.5.0 #### {#stable}
63
+
64
+ * Syntax changes:
65
+
66
+ * Compatibility with newest Markdown.pl: `[text]` as a synonim of `[text][]`.
67
+
68
+ * Meta data: the first IAL in a span environment now refers to the parent.
69
+ This makes it possible to set attributes for cells:
70
+
71
+ Head | Head |
72
+ ---------------+-------+--
73
+ {:r} Hello + ...
74
+
75
+ {:r: scope='row'}
76
+
77
+ The first cell will have the `scope` attribute set to `row`.
78
+
79
+ * New settings:
80
+
81
+ * Disable the Maruku signature by setting `maruku signature: false`
82
+
83
+ * Stricter doctype. By the way -- did I mention it? --
84
+ **Maruku HTML has always been proper validating XHTML strict**
85
+ (if a page does not validate, please report it as a bug).
86
+
87
+ Of course, this only matters when using `maruku` as a standalone
88
+ program.
89
+
90
+ * I have updated the XHTML DTD used to support MathML:
91
+ currently using XHTML+MathML+SVG.
92
+ * Content-type set to `application/xhtml+xml`
93
+ * All entities are written as numeric entities.
94
+
95
+ * Bug fixes
96
+
97
+ * Many fixes in the code handling the sanitizing of inline HTML.
98
+ * `markdown=1` did not propagate to children.
99
+ * LaTeX: An exception was raised if an unknown entity was used.
100
+
101
+ #### Changes in 0.4.2 ####
102
+
103
+ * Adapted syntax to the [new meta-data proposal][proposal].
104
+
105
+ * Changes in LaTeX export:
106
+
107
+ * Links to external URLs are blue by default.
108
+
109
+ * New attributes: `latex_preamble` to add a custom preamble,
110
+ and `latex_cjk` to add packages for UTF-8 Japanese characters.
111
+ (**support for this is still shaky**). Example:
112
+
113
+ Title: my document
114
+ LaTeX CJK: true
115
+ LaTeX preamble: preamble.tex
116
+
117
+ Content
118
+
119
+ * Bug fixes
120
+
121
+ + Images were not given `id` or `class` attributes.
122
+
123
+ + Fixed bug in LaTeX export with handling of `<`,`>` enclosed URLs: `<google.com>`.
1
124
 
2
125
  #### Changes in 0.4.1 aka "Typographer" ####
3
126
 
@@ -105,9 +228,9 @@ Immediate TODO-list:
105
228
 
106
229
  * Support for images in PDF.
107
230
 
108
- #### Changes in 0.2.13 ####
109
231
 
110
- - better handling of inline HTML code.
111
- - Handle HTML comments.
112
- - Sanitizes HR and IMG tags if you don't close them.
113
- - documentation included in HTML format
232
+ [proposal]: http://maruku.rubyforge.org/proposal.html
233
+ [contact]: http://www.dis.uniroma1.it/~acensi/contact.html
234
+ [markdown-discuss]: http://six.pairlist.net/mailman/listinfo/markdown-discuss
235
+ [tracker]: http://rubyforge.org/tracker/?group_id=2795
236
+