maruku 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. data/bin/maruku +74 -22
  2. data/bin/marutest +15 -3
  3. data/docs/{changelog-0.3.md → changelog.md} +47 -18
  4. data/docs/entity_test.html +253 -0
  5. data/docs/entity_test.md +21 -0
  6. data/docs/index.html +124 -31
  7. data/docs/markdown_syntax.html +46 -46
  8. data/docs/maruku.html +124 -31
  9. data/docs/maruku.md +47 -9
  10. data/docs/proposal.html +4 -4
  11. data/lib/maruku.rb +1 -0
  12. data/lib/maruku/defaults.rb +1 -1
  13. data/lib/maruku/helpers.rb +4 -4
  14. data/lib/maruku/input/parse_block.rb +39 -33
  15. data/lib/maruku/input/parse_doc.rb +57 -3
  16. data/lib/maruku/input/parse_span_better.rb +28 -8
  17. data/lib/maruku/input/rubypants.rb +225 -0
  18. data/lib/maruku/input/type_detection.rb +1 -0
  19. data/lib/maruku/output/to_html.rb +46 -47
  20. data/lib/maruku/output/to_latex.rb +166 -45
  21. data/lib/maruku/output/to_latex_entities.rb +75 -43
  22. data/lib/maruku/string_utils.rb +21 -19
  23. data/lib/maruku/structures.rb +21 -12
  24. data/lib/maruku/structures_inspect.rb +12 -3
  25. data/lib/maruku/tests/new_parser.rb +2 -1
  26. data/lib/maruku/version.rb +1 -1
  27. data/tests/unittest/abbreviations.md +8 -8
  28. data/tests/unittest/attributes/attributes.md +10 -10
  29. data/tests/unittest/attributes/circular.md +4 -4
  30. data/tests/unittest/attributes/default.md +3 -3
  31. data/tests/unittest/blank.md +2 -2
  32. data/tests/unittest/blanks_in_code.md +12 -12
  33. data/tests/unittest/code.md +4 -4
  34. data/tests/unittest/code2.md +7 -6
  35. data/tests/unittest/code3.md +16 -16
  36. data/tests/unittest/easy.md +4 -4
  37. data/tests/unittest/email.md +4 -4
  38. data/tests/unittest/encoding/iso-8859-1.md +2 -2
  39. data/tests/unittest/encoding/utf-8.md +2 -2
  40. data/tests/unittest/entities.md +20 -20
  41. data/tests/unittest/escaping.md +16 -16
  42. data/tests/unittest/extra_dl.md +17 -7
  43. data/tests/unittest/extra_header_id.md +11 -11
  44. data/tests/unittest/extra_table1.md +4 -4
  45. data/tests/unittest/footnotes.md +38 -28
  46. data/tests/unittest/headers.md +6 -6
  47. data/tests/unittest/hrule.md +6 -6
  48. data/tests/unittest/images.md +18 -16
  49. data/tests/unittest/inline_html.md +7 -29
  50. data/tests/unittest/inline_html2.md +3 -3
  51. data/tests/unittest/links.md +7 -27
  52. data/tests/unittest/list1.md +9 -8
  53. data/tests/unittest/list2.md +15 -12
  54. data/tests/unittest/list3.md +16 -14
  55. data/tests/unittest/list4.md +4 -4
  56. data/tests/unittest/lists.md +33 -29
  57. data/tests/unittest/lists_after_paragraph.md +36 -36
  58. data/tests/unittest/lists_ol.md +43 -38
  59. data/tests/unittest/misc_sw.md +172 -156
  60. data/tests/unittest/notyet/escape.md +8 -8
  61. data/tests/unittest/notyet/header_after_par.md +6 -6
  62. data/tests/unittest/notyet/ticks.md +4 -4
  63. data/tests/unittest/notyet/triggering.md +21 -21
  64. data/tests/unittest/olist.md +5 -5
  65. data/tests/unittest/one.md +1 -1
  66. data/tests/unittest/paragraph.md +1 -1
  67. data/tests/unittest/paragraph_rules/dont_merge_ref.md +1 -1
  68. data/tests/unittest/paragraph_rules/tab_is_blank.md +2 -2
  69. data/tests/unittest/paragraphs.md +5 -5
  70. data/tests/unittest/recover/recover_links.md +2 -2
  71. data/tests/unittest/references/long_example.md +27 -19
  72. data/tests/unittest/smartypants.md +148 -0
  73. data/tests/unittest/syntax_hl.md +14 -14
  74. data/tests/unittest/test.md +2 -2
  75. data/tests/unittest/wrapping.md +8 -8
  76. data/tests/unittest/xml_instruction.md +82 -0
  77. metadata +149 -160
  78. data/docs/TOFIX.html +0 -22
  79. data/docs/TOFIX.md +0 -3
  80. data/docs/changelog-0.2.13.html +0 -30
  81. data/docs/changelog-0.2.13.md +0 -6
  82. data/docs/changelog-0.3.html +0 -113
  83. data/docs/faq.html +0 -57
  84. data/docs/faq.md +0 -32
  85. data/docs/hidden_o_n_squared.md +0 -10
  86. data/docs/todo.html +0 -40
  87. data/docs/todo.md +0 -9
