maruku 0.6.1 → 0.7.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (263) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/MIT-LICENSE.txt +20 -0
  5. data/bin/maruku +153 -152
  6. data/bin/marutex +2 -29
  7. data/data/entities.xml +261 -0
  8. data/docs/math.md +14 -18
  9. data/lib/maruku.rb +65 -77
  10. data/lib/maruku/attributes.rb +109 -214
  11. data/lib/maruku/defaults.rb +45 -67
  12. data/lib/maruku/document.rb +43 -0
  13. data/lib/maruku/element.rb +112 -0
  14. data/lib/maruku/errors.rb +71 -0
  15. data/lib/maruku/ext/div.rb +105 -113
  16. data/lib/maruku/ext/fenced_code.rb +97 -0
  17. data/lib/maruku/ext/math.rb +22 -26
  18. data/lib/maruku/ext/math/elements.rb +20 -26
  19. data/lib/maruku/ext/math/mathml_engines/blahtex.rb +92 -104
  20. data/lib/maruku/ext/math/mathml_engines/itex2mml.rb +33 -26
  21. data/lib/maruku/ext/math/mathml_engines/none.rb +11 -19
  22. data/lib/maruku/ext/math/mathml_engines/ritex.rb +2 -4
  23. data/lib/maruku/ext/math/parsing.rb +107 -113
  24. data/lib/maruku/ext/math/to_html.rb +184 -187
  25. data/lib/maruku/ext/math/to_latex.rb +30 -21
  26. data/lib/maruku/helpers.rb +158 -257
  27. data/lib/maruku/html.rb +254 -0
  28. data/lib/maruku/input/charsource.rb +272 -319
  29. data/lib/maruku/input/extensions.rb +62 -63
  30. data/lib/maruku/input/html_helper.rb +220 -189
  31. data/lib/maruku/input/linesource.rb +90 -110
  32. data/lib/maruku/input/mdline.rb +129 -0
  33. data/lib/maruku/input/parse_block.rb +618 -612
  34. data/lib/maruku/input/parse_doc.rb +145 -215
  35. data/lib/maruku/input/parse_span.rb +658 -0
  36. data/lib/maruku/input/rubypants.rb +200 -128
  37. data/lib/maruku/inspect_element.rb +60 -0
  38. data/lib/maruku/maruku.rb +10 -31
  39. data/lib/maruku/output/entity_table.rb +33 -0
  40. data/lib/maruku/output/s5/fancy.rb +462 -462
  41. data/lib/maruku/output/s5/to_s5.rb +115 -135
  42. data/lib/maruku/output/to_html.rb +898 -983
  43. data/lib/maruku/output/to_latex.rb +561 -560
  44. data/lib/maruku/output/to_markdown.rb +207 -162
  45. data/lib/maruku/output/to_s.rb +11 -52
  46. data/lib/maruku/string_utils.rb +129 -179
  47. data/lib/maruku/toc.rb +185 -196
  48. data/lib/maruku/version.rb +33 -38
  49. data/spec/block_docs/abbrev.md +776 -0
  50. data/{tests/unittest → spec/block_docs}/abbreviations.md +11 -20
  51. data/{tests/unittest → spec/block_docs}/alt.md +2 -14
  52. data/{tests/unittest/pending → spec/block_docs}/amps.md +1 -13
  53. data/{tests/unittest → spec/block_docs}/attributes/att2.md +0 -12
  54. data/{tests/unittest → spec/block_docs}/attributes/att3.md +2 -14
  55. data/{tests/unittest → spec/block_docs}/attributes/attributes.md +12 -16
  56. data/{tests/unittest → spec/block_docs}/attributes/circular.md +0 -12
  57. data/{tests/unittest → spec/block_docs}/attributes/default.md +1 -13
  58. data/{tests/unittest → spec/block_docs}/blank.md +0 -12
  59. data/{tests/unittest → spec/block_docs}/blanks_in_code.md +16 -15
  60. data/{tests/unittest/loss.md → spec/block_docs/bug_def.md} +6 -18
  61. data/{tests/unittest → spec/block_docs}/bug_table.md +3 -15
  62. data/{tests/unittest → spec/block_docs}/code.md +7 -14
  63. data/{tests/unittest → spec/block_docs}/code2.md +4 -14
  64. data/{tests/unittest → spec/block_docs}/code3.md +12 -16
  65. data/{tests/unittest → spec/block_docs}/data_loss.md +2 -14
  66. data/{tests/unittest → spec/block_docs}/divs/div1.md +0 -12
  67. data/{tests/unittest → spec/block_docs}/divs/div2.md +0 -12
  68. data/{tests/unittest → spec/block_docs}/divs/div3_nest.md +3 -15
  69. data/{tests/unittest → spec/block_docs}/easy.md +1 -13
  70. data/spec/block_docs/email.md +29 -0
  71. data/{tests/unittest/pending → spec/block_docs}/empty_cells.md +3 -15
  72. data/{tests/unittest → spec/block_docs}/encoding/iso-8859-1.md +1 -14
  73. data/{tests/unittest → spec/block_docs}/encoding/utf-8.md +0 -12
  74. data/{tests/unittest → spec/block_docs}/entities.md +27 -29
  75. data/{tests/unittest/notyet → spec/block_docs}/escape.md +2 -14
  76. data/{tests/unittest → spec/block_docs}/escaping.md +11 -22
  77. data/{tests/unittest → spec/block_docs}/extra_dl.md +2 -13
  78. data/{tests/unittest → spec/block_docs}/extra_header_id.md +14 -20
  79. data/{tests/unittest → spec/block_docs}/extra_table1.md +3 -15
  80. data/spec/block_docs/fenced_code_blocks.md +66 -0
  81. data/spec/block_docs/fenced_code_blocks_highlighted.md +18 -0
  82. data/{tests/unittest → spec/block_docs}/footnotes.md +12 -24
  83. data/spec/block_docs/footnotes2.md +78 -0
  84. data/spec/block_docs/hard.md +25 -0
  85. data/spec/block_docs/header_after_par.md +62 -0
  86. data/{tests/unittest → spec/block_docs}/headers.md +10 -18
  87. data/{tests/unittest → spec/block_docs}/hex_entities.md +7 -18
  88. data/{tests/unittest → spec/block_docs}/hrule.md +5 -12
  89. data/{tests/unittest → spec/block_docs}/html3.md +1 -13
  90. data/{tests/unittest → spec/block_docs}/html4.md +2 -14
  91. data/{tests/unittest → spec/block_docs}/html5.md +2 -14
  92. data/spec/block_docs/html_block_in_para.md +22 -0
  93. data/spec/block_docs/html_inline.md +25 -0
  94. data/spec/block_docs/html_trailing.md +31 -0
  95. data/spec/block_docs/ie.md +62 -0
  96. data/spec/block_docs/iframe.md +29 -0
  97. data/{tests/unittest → spec/block_docs}/images.md +22 -28
  98. data/{tests/unittest → spec/block_docs}/images2.md +7 -17
  99. data/{tests/unittest → spec/block_docs}/inline_html.md +37 -67
  100. data/{tests/unittest → spec/block_docs}/inline_html2.md +1 -13
  101. data/spec/block_docs/inline_html_beginning.md +10 -0
  102. data/spec/block_docs/issue20.md +9 -0
  103. data/spec/block_docs/issue26.md +22 -0
  104. data/spec/block_docs/issue29.md +9 -0
  105. data/spec/block_docs/issue30.md +30 -0
  106. data/spec/block_docs/issue31.md +25 -0
  107. data/spec/block_docs/issue40.md +40 -0
  108. data/spec/block_docs/issue64.md +55 -0
  109. data/spec/block_docs/issue67.md +19 -0
  110. data/spec/block_docs/issue70.md +11 -0
  111. data/spec/block_docs/issue72.md +17 -0
  112. data/spec/block_docs/issue74.md +38 -0
  113. data/spec/block_docs/issue79.md +15 -0
  114. data/spec/block_docs/issue83.md +13 -0
  115. data/spec/block_docs/issue85.md +25 -0
  116. data/spec/block_docs/issue88.md +19 -0
  117. data/spec/block_docs/issue89.md +12 -0
  118. data/spec/block_docs/issue90.md +38 -0
  119. data/{tests/unittest/pending → spec/block_docs}/link.md +21 -18
  120. data/{tests/unittest → spec/block_docs}/links.md +33 -32
  121. data/spec/block_docs/links2.md +21 -0
  122. data/{tests/unittest → spec/block_docs}/list1.md +0 -12
  123. data/{tests/unittest → spec/block_docs}/list12.md +2 -14
  124. data/{tests/unittest → spec/block_docs}/list2.md +2 -14
  125. data/spec/block_docs/list_multipara.md +42 -0
  126. data/{tests/unittest → spec/block_docs}/lists.md +28 -29
  127. data/{tests/unittest → spec/block_docs}/lists10.md +2 -14
  128. data/spec/block_docs/lists11.md +23 -0
  129. data/spec/block_docs/lists12.md +43 -0
  130. data/spec/block_docs/lists13.md +55 -0
  131. data/spec/block_docs/lists14.md +61 -0
  132. data/spec/block_docs/lists15.md +36 -0
  133. data/spec/block_docs/lists6.md +88 -0
  134. data/spec/block_docs/lists7b.md +58 -0
  135. data/spec/block_docs/lists9.md +53 -0
  136. data/{tests/unittest → spec/block_docs}/lists_after_paragraph.md +19 -25
  137. data/spec/block_docs/lists_blank.md +35 -0
  138. data/{tests/unittest/list3.md → spec/block_docs/lists_blockquote_code.md} +2 -14
  139. data/{tests/unittest/list4.md → spec/block_docs/lists_need_blank_line.md} +50 -21
  140. data/spec/block_docs/lists_nested.md +44 -0
  141. data/spec/block_docs/lists_nested_blankline.md +28 -0
  142. data/spec/block_docs/lists_nested_deep.md +43 -0
  143. data/{tests/unittest → spec/block_docs}/lists_ol.md +37 -54
  144. data/spec/block_docs/lists_paraindent.md +47 -0
  145. data/spec/block_docs/lists_tab.md +54 -0
  146. data/spec/block_docs/loss.md +17 -0
  147. data/spec/block_docs/math-blahtex/equations.md +30 -0
  148. data/spec/block_docs/math-blahtex/inline.md +48 -0
  149. data/spec/block_docs/math-blahtex/math2.md +45 -0
  150. data/spec/block_docs/math-blahtex/table.md +25 -0
  151. data/spec/block_docs/math/embedded_invalid_svg.md +79 -0
  152. data/spec/block_docs/math/embedded_svg.md +97 -0
  153. data/spec/block_docs/math/equations.md +44 -0
  154. data/{tests/unittest → spec/block_docs}/math/inline.md +7 -19
  155. data/spec/block_docs/math/math2.md +45 -0
  156. data/{tests/unittest → spec/block_docs}/math/notmath.md +0 -12
  157. data/spec/block_docs/math/raw_mathml.md +87 -0
  158. data/spec/block_docs/math/table.md +25 -0
  159. data/{tests/unittest → spec/block_docs}/math/table2.md +5 -17
  160. data/{tests/unittest → spec/block_docs}/misc_sw.md +181 -118
  161. data/{tests/unittest → spec/block_docs}/olist.md +6 -18
  162. data/{tests/unittest → spec/block_docs}/one.md +0 -12
  163. data/{tests/unittest → spec/block_docs}/paragraph.md +0 -12
  164. data/{tests/unittest → spec/block_docs}/paragraph_rules/dont_merge_ref.md +4 -12
  165. data/{tests/unittest → spec/block_docs}/paragraph_rules/tab_is_blank.md +0 -12
  166. data/{tests/unittest → spec/block_docs}/paragraphs.md +1 -13
  167. data/{tests/unittest → spec/block_docs}/recover/recover_links.md +4 -16
  168. data/{tests/unittest/pending/ref.md → spec/block_docs/ref_with_period.md} +7 -16
  169. data/spec/block_docs/ref_with_title.md +22 -0
  170. data/{tests/unittest → spec/block_docs}/references/long_example.md +16 -23
  171. data/{tests/unittest → spec/block_docs}/references/spaces_and_numbers.md +0 -12
  172. data/{tests/unittest → spec/block_docs}/smartypants.md +24 -31
  173. data/{tests/unittest → spec/block_docs}/syntax_hl.md +13 -17
  174. data/{tests/unittest → spec/block_docs}/table_attributes.md +2 -14
  175. data/spec/block_docs/tables.md +58 -0
  176. data/{tests/unittest → spec/block_docs}/test.md +1 -13
  177. data/{tests/unittest/notyet → spec/block_docs}/ticks.md +1 -13
  178. data/spec/block_docs/toc.md +87 -0
  179. data/{tests/unittest/notyet → spec/block_docs}/triggering.md +14 -25
  180. data/{tests/unittest → spec/block_docs}/underscore_in_words.md +0 -12
  181. data/{tests/unittest → spec/block_docs}/wrapping.md +4 -16
  182. data/spec/block_docs/xml.md +33 -0
  183. data/{tests/unittest → spec/block_docs}/xml2.md +0 -12
  184. data/spec/block_docs/xml3.md +24 -0
  185. data/{tests/unittest → spec/block_docs}/xml_instruction.md +9 -20
  186. data/spec/block_spec.rb +110 -0
  187. data/spec/cli_spec.rb +8 -0
  188. data/spec/span_spec.rb +256 -0
  189. data/spec/spec_helper.rb +2 -0
  190. data/spec/to_html_utf8_spec.rb +13 -0
  191. metadata +205 -243
  192. metadata.gz.sig +3 -0
  193. data/Rakefile +0 -48
  194. data/bin/marudown +0 -29
  195. data/bin/marutest +0 -345
  196. data/docs/changelog.md +0 -334
  197. data/lib/maruku/errors_management.rb +0 -92
  198. data/lib/maruku/ext/math/latex_fix.rb +0 -12
  199. data/lib/maruku/input/parse_span_better.rb +0 -746
  200. data/lib/maruku/input/type_detection.rb +0 -147
  201. data/lib/maruku/output/to_latex_entities.rb +0 -367
  202. data/lib/maruku/output/to_latex_strings.rb +0 -64
  203. data/lib/maruku/structures.rb +0 -167
  204. data/lib/maruku/structures_inspect.rb +0 -87
  205. data/lib/maruku/structures_iterators.rb +0 -61
  206. data/lib/maruku/tests/benchmark.rb +0 -82
  207. data/lib/maruku/tests/new_parser.rb +0 -373
  208. data/lib/maruku/tests/tests.rb +0 -136
  209. data/lib/maruku/usage/example1.rb +0 -33
  210. data/tests/bugs/code_in_links.md +0 -101
  211. data/tests/bugs/complex_escaping.md +0 -38
  212. data/tests/math/syntax.md +0 -46
  213. data/tests/math_usage/document.md +0 -13
  214. data/tests/others/abbreviations.md +0 -11
  215. data/tests/others/blank.md +0 -4
  216. data/tests/others/code.md +0 -5
  217. data/tests/others/code2.md +0 -8
  218. data/tests/others/code3.md +0 -16
  219. data/tests/others/email.md +0 -4
  220. data/tests/others/entities.md +0 -19
  221. data/tests/others/escaping.md +0 -16
  222. data/tests/others/extra_dl.md +0 -101
  223. data/tests/others/extra_header_id.md +0 -13
  224. data/tests/others/extra_table1.md +0 -40
  225. data/tests/others/footnotes.md +0 -17
  226. data/tests/others/headers.md +0 -10
  227. data/tests/others/hrule.md +0 -10
  228. data/tests/others/images.md +0 -20
  229. data/tests/others/inline_html.md +0 -42
  230. data/tests/others/links.md +0 -38
  231. data/tests/others/list1.md +0 -4
  232. data/tests/others/list2.md +0 -5
  233. data/tests/others/list3.md +0 -8
  234. data/tests/others/lists.md +0 -32
  235. data/tests/others/lists_after_paragraph.md +0 -44
  236. data/tests/others/lists_ol.md +0 -39
  237. data/tests/others/misc_sw.md +0 -105
  238. data/tests/others/one.md +0 -1
  239. data/tests/others/paragraphs.md +0 -13
  240. data/tests/others/sss06.md +0 -352
  241. data/tests/others/test.md +0 -4
  242. data/tests/s5/s5profiling.md +0 -48
  243. data/tests/unittest/bug_def.md +0 -28
  244. data/tests/unittest/email.md +0 -32
  245. data/tests/unittest/html2.md +0 -34
  246. data/tests/unittest/ie.md +0 -61
  247. data/tests/unittest/links2.md +0 -34
  248. data/tests/unittest/lists11.md +0 -28
  249. data/tests/unittest/lists6.md +0 -53
  250. data/tests/unittest/lists9.md +0 -76
  251. data/tests/unittest/math/equations.md +0 -86
  252. data/tests/unittest/math/math2.md +0 -57
  253. data/tests/unittest/math/table.md +0 -37
  254. data/tests/unittest/notyet/header_after_par.md +0 -70
  255. data/tests/unittest/red_tests/abbrev.md +0 -1388
  256. data/tests/unittest/red_tests/lists7.md +0 -68
  257. data/tests/unittest/red_tests/lists7b.md +0 -128
  258. data/tests/unittest/red_tests/lists8.md +0 -76
  259. data/tests/unittest/red_tests/xml.md +0 -70
  260. data/tests/unittest/xml3.md +0 -38
  261. data/tests/utf8-files/simple.md +0 -1
  262. data/unit_test_block.sh +0 -5
  263. data/unit_test_span.sh +0 -3
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 69805284ca3b020f9b1dff4680f6ebf38cbbcd7c
4
+ data.tar.gz: 14dc0bd07d4e031246b6ff4219dd4ccb62f1a3af
5
+ SHA512:
6
+ metadata.gz: 0a4a5f800ea24f4c687f07dba356871f4ba7bdd830f046ab789f67a9d17b10e29bbda8de68a0e9dc52c78f9012d638c37fa377e5da081d0b7d80cf7e3d9db9f5
7
+ data.tar.gz: ba9bccdda762cf555d320b26e89c6b3cf234d340c5265d4b60dd37192c58f582723bbb79ebb8df77fac7bd8a6a037305bb6eb19f6f941d700140c2581024ad47
Binary file
Binary file
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2006 Andrea Censi
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/bin/maruku CHANGED
@@ -1,13 +1,22 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ dir = File.join(File.dirname(__FILE__), '..', 'lib')
4
+ $LOAD_PATH.unshift dir unless $LOAD_PATH.include?(dir)
5
+
3
6
  require 'maruku'
