ritex 0.1 → 0.2

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.
@@ -1,6 +1,6 @@
1
1
  ## test/mathml.rb -- contains Ritex::Test::MathML
2
2
  ## Author:: William Morgan (mailto: wmorgan-ritex@masanjin.net)
3
- ## Copyright:: Copyright 2005 William Morgan
3
+ ## Copyright:: Copyright 2005--2009 William Morgan
4
4
  ## License:: GNU GPL version 2
5
5
 
6
6
  require 'test/unit'
@@ -10,85 +10,74 @@ require 'ritex'
10
10
  module Ritex
11
11
 
12
12
  ## Module for all Ritex unit tests.
13
- ##
14
- ## Currently contains only one set of tests: Ritex::Test::MathML.
15
13
  module Test
16
14
 
17
- ## Ritex unit tests for itex->MathML conversion.
18
- ##
19
- ## = Preface
20
- ##
21
- ## Let me take a moment to express how much I love unit tests. Before
22
- ## Ruby, I never thought they'd be a practical part of any real
23
- ## development. But Test::Unit has made me a convert. Developing the
24
- ## tests at the same time as writing the code has forced me to think
25
- ## deeply about how the program functions. Having this test suite
26
- ## around to vett every change I make has been invaluable. And best of
27
- ## all: it's just so easy to do.
28
- ##
29
- ## = The test suite
30
- ##
31
- ## Ritex mathml output is based on itex2mml, so the mathml tests are
32
- ## designed to ultimately look there for the correct answer. But
33
- ## there's a level of caching in between, which a) helps people who
34
- ## don't have itex2mml and b) allows us to "correct" itex2mml.
15
+ ## Ritex unit tests for WebTeX->MathML conversion.
35
16
  ##
36
17
  ## Tests are run with a simple call to #cmp, e.g.:
37
- ##
38
18
  ## cmp '\int_{x=0}^1 \alpha(x)'
39
19
  ##
40
- ## The test framework first looks for the corresponding answer in the
41
- ## key file (KEY below). If it doesn't exist, the itex2mml binary is
42
- ## called (BIN below) to parse the string.
43
- ##
44
- ## = Adding new tests
45
- ##
46
- ## To add a new test, you need to either insert the correct mathml in
47
- ## the key file, or compile itex2mml and have it generate the mathml
48
- ## for you. Of course, if itex2mml doesn't do the correct thing,
49
- ## you'll then have to go to the key file and edit the answer
50
- ## accordingly. See the README for a list of differences between Ritex
51
- ## mathml output and itex2mml.
20
+ ## Test answers are loaded from the KEY file.
52
21
  ##
53
- ## Itex2mml can be found at:
54
- ## http://pear.math.pitt.edu/mathzilla/itex2mml.html
22
+ ## If an answer is not in the KEY file (e.g. you've just added a test, this
23
+ ## package will attempt to call the BIN program below to find the "correct"
24
+ ## answer. This answer will be placed in the KEY file, which you can then edit
25
+ ## as necessary.
55
26
  class MathML < ::Test::Unit::TestCase
56
- KEY = "test/itex2mml-key.yaml"
57
- BIN = "./itex2MML"
27
+ KEY = "test/answer-key.yaml"
28
+ BIN = "./itex2MML --inline" # for quickly generating possible answers to new tests
58
29
 
59
30
  def setup #:nodoc:
60
31
  @p = Ritex::Parser.new :mathml
61
- @key = (File.exists?(KEY) ? YAML::load_file(KEY) : {})
32
+ @key = if File.exists?(KEY)
33
+ YAML::load_file(KEY).inject({}) { |h, (k, v)| h[k] = v; h }
34
+ else
35
+ {}
36
+ end
62
37
  @key_dirty = false
63
38
  end
64
39
 
65
40
  def teardown #:nodoc:
66
41
  if @key_dirty
67
- puts "s"
68
- File.open(KEY, "wb") { |f| f.puts @key.to_yaml }
42
+ File.open(KEY, "wb") { |f| f.puts @key.sort_by { |a, b| [a, b] }.to_yaml }
69
43
  @key_dirty = false
70
44
  end
71
45
  end
72
46
 
73
- ## Tests whether an itex string is converted correctly by comparing
74
- ## it to the cached answer, or, if none is found, by running it
75
- ## through itex2mml directly.
47
+ ## Tests whether a webtex string is converted correctly.
76
48
  ##
77
- ## If _same_as_ is given, it means the conversion of _s_ should be
78
- ## the same as the itex2mml's rendering of _same_as_. This is mostly
79
- ## useful for macros.
49
+ ## If _same_as_ is given, it means the conversion of _s_ should be the same
50
+ ## as _same_as_. This is useful for macros and other features unsupported
51
+ ## by the binary answer-key generator.
80
52
  def cmp s, same_as=nil
81
53
  gold = gold_standard(same_as || s)
82
- test = @p.parse s
54
+ test = @p.parse s, false
83
55
 