@@ -18,12 +18,25 @@
18
18
  # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19
19
  #++
20
20
 
21
-
22
21
  module MaRuKu
23
-
22
+
24
23
  class MDDocument
25
24
 
26
-
25
+ Latex_preamble_enc_cjk =
26
+ "\\usepackage[C40]{fontenc}
27
+ \\usepackage[cjkjis]{ucs}
28
+ \\usepackage[utf8x]{inputenc}"
29
+
30
+ Latex_preamble_enc_utf8 =
31
+ "\\usepackage{ucs}
32
+ \\usepackage[utf8x]{inputenc}"
33
+
34
+ def latex_require_package(p)
35
+ if not self.latex_required_packages.include? p
36
+ self.latex_required_packages.push p
37
+ end
38
+ end
39
+
27
40
  # Render as a LaTeX fragment
28
41
  def to_latex
29
42
  children_to_latex
@@ -31,25 +44,77 @@ class MDDocument
31
44
 
32
45
  # Render as a complete LaTeX document
33
46
  def to_latex_document
34
- header = ""
35
-
36
- if @doc.attributes[:latex_use_listings]
37
- header += "\\usepackage{listings}\n"
38
- end
39
-
40
47
  body = to_latex
41
48
 
42
49
  body += render_latex_signature
43
50
 
51
+ required =
52
+ self.latex_required_packages.map {|p|
53
+ "\\usepackage{#{p}}\n"
54
+ }.join
55
+
56
+ =begin maruku_doc
57
+ Attribute: latex_cjk
58
+ Scope: document
59
+ Output: latex
60
+ Summary: Support for CJK characters.
61
+
62
+ If the `latex_cjk` attribute is specified, then appropriate headers
63
+ are added to the LaTeX preamble to support Japanese fonts.
64
+ You have to have these fonts installed -- and this can be a pain.
65
+
66
+ If `latex_cjk` is specified, this is added to the preamble:
67
+
68
+ <?mrk md_code_block(Maruku::MDDocument::Latex_preamble_enc_cjk) ?>
69
+
70
+ while the default is to add this:
71
+
72
+ <?mrk md_code_block(Maruku::MDDocument::Latex_preamble_enc_utf8) ?>
73
+
74
+ =end
75
+ encoding = @doc.attributes[:latex_cjk] ?
76
+ Latex_preamble_enc_cjk : Latex_preamble_enc_utf8
77
+
78
+ =begin maruku_doc
79
+ Attribute: latex_preamble
80
+ Scope: document
81
+ Output: latex
82
+ Summary: User-defined preamble.
83
+
84
+ If the `latex_preamble` attribute is specified, then its value
85
+ will be used as a custom preamble.
86
+
87
+ For example:
88
+
89
+ Title: My document
90
+ Latex preamble: preamble.tex
91
+
92
+ will produce:
93
+
94
+ ...
95
+ \input{preamble.tex}
96
+ ...
97
+
98
+ =end
99
+ user_preamble = (file = @doc.attributes[:latex_preamble]) ?
100
+ "\\input{#{file}}\n" : ""
101
+
44
102
  "\\documentclass{article}
