maruku 0.4.2.1 → 0.5.0
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 +66 -20
- data/bin/marutest +12 -2
- data/docs/changelog.html +188 -23
- data/docs/changelog.md +128 -5
- data/docs/entity_test.html +245 -240
- data/docs/entity_test.md +2 -0
- data/docs/exd.html +181 -23
- data/docs/index.html +130 -349
- data/docs/markdown_syntax.html +55 -51
- data/docs/maruku.html +130 -349
- data/docs/maruku.md +154 -339
- data/docs/math.md +143 -0
- data/docs/proposal.html +16 -12
- data/lib/maruku.rb +6 -3
- data/lib/maruku/attributes.rb +7 -2
- data/lib/maruku/defaults.rb +27 -27
- data/lib/maruku/errors_management.rb +10 -9
- data/lib/maruku/ext/diagrams/diagrams.rb +8 -0
- data/lib/maruku/ext/diagrams/grid.rb +78 -0
- data/lib/maruku/ext/diagrams/inspect.rb +11 -0
- data/lib/maruku/ext/diagrams/layout.rb +105 -0
- data/lib/maruku/ext/diagrams/parser.rb +219 -0
- data/lib/maruku/ext/diagrams/structures.rb +168 -0
- data/lib/maruku/ext/diagrams/to_html.rb +37 -0
- data/lib/maruku/ext/diagrams/to_latex.rb +308 -0
- data/lib/maruku/ext/diagrams/unittest.rb +123 -0
- data/lib/maruku/ext/math.rb +11 -0
- data/lib/maruku/ext/math/elements.rb +26 -0
- data/lib/maruku/ext/math/mathml_engines/blahtex.rb +108 -0
- data/lib/maruku/ext/math/mathml_engines/itex2mml.rb +29 -0
- data/lib/maruku/ext/math/mathml_engines/none.rb +20 -0
- data/lib/maruku/ext/math/mathml_engines/ritex.rb +24 -0
- data/lib/maruku/ext/math/parsing.rb +82 -0
- data/lib/maruku/ext/math/to_html.rb +178 -0
- data/lib/maruku/ext/math/to_latex.rb +21 -0
- data/lib/maruku/helpers.rb +11 -0
- data/lib/maruku/input/charsource.rb +1 -1
- data/lib/maruku/input/extensions.rb +68 -0
- data/lib/maruku/input/html_helper.rb +91 -60
- data/lib/maruku/input/parse_block.rb +10 -9
- data/lib/maruku/input/parse_doc.rb +21 -13
- data/lib/maruku/input/parse_span_better.rb +19 -8
- data/lib/maruku/input/type_detection.rb +5 -3
- data/lib/maruku/output/to_html.rb +236 -67
- data/lib/maruku/output/to_latex.rb +69 -26
- data/lib/maruku/output/to_latex_entities.rb +14 -2
- data/lib/maruku/output/to_s.rb +8 -0
- data/lib/maruku/structures.rb +1 -1
- data/lib/maruku/tests/benchmark.rb +2 -2
- data/lib/maruku/tests/new_parser.rb +13 -5
- data/lib/maruku/version.rb +1 -1
- data/lib/sort_prof.rb +22 -0
- data/tests/diagrams/diagrams.md +54 -0
- data/tests/math/syntax.md +46 -0
- data/tests/math_usage/document.md +13 -0
- data/tests/unittest/attributes/attributes.md +50 -6
- data/tests/unittest/easy.md +1 -1
- data/tests/unittest/email.md +3 -3
- data/tests/unittest/entities.md +12 -7
- data/tests/unittest/escaping.md +4 -4
- data/tests/unittest/extra_table1.md +3 -1
- data/tests/unittest/footnotes.md +5 -5
- data/tests/unittest/headers.md +3 -3
- data/tests/unittest/images.md +7 -7
- data/tests/unittest/inline_html.md +51 -5
- data/tests/unittest/links.md +7 -7
- data/tests/unittest/list2.md +1 -1
- data/tests/unittest/lists.md +1 -1
- data/tests/unittest/lists_after_paragraph.md +1 -1
- data/tests/unittest/lists_ol.md +1 -1
- data/tests/unittest/math/equations.md +82 -0
- data/tests/unittest/math/inline.md +80 -0
- data/tests/unittest/math/table.md +51 -0
- data/tests/unittest/math/table2.md +67 -0
- data/tests/unittest/misc_sw.md +24 -24
- data/tests/unittest/notyet/ticks.md +1 -1
- data/tests/unittest/references/long_example.md +2 -2
- data/tests/unittest/smartypants.md +4 -4
- data/tests/unittest/xml.md +68 -0
- data/tests/unittest/xml2.md +36 -0
- data/tests/unittest/xml3.md +52 -0
- data/tests/unittest/xml_instruction.md +5 -5
- metadata +33 -4
- data/docs/a.html +0 -6
- 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
|
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
|
-
|
93
|
+
params = {}
|
94
|
+
params[:on_error] = break_on_error ? :raise : :warning
|
58
95
|
|
59
|
-
|
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
|
-
|
104
|
+
suffix = using_mathml ? 'xhtml' : 'html'
|
63
105
|
out = doc.to_html_document( {:indent => -1})
|
64
106
|
when :html_frag
|
65
|
-
|
107
|
+
suffix='html_frag'
|
66
108
|
out = doc.to_html( {:indent => -1})
|
67
109
|
when :pdf, :tex
|
68
|
-
|
110
|
+
suffix='tex'
|
69
111
|
out = doc.to_latex_document
|
70
112
|
when :tex_frag
|
71
|
-
|
113
|
+
suffix='html_frag'
|
72
114
|
out = doc.to_latex
|
73
115
|
when :inspect
|
74
|
-
|
116
|
+
suffix='.txt'
|
75
117
|
out = doc.inspect
|
76
118
|
when :markdown
|
77
|
-
|
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
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
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.
|
144
|
+
$stdout.puts out
|
99
145
|
end
|
100
146
|
end
|
101
|
-
|
147
|
+
|
data/bin/marutest
CHANGED
@@ -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
|
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
|
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
|
|
data/docs/changelog.html
CHANGED
@@ -1,8 +1,185 @@
|
|
1
|
-
<?xml version=
|
2
|
-
<!DOCTYPE html PUBLIC
|
3
|
-
|
4
|
-
|
5
|
-
<
|
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’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…</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='row'}
|
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 – did I mention it? – <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><</code>,<code>></code> enclosed URLs: <code><google.com></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 “Typographer”</h4>
|
6
183
|
|
7
184
|
<ul>
|
8
185
|
<li>
|
@@ -10,7 +187,7 @@
|
|
10
187
|
<pre><code>'Twas a "test" to 'remember' -- in the '90s
|
11
188
|
--- while I was <<ok>>. She was 6\"12\'.</code></pre>
|
12
189
|
<blockquote>
|
13
|
-
<p
|
190
|
+
<p>‘Twas a “test” to ‘remember’ – in the ’90s — while I was «ok». She was 6"12'.</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
|
210
|
+
<p>Nevertheless, I could only get bitmap fonts working – probably it’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
|
239
|
+
<li>The <code>add_whitespace</code> method took too much time – 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
|
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’m struggling with half-baked solutions for UTF-8 encoded documents.</p>
|
125
302
|
</li>
|
126
303
|
|
127
304
|
<li>
|
128
|
-
<p>Implement the <
|
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’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>
|
data/docs/changelog.md
CHANGED
@@ -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
|
-
|
111
|
-
|
112
|
-
-
|
113
|
-
|
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
|
+
|