mathematical 0.0.1 → 0.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.
Files changed (261) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +5 -4
  3. data/.gitmodules +0 -4
  4. data/README.md +108 -28
  5. data/Rakefile +3 -31
  6. data/ext/mathematical/README.itex2MML.md +11 -0
  7. data/ext/mathematical/README.lasem.md +11 -0
  8. data/ext/mathematical/extconf.rb +51 -0
  9. data/ext/mathematical/itex2MML.h +63 -0
  10. data/ext/mathematical/lasemrender.c +257 -0
  11. data/ext/mathematical/lex.yy.c +6548 -0
  12. data/ext/mathematical/lsm.c +30 -0
  13. data/ext/mathematical/lsm.h +36 -0
  14. data/ext/mathematical/lsmattributes.c +279 -0
  15. data/ext/mathematical/lsmattributes.h +75 -0
  16. data/ext/mathematical/lsmcairo.c +598 -0
  17. data/ext/mathematical/lsmcairo.h +51 -0
  18. data/ext/mathematical/lsmdebug.c +179 -0
  19. data/ext/mathematical/lsmdebug.h +76 -0
  20. data/ext/mathematical/lsmdom.h +43 -0
  21. data/ext/mathematical/lsmdomcharacterdata.c +114 -0
  22. data/ext/mathematical/lsmdomcharacterdata.h +59 -0
  23. data/ext/mathematical/lsmdomdocument.c +292 -0
  24. data/ext/mathematical/lsmdomdocument.h +82 -0
  25. data/ext/mathematical/lsmdomdocumentfragment.c +81 -0
  26. data/ext/mathematical/lsmdomdocumentfragment.h +55 -0
  27. data/ext/mathematical/lsmdomelement.c +148 -0
  28. data/ext/mathematical/lsmdomelement.h +62 -0
  29. data/ext/mathematical/lsmdomentities.c +2155 -0
  30. data/ext/mathematical/lsmdomentities.h +35 -0
  31. data/ext/mathematical/lsmdomenumtypes.c +99 -0
  32. data/ext/mathematical/lsmdomenumtypes.c.template +39 -0
  33. data/ext/mathematical/lsmdomenumtypes.h +26 -0
  34. data/ext/mathematical/lsmdomenumtypes.h.template +26 -0
  35. data/ext/mathematical/lsmdomimplementation.c +82 -0
  36. data/ext/mathematical/lsmdomimplementation.h +41 -0
  37. data/ext/mathematical/lsmdomnamednodemap.c +118 -0
  38. data/ext/mathematical/lsmdomnamednodemap.h +64 -0
  39. data/ext/mathematical/lsmdomnode.c +725 -0
  40. data/ext/mathematical/lsmdomnode.h +120 -0
  41. data/ext/mathematical/lsmdomnodelist.c +70 -0
  42. data/ext/mathematical/lsmdomnodelist.h +58 -0
  43. data/ext/mathematical/lsmdomparser.c +461 -0
  44. data/ext/mathematical/lsmdomparser.h +54 -0
  45. data/ext/mathematical/lsmdomtext.c +82 -0
  46. data/ext/mathematical/lsmdomtext.h +55 -0
  47. data/ext/mathematical/lsmdomtypes.h +44 -0
  48. data/ext/mathematical/lsmdomview.c +422 -0
  49. data/ext/mathematical/lsmdomview.h +94 -0
  50. data/ext/mathematical/lsmmathml.h +66 -0
  51. data/ext/mathematical/lsmmathmlactionelement.c +93 -0
  52. data/ext/mathematical/lsmmathmlactionelement.h +57 -0
  53. data/ext/mathematical/lsmmathmlaligngroupelement.c +102 -0
  54. data/ext/mathematical/lsmmathmlaligngroupelement.h +56 -0
  55. data/ext/mathematical/lsmmathmlalignmarkelement.c +102 -0
  56. data/ext/mathematical/lsmmathmlalignmarkelement.h +56 -0
  57. data/ext/mathematical/lsmmathmlattributes.c +197 -0
  58. data/ext/mathematical/lsmmathmlattributes.h +126 -0
  59. data/ext/mathematical/lsmmathmldocument.c +306 -0
  60. data/ext/mathematical/lsmmathmldocument.h +61 -0
  61. data/ext/mathematical/lsmmathmlelement.c +491 -0
  62. data/ext/mathematical/lsmmathmlelement.h +107 -0
  63. data/ext/mathematical/lsmmathmlenums.c +429 -0
  64. data/ext/mathematical/lsmmathmlenums.h +182 -0
  65. data/ext/mathematical/lsmmathmlenumtypes.c +666 -0
  66. data/ext/mathematical/lsmmathmlenumtypes.c.template +39 -0
  67. data/ext/mathematical/lsmmathmlenumtypes.h +90 -0
  68. data/ext/mathematical/lsmmathmlenumtypes.h.template +26 -0
  69. data/ext/mathematical/lsmmathmlerrorelement.c +58 -0
  70. data/ext/mathematical/lsmmathmlerrorelement.h +56 -0
  71. data/ext/mathematical/lsmmathmlfencedelement.c +178 -0
  72. data/ext/mathematical/lsmmathmlfencedelement.h +65 -0
  73. data/ext/mathematical/lsmmathmlfractionelement.c +253 -0
  74. data/ext/mathematical/lsmmathmlfractionelement.h +62 -0
  75. data/ext/mathematical/lsmmathmlglyphtableams.c +597 -0
  76. data/ext/mathematical/lsmmathmlglyphtableams.h +45 -0
  77. data/ext/mathematical/lsmmathmlitexelement.c +187 -0
  78. data/ext/mathematical/lsmmathmlitexelement.h +60 -0
  79. data/ext/mathematical/lsmmathmllayoututils.c +191 -0
  80. data/ext/mathematical/lsmmathmllayoututils.h +58 -0
  81. data/ext/mathematical/lsmmathmlmathelement.c +204 -0
  82. data/ext/mathematical/lsmmathmlmathelement.h +81 -0
  83. data/ext/mathematical/lsmmathmloperatordictionary.c +3332 -0
  84. data/ext/mathematical/lsmmathmloperatordictionary.h +54 -0
  85. data/ext/mathematical/lsmmathmloperatorelement.c +307 -0
  86. data/ext/mathematical/lsmmathmloperatorelement.h +73 -0
  87. data/ext/mathematical/lsmmathmlpaddedelement.c +58 -0
  88. data/ext/mathematical/lsmmathmlpaddedelement.h +56 -0
  89. data/ext/mathematical/lsmmathmlphantomelement.c +71 -0
  90. data/ext/mathematical/lsmmathmlphantomelement.h +56 -0
  91. data/ext/mathematical/lsmmathmlpresentationcontainer.c +43 -0
  92. data/ext/mathematical/lsmmathmlpresentationcontainer.h +54 -0
  93. data/ext/mathematical/lsmmathmlpresentationtoken.c +303 -0
  94. data/ext/mathematical/lsmmathmlpresentationtoken.h +83 -0
  95. data/ext/mathematical/lsmmathmlradicalelement.c +266 -0
  96. data/ext/mathematical/lsmmathmlradicalelement.h +71 -0
  97. data/ext/mathematical/lsmmathmlrowelement.c +58 -0
  98. data/ext/mathematical/lsmmathmlrowelement.h +56 -0
  99. data/ext/mathematical/lsmmathmlscriptelement.c +282 -0
  100. data/ext/mathematical/lsmmathmlscriptelement.h +78 -0
  101. data/ext/mathematical/lsmmathmlsemanticselement.c +82 -0
  102. data/ext/mathematical/lsmmathmlsemanticselement.h +56 -0
  103. data/ext/mathematical/lsmmathmlspaceelement.c +142 -0
  104. data/ext/mathematical/lsmmathmlspaceelement.h +60 -0
  105. data/ext/mathematical/lsmmathmlstringelement.c +123 -0
  106. data/ext/mathematical/lsmmathmlstringelement.h +58 -0
  107. data/ext/mathematical/lsmmathmlstyle.c +130 -0
  108. data/ext/mathematical/lsmmathmlstyle.h +81 -0
  109. data/ext/mathematical/lsmmathmlstyleelement.c +307 -0
  110. data/ext/mathematical/lsmmathmlstyleelement.h +87 -0
  111. data/ext/mathematical/lsmmathmltablecellelement.c +122 -0
  112. data/ext/mathematical/lsmmathmltablecellelement.h +62 -0
  113. data/ext/mathematical/lsmmathmltableelement.c +545 -0
  114. data/ext/mathematical/lsmmathmltableelement.h +78 -0
  115. data/ext/mathematical/lsmmathmltablerowelement.c +120 -0
  116. data/ext/mathematical/lsmmathmltablerowelement.h +64 -0
  117. data/ext/mathematical/lsmmathmltraits.c +819 -0
  118. data/ext/mathematical/lsmmathmltraits.h +119 -0
  119. data/ext/mathematical/lsmmathmltypes.h +66 -0
  120. data/ext/mathematical/lsmmathmlunderoverelement.c +485 -0
  121. data/ext/mathematical/lsmmathmlunderoverelement.h +82 -0
  122. data/ext/mathematical/lsmmathmlutils.c +170 -0
  123. data/ext/mathematical/lsmmathmlutils.h +50 -0
  124. data/ext/mathematical/lsmmathmlview.c +1048 -0
  125. data/ext/mathematical/lsmmathmlview.h +164 -0
  126. data/ext/mathematical/lsmproperties.c +418 -0
  127. data/ext/mathematical/lsmproperties.h +85 -0
  128. data/ext/mathematical/lsmstr.c +231 -0
  129. data/ext/mathematical/lsmstr.h +114 -0
  130. data/ext/mathematical/lsmsvg.h +67 -0
  131. data/ext/mathematical/lsmsvgaelement.c +73 -0
  132. data/ext/mathematical/lsmsvgaelement.h +55 -0
  133. data/ext/mathematical/lsmsvgattributes.h +113 -0
  134. data/ext/mathematical/lsmsvgcircleelement.c +153 -0
  135. data/ext/mathematical/lsmsvgcircleelement.h +59 -0
  136. data/ext/mathematical/lsmsvgclippathelement.c +134 -0
  137. data/ext/mathematical/lsmsvgclippathelement.h +59 -0
  138. data/ext/mathematical/lsmsvgcolors.c +212 -0
  139. data/ext/mathematical/lsmsvgcolors.h +39 -0
  140. data/ext/mathematical/lsmsvgdefselement.c +74 -0
  141. data/ext/mathematical/lsmsvgdefselement.h +55 -0
  142. data/ext/mathematical/lsmsvgdocument.c +230 -0
  143. data/ext/mathematical/lsmsvgdocument.h +58 -0
  144. data/ext/mathematical/lsmsvgelement.c +367 -0
  145. data/ext/mathematical/lsmsvgelement.h +81 -0
  146. data/ext/mathematical/lsmsvgellipseelement.c +158 -0
  147. data/ext/mathematical/lsmsvgellipseelement.h +60 -0
  148. data/ext/mathematical/lsmsvgenums.c +544 -0
  149. data/ext/mathematical/lsmsvgenums.h +357 -0
  150. data/ext/mathematical/lsmsvgenumtypes.c +1083 -0
  151. data/ext/mathematical/lsmsvgenumtypes.c.template +39 -0
  152. data/ext/mathematical/lsmsvgenumtypes.h +111 -0
  153. data/ext/mathematical/lsmsvgenumtypes.h.template +26 -0
  154. data/ext/mathematical/lsmsvgfilterblend.c +105 -0
  155. data/ext/mathematical/lsmsvgfilterblend.h +58 -0
  156. data/ext/mathematical/lsmsvgfiltercomposite.c +109 -0
  157. data/ext/mathematical/lsmsvgfiltercomposite.h +58 -0
  158. data/ext/mathematical/lsmsvgfilterelement.c +266 -0
  159. data/ext/mathematical/lsmsvgfilterelement.h +66 -0
  160. data/ext/mathematical/lsmsvgfilterflood.c +86 -0
  161. data/ext/mathematical/lsmsvgfilterflood.h +55 -0
  162. data/ext/mathematical/lsmsvgfiltergaussianblur.c +114 -0
  163. data/ext/mathematical/lsmsvgfiltergaussianblur.h +57 -0
  164. data/ext/mathematical/lsmsvgfiltermerge.c +98 -0
  165. data/ext/mathematical/lsmsvgfiltermerge.h +55 -0
  166. data/ext/mathematical/lsmsvgfiltermergenode.c +87 -0
  167. data/ext/mathematical/lsmsvgfiltermergenode.h +57 -0
  168. data/ext/mathematical/lsmsvgfilteroffset.c +112 -0
  169. data/ext/mathematical/lsmsvgfilteroffset.h +58 -0
  170. data/ext/mathematical/lsmsvgfilterprimitive.c +168 -0
  171. data/ext/mathematical/lsmsvgfilterprimitive.h +66 -0
  172. data/ext/mathematical/lsmsvgfilterspecularlighting.c +127 -0
  173. data/ext/mathematical/lsmsvgfilterspecularlighting.h +60 -0
  174. data/ext/mathematical/lsmsvgfiltersurface.c +455 -0
  175. data/ext/mathematical/lsmsvgfiltersurface.h +66 -0
  176. data/ext/mathematical/lsmsvgfiltertile.c +102 -0
  177. data/ext/mathematical/lsmsvgfiltertile.h +57 -0
  178. data/ext/mathematical/lsmsvggelement.c +73 -0
  179. data/ext/mathematical/lsmsvggelement.h +55 -0
  180. data/ext/mathematical/lsmsvggradientelement.c +151 -0
  181. data/ext/mathematical/lsmsvggradientelement.h +68 -0
  182. data/ext/mathematical/lsmsvgimageelement.c +261 -0
  183. data/ext/mathematical/lsmsvgimageelement.h +67 -0
  184. data/ext/mathematical/lsmsvglength.c +93 -0
  185. data/ext/mathematical/lsmsvglength.h +59 -0
  186. data/ext/mathematical/lsmsvglineargradientelement.c +271 -0
  187. data/ext/mathematical/lsmsvglineargradientelement.h +60 -0
  188. data/ext/mathematical/lsmsvglineelement.c +153 -0
  189. data/ext/mathematical/lsmsvglineelement.h +60 -0
  190. data/ext/mathematical/lsmsvgmarkerelement.c +266 -0
  191. data/ext/mathematical/lsmsvgmarkerelement.h +74 -0
  192. data/ext/mathematical/lsmsvgmaskelement.c +232 -0
  193. data/ext/mathematical/lsmsvgmaskelement.h +64 -0
  194. data/ext/mathematical/lsmsvgmatrix.c +205 -0
  195. data/ext/mathematical/lsmsvgmatrix.h +59 -0
  196. data/ext/mathematical/lsmsvgpathelement.c +115 -0
  197. data/ext/mathematical/lsmsvgpathelement.h +59 -0
  198. data/ext/mathematical/lsmsvgpatternelement.c +398 -0
  199. data/ext/mathematical/lsmsvgpatternelement.h +69 -0
  200. data/ext/mathematical/lsmsvgpolygonelement.c +106 -0
  201. data/ext/mathematical/lsmsvgpolygonelement.h +57 -0
  202. data/ext/mathematical/lsmsvgpolylineelement.c +106 -0
  203. data/ext/mathematical/lsmsvgpolylineelement.h +57 -0
  204. data/ext/mathematical/lsmsvgradialgradientelement.c +323 -0
  205. data/ext/mathematical/lsmsvgradialgradientelement.h +61 -0
  206. data/ext/mathematical/lsmsvgrectelement.c +184 -0
  207. data/ext/mathematical/lsmsvgrectelement.h +62 -0
  208. data/ext/mathematical/lsmsvgstopelement.c +106 -0
  209. data/ext/mathematical/lsmsvgstopelement.h +57 -0
  210. data/ext/mathematical/lsmsvgstyle.c +558 -0
  211. data/ext/mathematical/lsmsvgstyle.h +217 -0
  212. data/ext/mathematical/lsmsvgsvgelement.c +260 -0
  213. data/ext/mathematical/lsmsvgsvgelement.h +71 -0
  214. data/ext/mathematical/lsmsvgswitchelement.c +103 -0
  215. data/ext/mathematical/lsmsvgswitchelement.h +55 -0
  216. data/ext/mathematical/lsmsvgsymbolelement.c +74 -0
  217. data/ext/mathematical/lsmsvgsymbolelement.h +55 -0
  218. data/ext/mathematical/lsmsvgtextelement.c +170 -0
  219. data/ext/mathematical/lsmsvgtextelement.h +58 -0
  220. data/ext/mathematical/lsmsvgtraits.c +1158 -0
  221. data/ext/mathematical/lsmsvgtraits.h +103 -0
  222. data/ext/mathematical/lsmsvgtransformable.c +106 -0
  223. data/ext/mathematical/lsmsvgtransformable.h +54 -0
  224. data/ext/mathematical/lsmsvgtspanelement.c +143 -0
  225. data/ext/mathematical/lsmsvgtspanelement.h +58 -0
  226. data/ext/mathematical/lsmsvgtypes.h +77 -0
  227. data/ext/mathematical/lsmsvguseelement.c +237 -0
  228. data/ext/mathematical/lsmsvguseelement.h +69 -0
  229. data/ext/mathematical/lsmsvgview.c +2400 -0
  230. data/ext/mathematical/lsmsvgview.h +168 -0
  231. data/ext/mathematical/lsmtraits.c +119 -0
  232. data/ext/mathematical/lsmtraits.h +49 -0
  233. data/ext/mathematical/lsmtypes.h +36 -0
  234. data/ext/mathematical/lsmutils.c +54 -0
  235. data/ext/mathematical/lsmutils.h +56 -0
  236. data/ext/mathematical/mathematical.c +122 -0
  237. data/ext/mathematical/y.tab.c +6179 -0
  238. data/ext/mathematical/y.tab.h +389 -0
  239. data/lib/mathematical.rb +7 -3
  240. data/lib/mathematical/parser.rb +1 -1
  241. data/lib/mathematical/render.rb +51 -77
  242. data/lib/mathematical/version.rb +1 -1
  243. data/mathematical.gemspec +5 -3
  244. data/script/bench +21 -0
  245. data/script/single_test +7 -0
  246. data/test/mathematical/basic_test.rb +30 -1
  247. data/test/mathematical/fixtures/after/brackets_display.html +1 -0
  248. data/test/mathematical/fixtures/after/dollar_sign_inline.html +1 -0
  249. data/test/mathematical/fixtures/after/equation_display.html +1 -0
  250. data/test/mathematical/fixtures/after/multiple_dollar_inline.html +1 -0
  251. data/test/mathematical/fixtures/after/parens_inline.html +1 -0
  252. data/test/mathematical/fixtures/before/brackets_display.text +1 -0
  253. data/test/mathematical/fixtures/before/{basic.text → dollar_sign_inline.text} +0 -0
  254. data/test/mathematical/fixtures/before/equation_display.text +1 -0
  255. data/test/mathematical/fixtures/before/multiple_dollar_inline.text +1 -0
  256. data/test/mathematical/fixtures/before/parens_inline.text +1 -0
  257. data/test/mathematical/fixtures/performance/big_file.text +1767 -0
  258. data/test/mathematical/performance_test.rb +13 -0
  259. data/test/test_helper.rb +1 -0
  260. metadata +303 -18
  261. data/test/mathematical/fixtures/after/basic.html +0 -1