45
- #{header}
103
+
104
+ % Packages required to support encoding
105
+ #{encoding}
106
+
107
+ % Packages required by code
108
+ #{required}
109
+
110
+ #{user_preamble}
111
+
46
112
  \\usepackage{hyperref}
47
113
  \\usepackage{xspace}
48
114
  \\usepackage[usenames,dvipsnames]{color}
49
115
  \\usepackage[margin=1in]{geometry}
50
116
  \\hypersetup{colorlinks=true}
51
- %\\usepackage{ucs}
52
- %\\usepackage[utf8x]{inputenc}
117
+
53
118
  \\begin{document}
54
119
  #{body}
55
120
  \\end{document}
@@ -74,34 +139,82 @@ module MaRuKu; module Out; module Latex
74
139
  def to_latex_hrule; "\n\\vspace{.5em} \\hrule \\vspace{.5em}\n" end
75
140
  def to_latex_linebreak; "\\linebreak " end
76
141
 
77
- def to_latex_paragraph;
142
+ def to_latex_paragraph
78
143
  children_to_latex+"\n\n"
79
144
  end
80
145
 
81
146
  def get_setting(name, default=nil)
82
147
  self.attributes[name] || @doc.attributes[name] || default
83
148
  end
84
-
149
+ =begin maruku_doc
150
+ Title: Input format for colors
151
+ Output: latex, html
152
+ Related: code_background_color
153
+
154
+ Admissible formats:
155
+
156
+ green
157
+ #abc
158
+ #aabbcc
159
+ =end
160
+
85
161
  # \color[named]{name}
86
162
  # \color[rgb]{1,0.2,0.3}
87
163
  def latex_color(s, command='color')
88
164
  if s =~ /^\#(\w\w)(\w\w)(\w\w)$/
89
- r = $1.hex; g = $2.hex; b=$3.hex
165
+ r = $1.hex; g = $2.hex; b=$3.hex
90
166
  # convert from 0-255 to 0.0-1.0
91
- r = r / 255.0
92
- g = g / 255.0
93
- b = b / 255.0
94
-
167
+ r = r / 255.0; g = g / 255.0; b = b / 255.0;
95
168
  "\\#{command}[rgb]{%0.2f,%0.2f,%0.2f}" % [r,g,b]
96
- else
169
+ elsif s =~ /^\#(\w)(\w)(\w)$/
170
+ r = $1.hex; g = $2.hex; b=$3.hex
171
+ # convert from 0-15 to 0.0-1.0
172
+ r = r / 15.0; g = g / 15.0; b = b / 15.0;
173
+ "\\#{command}[rgb]{%0.2f,%0.2f,%0.2f}" % [r,g,b]
174
+ else
97
175
  "\\#{command}{#{s}}"
98
176
  end
99
177
  end
100
178
 
101
179
  def to_latex_code;
102
180
  raw_code = self.raw_code
181
+ =begin maruku_doc
182
+ Attribute: latex_use_listings
183
+ Scope: document
184
+ Output: latex
185
+ Summary: Support for `listings` package.
186
+ Related: code_show_spaces, code_background_color, lang, code_lang
187
+
188
+ If the `latex_use_listings` attribute is specified, then
189
+ code block are rendered using the `listings` package.
190
+ Otherwise, a standard `verbatim` environment is used.
191
+
192
+ * If the `lang` attribute for the code block has been specified,
193
+ it gets passed to the `listings` package using the `lstset` macro.
194
+ The default lang for code blocks is specified through
195
+ the `code_lang` attribute.
196
+
197
+ \lstset{language=ruby}
198
+
199
+ Please refer to the documentation of the `listings` package for
200
+ supported languages.
201
+
202
+ If a language is not supported, the `listings` package will emit
203
+ a warning during the compilation. Just press enter and nothing
204
+ wrong will happen.
205
+
206
+ * If the `code_show_spaces` is specified, than spaces and tabs will
207
+ be shown using the macro:
208
+
209
+ \lstset{showspaces=true,showtabs=true}
210
+
211
+ * The background color is given by `code_background_color`.
212
+
213
+ =end
103
214
 