4
7
  require 'optparse'
5
8
 
6
9
 
7
10
  def cli_puts(s)
8
- $stderr.puts(s) if MaRuKu::Globals[:verbose]
11
+ $stderr.puts(s) if MaRuKu::Globals[:verbose]
9
12
  end
10
13
 
14
+ def benchmark(section)
15
+ t = Time.now
16
+ res = yield
17
+ cli_puts("%s finished in %.2f seconds." % [section, Time.now - t])
18
+ res
19
+ end
11
20
 
12
21
  export = :html
13
22
  break_on_error = false
@@ -16,166 +25,158 @@ using_mathml = false
16
25
  output_file = nil
17
26
 
18
27
  opt = OptionParser.new do |opts|
19
- opts.banner = "Usage: maruku [options] [file1.md [file2.md ..."
20
-
21
- opts.on("-v", "--[no-]verbose", "Run verbosely") do |v|
22
- MaRuKu::Globals[:verbose] = v end
23
- opts.on("-u", "--[no-]unsafe", "Use unsafe features") do |v|
24
- MaRuKu::Globals[:unsafe_features] = v end
25
-
26
- opts.on("-b", "Break on error") do |v|
27
- break_on_error = true end
28
-
29
-
30
- opts.on("-i", "--math-images ENGINE", "Uses ENGINE to render TeX to PNG.") do |s|
31
- using_math = true
32
- MaRuKu::Globals[:html_math_output_png] = true
33
- MaRuKu::Globals[:html_math_output_mathml] = false
34
- MaRuKu::Globals[:html_png_engine] = s
35
- cli_puts "Using png engine #{s}."
36
- end
37
-
38
- opts.on("-m", "--math-engine ENGINE", "Uses ENGINE to render MathML") do |s|
39
- MaRuKu::Globals[:html_math_output_png] = false
40
- MaRuKu::Globals[:html_math_output_mathml] = true
41
- using_math = true
42
- using_mathml = true
43
- MaRuKu::Globals[:html_math_engine] = s
44
- end
45
-
46
- opts.on("-o", "--output FILE", "Output filename") do |s|
47
- output_file = s
48
- end
49
-
50
- opts.on_tail("--pdf", "Write PDF","First writes LaTeX, then calls pdflatex." ) do export = :pdf end
51
- opts.on_tail("--s5", "Write S5 slideshow") do export = :s5 end
52
- opts.on_tail("--html", "Write HTML") do export = :html end
53
- opts.on_tail("--html-frag", "Write the contents of the BODY.") do export = :html_frag end
54
- opts.on_tail("--tex", "Write LaTeX" ) do export = :tex end
55
- opts.on_tail("--inspect", "Shows the parsing result" ) do export = :inspect end
56
-
57
- opts.on_tail("--version", "Show version") do
58
- puts "Maruku #{MaRuKu::Version}"; exit
59
- end
60
-
61
- opts.on_tail("--ext EXTENSIONS", "Use maruku extensions (comma separated)" ) do |s|
62
- s.split(",").each do |e| require "maruku/ext/#{e}"; end
63
- end
64
-
65
- opts.on_tail("-h", "--help", "Show this message") do
66
- puts opts
67
- exit
68
- end
69
-
28
+ opts.banner = "Usage: #{File.basename($0)} [options] [file1.md] [file2.md] ..."
29
+
30
+ opts.on("-v", "--[no-]verbose", "Run verbosely") do |v|
31
+ MaRuKu::Globals[:verbose] = v
32
+ end
33
+
34
+ opts.on("-u", "--[no-]unsafe", "Use unsafe features") do |v|
35
+ MaRuKu::Globals[:unsafe_features] = v
36
+ end
37
+
38
+ opts.on("-b", "--[no-]break", "Break on error") do |v|
39
+ break_on_error = v
40
+ end
41
+
42
+
43
+ opts.on("-i", "--math-images ENGINE", "Use ENGINE to render TeX to PNG") do |s|
44
+ using_math = true
45
+ MaRuKu::Globals[:html_math_output_png] = true
46
+ MaRuKu::Globals[:html_math_output_mathml] = false
47
+ MaRuKu::Globals[:html_png_engine] = s
48
+ cli_puts "Using png engine #{s}."
49
+ end
50
+
51
+ opts.on("-m", "--math-engine ENGINE", "Use ENGINE to render MathML") do |s|
52
+ MaRuKu::Globals[:html_math_output_png] = false
53
+ MaRuKu::Globals[:html_math_output_mathml] = true
54
+ using_math = true
55
+ using_mathml = true
56
+ MaRuKu::Globals[:html_math_engine] = s
57
+ end
58
+
59
+ opts.on("-o", "--output FILE", "Output filename (`-o -' writes to stdout)") {|s| output_file = s}
60
+
61
+ opts.on_tail("--pdf", "Output PDF;", "first writes LaTeX, then calls pdflatex") {export = :pdf}
62
+ opts.on_tail("--s5", "Output S5 slideshow") {export = :s5}
63
+ opts.on_tail("--html", "Output HTML") {export = :html}
64
+ opts.on_tail("--html-frag", "Output the contents of the <body> tag") {export = :html_frag}
65
+ opts.on_tail("--tex", "Output LaTeX" ) {export = :tex}
66
+ opts.on_tail("--markdown", "Output Markdown" ) {export = :markdown}
67
+ opts.on_tail("--inspect", "Output the parse tree") {export = :inspect}
68
+
69
+ opts.on_tail("--ext EXTENSIONS", "Use Maruku extensions (comma separated)") do |s|
70
+ s.split(",").each {|e| require "maruku/ext/#{e}"}
71
+ end
72
+
73
+ opts.on_tail("-h", "--help", "Show this help message") do
74
+ puts opts
75
+ exit
76
+ end
77
+
78
+ opts.on_tail("--version", "Show version") do
79
+ puts "Maruku #{MaRuKu::Version}"
80
+ exit
81
+ end
70
82
  end
