mathtype_to_mathml_plus 0.0.8

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.
Files changed (99) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +14 -0
  3. data/.rspec +2 -0
  4. data/.ruby-version +1 -0
  5. data/.travis.yml +3 -0
  6. data/Gemfile +6 -0
  7. data/LICENSE.txt +22 -0
  8. data/README.md +45 -0
  9. data/Rakefile +7 -0
  10. data/lib/mathtype_to_mathml/char_replacer.rb +366 -0
  11. data/lib/mathtype_to_mathml/mover.rb +151 -0
  12. data/lib/mathtype_to_mathml/version.rb +3 -0
  13. data/lib/mathtype_to_mathml.rb +45 -0
  14. data/lib/transform.xsl +53 -0
  15. data/lib/xsl/arrow.xsl +319 -0
  16. data/lib/xsl/box.xsl +42 -0
  17. data/lib/xsl/char.xsl +1854 -0
  18. data/lib/xsl/embellishment.xsl +389 -0
  19. data/lib/xsl/fence.xsl +228 -0
  20. data/lib/xsl/frac.xsl +46 -0
  21. data/lib/xsl/int.xsl +622 -0
  22. data/lib/xsl/lim.xsl +32 -0
  23. data/lib/xsl/long_division.xsl +32 -0
  24. data/lib/xsl/long_embellishment.xsl +150 -0
  25. data/lib/xsl/matrix.xsl +115 -0
  26. data/lib/xsl/pile.xsl +54 -0
  27. data/lib/xsl/product_coproduct.xsl +107 -0
  28. data/lib/xsl/subsup.xsl +55 -0
  29. data/lib/xsl/sum.xsl +81 -0
  30. data/lib/xsl/union_intersection.xsl +104 -0
  31. data/mathtype_to_mathml.gemspec +29 -0
  32. data/spec/fixtures/expected/280.xml +122 -0
  33. data/spec/fixtures/expected/281.xml +60 -0
  34. data/spec/fixtures/expected/299.xml +70 -0
  35. data/spec/fixtures/expected/326.xml +173 -0
  36. data/spec/fixtures/expected/424.xml +425 -0
  37. data/spec/fixtures/expected/450.xml +174 -0
  38. data/spec/fixtures/expected/452.xml +166 -0
  39. data/spec/fixtures/expected/478.xml +303 -0
  40. data/spec/fixtures/expected/629.xml +98 -0
  41. data/spec/fixtures/expected/arrows.xml +389 -0
  42. data/spec/fixtures/expected/boxes.xml +22 -0
  43. data/spec/fixtures/expected/embellishments.xml +178 -0
  44. data/spec/fixtures/expected/embellishments_roots_long_divisions.xml +162 -0
  45. data/spec/fixtures/expected/equation1.xml +52 -0
  46. data/spec/fixtures/expected/equation10.xml +19 -0
  47. data/spec/fixtures/expected/equation11.xml +17 -0
  48. data/spec/fixtures/expected/equation12.xml +34 -0
  49. data/spec/fixtures/expected/equation13.xml +113 -0
  50. data/spec/fixtures/expected/equation14.xml +54 -0
  51. data/spec/fixtures/expected/equation2.xml +33 -0
  52. data/spec/fixtures/expected/equation3.xml +324 -0
  53. data/spec/fixtures/expected/equation4.xml +14 -0
  54. data/spec/fixtures/expected/equation5.xml +23 -0
  55. data/spec/fixtures/expected/equation6.xml +13 -0
  56. data/spec/fixtures/expected/equation7.xml +19 -0
  57. data/spec/fixtures/expected/equation8.xml +17 -0
  58. data/spec/fixtures/expected/equation9.xml +15 -0
  59. data/spec/fixtures/expected/fences.xml +64 -0
  60. data/spec/fixtures/expected/integrals.xml +264 -0
  61. data/spec/fixtures/expected/matrices.xml +253 -0
  62. data/spec/fixtures/expected/sums.xml +36 -0
  63. data/spec/fixtures/expected/unions_and_intersections.xml +140 -0
  64. data/spec/fixtures/input/280.bin +0 -0
  65. data/spec/fixtures/input/281.bin +0 -0
  66. data/spec/fixtures/input/299.bin +0 -0
  67. data/spec/fixtures/input/326.bin +0 -0
  68. data/spec/fixtures/input/424.bin +0 -0
  69. data/spec/fixtures/input/450.bin +0 -0
  70. data/spec/fixtures/input/452.bin +0 -0
  71. data/spec/fixtures/input/478.bin +0 -0
  72. data/spec/fixtures/input/629.bin +0 -0
  73. data/spec/fixtures/input/arrows.bin +0 -0
  74. data/spec/fixtures/input/boxes.bin +0 -0
  75. data/spec/fixtures/input/embellishments.bin +0 -0
  76. data/spec/fixtures/input/embellishments_roots_long_divisions.bin +0 -0
  77. data/spec/fixtures/input/equation1.bin +0 -0
  78. data/spec/fixtures/input/equation10.bin +0 -0
  79. data/spec/fixtures/input/equation11.bin +0 -0
  80. data/spec/fixtures/input/equation12.bin +0 -0
  81. data/spec/fixtures/input/equation13.bin +0 -0
  82. data/spec/fixtures/input/equation14.bin +0 -0
  83. data/spec/fixtures/input/equation2.bin +0 -0
  84. data/spec/fixtures/input/equation3.bin +0 -0
  85. data/spec/fixtures/input/equation4.bin +0 -0
  86. data/spec/fixtures/input/equation5.bin +0 -0
  87. data/spec/fixtures/input/equation6.bin +0 -0
  88. data/spec/fixtures/input/equation7.bin +0 -0
  89. data/spec/fixtures/input/equation8.bin +0 -0
  90. data/spec/fixtures/input/equation9.bin +0 -0
  91. data/spec/fixtures/input/fences.bin +0 -0
  92. data/spec/fixtures/input/integrals.bin +0 -0
  93. data/spec/fixtures/input/matrices.bin +0 -0
  94. data/spec/fixtures/input/sums.bin +0 -0
  95. data/spec/fixtures/input/unions_and_intersections.bin +0 -0
  96. data/spec/html_output.rb +28 -0
  97. data/spec/mathtype_to_mathml_spec.rb +16 -0
  98. data/spec/spec_helper.rb +4 -0
  99. metadata +305 -0