104
215
  if @doc.attributes[:latex_use_listings]
216
+ @doc.latex_require_package('listings')
217
+
105
218
  s = "\\lstset{columns=fixed,frame=shadowbox}"
106
219
 
107
220
  show_spaces = get_setting(:code_show_spaces)
@@ -203,35 +316,31 @@ module MaRuKu; module Out; module Latex
203
316
  "#{colorspec}{\\tt #{s}}"
204
317
  end
205
318
 
206
- def to_latex_immediate_link
319
+ def to_latex_im_link
207
320
  url = self.url
208
- return "\\href{#{url}}{#{url.to_latex}}"
321
+
322
+ if url[0,1] == '#'
323
+ url = url[1,url.size]
324
+ return "\\hyperlink{#{url}}{#{children_to_latex}}"
325
+ else
326
+ return "\\href{#{url}}{#{children_to_latex}}"
327
+ end
209
328
  end
210
329
 
211
330
  def to_latex_link
212
- if id = self.ref_id
213
- # if empty, use text
214
- if id.size == 0
215
- id = children.to_s.downcase
216
- end
217
-
218
- ref = @doc.refs[id]
219
- if not ref
220
- $stderr.puts "Could not find id = '#{id}'"
221
- return children_to_latex
222
- else
223
- url = ref[:url]
224
- #title = ref[:title] || 'no title'
225
-
226
- if url[0,1] == '#'
227
- url = url[1,url.size]
228
- return "\\hyperlink{#{url}}{#{children_to_latex}}"
229
- else
230
- return "\\href{#{url}}{#{children_to_latex}}"
231
- end
232
- end
331
+ id = self.ref_id
332
+ # if empty, use text
333
+ if id.size == 0
334
+ id = children.to_s.downcase
335
+ end
336
+
337
+ ref = @doc.refs[id]
338
+ if not ref
339
+ $stderr.puts "Could not find id = '#{id}'"
340
+ return children_to_latex
233
341
  else
234
- url = self.url
342
+ url = ref[:url]
343
+ #title = ref[:title] || 'no title'
235
344
 
236
345
  if url[0,1] == '#'
237
346
  url = url[1,url.size]
@@ -240,6 +349,7 @@ module MaRuKu; module Out; module Latex
240
349
  return "\\href{#{url}}{#{children_to_latex}}"
241
350
  end
242
351
  end
352
+
243
353
  end
244
354
 
245
355
  def to_latex_email_address
@@ -297,7 +407,8 @@ module MaRuKu; module Out; module Latex
297
407
  end
298
408
 
299
409
  def to_latex_raw_html
300
- '{\bf Raw HTML removed in latex version }'
410
+ #'{\bf Raw HTML removed in latex version }'
411
+ ""
301
412
  end
302
413
 
303
414
  ## Definition lists ###
@@ -371,6 +482,16 @@ module MaRuKu; module Out; module Latex
371
482
  e << h
372
483
  end
373
484
  end
485
+
486
+ # puts a space after commands if needed
487
+ e.each_index do |i|
488
+ if e[i] =~ /\\\w+\s*$/ # command
489
+ if (s=e[i+1]) && s[0] == ?\ # space
490
+ e[i] = e[i] + "\\ "
491
+ end
492
+ end
493
+ end
494
+
374
495
  e.join(join_char)
375
496
  end
376
497
 
@@ -25,39 +25,64 @@ module MaRuKu; module Out; module Latex
25
25
 
26
26
  include REXML
27
27
 
28
+
28
29
  def to_latex_entity
29
30
  entity_name = self.entity_name