@@ -0,0 +1,13 @@
1
+ require "test_helper"
2
+ require 'benchmark'
3
+
4
+ class Mathematical::BasicTest < Test::Unit::TestCase
5
+
6
+ def test_it_handles_big_files
7
+ assert_nothing_raised do
8
+ big_file = File.read('test/mathematical/fixtures/performance/big_file.text')
9
+ speed = Benchmark.realtime { Mathematical::Render.new.render(big_file) }
10
+ assert_operator speed, :<=, 5
11
+ end
12
+ end
13
+ end
data/test/test_helper.rb CHANGED
@@ -1,3 +1,4 @@
1
1
  require 'bundler/setup'
2
2
  require 'mathematical'
3
3
  require 'test/unit'
4
+ require 'mocha/test_unit'
metadata CHANGED
@@ -1,68 +1,343 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mathematical
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen Torikian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-18 00:00:00.000000000 Z
11
+ date: 2014-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.5'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- description: Turn maths into PNGs.
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake-compiler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: mocha
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.0'
69
+ description: This is a general purpose wrapper to GNOME's Lasem. It's a fast and aesthetically
70
+ pleasing mechanism to turn math equations into base64 SVGs, to embed on the web.
42
71
  email:
43
72
  - gjtorikian@gmail.com
44
73
  executables: []