71
83
 
72
- begin
73
- opt.parse!
74
- rescue OptionParser::InvalidOption=>e
75
- $stderr.puts e
76
- $stderr.puts opt
77
- exit
84
+ begin
85
+ opt.parse!
86
+ rescue OptionParser::InvalidOption => e
87
+ $stderr.puts e
88
+ $stderr.puts opt
89
+ exit 1
78
90
  end
79
91
 
80
92
 
81
93
  if using_math
82
- cli_puts "Using Math extensions."
83
- require 'maruku/ext/math'
94
+ cli_puts "Using Math extensions."
95
+ require 'maruku/ext/math'
84
96
  end
85
97
 
86
- #p ARGV
87
- #p MaRuKu::Globals
88
98
 
99
+ unless ARGV.empty?
100
+ if ARGV.size > 1 && output_file
101
+ $stderr.puts "Can't write #{ARGV.map {|f| f.inspect}.join(' and ')} to #{output_file.inspect}"
102
+ exit 1
103
+ end
89
104
 
90
- inputs =
91
- # If we are given filenames, convert each file
92
- if not ARGV.empty?
93
- ARGV.map do |f|
94
- # read file content
95
- cli_puts "Reading from file #{f.inspect}."
96
- [f, File.open(f,'r').read]
97
- end
105
+ # If we are given filenames, convert each file
106
+ ARGV.map do |f|
107
+ # read file content
108
+ cli_puts "Reading from file #{f.inspect}."
109
+ [f, File.read(f)]
110
+ end
98
111
  else