31
+
32
+ entity = ENTITY_TABLE[entity_name]
33
+ replace = entity.latex_string
30
34
 
31
- MDElement.init_tables
35
+ entity.latex_packages.each do |p|
36
+ @doc.latex_require_package p
37
+ end
38
+
39
+ if replace =~ /^\\/
40
+ replace = replace + " "
41
+ end
32
42
 
33
- replace = @@entity_to_latex[entity_name]
34
43
  if replace
35
- # puts "#{entity_name} -> #{replace.inspect}"
36
44
  return replace
37
45
  else
38
- $stderr.puts "Cannot translate #{entity_name}"
46
+ tell_user "Cannot translate entity #{entity_name.inspect} to LaTeX."
39
47
  return entity_name
40
48
  end
41
49
  end
42
50
 
51
+ class LatexEntity
52
+ safe_attr_accessor :html_num, Fixnum
53
+ safe_attr_accessor :html_entity, String
54
+ safe_attr_accessor :latex_string, String
55
+ safe_attr_accessor :latex_packages, Array
56
+ end
43
57
 
44
58
  # create hash @@entity_to_latex
45
- def MDElement.init_tables
46
- ## why can't I use a class variable?
47
- if not $conversion_table_inited
48
- doc = Document.new XML_TABLE
49
- @@entity_to_latex = {}
50
- doc.elements.each("//char") do |c|
51
- num = c.attributes['num']
52
- name = c.attributes['name']
53
- convert = c.attributes['convertTo']
54
- @@entity_to_latex["#{num}"] = convert
55
- @@entity_to_latex["#{name}"] = convert
56
- end
57
- # puts @@entity_to_latex.inspect
58
- $conversion_table_inited = true
59
+ def Latex.init_entity_table
60
+ doc = Document.new XML_TABLE
61
+ doc.elements.each("//char") do |c|
62
+ num = c.attributes['num'].to_i
63
+ name = c.attributes['name']
64
+ package = c.attributes['package']
65
+
66
+ convert = c.attributes['convertTo']
67
+ convert.gsub!(/@DOUBLEQUOT/,'"')
68
+ convert.gsub!(/@QUOT/,"'")
69
+ convert.gsub!(/@GT/,">")
70
+ convert.gsub!(/@LT/,"<")
71
+ convert.gsub!(/@AMP/,"&")
72
+ convert.freeze
73
+
74
+ e = LatexEntity.new
75
+ e.html_num = num
76
+ e.html_entity = name
77
+ e.latex_string = convert
78
+ e.latex_packages = package ? package.split : []
79
+
80
+ ENTITY_TABLE[num] = e
81
+ ENTITY_TABLE[name] = e
59
82
  end
60
83
  end
84
+
85
+ ENTITY_TABLE = {}
61
86
 
62
87
  # The following is a conversion chart for html elements, courtesy of
63
88
  # text2html
@@ -164,7 +189,7 @@ module MaRuKu; module Out; module Latex
164
189
  <char num='8745' name='cup' convertTo='$\\cup$' />
165
190
  <char num='8746' name='cap' convertTo='$\\cap$' />
166
191
  <char num='8747' name='int' convertTo='$\\int$' />
167
- <char num='8756' name='there4' convertTo='$\\therefore$' /> <!-- only AMS -->
192
+ <char num='8756' name='there4' convertTo='$\\therefore$' package='amssymb' /> <!-- only AMS -->
168
193
  <char num='8764' name='sim' convertTo='$\\sim$' />
169
194
  <char num='8776' name='asymp' convertTo='$\\approx$' />
170
195
  <char num='8773' name='cong' convertTo='$\\cong$' />
@@ -175,9 +200,9 @@ module MaRuKu; module Out; module Latex
175
200
  <char num='8805' name='ge' convertTo='$\\geq$' />
176
201
  <char num='8834' name='sub' convertTo='$\\subset$' />
177
202
  <char num='8835' name='sup' convertTo='$\\supset$' />