45
74
  extensions: []
46
75
  extra_rdoc_files: []
47
76
  files:
48
- - .gitignore
49
- - .gitmodules
77
+ - ".gitignore"
78
+ - ".gitmodules"
50
79
  - Gemfile
51
80
  - LICENSE.txt
52
81
  - README.md
53
82
  - Rakefile
83
+ - ext/mathematical/README.itex2MML.md
84
+ - ext/mathematical/README.lasem.md
85
+ - ext/mathematical/extconf.rb
86
+ - ext/mathematical/itex2MML.h
87
+ - ext/mathematical/lasemrender.c
88
+ - ext/mathematical/lex.yy.c
89
+ - ext/mathematical/lsm.c
90
+ - ext/mathematical/lsm.h
91
+ - ext/mathematical/lsmattributes.c
92
+ - ext/mathematical/lsmattributes.h
93
+ - ext/mathematical/lsmcairo.c
94
+ - ext/mathematical/lsmcairo.h
95
+ - ext/mathematical/lsmdebug.c
96
+ - ext/mathematical/lsmdebug.h
97
+ - ext/mathematical/lsmdom.h
98
+ - ext/mathematical/lsmdomcharacterdata.c
99
+ - ext/mathematical/lsmdomcharacterdata.h
100
+ - ext/mathematical/lsmdomdocument.c
101
+ - ext/mathematical/lsmdomdocument.h
102
+ - ext/mathematical/lsmdomdocumentfragment.c
103
+ - ext/mathematical/lsmdomdocumentfragment.h
104
+ - ext/mathematical/lsmdomelement.c
105
+ - ext/mathematical/lsmdomelement.h
106
+ - ext/mathematical/lsmdomentities.c
107
+ - ext/mathematical/lsmdomentities.h
108
+ - ext/mathematical/lsmdomenumtypes.c
109
+ - ext/mathematical/lsmdomenumtypes.c.template
110
+ - ext/mathematical/lsmdomenumtypes.h
111
+ - ext/mathematical/lsmdomenumtypes.h.template
112
+ - ext/mathematical/lsmdomimplementation.c
113
+ - ext/mathematical/lsmdomimplementation.h
114
+ - ext/mathematical/lsmdomnamednodemap.c
115
+ - ext/mathematical/lsmdomnamednodemap.h
116
+ - ext/mathematical/lsmdomnode.c
117
+ - ext/mathematical/lsmdomnode.h
118
+ - ext/mathematical/lsmdomnodelist.c
119
+ - ext/mathematical/lsmdomnodelist.h
120
+ - ext/mathematical/lsmdomparser.c
121
+ - ext/mathematical/lsmdomparser.h
122
+ - ext/mathematical/lsmdomtext.c
123
+ - ext/mathematical/lsmdomtext.h
124
+ - ext/mathematical/lsmdomtypes.h
125
+ - ext/mathematical/lsmdomview.c
126
+ - ext/mathematical/lsmdomview.h
127
+ - ext/mathematical/lsmmathml.h
128
+ - ext/mathematical/lsmmathmlactionelement.c
129
+ - ext/mathematical/lsmmathmlactionelement.h
130
+ - ext/mathematical/lsmmathmlaligngroupelement.c
131
+ - ext/mathematical/lsmmathmlaligngroupelement.h
132
+ - ext/mathematical/lsmmathmlalignmarkelement.c
133
+ - ext/mathematical/lsmmathmlalignmarkelement.h
134
+ - ext/mathematical/lsmmathmlattributes.c
135
+ - ext/mathematical/lsmmathmlattributes.h
136
+ - ext/mathematical/lsmmathmldocument.c
137
+ - ext/mathematical/lsmmathmldocument.h
138
+ - ext/mathematical/lsmmathmlelement.c
139
+ - ext/mathematical/lsmmathmlelement.h
140
+ - ext/mathematical/lsmmathmlenums.c
141
+ - ext/mathematical/lsmmathmlenums.h
142
+ - ext/mathematical/lsmmathmlenumtypes.c
143
+ - ext/mathematical/lsmmathmlenumtypes.c.template
144
+ - ext/mathematical/lsmmathmlenumtypes.h
145
+ - ext/mathematical/lsmmathmlenumtypes.h.template
146
+ - ext/mathematical/lsmmathmlerrorelement.c
147
+ - ext/mathematical/lsmmathmlerrorelement.h
148
+ - ext/mathematical/lsmmathmlfencedelement.c
149
+ - ext/mathematical/lsmmathmlfencedelement.h
150
+ - ext/mathematical/lsmmathmlfractionelement.c
151
+ - ext/mathematical/lsmmathmlfractionelement.h
152
+ - ext/mathematical/lsmmathmlglyphtableams.c
153
+ - ext/mathematical/lsmmathmlglyphtableams.h
154
+ - ext/mathematical/lsmmathmlitexelement.c
155
+ - ext/mathematical/lsmmathmlitexelement.h
156
+ - ext/mathematical/lsmmathmllayoututils.c
157
+ - ext/mathematical/lsmmathmllayoututils.h
158
+ - ext/mathematical/lsmmathmlmathelement.c
159
+ - ext/mathematical/lsmmathmlmathelement.h
160
+ - ext/mathematical/lsmmathmloperatordictionary.c
161
+ - ext/mathematical/lsmmathmloperatordictionary.h
162
+ - ext/mathematical/lsmmathmloperatorelement.c
163
+ - ext/mathematical/lsmmathmloperatorelement.h
164
+ - ext/mathematical/lsmmathmlpaddedelement.c
165
+ - ext/mathematical/lsmmathmlpaddedelement.h
166
+ - ext/mathematical/lsmmathmlphantomelement.c
167
+ - ext/mathematical/lsmmathmlphantomelement.h
168
+ - ext/mathematical/lsmmathmlpresentationcontainer.c
169
+ - ext/mathematical/lsmmathmlpresentationcontainer.h
170
+ - ext/mathematical/lsmmathmlpresentationtoken.c
171
+ - ext/mathematical/lsmmathmlpresentationtoken.h
172
+ - ext/mathematical/lsmmathmlradicalelement.c
173
+ - ext/mathematical/lsmmathmlradicalelement.h
174
+ - ext/mathematical/lsmmathmlrowelement.c
175
+ - ext/mathematical/lsmmathmlrowelement.h
176
+ - ext/mathematical/lsmmathmlscriptelement.c
177
+ - ext/mathematical/lsmmathmlscriptelement.h
178
+ - ext/mathematical/lsmmathmlsemanticselement.c
179
+ - ext/mathematical/lsmmathmlsemanticselement.h
180
+ - ext/mathematical/lsmmathmlspaceelement.c
181
+ - ext/mathematical/lsmmathmlspaceelement.h
182
+ - ext/mathematical/lsmmathmlstringelement.c
183
+ - ext/mathematical/lsmmathmlstringelement.h
184
+ - ext/mathematical/lsmmathmlstyle.c
185
+ - ext/mathematical/lsmmathmlstyle.h
186
+ - ext/mathematical/lsmmathmlstyleelement.c
187
+ - ext/mathematical/lsmmathmlstyleelement.h
188
+ - ext/mathematical/lsmmathmltablecellelement.c
189
+ - ext/mathematical/lsmmathmltablecellelement.h
190
+ - ext/mathematical/lsmmathmltableelement.c
191
+ - ext/mathematical/lsmmathmltableelement.h
192
+ - ext/mathematical/lsmmathmltablerowelement.c
193
+ - ext/mathematical/lsmmathmltablerowelement.h
194
+ - ext/mathematical/lsmmathmltraits.c
195
+ - ext/mathematical/lsmmathmltraits.h
196
+ - ext/mathematical/lsmmathmltypes.h
197
+ - ext/mathematical/lsmmathmlunderoverelement.c
198
+ - ext/mathematical/lsmmathmlunderoverelement.h
199
+ - ext/mathematical/lsmmathmlutils.c
200
+ - ext/mathematical/lsmmathmlutils.h
201
+ - ext/mathematical/lsmmathmlview.c
202
+ - ext/mathematical/lsmmathmlview.h
203
+ - ext/mathematical/lsmproperties.c
204
+ - ext/mathematical/lsmproperties.h
205
+ - ext/mathematical/lsmstr.c
206
+ - ext/mathematical/lsmstr.h
207
+ - ext/mathematical/lsmsvg.h
208
+ - ext/mathematical/lsmsvgaelement.c
209
+ - ext/mathematical/lsmsvgaelement.h
210
+ - ext/mathematical/lsmsvgattributes.h
211
+ - ext/mathematical/lsmsvgcircleelement.c
212
+ - ext/mathematical/lsmsvgcircleelement.h
213
+ - ext/mathematical/lsmsvgclippathelement.c
214
+ - ext/mathematical/lsmsvgclippathelement.h
215
+ - ext/mathematical/lsmsvgcolors.c
216
+ - ext/mathematical/lsmsvgcolors.h
217
+ - ext/mathematical/lsmsvgdefselement.c
218
+ - ext/mathematical/lsmsvgdefselement.h
219
+ - ext/mathematical/lsmsvgdocument.c
220
+ - ext/mathematical/lsmsvgdocument.h
221
+ - ext/mathematical/lsmsvgelement.c
222
+ - ext/mathematical/lsmsvgelement.h
223
+ - ext/mathematical/lsmsvgellipseelement.c
224
+ - ext/mathematical/lsmsvgellipseelement.h
225
+ - ext/mathematical/lsmsvgenums.c
226
+ - ext/mathematical/lsmsvgenums.h
227
+ - ext/mathematical/lsmsvgenumtypes.c
228
+ - ext/mathematical/lsmsvgenumtypes.c.template
229
+ - ext/mathematical/lsmsvgenumtypes.h
230
+ - ext/mathematical/lsmsvgenumtypes.h.template
231
+ - ext/mathematical/lsmsvgfilterblend.c
232
+ - ext/mathematical/lsmsvgfilterblend.h
233
+ - ext/mathematical/lsmsvgfiltercomposite.c
234
+ - ext/mathematical/lsmsvgfiltercomposite.h
235
+ - ext/mathematical/lsmsvgfilterelement.c
236
+ - ext/mathematical/lsmsvgfilterelement.h
237
+ - ext/mathematical/lsmsvgfilterflood.c
238
+ - ext/mathematical/lsmsvgfilterflood.h
239
+ - ext/mathematical/lsmsvgfiltergaussianblur.c
240
+ - ext/mathematical/lsmsvgfiltergaussianblur.h
241
+ - ext/mathematical/lsmsvgfiltermerge.c
242
+ - ext/mathematical/lsmsvgfiltermerge.h
243
+ - ext/mathematical/lsmsvgfiltermergenode.c
244
+ - ext/mathematical/lsmsvgfiltermergenode.h
245
+ - ext/mathematical/lsmsvgfilteroffset.c
246
+ - ext/mathematical/lsmsvgfilteroffset.h
247
+ - ext/mathematical/lsmsvgfilterprimitive.c
248
+ - ext/mathematical/lsmsvgfilterprimitive.h
249
+ - ext/mathematical/lsmsvgfilterspecularlighting.c
250
+ - ext/mathematical/lsmsvgfilterspecularlighting.h
251
+ - ext/mathematical/lsmsvgfiltersurface.c
252
+ - ext/mathematical/lsmsvgfiltersurface.h
253
+ - ext/mathematical/lsmsvgfiltertile.c
254
+ - ext/mathematical/lsmsvgfiltertile.h
255
+ - ext/mathematical/lsmsvggelement.c
256
+ - ext/mathematical/lsmsvggelement.h
257
+ - ext/mathematical/lsmsvggradientelement.c
258
+ - ext/mathematical/lsmsvggradientelement.h
259
+ - ext/mathematical/lsmsvgimageelement.c
260
+ - ext/mathematical/lsmsvgimageelement.h
261
+ - ext/mathematical/lsmsvglength.c
262
+ - ext/mathematical/lsmsvglength.h
263
+ - ext/mathematical/lsmsvglineargradientelement.c
264
+ - ext/mathematical/lsmsvglineargradientelement.h
265
+ - ext/mathematical/lsmsvglineelement.c
266
+ - ext/mathematical/lsmsvglineelement.h
267
+ - ext/mathematical/lsmsvgmarkerelement.c
268
+ - ext/mathematical/lsmsvgmarkerelement.h
269
+ - ext/mathematical/lsmsvgmaskelement.c
270
+ - ext/mathematical/lsmsvgmaskelement.h
271
+ - ext/mathematical/lsmsvgmatrix.c
272
+ - ext/mathematical/lsmsvgmatrix.h
273
+ - ext/mathematical/lsmsvgpathelement.c
274
+ - ext/mathematical/lsmsvgpathelement.h
275
+ - ext/mathematical/lsmsvgpatternelement.c
276
+ - ext/mathematical/lsmsvgpatternelement.h
277
+ - ext/mathematical/lsmsvgpolygonelement.c
278
+ - ext/mathematical/lsmsvgpolygonelement.h
279
+ - ext/mathematical/lsmsvgpolylineelement.c
280
+ - ext/mathematical/lsmsvgpolylineelement.h
281
+ - ext/mathematical/lsmsvgradialgradientelement.c
282
+ - ext/mathematical/lsmsvgradialgradientelement.h
283
+ - ext/mathematical/lsmsvgrectelement.c
284
+ - ext/mathematical/lsmsvgrectelement.h
285
+ - ext/mathematical/lsmsvgstopelement.c
286
+ - ext/mathematical/lsmsvgstopelement.h
287
+ - ext/mathematical/lsmsvgstyle.c
288
+ - ext/mathematical/lsmsvgstyle.h
289
+ - ext/mathematical/lsmsvgsvgelement.c
290
+ - ext/mathematical/lsmsvgsvgelement.h
291
+ - ext/mathematical/lsmsvgswitchelement.c
292
+ - ext/mathematical/lsmsvgswitchelement.h
293
+ - ext/mathematical/lsmsvgsymbolelement.c
294
+ - ext/mathematical/lsmsvgsymbolelement.h
295
+ - ext/mathematical/lsmsvgtextelement.c
296
+ - ext/mathematical/lsmsvgtextelement.h
297
+ - ext/mathematical/lsmsvgtraits.c
298
+ - ext/mathematical/lsmsvgtraits.h
299
+ - ext/mathematical/lsmsvgtransformable.c
300
+ - ext/mathematical/lsmsvgtransformable.h
301
+ - ext/mathematical/lsmsvgtspanelement.c
302
+ - ext/mathematical/lsmsvgtspanelement.h
303
+ - ext/mathematical/lsmsvgtypes.h
304
+ - ext/mathematical/lsmsvguseelement.c
305
+ - ext/mathematical/lsmsvguseelement.h
306
+ - ext/mathematical/lsmsvgview.c
307
+ - ext/mathematical/lsmsvgview.h
308
+ - ext/mathematical/lsmtraits.c
309
+ - ext/mathematical/lsmtraits.h
310
+ - ext/mathematical/lsmtypes.h
311
+ - ext/mathematical/lsmutils.c
312
+ - ext/mathematical/lsmutils.h
313
+ - ext/mathematical/mathematical.c
314
+ - ext/mathematical/y.tab.c
315
+ - ext/mathematical/y.tab.h
54
316
  - lib/mathematical.rb