84
- [gold, test].each do |l|
85
- l.gsub!(/>[\s\n]+</, "><")
86
- l.gsub!(/"/, "'")
56
+ if gold.gsub('"', "'") != test.gsub('"', "'")
57
+ puts "BADBADBADBAD"
58
+ p gold
59
+ p test
60
+ exit
87
61
  end
62
+ assert_equal gold.gsub('"', "'"), test.gsub('"', "'"), "Difference in MathML output of #{s.inspect}"
63
+ end
64
+
65
+ ## fix up itex2MML's common known errors
66
+ def fix_itex2mml_output l
67
+ l.gsub(/<mi>&(lt|gt);<\/mi>/, "<mo>&\\1;</mo>").
68
+ gsub("<merror><mtext>Unknown character</mtext></merror>", "<mspace width='mediummathspace'/>")
69
+ end
88
70
 
89
- assert_equal gold, test, "Difference in XML transform of #{s}"
71
+ ## normalize itex2MML output to make it more like mine, for comparison purposes
72
+ def normalize_itex2mml_output l
73
+ l.gsub("-", "&minus;").
74
+ gsub(/>[\s\n]+</, "><").
75
+ gsub(/>(\d+)\s+/, ">\\1").
76
+ gsub(%r!<mspace (.*?)></mspace>!, "<mspace \\1/>")
90
77
  end
91
78
 
79
+ ##### and now, the tests! #####
80
+
92
81
  def test_grouping
93
82
  cmp 'x'
94
83
  cmp '{x}'
@@ -147,6 +136,9 @@ class MathML < ::Test::Unit::TestCase
147
136
  cmp ' a'
148
137
  cmp '\forall x\,x<0'
149
138
  cmp '\int_x f(x)\ dx'
139
+ cmp ','
140
+ cmp '\,'
141
+ cmp ',\,\,,,\,'
150
142
  end
151
143
 
152
144
  def test_escaping
@@ -167,6 +159,7 @@ class MathML < ::Test::Unit::TestCase
167
159
 
168
160
  def test_misc
169
161
  cmp '\ln x'
162
+ cmp "100!"
170
163
  end
171
164
 
172
165
  def test_multiline
@@ -176,14 +169,18 @@ class MathML < ::Test::Unit::TestCase
176
169
  end
177
170
 
178
171
  def test_delimiters
172
+ cmp '(\hat{x}) = {(\hat{x}})'
179
173
  cmp '\left ( x \right )'
180
174
  cmp '\left \{ x \right \}'
181
- cmp '\left ( x \right'
182
- cmp '\left ( x \right + 3'
183
175
  cmp '\left ( \frac{2}{4+x} \right )^3'
184
176
  cmp '\left \frac{x}{y} \right|_{x=0}'
185
177
  end
186
178
 
179
+ def test_elided_delimiters
180
+ cmp '\left ( x \right', '\left ( x \right'
181
+ cmp '\left ( x \right + 3', '\left ( x \right + 3'
182
+ end
183
+
187
184
  def test_arrays
188
185
  cmp '\array{1}'
189
186
  cmp '\array{1 & 0}'
@@ -193,25 +190,25 @@ class MathML < ::Test::Unit::TestCase
193
190
  end
194
191
 
195
192
  def test_real_life
193
+ cmp 'a = -3'
196
194
  cmp '\Pr(a < X \leq b) = \int_a^b f(x)\ dx'
197
195
  cmp '\int_{-\infinity}^\infinity f(x)\ dx = 1'
198
- cmp 'F(x) = \Pr(X \leq x) \text{ for } -\infinity < x < \infinity'
199
- cmp ' G^{-1}(x) = -\log(1 - x)/\lambda\text{ if } 0 < x < 1.'
196
+ cmp 'F(x) = \Pr(X \leq x)\ \text{for}\ -\infinity < x < \infinity'
197
+ cmp 'G^{-1}(x) = -\log(1 - x)/\lambda\text{ if } 0 < x < 1.'
200
198
  cmp '-\log(1 - X)/\lambda'
201
199
  cmp 'P(x) = P^*(x)/Z'
202
200
  cmp '\sum_{n=1}^\infty \frac{(-1)^n}{n} = \ln 2'
203
201
  cmp '\sum_{n=1}^\infty \frac{1}{n} \text{ is divergent, but } \lim_{n \to \infty} \sum_{i=1}^n \frac{1}{i} - \ln n \text{ exists.}'
204
- cmp ' G(y) = \left\{\array{ 1 - e^{-\lambda y} & \text{ if } y \geq 0 \\ 0 & \text{ if } y < 0 }\right. .'
202
+ cmp 'G(y) = \left\{\array{ 1 - e^{-\lambda y} & \text{ if } y \geq 0 \\\\
203
+ 0 & \text{ if } y < 0 }\right.'
205
204
  cmp '\define{\sampx}{x^{(r)}}
206
- \frac{1}{N} \sum_r \phi(\sampx),'
207
- cmp '\frac{\sum_r w_r \phi(\sampx)}{\sum_r w_r}'
208
- cmp 'w_r \equiv \frac{P^*(\sampx)}{Q^*(\sampx)}.'
205
+ \frac{1}{N} \sum_r \phi(\sampx)', '\frac{1}{N} \sum_r \phi({x^{(r)}})'
206
+ cmp '\frac{\sum_r w_r \phi(\sampx)}{\sum_r w_r}', '\frac{\sum_r w_r \phi({x^{(r)}})}{\sum_r w_r}'
207
+ cmp 'w_r \equiv \frac{P^*(\sampx)}{Q^*(\sampx)}.', 'w_r \equiv \frac{P^*({x^{(r)}})}{Q^*({x^{(r)}})}.'
209
208
  end
210
209
 
211
210
  def test_overs
212
- %w(hat bar dot ddot vec check tilde widehat widecheck widebar widevec widetilde).each do |x|
213
- cmp "\#{x}{x}"
214
- end
211
+ %w(hat bar dot ddot vec check).each { |x| cmp "\\#{x}{x}" }
215
212
  cmp '\overset{\text{n terms}}{\overbrace{1+2+\cdots+n}}'
216
213
  cmp '\underoverset{S}{\alpha}{x=\infty}'
217
214
  end
@@ -229,37 +226,83 @@ class MathML < ::Test::Unit::TestCase
229
226
  cmp '\float{\goat}{\boat{\goat}}', '{\frac{\alpha-{\mathbb{GOAT}}}{\beta-{{\mathbb{GOAT}}-x}}}'
230
227
  end
231
228
 
229
+ def test_more_macros
230
+ cmp '\define{\exp}[1]{E_\theta\left[#1\right]} \exp{\hat{\theta}}', '{E_\theta\left[\hat{\theta}\right]}'
231
+ end
232
+
232
233
  def test_unary_minus
233
234
  cmp '-x'
234
235
  cmp 'x - x'
235
236
  cmp 'x--x'
236
237
  cmp 'x + - x'
237
238
  cmp '\alpha - x'
238
- cmp '\arccos - x'
239
- cmp '\bigcup + x'
240
- cmp '\bigcup - x'
241
- end
239
+ cmp '-1'
240
+ cmp "a-b"
241
+ cmp "a=-b"
242
242
 
243
- private
243
+ cmp '-\infty'
244
+ cmp '\ -\infty'
245
+ cmp '\text{for}\ -\infty'
246
+ end
244
247
 