178
- <char num='8838' name='sube' convertTo='$\\subseteq$' />
203
+ <!-- <char num='8838' name='sube' convertTo='$\\subseteq$' />-->
179
204
  <char num='8839' name='supe' convertTo='$\\supseteq$' />
180
- <char num='8836' name='nsub' convertTo='$\\nsubset$' /> <!-- only AMS -->
205
+ <!-- <char num='8836' name='nsub' convertTo='$\\nsubset$' /> <!-- only AMS -->
181
206
 
182
207
  <char num='8853' name='oplus' convertTo='$\\oplus$' />
183
208
  <char num='8855' name='otimes' convertTo='$\\otimes$' />
@@ -190,13 +215,15 @@ module MaRuKu; module Out; module Latex
190
215
  <char num='9001' name='rang' convertTo='$\\rangle$' />
191
216
 
192
217
  <char num='9002' name='lang' convertTo='$\\langle$' />
193
- <char num='9674' name='loz' convertTo='$\\lozenge$' /> <!-- only AMS -->
218
+ <char num='9674' name='loz' convertTo='$\\lozenge$' package='amssymb' /> <!-- only AMS -->
194
219
  <char num='9824' name='spades' convertTo='$\\spadesuit$' />
195
220
  <char num='9827' name='clubs' convertTo='$\\clubsuit$' />
196
221
  <char num='9829' name='hearts' convertTo='$\\heartsuit$' />
197
222
  <char num='9830' name='diams' convertTo='$\\diamondsuit$' />
198
223
  <char num='38' name='amp' convertTo='\\@AMP' />
199
- <char num='34' name='quot' convertTo='@DOUBLEQUOT' />
224
+ <!-- <char num='34' name='quot' convertTo='\\@DOUBLEQUOT' /> XXX -->
225
+ <char num='34' name='quot' convertTo='\"' />
226
+ <char num='39' name='apos' convertTo=\"'\" />
200
227
  <char num='169' name='copy' convertTo='\\copyright' />
201
228
 
202
229
  <char num='60' name='lt' convertTo='$@LT$' />
@@ -212,31 +239,32 @@ module MaRuKu; module Out; module Latex
212
239
  <char num='8211' name='ndash' convertTo='--' />
213
240
  <char num='8212' name='mdash' convertTo='---' />
214
241
  <char num='8216' name='lsquo' convertTo='`' />
215
- <char num='8217' name='rsquo' convertTo='@QUOT' />
242
+ <char num='8217' name='rsquo' convertTo=\"'\" /> <!-- XXXX -->
216
243
  <char num='8220' name='ldquo' convertTo='``' />
217
- <char num='8221' name='rdquo' convertTo='@QUOT@QUOT' />
244
+ <char num='8221' name='rdquo' convertTo=\"''\" /> <!-- XXXX -->
218
245
  <char num='8224' name='dagger' convertTo='\\dag' />
219
246
  <char num='8225' name='Dagger' convertTo='\\ddag' />
220
- <char num='8240' name='permil' convertTo='\\permil' /> <!-- wasysym package -->
247
+ <char num='8240' name='permil' convertTo='\\permil' package='wasysym' /> <!-- wasysym package -->
221
248
 
222
- <char num='8364' name='euro' convertTo='\\euro' /> <!-- eurosym package -->
223
- <char num='8249' name='lsaquo' convertTo='\\guilsinglleft' />
224
- <char num='8250' name='rsaquo' convertTo='\\guilsinglright' />
249
+ <char num='8364' name='euro' convertTo='\\euro' package='eurosym' /> <!-- eurosym package -->
250
+ <char num='8249' name='lsaquo' convertTo='\\guilsinglleft' package='aeguill'/>
251
+ <char num='8250' name='rsaquo' convertTo='\\guilsinglright' package='aeguill' />
225
252
  <!-- <char num='160' name='nbsp' convertTo='\\nolinebreak' />-->
226
253
  <char num='160' name='nbsp' convertTo='~' />
227
254
  <char num='161' name='iexcl' convertTo='\\textexclamdown' />
228
255
  <char num='163' name='pound' convertTo='\\pounds' />