55
317
  - lib/mathematical/parser.rb
56
318
  - lib/mathematical/render.rb
57
319
  - lib/mathematical/version.rb
58
320
  - mathematical.gemspec
321
+ - script/bench
59
322
  - script/bootstrap
323
+ - script/single_test
324
+ - script/single_text
60
325
  - test/mathematical/basic_test.rb
61
- - test/mathematical/fixtures/after/basic.html
62
- - test/mathematical/fixtures/before/basic.text
326
+ - test/mathematical/fixtures/after/brackets_display.html
327
+ - test/mathematical/fixtures/after/dollar_sign_inline.html
328
+ - test/mathematical/fixtures/after/equation_display.html
329
+ - test/mathematical/fixtures/after/multiple_dollar_inline.html
330
+ - test/mathematical/fixtures/after/parens_inline.html
331
+ - test/mathematical/fixtures/before/brackets_display.text
332
+ - test/mathematical/fixtures/before/dollar_sign_inline.text
333
+ - test/mathematical/fixtures/before/equation_display.text
334
+ - test/mathematical/fixtures/before/multiple_dollar_inline.text
335
+ - test/mathematical/fixtures/before/parens_inline.text
336
+ - test/mathematical/fixtures/performance/big_file.text
63
337
  - test/mathematical/fixtures_test.rb