99
- export = :html_frag if export == :html
100
- export = :tex_frag if export == :tex
101
-
102
- cli_puts "Reading from standard input."
103
- [[nil, $stdin.read]]
112
+ export = :html_frag if export == :html
113
+ export = :tex_frag if export == :tex
114
+
115
+ cli_puts "Reading from standard input."
116
+ [[nil, $stdin.read]]
117
+ end.each do |filename, input|
118
+ doc = benchmark("Parsing") {Maruku.new(input, :on_error => (break_on_error ? :raise : :warning))}
119
+
120
+ out = ""
121
+ suffix = "?"
122
+ benchmark("Rendering") do
123
+ case export
124
+ when :html
125
+ suffix = using_mathml ? '.xhtml' : '.html'
126
+ out = doc.to_html_document
127
+ when :html_frag
128
+ suffix = '.html_frag'
129
+ out = doc.to_html
130
+ when :pdf, :tex
131
+ suffix = '.tex'
132
+ out = doc.to_latex_document
133
+ when :tex_frag
134
+ suffix = '.tex_frag'
135
+ out = doc.to_latex
136
+ when :inspect
137
+ suffix = '.txt'
138
+ out = doc.inspect
139
+ when :markdown
140
+ suffix = '.md'
141
+ out = doc.to_md
142
+ when :s5
143
+ suffix = '_s5slides.html'
144
+ out = doc.to_s5(:content_only => false, :print_slides => true)
145
+ end
146
+ end
147
+
148
+ if (output_file.nil? && filename.nil?) || output_file == "-"
149
+ if export == :pdf
150
+ $stderr.puts "Can't write PDF to stdout"
151
+ exit 1
152
+ end
153
+
154
+ cli_puts "Writing to standard output"
155
+ $stdout.puts out
156
+ next
157
+ end
158
+
159
+ if output_file
160
+ job = File.basename(output_file, File.extname(output_file))
161
+ else
162
+ dir = File.dirname(filename)
163
+ job = File.join(dir, File.basename(filename, File.extname(filename)))
164
+ output_file = job + suffix
165
+ end
166
+
167
+ if export == :pdf
168
+ cli_puts "Writing to #{job}.tex"
169
+ File.open("#{job}.tex", 'w') {|f| f.puts out}
170
+ cmd = ["pdflatex", "#{job}.tex", "-interaction=nonstopmode"]
171
+ cmd << "-output-directory=#{dir}" if dir
172
+ cli_puts "maruku: executing $ #{cmd.join(' ')}"
173
+
174
+ # run twice for cross references
175
+ system *cmd
176
+ system *cmd
177
+ next
178
+ end
179
+
180
+ cli_puts "Writing to #{output_file.inspect}"
181
+ File.open(output_file, 'w') {|f| f.puts out}
104
182
  end