229
- <char num='164' name='curren' convertTo='\\currency' /> <!-- wasysym package -->
230
- <char num='165' name='yen' convertTo='\\textyen' /> <!-- textcomp -->
256
+ <char num='164' name='curren' convertTo='\\currency' package='wasysym' /> <!-- wasysym package -->
257
+ <char num='165' name='yen' convertTo='\\textyen' package='textcomp'/> <!-- textcomp -->
231
258
 
232
259
  <char num='166' name='brvbar' convertTo='\\brokenvert' /> <!-- wasysym -->
233
260
  <char num='167' name='sect' convertTo='\\S' />
234
- <char num='171' name='laquo' convertTo='\\guillemotleft' />
235
- <char num='187' name='raquo' convertTo='\\guillemotright' />
261
+ <char num='171' name='laquo' convertTo='\\guillemotleft' package='aeguill'/>
262
+ <char num='187' name='raquo' convertTo='\\guillemotright' package='aeguill'/>
236
263
  <char num='174' name='reg' convertTo='\\textregistered' />
237
264
  <char num='170' name='ordf' convertTo='\\textordfeminine' />
238
265
  <char num='172' name='not' convertTo='$\\neg$' />
239
- <char num='176' name='deg' convertTo='$\\degree$' /> <!-- mathabx -->
266
+ <!-- <char num='176' name='deg' convertTo='$\\degree$' /> <!-- mathabx -->
267
+ <char num='176' name='deg' convertTo='\\textdegree' package='textcomp'/>
240
268
 
241
269
  <char num='177' name='plusmn' convertTo='$\\pm$' />
242
270
  <char num='180' name='acute' convertTo='@QUOT' />
@@ -244,14 +272,14 @@ module MaRuKu; module Out; module Latex
244
272
  <char num='182' name='para' convertTo='\\P' />
245
273
  <char num='183' name='middot' convertTo='$\\cdot$' />
246
274
  <char num='186' name='ordm' convertTo='\\textordmasculine' />
247
- <char num='162' name='cent' convertTo='\\cent' /> <!-- wasysym -->
275
+ <char num='162' name='cent' convertTo='\\cent' package='wasysym' />
248
276
  <char num='185' name='sup1' convertTo='$^1$' />
249
277
 
250
278
  <char num='178' name='sup2' convertTo='$^2$' />
251
279
  <char num='179' name='sup3' convertTo='$^3$' />
252
280
  <char num='189' name='frac12' convertTo='$\\frac{1}{2}$' />
253
281
  <char num='188' name='frac14' convertTo='$\\frac{1}{4}$' />
254
- <char num='190' name='frac34' convertTo='$\\frac{3}{4}' />
282
+ <char num='190' name='frac34' convertTo='$\\frac{3}{4}$' />
255
283
  <char num='192' name='Agrave' convertTo='\\`A' />
256
284
  <char num='193' name='Aacute' convertTo='\\@QUOTA' />
257
285
  <char num='194' name='Acirc' convertTo='\\^A' />
@@ -260,7 +288,7 @@ module MaRuKu; module Out; module Latex
260
288
  <char num='196' name='Auml' convertTo='\\@DOUBLEQUOTA' />
261
289
  <char num='197' name='Aring' convertTo='\\AA' />
262
290
  <char num='198' name='AElig' convertTo='\\AE' />
263
- <char num='199' name='Ccedil' convertTo='\\cC' />
291
+ <char num='199' name='Ccedil' convertTo='\\c{C}' />
264
292
  <char num='200' name='Egrave' convertTo='\\`E' />
265
293
  <char num='201' name='Eacute' convertTo='\\@QUOTE' />
266
294
  <char num='202' name='Ecirc' convertTo='\\^E' />
@@ -272,7 +300,7 @@ module MaRuKu; module Out; module Latex
272
300
  <char num='208' name='ETH' convertTo='$\\eth$' /> <!-- AMS -->
273
301
  <char num='209' name='Ntilde' convertTo='\\~N' />