338
+ - test/mathematical/performance_test.rb
64
339
  - test/test_helper.rb
65
- homepage: ''
340
+ homepage: https://github.com/gjtorikian/mathematical
66
341
  licenses:
67
342
  - MIT
68
343
  metadata: {}
@@ -72,23 +347,33 @@ require_paths:
72
347
  - lib
73
348
  required_ruby_version: !ruby/object:Gem::Requirement
74
349
  requirements:
75
- - - '>='
350
+ - - ">="
76
351
  - !ruby/object:Gem::Version
77
352
  version: '0'
78
353
  required_rubygems_version: !ruby/object:Gem::Requirement
79
354
  requirements:
80
- - - '>='
355
+ - - ">="
81
356
  - !ruby/object:Gem::Version
82
357
  version: '0'
83
358
  requirements: []
84
359
  rubyforge_project:
85
- rubygems_version: 2.0.3
360
+ rubygems_version: 2.2.2
86
361
  signing_key:
87
362
  specification_version: 4
88
- summary: Turn maths into PNGs.
363
+ summary: Turn itex math equations into base64 SVGs.
89
364
  test_files:
90
365
  - test/mathematical/basic_test.rb
91
- - test/mathematical/fixtures/after/basic.html
92
- - test/mathematical/fixtures/before/basic.text
366
+ - test/mathematical/fixtures/after/brackets_display.html
367
+ - test/mathematical/fixtures/after/dollar_sign_inline.html
368
+ - test/mathematical/fixtures/after/equation_display.html
369
+ - test/mathematical/fixtures/after/multiple_dollar_inline.html
370
+ - test/mathematical/fixtures/after/parens_inline.html
371
+ - test/mathematical/fixtures/before/brackets_display.text
372
+ - test/mathematical/fixtures/before/dollar_sign_inline.text
373
+ - test/mathematical/fixtures/before/equation_display.text
374
+ - test/mathematical/fixtures/before/multiple_dollar_inline.text
375
+ - test/mathematical/fixtures/before/parens_inline.text
376
+ - test/mathematical/fixtures/performance/big_file.text
93
377
  - test/mathematical/fixtures_test.rb
378
+ - test/mathematical/performance_test.rb
94
379
  - test/test_helper.rb
@@ -1 +0,0 @@
1
- When <img class="inline-math" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAUCAMAAAAusUTNAAAANlBMVEX///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABHL6OuAAAAEXRSTlMAQKOPaOEsfMNW+dMW7bPx81p55n0AAADiSURBVCgVtVLZAoQgCCSPrM0O//9ndyA1tK235YE4holDoheJL7lbypkailuwl1fD2vAX9zoSuUkne1tRWwF+hh6ifEXtpQtvVbYzg+ozBU5OnvVgrL3PoKhjcozbViiHkvGslpgX2Q98Fg5w9kR/2MS8JEpSWTFPkYyegJZuZhiNWD1R7mQBQ+K4yf+sFZoaGJly8WhkBkQtZ+O2j12aLxx1g5E7jiiR8sItuyoOkZWyhOus4DYpzvpQpikFG18+cMmIB0OmyceO+gSpa11/hWVkvU3o2blTP2P/Sk38En7LF60+BSj8TilKAAAAAElFTkSuQmCC"/>, there are two solutions...