105
-
106
- inputs.each do |f, input|
107
-
108
- # create Maruku
109
- params = {}
110
- params[:on_error] = break_on_error ? :raise : :warning
111
-
112
- t = Time.now
113
- doc = Maruku.new(input, params)
114
-
115
- cli_puts ("Parsing in %.2f seconds." % (Time.now-t))
116
-
117
- out=""; suffix = "?"
118
- t = Time.now
119
- case export
120
- when :html
121
- suffix = using_mathml ? '.xhtml' : '.html'
122
- out = doc.to_html_document( {:indent => -1})
123
- when :html_frag
124
- suffix='.html_frag'
125
- out = doc.to_html( {:indent => -1})
126
- when :pdf, :tex
127
- suffix='.tex'
128
- out = doc.to_latex_document
129
- when :tex_frag
130
- suffix='.tex_frag'
131
- out = doc.to_latex
132
- when :inspect
133
- suffix='.txt'
134
- out = doc.inspect
135
- when :markdown
136
- suffix='.pretty_md'
137
- out = doc.to_markdown
138
- when :s5
139
- suffix='_s5slides.html'
140
- out = doc.to_s5({:content_only => false})
141
- end
142
-
143
- cli_puts("Rendering in %.2f seconds." % (Time.now-t))
144
-
145
- # write to file or stdout
146
- if f
147
-
148
- if not output_file
149
- dir = File.dirname(f)
150
- job = File.join(dir, File.basename(f, File.extname(f)))
151
- output_file = job + suffix
152
- else
153
- job = File.basename(output_file, File.extname(output_file))
154
- end
155
-
156
- if output_file == "-"
157
- cli_puts "Writing to standard output"
158
- $stdout.puts out
159
- else
160
-
161
- if not (export == :pdf)
162
- cli_puts "Writing to #{output_file}"
163
- File.open(output_file,'w') do |f| f.puts out end
164
- else
165
- cli_puts "Writing to #{job}.tex"
166
- File.open("#{job}.tex",'w') do |f| f.puts out end
167
- cmd = "pdflatex '#{job}.tex' -interaction=nonstopmode "+
168
- "'-output-directory=#{dir}' "
169
- cli_puts "maruku: executing $ #{cmd}"
170
- # run twice for cross references
171
- system cmd
172
- system cmd
173
- end
174
-
175
- end
176
- else # write to stdout
177
- cli_puts "Writing to standard output"
178
- $stdout.puts out
179
- end
180
- end
181
-
@@ -1,31 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require 'maruku'
4
-
5
- if File.basename($0) =~ /^marutex/
6
- # Convert each file
7
- ARGV.each do |f|
8
- puts "Opening #{f}"
9
-
10
- # read file content
11
- input = File.open(f,'r').read
12
-
13
- # create Maruku
14
- doc = Maruku.new(input)
15
- # convert to a complete html document
16
- latex = doc.to_latex_document
17
-
18
- # write to file
19
- dir = File.dirname(f)
20
- job = File.join(dir, File.basename(f, File.extname(f)))
21
- filename = job + ".tex"
22
-
23
- File.open(filename,'w') do |f| f.puts latex end
24
-
25
- # run twice for cross references
26
- system "pdflatex '#{job}' '-output-directory=#{dir}' "
27
- system "pdflatex '#{job}' '-output-directory=#{dir}' "
28
-
29
- # system "open #{job}.pdf"
30
- end
31
- end
3
+ ARGV.unshift "--pdf"
4
+ load File.join(File.dirname(__FILE__), "maruku")
@@ -0,0 +1,261 @@
1
+ <!-- A conversion chart for html elements, courtesy of text2html -->
2
+ <chars>
3
+ <char num='913' name='Alpha' convertTo='$A$' />
4
+ <char num='914' name='Beta' convertTo='$B$' />
5
+ <char num='915' name='Gamma' convertTo='$\Gamma$' />
6
+ <char num='916' name='Delta' convertTo='$\Delta$' />
7
+ <char num='917' name='Epsilon' convertTo='$E$' />
8
+ <char num='918' name='Zeta' convertTo='$Z$' />
9
+ <char num='919' name='Eta' convertTo='$H$' />
10
+ <char num='920' name='Theta' convertTo='$\Theta$' />
11
+ <char num='921' name='Iota' convertTo='$I$' />
12
+ <char num='922' name='Kappa' convertTo='$K$' />
13
+ <char num='923' name='Lambda' convertTo='$\Lambda$' />
14
+ <char num='924' name='Mu' convertTo='$M$' />
15
+ <char num='925' name='Nu' convertTo='$N$' />
16
+ <char num='926' name='Xi' convertTo='$\Xi$' />
17
+ <char num='927' name='Omicron' convertTo='$O$' />
18
+ <char num='928' name='Pi' convertTo='$\Pi$' />
19
+ <char num='929' name='Rho' convertTo='$P$' />
20
+ <char num='931' name='Sigma' convertTo='$\Sigma$' />
21
+ <char num='932' name='Tau' convertTo='$T$' />
22
+ <char num='933' name='Upsilon' convertTo='$Y$' />
23
+ <char num='934' name='Phi' convertTo='$\Phi$' />
24
+ <char num='935' name='Chi' convertTo='$X$' />
25
+ <char num='936' name='Psi' convertTo='$\Psi$' />
26
+ <char num='937' name='Omega' convertTo='$\Omega$' />
27
+ <char num='945' name='alpha' convertTo='$\alpha$' />
28
+ <char num='946' name='beta' convertTo='$\beta$' />
29
+ <char num='947' name='gamma' convertTo='$\gamma$' />
30
+ <char num='948' name='delta' convertTo='$\delta$' />
31
+ <char num='949' name='epsilon' convertTo='$\epsilon$' />
32
+ <char num='950' name='zeta' convertTo='$\zeta$' />
33
+ <char num='951' name='eta' convertTo='$\eta$' />
34
+ <char num='952' name='theta' convertTo='$\theta$' />
35
+ <char num='953' name='iota' convertTo='$\iota$' />
36
+ <char num='954' name='kappa' convertTo='$\kappa$' />
37
+ <char num='955' name='lambda' convertTo='$\lambda$' />
38
+ <char num='956' name='mu' convertTo='$\mu$' />
39
+
40
+ <char num='957' name='nu' convertTo='$\nu$' />
41
+ <char num='958' name='xi' convertTo='$\xi$' />
42
+ <char num='959' name='omicron' convertTo='$o$' />
43
+ <char num='960' name='pi' convertTo='$\pi$' />
44
+ <char num='961' name='rho' convertTo='$\rho$' />
45
+ <char num='963' name='sigma' convertTo='$\sigma$' />
46
+ <char num='964' name='tau' convertTo='$\tau$' />
47
+ <char num='965' name='upsilon' convertTo='$\upsilon$' />
48
+ <char num='966' name='phi' convertTo='$\phi$' />
49
+
50
+ <char num='967' name='chi' convertTo='$\chi$' />
51
+ <char num='968' name='psi' convertTo='$\psi$' />
52
+ <char num='969' name='omega' convertTo='$\omega$' />
53
+ <char num='962' name='sigmaf' convertTo='$\varsigma$' />
54
+ <char num='977' name='thetasym' convertTo='$\vartheta$' />
55
+ <char num='982' name='piv' convertTo='$\varpi$' />
56
+ <char num='8230' name='hellip' convertTo='\ldots' />
57
+ <char num='8242' name='prime' convertTo='$\prime$' />
58
+ <char num='8254' name='oline' convertTo='-' />
59
+
60
+ <char num='8260' name='frasl' convertTo='/' />
61
+ <char num='8472' name='weierp' convertTo='$\wp$' />
62
+ <char num='8465' name='image' convertTo='$\Im$' />
63
+ <char num='8476' name='real' convertTo='$\Re$' />
64
+ <char num='8501' name='alefsym' convertTo='$\aleph$' />
65
+ <char num='8226' name='bull' convertTo='$\bullet$' />
66
+ <char num='8482' name='trade' convertTo='$^{\rm TM}$' /> <!-- exttrademark -->
67
+ <char num='8592' name='larr' convertTo='$\leftarrow$' />
68
+
69
+ <char num='8594' name='rarr' convertTo='$\rightarrow$' />
70
+ <char num='8593' name='uarr' convertTo='$\uparrow$' />
71
+ <char num='8595' name='darr' convertTo='$\downarrow$' />
72
+ <char num='8596' name='harr' convertTo='$\leftrightarrow$' />
73
+ <char num='8629' name='crarr' convertTo='$\hookleftarrow$' />
74
+ <char num='8657' name='uArr' convertTo='$\Uparrow$' />
75
+ <char num='8659' name='dArr' convertTo='$\Downarrow$' />
76
+ <char num='8656' name='lArr' convertTo='$\Leftarrow$' />
77
+ <char num='8658' name='rArr' convertTo='$\Rightarrow$' />
78
+
79
+ <char num='8660' name='hArr' convertTo='$\Leftrightarrow$' />
80
+ <char num='8704' name='forall' convertTo='$\forall$' />
81
+ <char num='8706' name='part' convertTo='$\partial$' />
82
+ <char num='8707' name='exist' convertTo='$\exists$' />
83
+ <char num='8709' name='empty' convertTo='$\emptyset$' />
84
+ <char num='8711' name='nabla' convertTo='$\nabla$' />
85
+ <char num='8712' name='isin' convertTo='$\in$' />
86
+ <char num='8715' name='ni' convertTo='$\ni$' />
87
+ <char num='8713' name='notin' convertTo='$\notin$' />
88
+
89
+ <char num='8721' name='sum' convertTo='$\sum$' />
90
+ <char num='8719' name='prod' convertTo='$\prod$' />
91
+ <char num='8722' name='minus' convertTo='$-$' />
92
+ <char num='8727' name='lowast' convertTo='$\ast$' />
93
+ <char num='8730' name='radic' convertTo='$\surd$' />
94
+ <char num='8733' name='prop' convertTo='$\propto$' />
95
+ <char num='8734' name='infin' convertTo='$\infty$' />
96
+ <char num='8736' name='ang' convertTo='$\angle$' />
97
+ <char num='8743' name='and' convertTo='$\wedge$' />
98
+
99
+ <char num='8744' name='or' convertTo='$\vee$' />
100
+ <char num='8745' name='cup' convertTo='$\cup$' />
101
+ <char num='8746' name='cap' convertTo='$\cap$' />
102
+ <char num='8747' name='int' convertTo='$\int$' />
103
+ <char num='8756' name='there4' convertTo='$\therefore$' package='amssymb' /> <!-- only AMS -->
104
+ <char num='8764' name='sim' convertTo='$\sim$' />
105
+ <char num='8776' name='asymp' convertTo='$\approx$' />
106
+ <char num='8773' name='cong' convertTo='$\cong$' />
107
+
108
+ <char num='8800' name='ne' convertTo='$\neq$' />
109
+ <char num='8801' name='equiv' convertTo='$\equiv$' />
110
+ <char num='8804' name='le' convertTo='$\leq$' />
111
+ <char num='8805' name='ge' convertTo='$\geq$' />
112
+ <char num='8834' name='sub' convertTo='$\subset$' />
113
+ <char num='8835' name='sup' convertTo='$\supset$' />
114
+ <!-- <char num='8838' name='sube' convertTo='$\subseteq$' />-->
115
+ <char num='8839' name='supe' convertTo='$\supseteq$' />
116
+ <!-- <char num='8836' name='nsub' convertTo='$\nsubset$' /> only AMS -->
117
+
118
+ <char num='8853' name='oplus' convertTo='$\oplus$' />
119
+ <char num='8855' name='otimes' convertTo='$\otimes$' />
120
+ <char num='8869' name='perp' convertTo='$\perp$' />
121
+ <char num='8901' name='sdot' convertTo='$\cdot$' />
122
+ <char num='8968' name='rceil' convertTo='$\rceil$' />
123
+ <char num='8969' name='lceil' convertTo='$\lceil$' />
124
+ <char num='8970' name='lfloor' convertTo='$\lfloor$' />
125
+ <char num='8971' name='rfloor' convertTo='$\rfloor$' />
126
+ <char num='9001' name='rang' convertTo='$\rangle$' />
127
+
128
+ <char num='9002' name='lang' convertTo='$\langle$' />
129
+ <char num='9674' name='loz' convertTo='$\lozenge$' package='amssymb' /> <!-- only AMS -->
130
+ <char num='9824' name='spades' convertTo='$\spadesuit$' />
131
+ <char num='9827' name='clubs' convertTo='$\clubsuit$' />
132
+ <char num='9829' name='hearts' convertTo='$\heartsuit$' />
133
+ <char num='9830' name='diams' convertTo='$\diamondsuit$' />
134
+ <char num='38' name='amp' convertTo='\&amp;' />
135
+ <!-- <char num='34' name='quot' convertTo='\&quot;' /> XXX -->
136
+ <char num='34' name='quot' convertTo='&quot;' />
137
+ <char num='39' name='apos' convertTo="'" />
138
+ <char num='169' name='copy' convertTo='\copyright' />
139
+
140
+ <char num='60' name='lt' convertTo='$&lt;$' />
141
+ <char num='62' name='gt' convertTo='$&gt;$' />
142
+ <char num='338' name='OElig' convertTo='\OE' />
143
+ <char num='339' name='oelig' convertTo='\oe' />
144
+ <char num='352' name='Scaron' convertTo='\v{S}' />
145
+ <char num='353' name='scaron' convertTo='\v{s}' />
146
+ <char num='376' name='Yuml' convertTo='\"Y' />
147
+ <char num='710' name='circ' convertTo='\textasciicircum' />
148
+ <char num='732' name='tilde' convertTo='\textasciitilde' />
149
+
150
+ <char num='8211' name='ndash' convertTo='--' />
151
+ <char num='8212' name='mdash' convertTo='---' />
152
+ <char num='8216' name='lsquo' convertTo='`' />
153
+ <char num='8217' name='rsquo' convertTo="'" /> <!-- XXXX -->
154
+ <char num='8220' name='ldquo' convertTo='``' />
155
+ <char num='8221' name='rdquo' convertTo="''" /> <!-- XXXX -->
156
+ <char num='8224' name='dagger' convertTo='\dag' />
157
+ <char num='8225' name='Dagger' convertTo='\ddag' />
158
+ <char num='8240' name='permil' convertTo='\permil' package='wasysym' /> <!-- wasysym package -->
159
+
160
+ <char num='8364' name='euro' convertTo='\euro' package='eurosym' /> <!-- eurosym package -->
161
+ <char num='8249' name='lsaquo' convertTo='\guilsinglleft' package='aeguill'/>
162
+ <char num='8250' name='rsaquo' convertTo='\guilsinglright' package='aeguill' />
163
+ <!-- <char num='160' name='nbsp' convertTo='\nolinebreak' />-->
164
+ <char num='160' name='nbsp' convertTo='~' />
165
+ <char num='161' name='iexcl' convertTo='\textexclamdown' />
166
+ <char num='163' name='pound' convertTo='\pounds' />
167
+ <char num='164' name='curren' convertTo='\currency' package='wasysym' /> <!-- wasysym package -->
168
+ <char num='165' name='yen' convertTo='\textyen' package='textcomp'/> <!-- textcomp -->
169
+
170
+ <char num='166' name='brvbar' convertTo='\brokenvert' /> <!-- wasysym -->
171
+ <char num='167' name='sect' convertTo='\S' />
172
+ <char num='171' name='laquo' convertTo='\guillemotleft' package='aeguill'/>
173
+ <char num='187' name='raquo' convertTo='\guillemotright' package='aeguill'/>
174
+ <char num='174' name='reg' convertTo='\textregistered' />
175
+ <char num='170' name='ordf' convertTo='\textordfeminine' />
176
+ <char num='172' name='not' convertTo='$\neg$' />
177
+ <!-- <char num='176' name='deg' convertTo='$\degree$' /> mathabx -->
178
+ <char num='176' name='deg' convertTo='\textdegree' package='textcomp'/>
179
+
180
+ <char num='177' name='plusmn' convertTo='$\pm$' />
181
+ <char num='180' name='acute' convertTo='&apos;' />
182
+ <char num='181' name='micro' convertTo='$\mu$' />
183
+ <char num='182' name='para' convertTo='\P' />
184
+ <char num='183' name='middot' convertTo='$\cdot$' />
185
+ <char num='186' name='ordm' convertTo='\textordmasculine' />
186
+ <char num='162' name='cent' convertTo='\cent' package='wasysym' />
187
+ <char num='185' name='sup1' convertTo='$^1$' />
188
+
189
+ <char num='178' name='sup2' convertTo='$^2$' />
190
+ <char num='179' name='sup3' convertTo='$^3$' />
191
+ <char num='189' name='frac12' convertTo='$\frac{1}{2}$' />
192
+ <char num='188' name='frac14' convertTo='$\frac{1}{4}$' />
193
+ <char num='190' name='frac34' convertTo='$\frac{3}{4}$' />
194
+ <char num='192' name='Agrave' convertTo='\`A' />
195
+ <char num='193' name='Aacute' convertTo='\&apos;A' />
196
+ <char num='194' name='Acirc' convertTo='\^A' />
197
+ <char num='195' name='Atilde' convertTo='\~A' />
198
+
199
+ <char num='196' name='Auml' convertTo='\&quot;A' />
200
+ <char num='197' name='Aring' convertTo='\AA' />
201
+ <char num='198' name='AElig' convertTo='\AE' />
202
+ <char num='199' name='Ccedil' convertTo='\c{C}' />
203
+ <char num='200' name='Egrave' convertTo='\`E' />
204
+ <char num='201' name='Eacute' convertTo='\&apos;E' />
205
+ <char num='202' name='Ecirc' convertTo='\^E' />
206
+ <char num='203' name='Euml' convertTo='\&quot;E' />
207
+ <char num='204' name='Igrave' convertTo='\`I' />
208
+ <char num='205' name='Iacute' convertTo='\&apos;I' />
209
+ <char num='206' name='Icirc' convertTo='\^I' />
210
+ <char num='207' name='Iuml' convertTo='\"I' />
211
+ <char num='208' name='ETH' convertTo='$\eth$' /> <!-- AMS -->
212
+ <char num='209' name='Ntilde' convertTo='\~N' />
213
+ <char num='210' name='Ograve' convertTo='\`O' />
214
+ <char num='211' name='Oacute' convertTo='\&apos;O' />
215
+ <char num='212' name='Ocirc' convertTo='\^O' />
216
+ <char num='213' name='Otilde' convertTo='\~O' />
217
+ <char num='214' name='Ouml' convertTo='\&quot;O' />
218
+ <char num='215' name='times' convertTo='$\times$' />
219
+ <char num='216' name='Oslash' convertTo='\O' />
220
+ <char num='217' name='Ugrave' convertTo='\`U' />
221
+ <char num='218' name='Uacute' convertTo='\&apos;U' />
222
+ <char num='219' name='Ucirc' convertTo='\^U' />
223
+ <char num='220' name='Uuml' convertTo='\&quot;U' />
224
+ <char num='221' name='Yacute' convertTo='\&apos;Y' />
225
+ <char num='223' name='szlig' convertTo='\ss' />
226
+ <char num='224' name='agrave' convertTo='\`a' />
227
+ <char num='225' name='aacute' convertTo='\&apos;a' />
228
+ <char num='226' name='acirc' convertTo='\^a' />
229
+ <char num='227' name='atilde' convertTo='\~a' />
230
+ <char num='228' name='auml' convertTo='\&quot;a' />
231
+ <char num='229' name='aring' convertTo='\aa' />
232
+ <char num='230' name='aelig' convertTo='\ae' />
233
+ <char num='231' name='ccedil' convertTo='\c{c}' />
234
+ <char num='232' name='egrave' convertTo='\`e' />
235
+ <char num='233' name='eacute' convertTo='\&apos;e' />
236
+ <char num='234' name='ecirc' convertTo='\^e' />
237
+ <char num='235' name='euml' convertTo='\&quot;e' />
238
+ <char num='236' name='igrave' convertTo='\`i' />
239
+ <char num='237' name='iacute' convertTo='\&apos;i' />
240
+ <char num='238' name='icirc' convertTo='\^i' />
241
+ <char num='239' name='iuml' convertTo='\&quot;i' />
242
+ <char num='240' name='eth' convertTo='$\eth$' package='amssymb'/> <!-- -->
243
+ <char num='241' name='ntilde' convertTo='\~n' />
244
+ <char num='242' name='ograve' convertTo='\`o' />
245
+ <char num='243' name='oacute' convertTo='\&apos;o' />
246
+ <char num='244' name='ocirc' convertTo='\^o' />
247
+ <char num='245' name='otilde' convertTo='\~o' />
248
+ <char num='246' name='ouml' convertTo='\&quot;o' />
249
+ <!-- <char num='247' name='divide' convertTo='$\divide$' /> -->
250
+ <char num='248' name='oslash' convertTo='\o' />
251
+ <char num='249' name='ugrave' convertTo='\`u' />
252
+ <char num='250' name='uacute' convertTo='\&apos;u' />
253
+ <char num='251' name='ucirc' convertTo='\^u' />
254
+ <char num='252' name='uuml' convertTo='\&quot;u' />
255
+ <char num='253' name='yacute' convertTo='\&apos;y' />
256
+
257
+ <char num='255' name='yuml' convertTo='\&quot;y' />
258
+
259
+ <char num='222' name='THORN' convertTo='\Thorn' package='wasysym' />
260
+ <char num='254' name='thorn' convertTo='\thorn' package='wasysym' />
261
+ </chars>