274
302
  <char num='210' name='Ograve' convertTo='\\`O' />
275
- <char num='211' name='Oacute' convertTo='\\@QUOTO' />
303
+ <char num='211' name='Oacute' convertTo='\\@QUOT O' />
276
304
  <char num='212' name='Ocirc' convertTo='\\^O' />
277
305
  <char num='213' name='Otilde' convertTo='\\~O' />
278
306
  <char num='214' name='Ouml' convertTo='\\@DOUBLEQUOTO' />
@@ -283,7 +311,6 @@ module MaRuKu; module Out; module Latex
283
311
  <char num='219' name='Ucirc' convertTo='\\^U' />
284
312
  <char num='220' name='Uuml' convertTo='\\@DOUBLEQUOTU' />
285
313
  <char num='221' name='Yacute' convertTo='\\@QUOTY' />
286
- <char num='222' name='THORN' convertTo='\\Thorn' /> <!-- wasysym -->
287
314
  <char num='223' name='szlig' convertTo='\\ss' />
288
315
  <char num='224' name='agrave' convertTo='\\`a' />
289
316
  <char num='225' name='aacute' convertTo='\\@QUOTa' />
@@ -292,7 +319,7 @@ module MaRuKu; module Out; module Latex
292
319
  <char num='228' name='auml' convertTo='\\@DOUBLEQUOTa' />
293
320
  <char num='229' name='aring' convertTo='\\aa' />
294
321
  <char num='230' name='aelig' convertTo='\\ae' />
295
- <char num='231' name='ccedil' convertTo='\\cc' />
322
+ <char num='231' name='ccedil' convertTo='\\c{c}' />
296
323
  <char num='232' name='egrave' convertTo='\\`e' />
297
324
  <char num='233' name='eacute' convertTo='\\@QUOTe' />
298
325
  <char num='234' name='ecirc' convertTo='\\^e' />
@@ -301,23 +328,28 @@ module MaRuKu; module Out; module Latex
301
328
  <char num='237' name='iacute' convertTo='\\@QUOTi' />
302
329
  <char num='238' name='icirc' convertTo='\\^i' />
303
330
  <char num='239' name='iuml' convertTo='\\@DOUBLEQUOTi' />
304
- <char num='240' name='eth' convertTo='$\\eth$' /> <!-- -->
331
+ <char num='240' name='eth' convertTo='$\\eth$' package='amssymb'/> <!-- -->
305
332
  <char num='241' name='ntilde' convertTo='\\~n' />
306
333
  <char num='242' name='ograve' convertTo='\\`o' />
307
334
  <char num='243' name='oacute' convertTo='\\@QUOTo' />
308
335
  <char num='244' name='ocirc' convertTo='\\^o' />
309
336
  <char num='245' name='otilde' convertTo='\\~o' />
310
337
  <char num='246' name='ouml' convertTo='\\@DOUBLEQUOTo' />
311
- <char num='247' name='divide' convertTo='$\\divide$' />
338
+ <!-- <char num='247' name='divide' convertTo='$\\divide$' /> -->
312
339
  <char num='248' name='oslash' convertTo='\\o' />
313
340
  <char num='249' name='ugrave' convertTo='\\`u' />
314
341
  <char num='250' name='uacute' convertTo='\\@QUOTu' />
315
342
  <char num='251' name='ucirc' convertTo='\\^u' />
316
343
  <char num='252' name='uuml' convertTo='\\@DOUBLEQUOTu' />
317
344
  <char num='253' name='yacute' convertTo='\\@QUOTy' />
318
- <char num='254' name='thorn' convertTo='\\thorn' /> <!-- wasysym -->
345
+
319
346
  <char num='255' name='yuml' convertTo='\\@DOUBLEQUOTy' />
347
+
348
+ <char num='222' name='THORN' convertTo='\\Thorn' package='wasysym' />
349
+ <char num='254' name='thorn' convertTo='\\thorn' package='wasysym' />
320
350
  </chars>"
351
+
352
+ init_entity_table
321
353
 
322
354
  end end end
323
355