mathtype_to_mathml 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -0
  3. data/lib/mathtype_to_mathml.rb +1 -1
  4. data/lib/mathtype_to_mathml/char_replacer.rb +60 -5
  5. data/lib/mathtype_to_mathml/version.rb +1 -1
  6. data/lib/transform.xsl +20 -41
  7. data/lib/xsl/box.xsl +42 -0
  8. data/lib/xsl/char.xsl +1820 -1
  9. data/lib/xsl/fence.xsl +228 -0
  10. data/lib/xsl/frac.xsl +46 -0
  11. data/lib/xsl/int.xsl +622 -0
  12. data/lib/xsl/lim.xsl +32 -0
  13. data/lib/xsl/product_coproduct.xsl +107 -0
  14. data/lib/xsl/sum.xsl +24 -0
  15. data/mathtype_to_mathml.gemspec +1 -1
  16. data/spec/fixtures/expected/280.xml +122 -0
  17. data/spec/fixtures/expected/281.xml +61 -0
  18. data/spec/fixtures/expected/299.xml +70 -0
  19. data/spec/fixtures/expected/326.xml +173 -0
  20. data/spec/fixtures/expected/424.xml +425 -0
  21. data/spec/fixtures/expected/450.xml +174 -0
  22. data/spec/fixtures/expected/452.xml +166 -0
  23. data/spec/fixtures/expected/478.xml +303 -0
  24. data/spec/fixtures/expected/boxes.xml +22 -0
  25. data/spec/fixtures/expected/equation14.xml +54 -0
  26. data/spec/fixtures/expected/fences.xml +64 -0
  27. data/spec/fixtures/expected/integrals.xml +264 -0
  28. data/spec/fixtures/expected/sums.xml +36 -0
  29. data/spec/fixtures/expected/unions_and_intersections.xml +140 -0
  30. data/spec/fixtures/input/280.bin +0 -0
  31. data/spec/fixtures/input/281.bin +0 -0
  32. data/spec/fixtures/input/299.bin +0 -0
  33. data/spec/fixtures/input/326.bin +0 -0
  34. data/spec/fixtures/input/424.bin +0 -0
  35. data/spec/fixtures/input/450.bin +0 -0
  36. data/spec/fixtures/input/452.bin +0 -0
  37. data/spec/fixtures/input/478.bin +0 -0
  38. data/spec/fixtures/input/boxes.bin +0 -0
  39. data/spec/fixtures/input/equation14.bin +0 -0
  40. data/spec/fixtures/input/fences.bin +0 -0
  41. data/spec/fixtures/input/integrals.bin +0 -0
  42. data/spec/fixtures/input/sums.bin +0 -0
  43. data/spec/fixtures/input/unions_and_intersections.bin +0 -0
  44. metadata +66 -5
  45. data/lib/xsl/brace.xsl +0 -55