@@ -0,0 +1,104 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
4
+ exclude-result-prefixes="xs"
5
+ version="1.0">
6
+
7
+ <!-- Unions and intersections -->
8
+
9
+ <xsl:template match="tmpl[selector='tmINTER' and (not(variation='tvBO_UPPER') and not(variation='tvBO_UPPER'))]">
10
+ <mstyle displaystyle="true">
11
+ <mo>&#x2229;</mo> <xsl:apply-templates select="slot[1] | pile[1]"/>
12
+ </mstyle>
13
+ </xsl:template>
14
+
15
+ <xsl:template match="tmpl[selector='tmINTER' and variation='tvBO_LOWER']">
16
+ <mstyle displaystyle="true">
17
+ <munder>
18
+ <mo>&#x2229;</mo>
19
+ <xsl:apply-templates select="slot[2] | pile[2]"/>
20
+ </munder>
21
+ <xsl:apply-templates select="slot[1] | pile[1]"/>
22
+ </mstyle>
23
+ </xsl:template>
24
+
25
+ <xsl:template match="tmpl[selector='tmINTER']">
26
+ <mstyle displaystyle="true">
27
+ <munderover>
28
+ <mo>&#x2229;</mo>
29
+ <xsl:apply-templates select="slot[2] | pile[2]"/>
30
+ <xsl:apply-templates select="slot[3] | pile[3]"/>
31
+ </munderover>
32
+ <xsl:apply-templates select="slot[1] | pile[1]"/>
33
+ </mstyle>
34
+ </xsl:template>
35
+
36
+ <xsl:template match="tmpl[selector='tmINTER' and not(variation='tvBO_SUM') and variation='tvBO_LOWER']">
37
+ <mstyle displaystyle="true">
38
+ <msub>
39
+ <mo>&#x2229;</mo>
40
+ <xsl:apply-templates select="slot[2] | pile[2]"/>
41
+ </msub>
42
+ <xsl:apply-templates select="slot[1] | pile[1]"/>
43
+ </mstyle>
44
+ </xsl:template>
45
+
46
+ <xsl:template match="tmpl[selector='tmINTER' and not(variation='tvBO_SUM')]">
47
+ <mstyle displaystyle="true">
48
+ <msubsup>
49
+ <mo>&#x2229;</mo>
50
+ <xsl:apply-templates select="slot[2] | pile[2]"/>
51
+ <xsl:apply-templates select="slot[3] | pile[3]"/>
52
+ </msubsup>
53
+ <xsl:apply-templates select="slot[1] | pile[1]"/>
54
+ </mstyle>
55
+ </xsl:template>
56
+
57
+ <xsl:template match="tmpl[selector='tmUNION' and (not(variation='tvBO_UPPER') and not(variation='tvBO_UPPER'))]">
58
+ <mstyle displaystyle="true">
59
+ <mo>&#x222A;</mo> <xsl:apply-templates select="slot[1] | pile[1]"/>
60
+ </mstyle>
61
+ </xsl:template>
62
+
63
+ <xsl:template match="tmpl[selector='tmUNION' and variation='tvBO_LOWER']">
64
+ <mstyle displaystyle="true">
65
+ <munder>
66
+ <mo>&#x222A;</mo>
67
+ <xsl:apply-templates select="slot[2] | pile[2]"/>
68
+ </munder>
69
+ <xsl:apply-templates select="slot[1] | pile[1]"/>
70
+ </mstyle>
71
+ </xsl:template>
72
+
73
+ <xsl:template match="tmpl[selector='tmUNION']">
74
+ <mstyle displaystyle="true">
75
+ <munderover>
76
+ <mo>&#x222A;</mo>
77
+ <xsl:apply-templates select="slot[2] | pile[2]"/>
78
+ <xsl:apply-templates select="slot[3] | pile[3]"/>
79
+ </munderover>
80
+ <xsl:apply-templates select="slot[1] | pile[1]"/>
81
+ </mstyle>
82
+ </xsl:template>
83
+
84
+ <xsl:template match="tmpl[selector='tmUNION' and not(variation='tvBO_SUM') and variation='tvBO_LOWER']">
85
+ <mstyle displaystyle="true">
86
+ <msub>
87
+ <mo>&#x222A;</mo>
88
+ <xsl:apply-templates select="slot[2] | pile[2]"/>
89
+ </msub>
90
+ <xsl:apply-templates select="slot[1] | pile[1]"/>
91
+ </mstyle>
92
+ </xsl:template>
93
+
94
+ <xsl:template match="tmpl[selector='tmUNION' and not(variation='tvBO_SUM') ]">
95
+ <mstyle displaystyle="true">
96
+ <msubsup>
97
+ <mo>&#x222A;</mo>
98
+ <xsl:apply-templates select="slot[2] | pile[2]"/>
99
+ <xsl:apply-templates select="slot[3] | pile[3]"/>
100
+ </msubsup>
101
+ <xsl:apply-templates select="slot[1] | pile[1]"/>
102
+ </mstyle>
103
+ </xsl:template>
104
+ </xsl:stylesheet>
@@ -0,0 +1,29 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'mathtype_to_mathml/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "mathtype_to_mathml_plus"
8
+ spec.version = MathTypeToMathML::VERSION
9
+ spec.authors = ["Jure Triglav"]
10
+ spec.email = ["juretriglav@gmail.com"]
11
+ spec.summary = %q{Converts from a binary MathType format (MTEF) to MathML.}
12
+ spec.description = %q{This gem can be used to convert MathType equations from a binary format (e.g. embedded in Word documents) to an open MathML representation. It achieves that in several stages, first using the "mathtype" gem to convert from a binary to an XML form of MTEF, and second, using XSLTs to convert XML to MathML.}
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.7"
22
+ spec.add_development_dependency "rake", "~> 10.0"
23
+ spec.add_development_dependency "rspec", "~> 3.3"
24
+ spec.add_development_dependency "pry", "~> 0.10"
25
+ spec.add_development_dependency "equivalent-xml", "~> 0.6"
26
+
27
+ spec.add_dependency "nokogiri", "~> 1.6"
28
+ spec.add_dependency "mathtype", "~> 0.0.8"
29
+ end
@@ -0,0 +1,122 @@
1
+ <math xmlns="http://www.w3.org/1998/Math/MathML" display='block'>
2
+ <semantics>
3
+ <mrow>
4
+ <mi>T</mi><mo stretchy='false'>(</mo><mi>r</mi><mo stretchy='false'>)</mo><mo>=</mo><msub>
5
+ <mi>T</mi>
6
+ <mrow>
7
+ <mi>c</mi><mi>o</mi><mi>r</mi><mi>e</mi></mrow>
8
+ </msub>
9
+ <mo>+</mo><mfrac>
10
+ <mrow>
11
+ <msubsup>
12
+ <mover accent='true'>
13
+ <mi>Q</mi>
14
+ <mo>&#x02D9;</mo>
15
+ </mover>
16
+
17
+ <mrow>
18
+ <mi>p</mi><mi>r</mi><mi>o</mi><mi>d</mi></mrow>
19
+ <mrow>
20
+ <mo>&#x0027;</mo><mo>&#x0027;</mo><mo>&#x0027;</mo></mrow>
21
+ </msubsup>
22
+ </mrow>
23
+ <mrow>
24
+ <mn>4</mn><mi>&#x03BB;</mi></mrow>
25
+ </mfrac>
26
+ <mrow><mo>(</mo>
27
+ <mrow>
28
+ <msubsup>
29
+ <mi>r</mi>
30
+ <mrow>
31
+ <mi>c</mi><mi>o</mi><mi>r</mi><mi>e</mi></mrow>
32
+ <mn>2</mn>
33
+ </msubsup>
34
+ <mo>&#x2212;</mo><msup>
35
+ <mi>r</mi>
36
+ <mn>2</mn>
37
+ </msup>
38
+ </mrow>
39
+ <mo>)</mo></mrow><mo>+</mo><mfrac>
40
+ <mrow>
41
+ <msub>
42
+ <mi>T</mi>
43
+ <mrow>
44
+ <mi>s</mi><mi>h</mi><mi>e</mi><mi>l</mi><mi>l</mi></mrow>
45
+ </msub>
46
+ <mo>&#x2212;</mo><msub>
47
+ <mi>T</mi>
48
+ <mrow>
49
+ <mi>c</mi><mi>o</mi><mi>r</mi><mi>e</mi></mrow>
50
+ </msub>
51
+ <mo>+</mo><mfrac>
52
+ <mrow>
53
+ <msubsup>
54
+ <mover accent='true'>
55
+ <mi>Q</mi>
56
+ <mo>&#x02D9;</mo>
57
+ </mover>
58
+
59
+ <mrow>
60
+ <mi>p</mi><mi>r</mi><mi>o</mi><mi>d</mi></mrow>
61
+ <mrow>
62
+ <mo>&#x0027;</mo><mo>&#x0027;</mo><mo>&#x0027;</mo></mrow>
63
+ </msubsup>
64
+ </mrow>
65
+ <mrow>
66
+ <mn>4</mn><mi>&#x03BB;</mi></mrow>
67
+ </mfrac>
68
+ <mrow><mo>(</mo>
69
+ <mrow>
70
+ <msubsup>
71
+ <mi>r</mi>
72
+ <mrow>
73
+ <mi>s</mi><mi>h</mi><mi>e</mi><mi>l</mi><mi>l</mi></mrow>
74
+ <mn>2</mn>
75
+ </msubsup>
76
+ <mo>&#x2212;</mo><msubsup>
77
+ <mi>r</mi>
78
+ <mrow>
79
+ <mi>c</mi><mi>o</mi><mi>r</mi><mi>e</mi></mrow>
80
+ <mn>2</mn>
81
+ </msubsup>
82
+ </mrow>
83
+ <mo>)</mo></mrow></mrow>
84
+ <mrow>
85
+ <mi>ln</mi><mrow><mo>(</mo>
86
+ <mrow>
87
+ <mfrac bevelled='true'>
88
+ <mrow>
89
+ <msub>
90
+ <mi>r</mi>
91
+ <mrow>
92
+ <mi>s</mi><mi>h</mi><mi>e</mi><mi>l</mi><mi>l</mi></mrow>
93
+ </msub>
94
+ </mrow>
95
+ <mrow>
96
+ <msub>
97
+ <mi>r</mi>
98
+ <mrow>
99
+ <mi>c</mi><mi>o</mi><mi>r</mi><mi>e</mi></mrow>
100
+ </msub>
101
+ </mrow>
102
+ </mfrac>
103
+ </mrow>
104
+ <mo>)</mo></mrow></mrow>
105
+ </mfrac>
106
+ <mi>ln</mi><mrow><mo>(</mo>
107
+ <mrow>
108
+ <mfrac>
109
+ <mi>r</mi>
110
+ <mrow>
111
+ <msub>
112
+ <mi>r</mi>
113
+ <mrow>
114
+ <mi>c</mi><mi>o</mi><mi>r</mi><mi>e</mi></mrow>
115
+ </msub>
116
+ </mrow>
117
+ </mfrac>
118
+ </mrow>
119
+ <mo>)</mo></mrow><mtext>&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;(2)</mtext></mrow>
120
+ <annotation encoding='MathType-MTEF'>MathType@MTEF@5@5@+=faaagCart1ev2aaaKnaaaaWenf2ys9wBH5garuavP1wzZbItLDhis9wBH5garmWu51MyVXgaruWqVvNCPvMCG4uz3bqee0evGueE0jxyaibaieYtf9irVeeu0dXdh9vqqj=hHeeu0xXdbba9frFj0=OqFfea0dXdd9vqaq=JfrVkFHe9pgea0dXdar=Jb9hs0dXdbPYxe9vr0=vr0=vqpi0dc9GqpWqaaeaabiGaciaacaqabeaadaqaaqaaaOqaaiaadsfacaGGOaGaamOCaiaacMcacqGH9aqpcaWGubWaaSbaaSqaaiaadogacaWGVbGaamOCaiaadwgaaeqaaOGaey4kaSYaaSaaaeaaceWGrbGbaiaadaqhaaWcbaGaamiCaiaadkhacaWGVbGaamizaaqaaiaacEcacaGGNaGaai4jaaaaaOqaaiaaisdacqaH7oaBaaWaaeWaaeaacaWGYbWaa0baaSqaaiaadogacaWGVbGaamOCaiaadwgaaeaacaaIYaaaaOGaeyOeI0IaamOCamaaCaaaleqabaGaaGOmaaaaaOGaayjkaiaawMcaaiabgUcaRmaalaaabaGaamivamaaBaaaleaacaWGZbGaamiAaiaadwgacaWGSbGaamiBaaqabaGccqGHsislcaWGubWaaSbaaSqaaiaadogacaWGVbGaamOCaiaadwgaaeqaaOGaey4kaSYaaSaaaeaaceWGrbGbaiaadaqhaaWcbaGaamiCaiaadkhacaWGVbGaamizaaqaaiaacEcacaGGNaGaai4jaaaaaOqaaiaaisdacqaH7oaBaaWaaeWaaeaacaWGYbWaa0baaSqaaiaadohacaWGObGaamyzaiaadYgacaWGSbaabaGaaGOmaaaakiabgkHiTiaadkhadaqhaaWcbaGaam4yaiaad+gacaWGYbGaamyzaaqaaiaaikdaaaaakiaawIcacaGLPaaaaeaaciGGSbGaaiOBamaabmaabaWaaSGaaeaacaWGYbWaaSbaaSqaaiaadohacaWGObGaamyzaiaadYgacaWGSbaabeaaaOqaaiaadkhadaWgaaWcbaGaam4yaiaad+gacaWGYbGaamyzaaqabaaaaaGccaGLOaGaayzkaaaaaiGacYgacaGGUbWaaeWaaeaadaWcaaqaaiaadkhaaeaacaWGYbWaaSbaaSqaaiaadogacaWGVbGaamOCaiaadwgaaeqaaaaaaOGaayjkaiaawMcaaiaabccacaqGGaGaaeiiaiaabccacaqGGaGaaeiiaiaabccacaqGOaGaaeOmaiaabMcaaaa@93BD@</annotation>
121
+ </semantics>
122
+ </math>
@@ -0,0 +1,60 @@
1
+ <math xmlns="http://www.w3.org/1998/Math/MathML" display='block'>
2
+ <semantics>
3
+ <mtable columnalign='left'>
4
+ <mtr>
5
+ <mtd>
6
+ <msubsup>
7
+ <mover accent='true'>
8
+ <mi>Q</mi>
9
+ <mo>&#x02D9;</mo>
10
+ </mover>
11
+
12
+ <mrow>
13
+ <mi>p</mi><mi>r</mi><mi>o</mi><mi>d</mi></mrow>
14
+ <mrow>
15
+ <mo>&#x0027;</mo><mo>&#x0027;</mo><mo>&#x0027;</mo></mrow>
16
+ </msubsup>
17
+ <mo>=</mo><mtext>&#x00A0;rate&#x00A0;of&#x00A0;internal&#x00A0;heat&#x00A0;generation&#x00A0;per&#x00A0;unit&#x00A0;volume&#x00A0;</mtext><mrow><mo>[</mo> <mrow>
18
+ <mfrac>
19
+ <mi>W</mi>
20
+ <mrow>
21
+ <msup>
22
+ <mi>m</mi>
23
+ <mn>3</mn>
24
+ </msup>
25
+ </mrow>
26
+ </mfrac>
27
+ </mrow> <mo>]</mo></mrow>
28
+ </mtd>
29
+ </mtr>
30
+ <mtr>
31
+ <mtd>
32
+ <mi>&#x03BB;</mi><mtext>&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;</mtext><mo>=</mo><mtext>&#x00A0;dung&#x00A0;heat&#x00A0;conductivity&#x00A0;</mtext><mrow><mo>[</mo> <mrow>
33
+ <mfrac>
34
+ <mi>W</mi>
35
+ <mrow>
36
+ <mi>m</mi><mo>&#x22C5;</mo><mi>K</mi></mrow>
37
+ </mfrac>
38
+ </mrow> <mo>]</mo></mrow>
39
+ </mtd>
40
+ </mtr>
41
+ <mtr>
42
+ <mtd>
43
+ <mi>r</mi><mtext>&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;</mtext><mo>=</mo><mtext>&#x00A0;radius&#x00A0;</mtext><mrow><mo>[</mo> <mi>m</mi> <mo>]</mo></mrow>
44
+ </mtd>
45
+ </mtr>
46
+ <mtr>
47
+ <mtd>
48
+ <mi>L</mi><mtext>&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;</mtext><mo>=</mo><mtext>&#x00A0;dung&#x00A0;hill&#x00A0;length&#x00A0;</mtext><mrow><mo>[</mo> <mi>m</mi> <mo>]</mo></mrow>
49
+ </mtd>
50
+ </mtr>
51
+ <mtr>
52
+ <mtd>
53
+ <mi>T</mi><mtext>&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;</mtext><mo>=</mo><mtext>&#x00A0;temperature&#x00A0;</mtext><mrow><mo>[</mo> <mrow>
54
+ <mo>&#x00B0;</mo><mi>C</mi></mrow> <mo>]</mo></mrow>
55
+ </mtd>
56
+ </mtr>
57
+ </mtable>
58
+ <annotation encoding='MathType-MTEF'>MathType@MTEF@5@5@+=faaagCart1ev2aaaKnaaaaWenf2ys9wBH5garuavP1wzZbItLDhis9wBH5garmWu51MyVXgaruWqVvNCPvMCG4uz3bqee0evGueE0jxyaibaieYlf9irVeeu0dXdh9vqqj=hHeeu0xXdbba9frFj0=OqFfea0dXdd9vqaq=JfrVkFHe9pgea0dXdar=Jb9hs0dXdbPYxe9vr0=vr0=vqpi0dc9GqpWqaaeaabiGaciaacaqabeaadaqaaqaaaOabaeqabaGabmyuayaacaWaa0baaSqaaiaadchacaWGYbGaam4BaiaadsgaaeaacaGGNaGaai4jaiaacEcaaaGccqGH9aqpcaqGGaGaaeOCaiaabggacaqG0bGaaeyzaiaabccacaqGVbGaaeOzaiaabccacaqGPbGaaeOBaiaabshacaqGLbGaaeOCaiaab6gacaqGHbGaaeiBaiaabccacaqGObGaaeyzaiaabggacaqG0bGaaeiiaiaabEgacaqGLbGaaeOBaiaabwgacaqGYbGaaeyyaiaabshacaqGPbGaae4Baiaab6gacaqGGaGaaeiCaiaabwgacaqGYbGaaeiiaiaabwhacaqGUbGaaeyAaiaabshacaqGGaGaaeODaiaab+gacaqGSbGaaeyDaiaab2gacaqGLbGaaeiiamaadmaabaWaaSaaaeaacaWGxbaabaGaamyBamaaCaaaleqabaGaaG4maaaaaaaakiaawUfacaGLDbaaaeaacqaH7oaBcaqGGaGaaeiiaiaabccacaqGGaGaaeiiaiaabccacqGH9aqpcaqGGaGaaeizaiaabwhacaqGUbGaae4zaiaabccacaqGObGaaeyzaiaabggacaqG0bGaaeiiaiaabogacaqGVbGaaeOBaiaabsgacaqG1bGaae4yaiaabshacaqGPbGaaeODaiaabMgacaqG0bGaaeyEaiaabccadaWadaqaamaalaaabaGaam4vaaqaaiaad2gacqGHflY1caWGlbaaaaGaay5waiaaw2faaaqaaiaadkhacaqGGaGaaeiiaiaabccacaqGGaGaaeiiaiaabccacaqGGaGaeyypa0JaaeiiaiaabkhacaqGHbGaaeizaiaabMgacaqG1bGaae4CaiaabccadaWadaqaaiaad2gaaiaawUfacaGLDbaaaeaacaWGmbGaaeiiaiaabccacaqGGaGaaeiiaiaabccacaqGGaGaeyypa0JaaeiiaiaabsgacaqG1bGaaeOBaiaabEgacaqGGaGaaeiAaiaabMgacaqGSbGaaeiBaiaabccacaqGSbGaaeyzaiaab6gacaqGNbGaaeiAaiaabshacaqGGaWaamWaaeaacaWGTbaacaGLBbGaayzxaaaabaGaamivaiaabccacaqGGaGaaeiiaiaabccacaqGGaGaaeiiaiabg2da9iaabccacaqG0bGaaeyzaiaab2gacaqGWbGaaeyzaiaabkhacaqGHbGaaeiDaiaabwhacaqGYbGaaeyzaiaabccadaWadaqaaiabgclaWkaadoeaaiaawUfacaGLDbaaaaaa@CC70@</annotation>
59
+ </semantics>
60
+ </math>
@@ -0,0 +1,70 @@
1
+ <math display='block'>
2
+ <semantics>
3
+ <mtable columnalign='left'>
4
+ <mtr>
5
+ <mtd>
6
+ <mtext>&#x2003;</mtext><mtext>&#x2003;</mtext><mtext>&#x2009;</mtext><munder>
7
+ <mrow>
8
+ <mi>min</mi></mrow>
9
+ <mrow>
10
+ <mi>w</mi><mo>,</mo><mi>b</mi><mo>,</mo><mi>&#x03BE;</mi></mrow>
11
+ </munder>
12
+ <mtext>&#x2003;</mtext><mtext>&#x2009;</mtext><mfrac>
13
+ <mn>1</mn>
14
+ <mn>2</mn>
15
+ </mfrac>
16
+ <msup>
17
+ <mi>w</mi>
18
+ <mi>T</mi>
19
+ </msup>
20
+ <mi>w</mi><mo>+</mo><mi>C</mi><munderover>
21
+ <mstyle mathsize='140%' displaystyle='true'><mo>&#x2211;</mo></mstyle>
22
+ <mrow>
23
+ <mi>i</mi><mo>=</mo><mn>1</mn></mrow>
24
+ <mi>l</mi>
25
+ </munderover >
26
+ <msub>
27
+ <mi>&#x03BE;</mi>
28
+ <mi>i</mi>
29
+ </msub>
30
+
31
+ </mtd>
32
+ </mtr>
33
+ <mtr>
34
+ <mtd>
35
+ <mtext>subject</mtext><mtext>&#x2009;</mtext><mtext>to&#x00A0;</mtext><mtext>&#x2009;</mtext><mtext>&#x2003;</mtext><msub>
36
+ <mi>y</mi>
37
+ <mi>i</mi>
38
+ </msub>
39
+ <mo stretchy='false'>(</mo><msup>
40
+ <mi>w</mi>
41
+ <mi>T</mi>
42
+ </msup>
43
+ <mi>&#x03D5;</mi><mrow><mo>(</mo>
44
+ <mrow>
45
+ <msub>
46
+ <mi>x</mi>
47
+ <mi>i</mi>
48
+ </msub>
49
+ </mrow>
50
+ <mo>)</mo></mrow><mo>+</mo><mi>b</mi><mo stretchy='false'>)</mo><mo>&#x00A0;</mo><mtext>&#x2009;</mtext><mo>&#x2265;</mo><mtext>&#x2009;</mtext><mn>1</mn><mo>&#x2212;</mo><msub>
51
+ <mi>&#x03BE;</mi>
52
+ <mi>i</mi>
53
+ </msub>
54
+
55
+ </mtd>
56
+ </mtr>
57
+ <mtr>
58
+ <mtd>
59
+ <mtext>&#x2003;</mtext><mtext>&#x2003;</mtext><mtext>&#x2003;</mtext><mtext>&#x2003;</mtext><mtext>&#x2003;</mtext><msub>
60
+ <mi>&#x03BE;</mi>
61
+ <mi>i</mi>
62
+ </msub>
63
+ <mo>&#x2265;</mo><mn>0</mn><mo>,</mo><mtext>&#x2003;</mtext><mo>&#x2200;</mo><mi>i</mi>
64
+ </mtd>
65
+ </mtr>
66
+ </mtable>
67
+
68
+ <annotation encoding='MathType-MTEF'>MathType@MTEF@5@5@+=faaagCart1ev2aaaKnaaaaWenf2ys9wBH5garuavP1wzZbItLDhis9wBH5garmWu51MyVXgaruWqVvNCPvMCG4uz3bqee0evGueE0jxyaibaieYlf9irVeeu0dXdh9vqqj=hHeeu0xXdbba9frFj0=OqFfea0dXdd9vqaq=JfrVkFHe9pgea0dXdar=Jb9hs0dXdbPYxe9vr0=vr0=vqpi0dc9GqpWqaaeaabiGaciaacaqabeaadaqaaqaaaOabaeqabaGaaGzbVlaaywW7caaMc8+aaCbeaeaaqaaaaaaaaaWdbiGac2gacaGGPbGaaiOBaaWcpaqaa8qacaWG3bGaaiilaiaadkgacaGGSaGaeqOVdGhapaqabaGccaaMf8UaaGjbV=qadaWcaaWdaeaapeGaaGymaaWdaeaapeGaaGOmaaaacaWG3bWdamaaCaaaleqabaWdbiaadsfaaaGccaWG3bGaey4kaSIaam4qamaawahabeWcpaqaa8qacaWGPbGaeyypa0JaaGymaaWdaeaapeGaamiBaaqdpaqaa8qacqGHris5aaGccqaH+oaEpaWaaSbaaSqaa8qacaWGPbaapaqabaaakeaapeGaae4CaiaabwhacaqGIbGaaeOAaiaabwgacaqGJbGaaeiDaiaaysW7caqG0bGaae4BaiaabckacaaMe8UaaGzbVlaadMhapaWaaSbaaSqaa8qacaWGPbaapaqabaGccaGGOaWdbiaadEhapaWaaWbaaSqabeaapeGaamivaaaak8aacqaHvpGzdaqadaqaa8qacaWG4bWdamaaBaaaleaapeGaamyAaaWdaeqaaaGccaGLOaGaayzkaaWdbiabgUcaRiaadkgapaGaaiyka8qacaGGGcGaaGjbVlabgwMiZkaaysW7caaIXaGaeyOeI0IaeqOVdG3damaaBaaaleaapeGaamyAaaWdaeqaaaGcpeqaaiaaywW7caaMf8UaaGzbVlaaywW7caaMf8UaeqOVdG3damaaBaaaleaapeGaamyAaaWdaeqaaOWdbiabgwMiZkaaicdacaGGSaGaaGzbVlabgcGiIiaadMgaaaaa@8B25@</annotation>
69
+ </semantics>
70
+ </math>
@@ -0,0 +1,173 @@
1
+ <math display='block'>
2
+ <semantics>
3
+ <mrow>
4
+ <msubsup>
5
+ <mi>P</mi>
6
+ <mrow>
7
+ <mi>x</mi><mo>,</mo><mi>t</mi></mrow>
8
+ <mi>c</mi>
9
+ </msubsup>
10
+ <mo>=</mo><msubsup>
11
+ <mi>D</mi>
12
+ <mi>t</mi>
13
+ <mi>c</mi>
14
+ </msubsup>
15
+ <mrow><mo>(</mo>
16
+ <mrow>
17
+ <mfrac>
18
+ <mrow>
19
+ <mstyle displaystyle='true'>
20
+ <munderover>
21
+ <mo>&#x2211;</mo>
22
+ <mrow>
23
+ <mi>j</mi><mo>=</mo><mn>1</mn></mrow>
24
+ <mi>m</mi>
25
+ </munderover>
26
+ <mrow>
27
+ <msubsup>
28
+ <mi>D</mi>
29
+ <mrow>
30
+ <mi>t</mi><mo>&#x2212;</mo><mi>j</mi><mo>+</mo><mn>1</mn></mrow>
31
+ <mrow>
32
+ <mi>c</mi><mo>&#x2212;</mo><mi>j</mi></mrow>
33
+ </msubsup>
34
+ </mrow>
35
+ </mstyle></mrow>
36
+ <mrow>
37
+ <mstyle displaystyle='true'>
38
+ <munderover>
39
+ <mo>&#x2211;</mo>
40
+ <mrow>
41
+ <mi>j</mi><mo>=</mo><mn>1</mn></mrow>
42
+ <mi>m</mi>
43
+ </munderover>
44
+ <mrow>
45
+ <msubsup>
46
+ <mi>D</mi>
47
+ <mrow>
48
+ <mi>t</mi><mo>&#x2212;</mo><mi>j</mi></mrow>
49
+ <mrow>
50
+ <mi>c</mi><mo>&#x2212;</mo><mi>j</mi></mrow>
51
+ </msubsup>
52
+ </mrow>
53
+ </mstyle></mrow>
54
+ </mfrac>
55
+ <mo>+</mo><mfrac>
56
+ <mrow>
57
+ <mstyle displaystyle='true'>
58
+ <munderover>
59
+ <mo>&#x2211;</mo>
60
+ <mrow>
61
+ <mi>j</mi><mo>=</mo><mn>1</mn></mrow>
62
+ <mi>m</mi>
63
+ </munderover>
64
+ <mrow>
65
+ <msubsup>
66
+ <mi>D</mi>
67
+ <mrow>
68
+ <mi>t</mi><mo>&#x2212;</mo><mi>j</mi><mo>+</mo><mn>2</mn></mrow>
69
+ <mrow>
70
+ <mi>c</mi><mo>&#x2212;</mo><mi>j</mi></mrow>
71
+ </msubsup>
72
+ </mrow>
73
+ </mstyle></mrow>
74
+ <mrow>
75
+ <mstyle displaystyle='true'>
76
+ <munderover>
77
+ <mo>&#x2211;</mo>
78
+ <mrow>
79
+ <mi>j</mi><mo>=</mo><mn>1</mn></mrow>
80
+ <mi>m</mi>
81
+ </munderover>
82
+ <mrow>
83
+ <msubsup>
84
+ <mi>D</mi>
85
+ <mrow>
86
+ <mi>t</mi><mo>&#x2212;</mo><mi>j</mi></mrow>
87
+ <mrow>
88
+ <mi>c</mi><mo>&#x2212;</mo><mi>j</mi></mrow>
89
+ </msubsup>
90
+ </mrow>
91
+ </mstyle></mrow>
92
+ </mfrac>
93
+ <mo>+</mo><mfrac>
94
+ <mrow>
95
+ <mstyle displaystyle='true'>
96
+ <munderover>
97
+ <mo>&#x2211;</mo>
98
+ <mrow>
99
+ <mi>j</mi><mo>=</mo><mn>1</mn></mrow>
100
+ <mi>m</mi>
101
+ </munderover>
102
+ <mrow>
103
+ <msubsup>
104
+ <mi>D</mi>
105
+ <mrow>
106
+ <mi>t</mi><mo>&#x2212;</mo><mi>j</mi><mo>+</mo><mn>3</mn></mrow>
107
+ <mrow>
108
+ <mi>c</mi><mo>&#x2212;</mo><mi>j</mi></mrow>
109
+ </msubsup>
110
+ </mrow>
111
+ </mstyle></mrow>
112
+ <mrow>
113
+ <mstyle displaystyle='true'>
114
+ <munderover>
115
+ <mo>&#x2211;</mo>
116
+ <mrow>
117
+ <mi>j</mi><mo>=</mo><mn>1</mn></mrow>
118
+ <mi>m</mi>
119
+ </munderover>
120
+ <mrow>
121
+ <msubsup>
122
+ <mi>D</mi>
123
+ <mrow>
124
+ <mi>t</mi><mo>&#x2212;</mo><mi>j</mi></mrow>
125
+ <mrow>
126
+ <mi>c</mi><mo>&#x2212;</mo><mi>j</mi></mrow>
127
+ </msubsup>
128
+ </mrow>
129
+ </mstyle></mrow>
130
+ </mfrac>
131
+ <mo>+</mo><mfrac>
132
+ <mrow>
133
+ <mstyle displaystyle='true'>
134
+ <munderover>
135
+ <mo>&#x2211;</mo>
136
+ <mrow>
137
+ <mi>j</mi><mo>=</mo><mn>1</mn></mrow>
138
+ <mi>m</mi>
139
+ </munderover>
140
+ <mrow>
141
+ <msubsup>
142
+ <mi>D</mi>
143
+ <mrow>
144
+ <mi>t</mi><mo>&#x2212;</mo><mi>j</mi><mo>+</mo><mn>4</mn></mrow>
145
+ <mrow>
146
+ <mi>c</mi><mo>&#x2212;</mo><mi>j</mi></mrow>
147
+ </msubsup>
148
+ </mrow>
149
+ </mstyle></mrow>
150
+ <mrow>
151
+ <mstyle displaystyle='true'>
152
+ <munderover>
153
+ <mo>&#x2211;</mo>
154
+ <mrow>
155
+ <mi>j</mi><mo>=</mo><mn>1</mn></mrow>
156
+ <mi>m</mi>
157
+ </munderover>
158
+ <mrow>
159
+ <msubsup>
160
+ <mi>D</mi>
161
+ <mrow>
162
+ <mi>t</mi><mo>&#x2212;</mo><mi>j</mi></mrow>
163
+ <mrow>
164
+ <mi>c</mi><mo>&#x2212;</mo><mi>j</mi></mrow>
165
+ </msubsup>
166
+ </mrow>
167
+ </mstyle></mrow>
168
+ </mfrac>
169
+ <mo>+</mo><mo>.</mo><mo>.</mo><mo>.</mo></mrow>
170
+ <mo>)</mo></mrow></mrow>
171
+ <annotation encoding='MathType-MTEF'>MathType@MTEF@5@5@+=faaagCart1ev2aaaKnaaaaWenf2ys9wBH5garuavP1wzZbItLDhis9wBH5garmWu51MyVXgaruWqVvNCPvMCG4uz3bqee0evGueE0jxyaibaieYlf9irVeeu0dXdh9vqqj=hHeeu0xXdbba9frFj0=OqFfea0dXdd9vqaq=JfrVkFHe9pgea0dXdar=Jb9hs0dXdbPYxe9vr0=vr0=vqpi0dc9GqpWqaaeaabiGaciaacaqabeaadaqaaqaaaOqaaiaadcfadaqhaaWcbaGaamiEaiaacYcacaWG0baabaGaam4yaaaakiabg2da9iaadseadaqhaaWcbaGaamiDaaqaaiaadogaaaGcdaqadaqaamaalaaabaWaaabCaeaacaWGebWaa0baaSqaaiaadshacqGHsislcaWGQbGaey4kaSIaaGymaaqaaiaadogacqGHsislcaWGQbaaaaqaaiaadQgacqGH9aqpcaaIXaaabaGaamyBaaqdcqGHris5aaGcbaWaaabCaeaacaWGebWaa0baaSqaaiaadshacqGHsislcaWGQbaabaGaam4yaiabgkHiTiaadQgaaaaabaGaamOAaiabg2da9iaaigdaaeaacaWGTbaaniabggHiLdaaaOGaey4kaSYaaSaaaeaadaaeWbqaaiaadseadaqhaaWcbaGaamiDaiabgkHiTiaadQgacqGHRaWkcaaIYaaabaGaam4yaiabgkHiTiaadQgaaaaabaGaamOAaiabg2da9iaaigdaaeaacaWGTbaaniabggHiLdaakeaadaaeWbqaaiaadseadaqhaaWcbaGaamiDaiabgkHiTiaadQgaaeaacaWGJbGaeyOeI0IaamOAaaaaaeaacaWGQbGaeyypa0JaaGymaaqaaiaad2gaa0GaeyyeIuoaaaGccqGHRaWkdaWcaaqaamaaqahabaGaamiramaaDaaaleaacaWG0bGaeyOeI0IaamOAaiabgUcaRiaaiodaaeaacaWGJbGaeyOeI0IaamOAaaaaaeaacaWGQbGaeyypa0JaaGymaaqaaiaad2gaa0GaeyyeIuoaaOqaamaaqahabaGaamiramaaDaaaleaacaWG0bGaeyOeI0IaamOAaaqaaiaadogacqGHsislcaWGQbaaaaqaaiaadQgacqGH9aqpcaaIXaaabaGaamyBaaqdcqGHris5aaaakiabgUcaRmaalaaabaWaaabCaeaacaWGebWaa0baaSqaaiaadshacqGHsislcaWGQbGaey4kaSIaaGinaaqaaiaadogacqGHsislcaWGQbaaaaqaaiaadQgacqGH9aqpcaaIXaaabaGaamyBaaqdcqGHris5aaGcbaWaaabCaeaacaWGebWaa0baaSqaaiaadshacqGHsislcaWGQbaabaGaam4yaiabgkHiTiaadQgaaaaabaGaamOAaiabg2da9iaaigdaaeaacaWGTbaaniabggHiLdaaaOGaey4kaSIaaiOlaiaac6cacaGGUaaacaGLOaGaayzkaaaaaa@ACBC@</annotation>
172
+ </semantics>
173
+ </math>