245
- def normalize s
246
- s.gsub(/&/, "&amp;").gsub(/</, "&lt;").gsub(/>/, "&gt;")
248
+ def test_arrayopts
249
+ cmp '\array{ \arrayopts{\colalign{left center right}} a & b & c \\\\ 100000 & 100000 & 10000}'
250
+ cmp '\array{ \arrayopts{\colalign{left}} a & b & c \\\\ 100000 & 100000 & 10000}'
251
+ cmp '\array{ \arrayopts{\rowalign{top center bottom}} \binom{\alpha}{\omega} & a & b \\\\ \frac{3}{4} & c & d \\\\ \int_0^1 & e & f}'
252
+ cmp '\array{ \arrayopts{\rowalign{top}} \binom{\alpha}{\omega} & a & b \\\\ \frac{3}{4} & c & d \\\\ \int_0^1 & e & f}'
253
+ cmp '\array{\arrayopts{\frame{solid}} a}'
254
+ cmp '\array{\arrayopts{\padding{20}} a & b & c \\\\ d & e & f \\\\ \alpha & \beta & \gamma}'
255
+ cmp '\array{\arrayopts{\equalrows{true}} a}'
256
+ cmp '\array{\arrayopts{\equalcols{true}} a}'
257
+ cmp '\array{\arrayopts{\rowlines{solid}} a}'
258
+ cmp '\array{\arrayopts{\collines{solid}} a}'
259
+ cmp '\array{\cellopts{\rowspan{2}} a & b \\\\ c}'
260
+ cmp '\array{\rowspan{2} a & b \\\\ c}'
261
+ cmp '\array{\cellopts{\colspan{2}} a \\\\ b & c}'
262
+ cmp '\array{\colspan{2} a \\\\ b & c}'
263
+
264
+ cmp '\array{ (1,1) & \rowspan{2} \int dx & (1,3) \\\\
265
+ (2,1) & (2,3) \\\\
266
+ (3,1) & (3,2) & (3,3) }'
267
+
268
+ cmp '\array{ \colspan{3} (1,1) \text{ to } (1,3) & (1,4) \\\\
269
+ (2,1) & (2,2) & (2,3) & (2,4) }'
247
270
  end
248
271
 
272
+ private
273
+
249
274
  ## Returns the correct translation of _s_, by looking in the key
250
275
  ## file or, if that fails, by calling itex2mml directly.
251
276
  def gold_standard s
252
277
  return @key[s] if @key.member? s
278
+
279
+ ## not in key; try and run BIN to generate the answer
253
280
  ret = IO.popen(BIN, "wb+") do |io|
254
- io.puts "$#{normalize s}$"
281
+ io.puts s.gsub(/&/, "&amp;").gsub(/</, "&lt;").gsub(/>/, "&gt;")
255
282
  io.close_write
256
- io.readlines.join.gsub(/\n/, "")
283
+ io.readlines.join
284
+ end
285
+ ret = ret.chomp.gsub(%r!^<math xmlns='http://www.w3.org/1998/Math/MathML'.*?>!, "").gsub(%r!</math>$!, "")
286
+ ret = normalize_itex2mml_output(fix_itex2mml_output(ret))
287
+
288
+ if ENV["ALLOW_OVERRIDE"]
289
+ test = Ritex::Parser.new.parse s, false
290
+
291
+ if ret.gsub('"', "'") != test.gsub('"', "'")
292
+ puts
293
+ puts " input: #{s}"
294
+ puts "output: #{test}"
295
+ puts "answer: #{ret}"
296
+ print "correct? "
297
+ if gets =~ /y/i
298
+ ret = test
299
+ end
300
+ end
257
301
  end
302
+
258
303
  @key_dirty = true
259
304
  @key[s] = ret
260
305
  end
261
-
262
306
  end
263
-
264
307
  end
265
308
  end
metadata CHANGED
@@ -1,55 +1,66 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.8.11
3
- specification_version: 1
4
2
  name: ritex
5
3
  version: !ruby/object:Gem::Version
6
- version: "0.1"
7
- date: 2005-09-15 00:00:00 -04:00
8
- summary: WebTeX to MathML conversion library.
9
- require_paths:
10
- - lib
11
- email: wmorgan-ritex-gem@masanjin.net
12
- homepage:
13
- rubyforge_project: ritex
14
- description: Ritex converts expressions from WebTeX into MathML. WebTeX is an adaptation of TeX math syntax for web display. Ritex makes inserting math into HTML pages easy. It supports most TeX math syntax as well as macros.
4
+ version: "0.2"
5
+ platform: ruby
6
+ authors:
7
+ - William Morgan
15
8
  autorequire:
16
- default_executable:
17
9
  bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-04-01 00:00:00 -04:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description: Ritex converts expressions from WebTeX into MathML. WebTeX is an adaptation of TeX math syntax for web display. Ritex makes inserting math into HTML pages easy. It supports most TeX math syntax as well as macros.
17
+ email: wmorgan-ritex-gem@masanjin.net
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - README
24
+ - ReleaseNotes
25
+ files:
26
+ - lib/ritex.rb
27
+ - lib/ritex/mathml/entities.rb
28
+ - lib/ritex/mathml/functions.rb
29
+ - lib/ritex/mathml/markup.rb
30
+ - lib/ritex/lexer.rb
31
+ - lib/ritex/parser.rb
32
+ - test/all.rb
33
+ - test/parser.rb
34
+ - test/mathml.rb
35
+ - README
36
+ - ReleaseNotes
37
+ - lib/ritex/parser.y
38
+ - test/answer-key.yaml
18
39
  has_rdoc: true
19
- required_ruby_version: !ruby/object:Gem::Version::Requirement
40
+ homepage: http://masanjin.net/ritex/
41
+ post_install_message:
42
+ rdoc_options: []
43
+
44
+ require_paths:
45
+ - lib
46
+ required_ruby_version: !ruby/object:Gem::Requirement
20
47
  requirements:
21
- -
22
- - ">"
23
- - !ruby/object:Gem::Version
24
- version: 0.0.0
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: "0"
25
51
  version:
26
- platform: ruby
52
+ required_rubygems_version: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: "0"
57
+ version:
58
+ requirements:
59
+ - none
60
+ rubyforge_project: ritex
61
+ rubygems_version: 1.2.0
27
62
  signing_key:
28
- cert_chain:
29
- authors:
30
- - William Morgan
31
- files:
32
- - lib/ritex.rb
33
- - lib/ritex/mathml/entities.rb
34
- - lib/ritex/mathml/functions.rb
35
- - lib/ritex/mathml/markup.rb
36
- - lib/ritex/lexer.rb
37
- - test/all.rb
38
- - test/parser.rb
39
- - test/mathml.rb
40
- - README
41
- - ReleaseNotes
42
- - lib/ritex/parser.y
43
- - test/itex2mml-key.yaml
44
- - lib/ritex/parser.rb
63
+ specification_version: 2
64
+ summary: WebTeX to MathML conversion library.
45
65
  test_files:
46
- - test/all.rb
47
- rdoc_options: []
48
- extra_rdoc_files:
49
- - README
50
- - ReleaseNotes
51
- executables: []
52
- extensions: []
53
- requirements:
54
- - none
55
- dependencies: []
66
+ - test/all.rb
@@ -1,292 +0,0 @@
1
- ---
2
- "\\left ( x \\right )": "<math
3
- xmlns='http://www.w3.org/1998/Math/MathML'><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></math>"
4
- "\\mathcal{Hello}": "<math
5
- xmlns='http://www.w3.org/1998/Math/MathML'><mi>&Hscr;&escr;&lscr;&lscr;&oscr;</mi></math>"
6
- "-3": "<math xmlns='http://www.w3.org/1998/Math/MathML'><mo
7
- lspace=\"thinthinmathspace\" rspace=\"0em\">-</mo><mn>3</mn></math>"
8
- "\\lim_3": "<math xmlns='http://www.w3.org/1998/Math/MathML'><msub><mo
9
- lspace=\"thinmathspace\" rspace=\"thinmathspace\">lim</mo>
10
- <mn>3</mn></msub></math>"
11
- '': ''
12
- "\\forall x\\,x<0": "<math
13
- xmlns='http://www.w3.org/1998/Math/MathML'><mo>&forall;</mo><mi>x</mi><mspace
14
- width=\"thinmathspace\"/><mi>x</mi><mo>&lt;</mo><mn>0</mn></math>"
15
- "{{N-x}-x}": "<math
16
- xmlns='http://www.w3.org/1998/Math/MathML'><mrow><mrow><mi>N</mi><mo>-</mo><mi>x</mi></mrow><mo>-</mo><mi>x</mi></mrow></math>"
17
- if: "<math xmlns='http://www.w3.org/1998/Math/MathML'><mi>i</mi><mi>f</mi></math>"
18
- "\\alpha": "<math xmlns='http://www.w3.org/1998/Math/MathML'><mi>&alpha;</mi></math>"
19
- a ^ b: "<math
20
- xmlns='http://www.w3.org/1998/Math/MathML'><msup><mi>a</mi><mi>b</mi></msup></math>"
21
- "\\define { \\goat }{3+4}": "<math xmlns='http://www.w3.org/1998/Math/MathML'><mo lspace='0em'
22
- rspace='thinmathspace'>define</mo><mrow><mo lspace='0em'
23
- rspace='thinmathspace'>goat</mo></mrow><mrow><mn>3</mn><mo>+</mo><mn>4</mn></mrow></math>"
24
- a\text{ if }b: "<math xmlns='http://www.w3.org/1998/Math/MathML'><mi>a</mi><mtext> if
25
- </mtext><mi>b</mi></math>"
26
- a\in S: "<math
27
- xmlns='http://www.w3.org/1998/Math/MathML'><mi>a</mi><mo>&Element;</mo><mi>S</mi></math>"
28
- " G(y) = \\left\\{\\array{ 1 - e^{-\\lambda y} & \\text{ if } y \\geq 0 \\ 0 & \\text{ if } y < 0 }\\right. .": "<math
29
- xmlns='http://www.w3.org/1998/Math/MathML'><mi>G</mi><mo>(</mo><mi>y</mi><mo>)</mo><mo>=</mo><mrow><mo>{</mo><mrow><mtable><mtr><mtd><mn>1</mn><mo>-</mo><msup><mi>e</mi>
30
- <mrow><mo lspace=\"thinthinmathspace\"
31
- rspace=\"0em\">-</mo><mi>&lambda;</mi><mi>y</mi></mrow></msup></mtd>
32
- <mtd><mtext> if </mtext><mi>y</mi><mo>&geq;</mo><mn>0</mn><mspace
33
- width=\"mediummathspace\"/><mn>0</mn></mtd> <mtd><mtext> if
34
- </mtext><mi>y</mi><mo>&lt;</mo><mn>0</mn></mtd></mtr></mtable></mrow>
35
- <mo>.</mo></mrow><mo>.</mo></math>"
36
- " a": "<math xmlns='http://www.w3.org/1998/Math/MathML'><mi>a</mi></math>"
37
- "{x}": "<math xmlns='http://www.w3.org/1998/Math/MathML'><mrow><mi>x</mi></mrow></math>"
38
- "\\bigcup + x": "<math xmlns='http://www.w3.org/1998/Math/MathML'><mo lspace='thinmathspace'
39
- rspace='thinmathspace'>&Union;</mo><mo>+</mo><mi>x</mi></math>"
40
- "\\overset{\\text{n terms}}{\\overbrace{1+2+\\cdots+n}}": "<math
41
- xmlns='http://www.w3.org/1998/Math/MathML'><mover><mrow><mover><mrow><mn>1</mn><mo>+</mo><mn>2</mn><mo>+</mo><mo>&sdot;
42
- &sdot;
43
- &sdot;</mo><mo>+</mo><mi>n</mi></mrow><mo>&OverBrace;</mo></mover></mrow><mrow><mtext>n
44
- terms</mtext></mrow></mover></math>"
45
- a < b: "<math
46
- xmlns='http://www.w3.org/1998/Math/MathML'><mi>a</mi><mo>&lt;</mo><mi>b</mi></math>"
47
- "\\array{1 & 0 \\\\ 0 & 1}": "<math
48
- xmlns='http://www.w3.org/1998/Math/MathML'><mrow><mtable><mtr><mtd><mn>1</mn></mtd>
49
- <mtd><mn>0</mn></mtd></mtr> <mtr><mtd><mn>0</mn></mtd>
50
- <mtd><mn>1</mn></mtd></mtr></mtable></mrow></math>"
51
- "\\alpha + b + c": "<math
52
- xmlns='http://www.w3.org/1998/Math/MathML'><mi>&alpha;</mi><mo>+</mo><mi>b</mi><mo>+</mo><mi>c</mi></math>"
53
- "\\left ( \\frac{2}{4+x} \\right )^3": "<math
54
- xmlns='http://www.w3.org/1998/Math/MathML'><msup><mrow><mo>(</mo><mfrac><mrow><mn>2</mn></mrow><mrow><mn>4</mn><mo>+</mo><mi>x</mi></mrow></mfrac><mo>)</mo></mrow><mn>3</mn></msup></math>"
55
- "\\left ( \\binom{2}{3} \\right )": "<math xmlns='http://www.w3.org/1998/Math/MathML'><mrow><mo>(</mo><mfrac
56
- linethickness=\"0\"><mrow><mn>2</mn></mrow><mrow><mn>3</mn></mrow></mfrac>
57
- <mo>)</mo></mrow></math>"
58
- a\text{ if a fd ew s }b: "<math xmlns='http://www.w3.org/1998/Math/MathML'><mi>a</mi><mtext> if a fd ew s
59
- </mtext><mi>b</mi></math>"
60
- "\\bigcup - x": "<math xmlns='http://www.w3.org/1998/Math/MathML'><mo lspace='thinmathspace'
61
- rspace='thinmathspace'>&Union;</mo><mo lspace='thinthinmathspace'
62
- rspace='0em'>-</mo><mi>x</mi></math>"
63
- "x + - x": "<math xmlns='http://www.w3.org/1998/Math/MathML'><mi>x</mi><mo>+</mo><mo
64
- lspace='thinthinmathspace' rspace='0em'>-</mo><mi>x</mi></math>"
65
- "\\text{if}": "<math xmlns='http://www.w3.org/1998/Math/MathML'><mtext>if</mtext></math>"
66
- "\\frac{1}{2}": "<math
67
- xmlns='http://www.w3.org/1998/Math/MathML'><mfrac><mrow><mn>1</mn></mrow><mrow><mn>2</mn></mrow></mfrac></math>"
68
- "-x-x": "<math xmlns='http://www.w3.org/1998/Math/MathML'><mo
69
- lspace=\"thinthinmathspace\"
70
- rspace=\"0em\">-</mo><mi>x</mi><mo>-</mo><mi>x</mi></math>"
71
- a+3: "<math
72
- xmlns='http://www.w3.org/1998/Math/MathML'><mi>a</mi><mo>+</mo><mn>3</mn></math>"
73
- a^b_c: "<math xmlns='http://www.w3.org/1998/Math/MathML'><msubsup><mi>a</mi> <mi>c</mi>
74
- <mi>b</mi></msubsup></math>"
75
- "\\arccos - x": "<math xmlns='http://www.w3.org/1998/Math/MathML'><mo lspace='0em'
76
- rspace='thinmathspace'>arccos</mo><mo lspace='thinthinmathspace'
77
- rspace='0em'>-</mo><mi>x</mi></math>"
78
- w_r \equiv \frac{P^*(\sampx)}{Q^*(\sampx)}.: "<math
79
- xmlns='http://www.w3.org/1998/Math/MathML'><msub><mi>w</mi><mi>r</mi></msub><mo>&equiv;</mo><mfrac><mrow><msup><mi>P</mi><mo>*</mo></msup><mo>(</mo><mrow><msup><mi>x</mi><mrow><mo>(</mo><mi>r</mi><mo>)</mo></mrow></msup></mrow><mo>)</mo></mrow><mrow><msup><mi>Q</mi><mo>*</mo></msup><mo>(</mo><mrow><msup><mi>x</mi><mrow><mo>(</mo><mi>r</mi><mo>)</mo></mrow></msup></mrow><mo>)</mo></mrow></mfrac><mo>.</mo></math>"
80
- ? |2-
81
- G(y) = \left\{\array{ 1 - e^{-\lambda y} & \text{ if } y \geq 0 \
82
- 0 & \text{ if } y < 0 }\right. .
83
- : "<math
84
- xmlns='http://www.w3.org/1998/Math/MathML'><mi>G</mi><mo>(</mo><mi>y</mi><mo>)</mo><mo>=</mo><mrow><mo>{</mo><mrow><mtable><mtr><mtd><mn>1</mn><mo>-</mo><msup><mi>e</mi>
85
- <mrow><mo lspace=\"thinthinmathspace\"
86
- rspace=\"0em\">-</mo><mi>&lambda;</mi><mi>y</mi></mrow></msup></mtd>
87
- <mtd><mtext> if </mtext><mi>y</mi><mo>&geq;</mo><mn>0</mn><merror>Unknown
88
- character</merror><mn>0</mn></mtd> <mtd><mtext> if
89
- </mtext><mi>y</mi><mo>&lt;</mo><mn>0</mn></mtd></mtr></mtable></mrow>
90
- <mo>.</mo></mrow><mo>.</mo></math>"
91
- a+-3: "<math xmlns='http://www.w3.org/1998/Math/MathML'><mi>a</mi><mo>+</mo><mo
92
- lspace=\"thinthinmathspace\" rspace=\"0em\">-</mo><mn>3</mn></math>"
93
- " a": "<math xmlns='http://www.w3.org/1998/Math/MathML'><mi>a</mi></math>"
94
- ? |-
95
- \mathop{monkey}
96
- <
97
- b
98
- : "<math xmlns='http://www.w3.org/1998/Math/MathML'><mo lspace=\"0em\"
99
- rspace=\"thinmathspace\">monkey</mo><mo>&lt;</mo><mi>b</mi></math>"
100
- "\\left ( x \\right + 3": "<math
101
- xmlns='http://www.w3.org/1998/Math/MathML'><mrow><mo>(</mo><mi>x</mi><mo>+</mo></mrow><mn>3</mn></math>"
102
- a_b: "<math xmlns='http://www.w3.org/1998/Math/MathML'><msub><mi>a</mi>
103
- <mi>b</mi></msub></math>"
104
- a^{b_c} < a^b_c: "<math xmlns='http://www.w3.org/1998/Math/MathML'><msup><mi>a</mi>
105
- <mrow><msub><mi>b</mi>
106
- <mi>c</mi></msub></mrow></msup><mo>&lt;</mo><msubsup><mi>a</mi> <mi>c</mi>
107
- <mi>b</mi></msubsup></math>"
108
- x--x: "<math xmlns='http://www.w3.org/1998/Math/MathML'><mi>x</mi><mo>-</mo><mo
109
- lspace='thinthinmathspace' rspace='0em'>-</mo><mi>x</mi></math>"
110
- "\\int_x f(x)\\ dx": "<math xmlns='http://www.w3.org/1998/Math/MathML'><msub><mo>&Integral;</mo>
111
- <mi>x</mi></msub><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo><mspace
112
- width=\"mediummathspace\"/><mi>d</mi><mi>x</mi></math>"
113
- "\\sampx": "<math
114
- xmlns='http://www.w3.org/1998/Math/MathML'><mrow><msup><mi>x</mi><mrow><mo>(</mo><mi>r</mi><mo>)</mo></mrow></msup></mrow></math>"
115
- "\\ln x": "<math xmlns='http://www.w3.org/1998/Math/MathML'><mo lspace=\"0em\"
116
- rspace=\"thinmathspace\">ln</mo><mi>x</mi></math>"
117
- F(x) = \Pr(X \leq x) \text{ for } -\infinity < x < \infinity: "<math
118
- xmlns='http://www.w3.org/1998/Math/MathML'><mi>F</mi><mo>(</mo><mi>x</mi><mo>)</mo><mo>=</mo><mo
119
- lspace=\"0em\"
120
- rspace=\"thinmathspace\">Pr</mo><mo>(</mo><mi>X</mi><mo>&leq;</mo><mi>x</mi><mo>)</mo><mtext>
121
- for
122
- </mtext><mo>-</mo><mn>&infin;</mn><mo>&lt;</mo><mi>x</mi><mo>&lt;</mo><mn>&infin;</mn></math>"
123
- "{\\mathbb{GOAT}_3}": "<math
124
- xmlns='http://www.w3.org/1998/Math/MathML'><mrow><msub><mi>&Gopf;&Oopf;&Aopf;&Topf;</mi><mn>3</mn></msub></mrow></math>"
125
- a\mathbb{GOAT}: "<math
126
- xmlns='http://www.w3.org/1998/Math/MathML'><mi>a</mi><mi>&Gopf;&Oopf;&Aopf;&Topf;</mi></math>"
127
- x: "<math xmlns='http://www.w3.org/1998/Math/MathML'><mi>x</mi></math>"
128
- "\\alpha - x": "<math
129
- xmlns='http://www.w3.org/1998/Math/MathML'><mi>&alpha;</mi><mo>-</mo><mi>x</mi></math>"
130
- "\\int_{-\\infinity}^\\infinity f(x)\\ dx = 1": "<math xmlns='http://www.w3.org/1998/Math/MathML'><msubsup><mo>&Integral;</mo>
131
- <mrow><mo lspace=\"thinthinmathspace\"
132
- rspace=\"0em\">-</mo><mn>&infin;</mn></mrow>
133
- <mn>&infin;</mn></msubsup><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo><mspace
134
- width=\"mediummathspace\"/> <mi>d</mi><mi>x</mi><mo>=</mo><mn>1</mn></math>"
135
- "\\Pr(a < X \\leq b) = \\int_a^b f(x)\\ dx": "<math xmlns='http://www.w3.org/1998/Math/MathML'><mo lspace=\"0em\"
136
- rspace=\"thinmathspace\">Pr</mo><mo>(</mo><mi>a</mi><mo>&lt;</mo><mi>X</mi><mo>&leq;</mo><mi>b</mi><mo>)</mo><mo>=</mo><msubsup><mo>&Integral;</mo>
137
- <mi>a</mi> <mi>b</mi></msubsup><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo><mspace
138
- width=\"mediummathspace\"/><mi>d</mi><mi>x</mi></math>"
139
- ? |-
140
- \define{\sampx}{x^{(r)}}
141
- \frac{1}{N} \sum_r \phi(\sampx),
142
- : "<math
143
- xmlns='http://www.w3.org/1998/Math/MathML'><mfrac><mrow><mn>1</mn></mrow><mrow><mi>N</mi></mrow></mfrac><msub><mo
144
- lspace='thinmathspace'
145
- rspace='thinmathspace'>&Sum;</mo><mi>r</mi></msub><mi>&phi;</mi><mo>(</mo><mrow><msup><mi>x</mi><mrow><mo>(</mo><mi>r</mi><mo>)</mo></mrow></msup></mrow><mo>)</mo><mo>,</mo></math>"
146
- "\\overset{\\text{$n$ terms}}{\\overbrace{1+2+\\cdots+n}}": "<math
147
- xmlns='http://www.w3.org/1998/Math/MathML'><mover><mrow><mover><mrow><mn>1</mn><mo>+</mo><mn>2</mn><mo>+</mo><mo>&sdot;
148
- &sdot;
149
- &sdot;</mo><mo>+</mo><mi>n</mi></mrow><mo>&OverBrace;</mo></mover></mrow><mrow><mtext>$n$
150
- terms</mtext></mrow></mover></math>"
151
- x\textstyle{\int_0^1}\displaystyle{\int_0^1}y: "<math xmlns='http://www.w3.org/1998/Math/MathML'><mi>x</mi><mstyle
152
- displaystyle='false'><mrow><msubsup><mo>&Integral;</mo><mn>0</mn><mn>1</mn></msubsup></mrow></mstyle><mstyle
153
- displaystyle='true'><mrow><msubsup><mo>&Integral;</mo><mn>0</mn><mn>1</mn></msubsup></mrow></mstyle><mi>y</mi></math>"
154
- " G^{-1}(x) = -\\log(1 - x)/\\lambda\\text{ if } 0 < x < 1.": "<math xmlns='http://www.w3.org/1998/Math/MathML'><msup><mi>G</mi> <mrow><mo
155
- lspace=\"thinthinmathspace\"
156
- rspace=\"0em\">-</mo><mn>1</mn></mrow></msup><mo>(</mo><mi>x</mi><mo>)</mo><mo>=</mo><mo
157
- lspace=\"thinthinmathspace\" rspace=\"0em\">-</mo><mo lspace=\"0em\"
158
- rspace=\"thinmathspace\">log</mo><mo>(</mo><mn>1</mn><mo>-</mo><mi>x</mi><mo>)</mo><mo>/</mo><mi>&lambda;</mi><mtext>
159
- if
160
- </mtext><mn>0</mn><mo>&lt;</mo><mi>x</mi><mo>&lt;</mo><mn>1</mn><mo>.</mo></math>"
161
- a\text{if}b: "<math
162
- xmlns='http://www.w3.org/1998/Math/MathML'><mi>a</mi><mtext>if</mtext><mi>b</mi></math>"
163
- a\text{if }b: "<math xmlns='http://www.w3.org/1998/Math/MathML'><mi>a</mi><mtext>if
164
- </mtext><mi>b</mi></math>"
165
- "\\array{ }": ''
166
- ? |-
167
- \mathbb{monkey}
168
- <
169
- b
170
- : "<math
171
- xmlns='http://www.w3.org/1998/Math/MathML'><mi>monkey</mi><mo>&lt;</mo><mi>b</mi></math>"
172
- w_r \defnas \frac{P^*(\sampx)}{Q^*(\sampx)}.: "<math xmlns='http://www.w3.org/1998/Math/MathML'><msub><mi>w</mi>
173
- <mi>r</mi></msub><mo lspace=\"0em\"
174
- rspace=\"thinmathspace\">defnas</mo><mfrac><mrow><msup><mi>P</mi>
175
- <mo>*</mo></msup><mo>(</mo><mo lspace=\"0em\"
176
- rspace=\"thinmathspace\">sampx</mo><mo>)</mo></mrow><mrow><msup><mi>Q</mi>
177
- <mo>*</mo></msup><mo>(</mo><mo lspace=\"0em\"
178
- rspace=\"thinmathspace\">sampx</mo><mo>)</mo></mrow></mfrac><mo>.</mo></math>"
179
- "\\mathbb{GOAT}_3": "<math
180
- xmlns='http://www.w3.org/1998/Math/MathML'><msub><mi>&Gopf;&Oopf;&Aopf;&Topf;</mi><mn>3</mn></msub></math>"
181
- "\\array{}": ''
182
- "\\array{1}": "<math
183
- xmlns='http://www.w3.org/1998/Math/MathML'><mrow><mtable><mtr><mtd><mn>1</mn></mtd></mtr></mtable></mrow></math>"
184
- "\\array{1 & 0}": "<math
185
- xmlns='http://www.w3.org/1998/Math/MathML'><mrow><mtable><mtr><mtd><mn>1</mn></mtd>
186
- <mtd><mn>0</mn></mtd></mtr></mtable></mrow></math>"
187
- "\\sum_{n=1}^\\infty \\frac{1}{n} \\text{ is divergent, but } \\lim_{n \\to
188
- \\infty} \\sum_{i=1}^n \\frac{1}{i} - \\ln n \\text{ exists.}": "<math xmlns='http://www.w3.org/1998/Math/MathML'><msubsup><mo
189
- lspace=\"thinmathspace\" rspace=\"thinmathspace\">&Sum;</mo>
190
- <mrow><mi>n</mi><mo>=</mo><mn>1</mn></mrow>
191
- <mn>&infin;</mn></msubsup><mfrac><mrow><mn>1</mn></mrow><mrow><mi>n</mi></mrow></mfrac><mtext>
192
- is divergent, but </mtext><msub><mo lspace=\"thinmathspace\"
193
- rspace=\"thinmathspace\">lim</mo>
194
- <mrow><mi>n</mi><mo>&rightarrow;</mo><mn>&infin;</mn></mrow></msub><msubsup><mo
195
- lspace=\"thinmathspace\" rspace=\"thinmathspace\">&Sum;</mo>
196
- <mrow><mi>i</mi><mo>=</mo><mn>1</mn></mrow>
197
- <mi>n</mi></msubsup><mfrac><mrow><mn>1</mn></mrow><mrow><mi>i</mi></mrow></mfrac><mo>-</mo><mo
198
- lspace=\"0em\" rspace=\"thinmathspace\">ln</mo><mi>n</mi><mtext>
199
- exists.</mtext></math>"
200
- "{\\frac{\\alpha-\\delta}{\\beta-\\gamma}}": "<math
201
- xmlns='http://www.w3.org/1998/Math/MathML'><mrow><mfrac><mrow><mi>&alpha;</mi><mo>-</mo><mi>&delta;</mi></mrow><mrow><mi>&beta;</mi><mo>-</mo><mi>&gamma;</mi></mrow></mfrac></mrow></math>"
202
- "\\mathbb{Hello}": "<math xmlns='http://www.w3.org/1998/Math/MathML'><mi>&Hopf;ello</mi></math>"
203
- "{N-{N-x}}": "<math
204
- xmlns='http://www.w3.org/1998/Math/MathML'><mrow><mi>N</mi><mo>-</mo><mrow><mi>N</mi><mo>-</mo><mi>x</mi></mrow></mrow></math>"
205
- "\\sqrt{i}": "<math
206
- xmlns='http://www.w3.org/1998/Math/MathML'><msqrt><mrow><mi>i</mi></mrow></msqrt></math>"
207
- ? |-
208
- \array{1 & 0 \\
209
- 0 & 1}
210
- : "<math
211
- xmlns='http://www.w3.org/1998/Math/MathML'><mrow><mtable><mtr><mtd><mn>1</mn></mtd>
212
- <mtd><mn>0</mn></mtd></mtr> <mtr><mtd><mn>0</mn></mtd>
213
- <mtd><mn>1</mn></mtd></mtr></mtable></mrow></math>"
214
- "\\binom{x}{2}": "<math xmlns='http://www.w3.org/1998/Math/MathML'><mfrac
215
- linethickness=\"0\"><mrow><mi>x</mi></mrow><mrow><mn>2</mn></mrow></mfrac></math>"
216
- "\\lim_{x\\to\\infty}f(x)=0": "<math xmlns='http://www.w3.org/1998/Math/MathML'><msub><mo
217
- lspace=\"thinmathspace\" rspace=\"thinmathspace\">lim</mo>
218
- <mrow><mi>x</mi><mo>&rightarrow;</mo><mn>&infin;</mn></mrow></msub><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo><mo>=</mo><mn>0</mn></math>"
219
- "{{{N-x}-x}-x}": "<math
220
- xmlns='http://www.w3.org/1998/Math/MathML'><mrow><mrow><mrow><mi>N</mi><mo>-</mo><mi>x</mi></mrow><mo>-</mo><mi>x</mi></mrow><mo>-</mo><mi>x</mi></mrow></math>"
221
- "\\underoverset{S}{\\alpha}{x=\\infty}": "<math
222
- xmlns='http://www.w3.org/1998/Math/MathML'><munderover><mrow><mi>x</mi><mo>=</mo><mn>&infin;</mn></mrow><mrow><mi>S</mi></mrow><mrow><mi>&alpha;</mi></mrow></munderover></math>"
223
- "\\text{ if }": "<math xmlns='http://www.w3.org/1998/Math/MathML'><mtext> if </mtext></math>"
224
- "-\\log(1 - X)/\\lambda": "<math xmlns='http://www.w3.org/1998/Math/MathML'><mo
225
- lspace=\"thinthinmathspace\" rspace=\"0em\">-</mo><mo lspace=\"0em\"
226
- rspace=\"thinmathspace\">log</mo><mo>(</mo><mn>1</mn><mo>-</mo><mi>X</mi><mo>)</mo><mo>/</mo><mi>&lambda;</mi></math>"
227
- "\\left \\frac{x}{y} \\right|_{x=0}": "<math
228
- xmlns='http://www.w3.org/1998/Math/MathML'><msub><mrow><mfrac><mrow><mi>x</mi></mrow><mrow><mi>y</mi></mrow></mfrac><mo>|</mo></mrow><mrow><mi>x</mi><mo>=</mo><mn>0</mn></mrow></msub></math>"
229
- "-x": "<math xmlns='http://www.w3.org/1998/Math/MathML'><mo lspace='thinthinmathspace'
230
- rspace='0em'>-</mo><mi>x</mi></math>"
231
- "\\frac{N-x}{2}": "<math
232
- xmlns='http://www.w3.org/1998/Math/MathML'><mfrac><mrow><mi>N</mi><mo>-</mo><mi>x</mi></mrow><mrow><mn>2</mn></mrow></mfrac></math>"
233
- 2^{-3}: "<math xmlns='http://www.w3.org/1998/Math/MathML'><msup><mn>2</mn> <mrow><mo
234
- lspace=\"thinthinmathspace\"
235
- rspace=\"0em\">-</mo><mn>3</mn></mrow></msup></math>"
236
- P(x) = P^*(x)/Z: "<math
237
- xmlns='http://www.w3.org/1998/Math/MathML'><mi>P</mi><mo>(</mo><mi>x</mi><mo>)</mo><mo>=</mo><msup><mi>P</mi>
238
- <mo>*</mo></msup><mo>(</mo><mi>x</mi><mo>)</mo><mo>/</mo><mi>Z</mi></math>"
239
- "\\text{if \\alpha}": "<math xmlns='http://www.w3.org/1998/Math/MathML'><mtext>if
240
- \\alpha</mtext></math>"
241
- "\\sum_{n=1}^\\infty \\frac{(-1)^n}{n} = \\ln 2": "<math xmlns='http://www.w3.org/1998/Math/MathML'><msubsup><mo
242
- lspace=\"thinmathspace\" rspace=\"thinmathspace\">&Sum;</mo>
243
- <mrow><mi>n</mi><mo>=</mo><mn>1</mn></mrow>
244
- <mn>&infin;</mn></msubsup><mfrac><mrow><mo>(</mo><mo
245
- lspace=\"thinthinmathspace\" rspace=\"0em\">-</mo><mn>1</mn><msup><mo>)</mo>
246
- <mi>n</mi></msup></mrow><mrow><mi>n</mi></mrow></mfrac><mo>=</mo><mo
247
- lspace=\"0em\" rspace=\"thinmathspace\">ln</mo><mn>2</mn></math>"
248
- "{y-x}": "<math
249
- xmlns='http://www.w3.org/1998/Math/MathML'><mrow><mi>y</mi><mo>-</mo><mi>x</mi></mrow></math>"
250
- "\\left \\{ x \\right \\}": "<math
251
- xmlns='http://www.w3.org/1998/Math/MathML'><mrow><mo>{</mo><mi>x</mi><mo>}</mo></mrow></math>"
252
- a\text{ if}b: "<math xmlns='http://www.w3.org/1998/Math/MathML'><mi>a</mi><mtext>
253
- if</mtext><mi>b</mi></math>"
254
- "\\root{3}{x+y}": "<math
255
- xmlns='http://www.w3.org/1998/Math/MathML'><mroot><mrow><mi>x</mi><mo>+</mo><mi>y</mi></mrow><mrow><mn>3</mn></mrow></mroot></math>"
256
- ? |-
257
- a
258
- <
259
- b
260
- : "<math
261
- xmlns='http://www.w3.org/1998/Math/MathML'><mi>a</mi><mo>&lt;</mo><mi>b</mi></math>"
262
- "x - x": "<math
263
- xmlns='http://www.w3.org/1998/Math/MathML'><mi>x</mi><mo>-</mo><mi>x</mi></math>"
264
- "{\\frac{\\alpha-{\\mathbb{GOAT}}}{\\beta-{{\\mathbb{GOAT}}-x}}}": "<math
265
- xmlns='http://www.w3.org/1998/Math/MathML'><mrow><mfrac><mrow><mi>&alpha;</mi><mo>-</mo><mrow><mi>&Gopf;&Oopf;&Aopf;&Topf;</mi></mrow></mrow><mrow><mi>&beta;</mi><mo>-</mo><mrow><mrow><mi>&Gopf;&Oopf;&Aopf;&Topf;</mi></mrow><mo>-</mo><mi>x</mi></mrow></mrow></mfrac></mrow></math>"
266
- "\\goat_3": "<math
267
- xmlns='http://www.w3.org/1998/Math/MathML'><msub><mrow><mi>&Gopf;&Oopf;&Aopf;&Topf;</mi></mrow><mn>3</mn></msub></math>"
268
- "\\frac{\\sum_r w_r \\phi(\\sampx)}{\\sum_r w_r}": "<math xmlns='http://www.w3.org/1998/Math/MathML'><mfrac><mrow><msub><mo
269
- lspace='thinmathspace'
270
- rspace='thinmathspace'>&Sum;</mo><mi>r</mi></msub><msub><mi>w</mi><mi>r</mi></msub><mi>&phi;</mi><mo>(</mo><mrow><msup><mi>x</mi><mrow><mo>(</mo><mi>r</mi><mo>)</mo></mrow></msup></mrow><mo>)</mo></mrow><mrow><msub><mo
271
- lspace='thinmathspace'
272
- rspace='thinmathspace'>&Sum;</mo><mi>r</mi></msub><msub><mi>w</mi><mi>r</mi></msub></mrow></mfrac></math>"
273
- "\\frac{{N-x}}{2}": "<math
274
- xmlns='http://www.w3.org/1998/Math/MathML'><mfrac><mrow><mrow><mi>N</mi><mo>-</mo><mi>x</mi></mrow></mrow><mrow><mn>2</mn></mrow></mfrac></math>"
275
- "#{x}{x}": "<math
276
- xmlns='http://www.w3.org/1998/Math/MathML'><mo>#</mo><mrow><mi>x</mi></mrow><mrow><mi>x</mi></mrow></math>"
277
- a^b: "<math xmlns='http://www.w3.org/1998/Math/MathML'><msup><mi>a</mi>
278
- <mi>b</mi></msup></math>"
279
- "\\left ( x \\right": "<math
280
- xmlns='http://www.w3.org/1998/Math/MathML'><mrow><mo>(</mo><mi>x</mi></mrow></math>"
281
- "-log(1 - X)/\\lambda": "<math xmlns='http://www.w3.org/1998/Math/MathML'><mo
282
- lspace=\"thinthinmathspace\"
283
- rspace=\"0em\">-</mo><mi>log</mi><mo>(</mo><mn>1</mn><mo>-</mo><mi>X</mi><mo>)</mo><mo>/</mo><mi>&lambda;</mi></math>"
284
- ? |-
285
- \array{1 & 0 \\
286
- 0 & 1}
287
- : "<math
288
- xmlns='http://www.w3.org/1998/Math/MathML'><mrow><mtable><mtr><mtd><mn>1</mn></mtd>
289
- <mtd><mn>0</mn></mtd></mtr> <mtr><mtd><mn>0</mn></mtd>
290
- <mtd><mn>1</mn></mtd></mtr></mtable></mrow></math>"
291
- "{\\mathbb{GOAT}}_3": "<math
292
- xmlns='http://www.w3.org/1998/Math/MathML'><msub><mrow><mi>&Gopf;&Oopf;&Aopf;&Topf;</mi></mrow><mn>3</mn></msub></math>"