data/lib/xsl/lim.xsl ADDED
@@ -0,0 +1,32 @@
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
+ <!-- Limits -->
8
+
9
+ <xsl:template match="tmpl[selector='tmLIM']">
10
+ <munder>
11
+ <xsl:apply-templates select="slot[1]"/>
12
+ <xsl:apply-templates select="slot[2]"/>
13
+ </munder>
14
+ </xsl:template>
15
+
16
+
17
+ <xsl:template match="tmpl[selector='tmLIM' and variation='tvBO_UPPER']">
18
+ <mover>
19
+ <xsl:apply-templates select="slot[1]"/>
20
+ <xsl:apply-templates select="slot[3]"/>
21
+ </mover>
22
+ </xsl:template>
23
+
24
+ <xsl:template match="tmpl[selector='tmLIM' and (variation='tvBO_UPPER' and variation='tvBO_LOWER')]">
25
+ <munderover>
26
+ <xsl:apply-templates select="slot[1]"/>
27
+ <xsl:apply-templates select="slot[2]"/>
28
+ <xsl:apply-templates select="slot[3]"/>
29
+ </munderover>
30
+ </xsl:template>
31
+
32
+ </xsl:stylesheet>
@@ -0,0 +1,107 @@
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
+ <!-- Product and coproduct -->
8
+
9
+ <xsl:template match="tmpl[selector='tmPROD']">
10
+ <mstyle displaystyle="true">
11
+ <munderover>
12
+ <mo>&#x220F;</mo>
13
+ <xsl:apply-templates select="slot[2]"/>
14
+ <xsl:apply-templates select="slot[3]"/>
15
+ </munderover>
16
+ <xsl:apply-templates select="slot[1]"/>
17
+ </mstyle>
18
+ </xsl:template>
19
+
20
+ <xsl:template match="tmpl[selector='tmPROD' and variation='tvBO_LOWER' and not(variation='tvBO_UPPER')]">
21
+ <mstyle displaystyle="true">
22
+ <munder>
23
+ <mo>&#x220F;</mo>
24
+ <xsl:apply-templates select="slot[2]"/>
25
+ </munder>
26
+ <xsl:apply-templates select="slot[1]"/>
27
+ </mstyle>
28
+ </xsl:template>
29
+
30
+ <xsl:template match="tmpl[selector='tmPROD' and (not(variation='tvBO_UPPER') and not(variation='tvBO_LOWER'))]">
31
+ <mstyle displaystyle="true">
32
+ <mo>&#x220F;</mo> <xsl:apply-templates select="slot[1]"/>
33
+ </mstyle>
34
+ </xsl:template>
35
+
36
+ <xsl:template match="tmpl[selector='tmPROD' and not(variation='tvBO_SUM') and variation='tvBO_LOWER']">
37
+ <mstyle displaystyle="true">
38
+ <msub>
39
+ <mo>&#x220F;</mo>
40
+ <xsl:apply-templates select="slot[2]"/>
41
+ </msub>
42
+ <xsl:apply-templates select="slot[1]"/>
43
+ </mstyle>
44
+ </xsl:template>
45
+
46
+ <xsl:template match="tmpl[selector='tmPROD' and not(variation='tvBO_SUM') ]">
47
+ <mstyle displaystyle="true">
48
+ <msubsup>
49
+ <mo>&#x220F;</mo>
50
+ <xsl:apply-templates select="slot[2]"/>
51
+ <xsl:apply-templates select="slot[3]"/>
52
+ </msubsup>
53
+ <xsl:apply-templates select="slot[1]"/>
54
+ </mstyle>
55
+ </xsl:template>
56
+
57
+ <xsl:template match="tmpl[selector='tmCOPROD']">
58
+ <mstyle displaystyle="true">
59
+ <munderover>
60
+ <mo>&#x2210;</mo>
61
+ <xsl:apply-templates select="slot[2]"/>
62
+ <xsl:apply-templates select="slot[3]"/>
63
+ </munderover>
64
+ <xsl:apply-templates select="slot[1]"/>
65
+ </mstyle>
66
+ </xsl:template>
67
+
68
+ <xsl:template match="tmpl[selector='tmCOPROD' and not(variation='tvBO_SUM') ]">
69
+ <mstyle displaystyle="true">
70
+ <msubsup>
71
+ <mo>&#x2210;</mo>
72
+ <xsl:apply-templates select="slot[2]"/>
73
+ <xsl:apply-templates select="slot[3]"/>
74
+ </msubsup>
75
+ <xsl:apply-templates select="slot[1]"/>
76
+ </mstyle>
77
+ </xsl:template>
78
+
79
+ <xsl:template match="tmpl[selector='tmCOPROD' and (not(variation='tvBO_UPPER') and not(variation='tvBO_LOWER'))]">
80
+ <mstyle displaystyle="true">
81
+ <mo>&#x2210;</mo> <xsl:apply-templates select="slot[1]"/>
82
+ </mstyle>
83
+ </xsl:template>
84
+
85
+ <xsl:template match="tmpl[selector='tmCOPROD' and variation='tvBO_LOWER' and not(variation='tvBO_UPPER')]">
86
+ <mstyle displaystyle="true">
87
+ <munder>
88
+ <mo>&#x2210;</mo>
89
+ <xsl:apply-templates select="slot[2]"/>
90
+ </munder>
91
+ <xsl:apply-templates select="slot[1]"/>
92
+ </mstyle>
93
+ </xsl:template>
94
+
95
+ <xsl:template match="tmpl[selector='tmCOPROD' and not(variation='tvBO_SUM') and variation='tvBO_LOWER' and not(variation='tvBO_UPPER')]">
96
+ <mstyle displaystyle="true">
97
+ <msub>
98
+ <mo>&#x2210;</mo>
99
+ <xsl:apply-templates select="slot[2]"/>
100
+ </msub>
101
+ <xsl:apply-templates select="slot[1]"/>
102
+ </mstyle>
103
+ </xsl:template>
104
+
105
+
106
+
107
+ </xsl:stylesheet>
data/lib/xsl/sum.xsl CHANGED
@@ -54,4 +54,28 @@
54
54
  <xsl:apply-templates select="slot[1]"/>
55
55
  </mstyle>
56
56
  </xsl:template>
57
+
58
+ <!-- Sum operator -->
59
+ <xsl:template match="tmpl[selector='tmSUMOP']">
60
+ <munderover>
61
+ <mstyle mathsize="140%" displaystyle="true"><xsl:apply-templates select="slot[4]"/></mstyle>
62
+ <xsl:apply-templates select="slot[2]"/>
63
+ <xsl:apply-templates select="slot[3]"/>
64
+ </munderover>
65
+ </xsl:template>
66
+
67
+ <xsl:template match="tmpl[selector='tmSUMOP' and variation='tvBO_UPPER' ]">
68
+ <mover>
69
+ <mstyle mathsize="140%" displaystyle="true"><xsl:apply-templates select="slot[4]"/></mstyle>
70
+ <xsl:apply-templates select="slot[3]"/>
71
+ </mover>
72
+ </xsl:template>
73
+
74
+ <xsl:template match="tmpl[selector='tmSUMOP' and variation='tvBO_LOWER' ]">
75
+ <munder>
76
+ <mstyle mathsize="140%" displaystyle="true"><xsl:apply-templates select="slot[4]"/></mstyle>
77
+ <xsl:apply-templates select="slot[2]"/>
78
+ </munder>
79
+ </xsl:template>
80
+
57
81
  </xsl:stylesheet>
@@ -24,5 +24,5 @@ Gem::Specification.new do |spec|
24
24
  spec.add_development_dependency "pry", "~> 0.10"
25
25
 
26
26
  spec.add_dependency "nokogiri", "~> 1.6"
27
- spec.add_dependency "mathtype", "~> 0.0.5"
27
+ spec.add_dependency "mathtype", "~> 0.0.6"
28
28
  end
@@ -0,0 +1,122 @@
1
+ <math 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,61 @@
1
+ <math 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
+
59
+ <annotation encoding='MathType-MTEF'>MathType@MTEF@5@5@+=faaagCart1ev2aaaKnaaaaWenf2ys9wBH5garuavP1wzZbItLDhis9wBH5garmWu51MyVXgaruWqVvNCPvMCG4uz3bqee0evGueE0jxyaibaieYlf9irVeeu0dXdh9vqqj=hHeeu0xXdbba9frFj0=OqFfea0dXdd9vqaq=JfrVkFHe9pgea0dXdar=Jb9hs0dXdbPYxe9vr0=vr0=vqpi0dc9GqpWqaaeaabiGaciaacaqabeaadaqaaqaaaOabaeqabaGabmyuayaacaWaa0baaSqaaiaadchacaWGYbGaam4BaiaadsgaaeaacaGGNaGaai4jaiaacEcaaaGccqGH9aqpcaqGGaGaaeOCaiaabggacaqG0bGaaeyzaiaabccacaqGVbGaaeOzaiaabccacaqGPbGaaeOBaiaabshacaqGLbGaaeOCaiaab6gacaqGHbGaaeiBaiaabccacaqGObGaaeyzaiaabggacaqG0bGaaeiiaiaabEgacaqGLbGaaeOBaiaabwgacaqGYbGaaeyyaiaabshacaqGPbGaae4Baiaab6gacaqGGaGaaeiCaiaabwgacaqGYbGaaeiiaiaabwhacaqGUbGaaeyAaiaabshacaqGGaGaaeODaiaab+gacaqGSbGaaeyDaiaab2gacaqGLbGaaeiiamaadmaabaWaaSaaaeaacaWGxbaabaGaamyBamaaCaaaleqabaGaaG4maaaaaaaakiaawUfacaGLDbaaaeaacqaH7oaBcaqGGaGaaeiiaiaabccacaqGGaGaaeiiaiaabccacqGH9aqpcaqGGaGaaeizaiaabwhacaqGUbGaae4zaiaabccacaqGObGaaeyzaiaabggacaqG0bGaaeiiaiaabogacaqGVbGaaeOBaiaabsgacaqG1bGaae4yaiaabshacaqGPbGaaeODaiaabMgacaqG0bGaaeyEaiaabccadaWadaqaamaalaaabaGaam4vaaqaaiaad2gacqGHflY1caWGlbaaaaGaay5waiaaw2faaaqaaiaadkhacaqGGaGaaeiiaiaabccacaqGGaGaaeiiaiaabccacaqGGaGaeyypa0JaaeiiaiaabkhacaqGHbGaaeizaiaabMgacaqG1bGaae4CaiaabccadaWadaqaaiaad2gaaiaawUfacaGLDbaaaeaacaWGmbGaaeiiaiaabccacaqGGaGaaeiiaiaabccacaqGGaGaeyypa0JaaeiiaiaabsgacaqG1bGaaeOBaiaabEgacaqGGaGaaeiAaiaabMgacaqGSbGaaeiBaiaabccacaqGSbGaaeyzaiaab6gacaqGNbGaaeiAaiaabshacaqGGaWaamWaaeaacaWGTbaacaGLBbGaayzxaaaabaGaamivaiaabccacaqGGaGaaeiiaiaabccacaqGGaGaaeiiaiabg2da9iaabccacaqG0bGaaeyzaiaab2gacaqGWbGaaeyzaiaabkhacaqGHbGaaeiDaiaabwhacaqGYbGaaeyzaiaabccadaWadaqaaiabgclaWkaadoeaaiaawUfacaGLDbaaaaaa@CC70@</annotation>
60
+ </semantics>
61
+ </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>