mathematical 1.5.12 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (254) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -30
  3. data/Rakefile +1 -0
  4. data/ext/mathematical/CMakeLists.txt +4 -1
  5. data/ext/mathematical/extconf.rb +4 -1
  6. data/ext/mathematical/lasem/NEWS +17 -0
  7. data/ext/mathematical/lasem/autogen.sh +5 -2
  8. data/ext/mathematical/lasem/configure.ac +3 -3
  9. data/ext/mathematical/lasem/po/cs.po +50 -18
  10. data/ext/mathematical/lasem/po/de.po +62 -26
  11. data/ext/mathematical/lasem/po/es.po +27 -18
  12. data/ext/mathematical/lasem/po/hu.po +50 -21
  13. data/ext/mathematical/lasem/po/id.po +49 -16
  14. data/ext/mathematical/lasem/po/lt.po +47 -18
  15. data/ext/mathematical/lasem/po/pl.po +53 -24
  16. data/ext/mathematical/lasem/po/pt_BR.po +70 -29
  17. data/ext/mathematical/lasem/po/sl.po +43 -29
  18. data/ext/mathematical/lasem/po/sr.po +67 -27
  19. data/ext/mathematical/lasem/po/sr@latin.po +67 -27
  20. data/ext/mathematical/lasem/po/sv.po +51 -18
  21. data/ext/mathematical/lasem/src/lasemrender.c +107 -14
  22. data/ext/mathematical/lasem/src/lsmitex.c +1 -0
  23. data/ext/mathematical/lasem/src/lsmsvgelement.c +0 -2
  24. data/ext/mathematical/lasem/src/lsmsvglength.c +2 -2
  25. data/ext/mathematical/lasem/src/lsmsvgmatrix.c +16 -0
  26. data/ext/mathematical/lasem/src/lsmsvgmatrix.h +2 -1
  27. data/ext/mathematical/lasem/src/lsmsvgsvgelement.c +8 -2
  28. data/ext/mathematical/lasem_overrides.c +3 -3
  29. data/ext/mathematical/lib/liblasem.dylib +0 -0
  30. data/ext/mathematical/lib/libmtex2MML.a +0 -0
  31. data/ext/mathematical/mathematical.c +1 -1
  32. data/ext/mathematical/mtex2MML/CMakeLists.txt +5 -0
  33. data/ext/mathematical/mtex2MML/README.md +3 -3
  34. data/ext/mathematical/mtex2MML/SUPPORTED.md +2 -0
  35. data/ext/mathematical/mtex2MML/appveyor.yml +15 -5
  36. data/ext/mathematical/mtex2MML/build/CMakeCache.txt +181 -116
  37. data/ext/mathematical/mtex2MML/build/CMakeFiles/3.6.1/CMakeCCompiler.cmake +67 -0
  38. data/ext/mathematical/mtex2MML/build/CMakeFiles/3.6.1/CMakeCXXCompiler.cmake +68 -0
  39. data/ext/mathematical/mtex2MML/build/CMakeFiles/{2.8.10.1 → 3.6.1}/CMakeDetermineCompilerABI_C.bin +0 -0
  40. data/ext/mathematical/mtex2MML/build/CMakeFiles/{2.8.10.1 → 3.6.1}/CMakeDetermineCompilerABI_CXX.bin +0 -0
  41. data/ext/mathematical/mtex2MML/build/CMakeFiles/3.6.1/CMakeSystem.cmake +15 -0
  42. data/ext/mathematical/mtex2MML/build/CMakeFiles/{2.8.10.1 → 3.6.1}/CompilerIdC/CMakeCCompilerId.c +223 -55
  43. data/ext/mathematical/mtex2MML/build/CMakeFiles/{2.8.10.1/CompilerIdCXX → 3.6.1/CompilerIdC}/a.out +0 -0
  44. data/ext/mathematical/mtex2MML/build/CMakeFiles/{2.8.10.1 → 3.6.1}/CompilerIdCXX/CMakeCXXCompilerId.cpp +202 -44
  45. data/ext/mathematical/mtex2MML/build/CMakeFiles/{2.8.10.1/CompilerIdC → 3.6.1/CompilerIdCXX}/a.out +0 -0
  46. data/ext/mathematical/mtex2MML/build/CMakeFiles/CMakeDirectoryInformation.cmake +8 -8
  47. data/ext/mathematical/mtex2MML/build/CMakeFiles/CMakeOutput.log +405 -109
  48. data/ext/mathematical/mtex2MML/build/CMakeFiles/CMakeRuleHashes.txt +29 -29
  49. data/ext/mathematical/mtex2MML/build/CMakeFiles/Continuous.dir/DependInfo.cmake +4 -20
  50. data/ext/mathematical/mtex2MML/build/CMakeFiles/Continuous.dir/build.make +14 -7
  51. data/ext/mathematical/mtex2MML/build/CMakeFiles/Continuous.dir/cmake_clean.cmake +4 -4
  52. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousBuild.dir/DependInfo.cmake +4 -20
  53. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousBuild.dir/build.make +14 -7
  54. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousBuild.dir/cmake_clean.cmake +4 -4
  55. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousConfigure.dir/DependInfo.cmake +4 -20
  56. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousConfigure.dir/build.make +14 -7
  57. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousConfigure.dir/cmake_clean.cmake +4 -4
  58. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousCoverage.dir/DependInfo.cmake +4 -20
  59. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousCoverage.dir/build.make +14 -7
  60. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousCoverage.dir/cmake_clean.cmake +4 -4
  61. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousMemCheck.dir/DependInfo.cmake +4 -20
  62. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousMemCheck.dir/build.make +14 -7
  63. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousMemCheck.dir/cmake_clean.cmake +4 -4
  64. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousStart.dir/DependInfo.cmake +4 -20
  65. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousStart.dir/build.make +14 -7
  66. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousStart.dir/cmake_clean.cmake +4 -4
  67. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousSubmit.dir/DependInfo.cmake +4 -20
  68. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousSubmit.dir/build.make +14 -7
  69. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousSubmit.dir/cmake_clean.cmake +4 -4
  70. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousTest.dir/DependInfo.cmake +4 -20
  71. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousTest.dir/build.make +14 -7
  72. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousTest.dir/cmake_clean.cmake +4 -4
  73. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousUpdate.dir/DependInfo.cmake +4 -20
  74. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousUpdate.dir/build.make +14 -7
  75. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousUpdate.dir/cmake_clean.cmake +4 -4
  76. data/ext/mathematical/mtex2MML/build/CMakeFiles/Experimental.dir/DependInfo.cmake +4 -20
  77. data/ext/mathematical/mtex2MML/build/CMakeFiles/Experimental.dir/build.make +14 -7
  78. data/ext/mathematical/mtex2MML/build/CMakeFiles/Experimental.dir/cmake_clean.cmake +4 -4
  79. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalBuild.dir/DependInfo.cmake +4 -20
  80. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalBuild.dir/build.make +14 -7
  81. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalBuild.dir/cmake_clean.cmake +4 -4
  82. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalConfigure.dir/DependInfo.cmake +4 -20
  83. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalConfigure.dir/build.make +14 -7
  84. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalConfigure.dir/cmake_clean.cmake +4 -4
  85. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalCoverage.dir/DependInfo.cmake +4 -20
  86. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalCoverage.dir/build.make +14 -7
  87. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalCoverage.dir/cmake_clean.cmake +4 -4
  88. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalMemCheck.dir/DependInfo.cmake +4 -20
  89. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalMemCheck.dir/build.make +14 -7
  90. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalMemCheck.dir/cmake_clean.cmake +4 -4
  91. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalStart.dir/DependInfo.cmake +4 -20
  92. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalStart.dir/build.make +14 -7
  93. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalStart.dir/cmake_clean.cmake +4 -4
  94. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalSubmit.dir/DependInfo.cmake +4 -20
  95. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalSubmit.dir/build.make +14 -7
  96. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalSubmit.dir/cmake_clean.cmake +4 -4
  97. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalTest.dir/DependInfo.cmake +4 -20
  98. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalTest.dir/build.make +14 -7
  99. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalTest.dir/cmake_clean.cmake +4 -4
  100. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalUpdate.dir/DependInfo.cmake +4 -20
  101. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalUpdate.dir/build.make +14 -7
  102. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalUpdate.dir/cmake_clean.cmake +4 -4
  103. data/ext/mathematical/mtex2MML/build/CMakeFiles/Makefile.cmake +68 -60
  104. data/ext/mathematical/mtex2MML/build/CMakeFiles/Makefile2 +564 -522
  105. data/ext/mathematical/mtex2MML/build/CMakeFiles/Nightly.dir/DependInfo.cmake +4 -20
  106. data/ext/mathematical/mtex2MML/build/CMakeFiles/Nightly.dir/build.make +14 -7
  107. data/ext/mathematical/mtex2MML/build/CMakeFiles/Nightly.dir/cmake_clean.cmake +4 -4
  108. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyBuild.dir/DependInfo.cmake +4 -20
  109. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyBuild.dir/build.make +14 -7
  110. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyBuild.dir/cmake_clean.cmake +4 -4
  111. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyConfigure.dir/DependInfo.cmake +4 -20
  112. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyConfigure.dir/build.make +14 -7
  113. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyConfigure.dir/cmake_clean.cmake +4 -4
  114. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyCoverage.dir/DependInfo.cmake +4 -20
  115. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyCoverage.dir/build.make +14 -7
  116. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyCoverage.dir/cmake_clean.cmake +4 -4
  117. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemCheck.dir/DependInfo.cmake +4 -20
  118. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemCheck.dir/build.make +14 -7
  119. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemCheck.dir/cmake_clean.cmake +4 -4
  120. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemoryCheck.dir/DependInfo.cmake +4 -20
  121. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemoryCheck.dir/build.make +14 -7
  122. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemoryCheck.dir/cmake_clean.cmake +4 -4
  123. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyStart.dir/DependInfo.cmake +4 -20
  124. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyStart.dir/build.make +14 -7
  125. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyStart.dir/cmake_clean.cmake +4 -4
  126. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlySubmit.dir/DependInfo.cmake +4 -20
  127. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlySubmit.dir/build.make +14 -7
  128. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlySubmit.dir/cmake_clean.cmake +4 -4
  129. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyTest.dir/DependInfo.cmake +4 -20
  130. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyTest.dir/build.make +14 -7
  131. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyTest.dir/cmake_clean.cmake +4 -4
  132. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyUpdate.dir/DependInfo.cmake +4 -20
  133. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyUpdate.dir/build.make +14 -7
  134. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyUpdate.dir/cmake_clean.cmake +4 -4
  135. data/ext/mathematical/mtex2MML/build/CMakeFiles/TargetDirectories.txt +28 -21
  136. data/ext/mathematical/mtex2MML/build/CMakeFiles/feature_tests.bin +0 -0
  137. data/ext/mathematical/mtex2MML/build/CMakeFiles/feature_tests.c +34 -0
  138. data/ext/mathematical/mtex2MML/build/CMakeFiles/feature_tests.cxx +405 -0
  139. data/ext/mathematical/mtex2MML/build/CMakeFiles/format.dir/DependInfo.cmake +4 -20
  140. data/ext/mathematical/mtex2MML/build/CMakeFiles/format.dir/build.make +13 -6
  141. data/ext/mathematical/mtex2MML/build/CMakeFiles/format.dir/cmake_clean.cmake +4 -4
  142. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/DependInfo.cmake +16 -18
  143. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/build.make +55 -42
  144. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/cmake_clean.cmake +4 -4
  145. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/flags.make +5 -3
  146. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/link.txt +1 -1
  147. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/progress.make +1 -0
  148. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/C.includecache +115 -27
  149. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/DependInfo.cmake +16 -18
  150. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/build.make +54 -42
  151. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/cmake_clean.cmake +4 -4
  152. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/cmake_clean_target.cmake +1 -1
  153. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/depend.internal +19 -20
  154. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/depend.make +18 -19
  155. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/flags.make +5 -3
  156. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/link.txt +2 -2
  157. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/progress.make +9 -8
  158. data/ext/mathematical/mtex2MML/build/CMakeFiles/memcheck.dir/DependInfo.cmake +4 -20
  159. data/ext/mathematical/mtex2MML/build/CMakeFiles/memcheck.dir/build.make +13 -6
  160. data/ext/mathematical/mtex2MML/build/CMakeFiles/memcheck.dir/cmake_clean.cmake +4 -4
  161. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/DependInfo.cmake +16 -18
  162. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/build.make +60 -47
  163. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/cmake_clean.cmake +4 -4
  164. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/flags.make +5 -3
  165. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/link.txt +1 -1
  166. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/progress.make +10 -9
  167. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/DependInfo.cmake +17 -18
  168. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/build.make +178 -124
  169. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/cmake_clean.cmake +5 -4
  170. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/flags.make +5 -3
  171. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/link.txt +1 -1
  172. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/progress.make +27 -25
  173. data/ext/mathematical/mtex2MML/build/CMakeFiles/progress.marks +1 -1
  174. data/ext/mathematical/mtex2MML/build/CTestTestfile.cmake +2 -2
  175. data/ext/mathematical/mtex2MML/build/DartConfiguration.tcl +25 -7
  176. data/ext/mathematical/mtex2MML/build/Makefile +419 -307
  177. data/ext/mathematical/mtex2MML/build/cmake_install.cmake +32 -32
  178. data/ext/mathematical/mtex2MML/build/lexer.c +4317 -4379
  179. data/ext/mathematical/mtex2MML/build/libmtex2MML.a +0 -0
  180. data/ext/mathematical/mtex2MML/build/mtex2mml_export.h +12 -5
  181. data/ext/mathematical/mtex2MML/build/parser.c +5549 -5473
  182. data/ext/mathematical/mtex2MML/build/parser.h +499 -490
  183. data/ext/mathematical/mtex2MML/build/parser.output +93361 -92735
  184. data/ext/mathematical/mtex2MML/deps/strdup/package.json +2 -2
  185. data/ext/mathematical/mtex2MML/deps/strdup/strdup.c +2 -0
  186. data/ext/mathematical/mtex2MML/deps/strdup/strdup.h +2 -0
  187. data/ext/mathematical/mtex2MML/deps/uthash/package.json +2 -1
  188. data/ext/mathematical/mtex2MML/deps/uthash/utarray.h +42 -36
  189. data/ext/mathematical/mtex2MML/deps/uthash/uthash.h +334 -218
  190. data/ext/mathematical/mtex2MML/deps/uthash/utlist.h +282 -144
  191. data/ext/mathematical/mtex2MML/deps/uthash/utringbuffer.h +108 -0
  192. data/ext/mathematical/mtex2MML/deps/uthash/utstring.h +15 -10
  193. data/ext/mathematical/mtex2MML/script/bootstrap +6 -12
  194. data/ext/mathematical/mtex2MML/script/cibuild +47 -1
  195. data/ext/mathematical/mtex2MML/script/{release → tag} +1 -1
  196. data/ext/mathematical/mtex2MML/src/environment.c +73 -13
  197. data/ext/mathematical/mtex2MML/src/environment.h +1 -1
  198. data/ext/mathematical/mtex2MML/src/lexer.l +75 -53
  199. data/ext/mathematical/mtex2MML/src/main.c +65 -36
  200. data/ext/mathematical/mtex2MML/src/mtex2MML.h +5 -1
  201. data/ext/mathematical/mtex2MML/src/parser.y +67 -16
  202. data/ext/mathematical/mtex2MML/tests/basic.c +10 -0
  203. data/ext/mathematical/mtex2MML/tests/delimiters.c +95 -0
  204. data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/strut-1.html +1 -1
  205. data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/cal-1.html +1 -1
  206. data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/frak-1.html +1 -1
  207. data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/mathcal-1.html +1 -1
  208. data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/mathfrak-1.html +1 -1
  209. data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/mathrm-1.html +1 -1
  210. data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/mathscr-1.html +1 -1
  211. data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/rm-1.html +1 -1
  212. data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/scr-1.html +1 -1
  213. data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/textrm-1.html +1 -1
  214. data/ext/mathematical/mtex2MML/tests/fixtures/array/strip_excess_whitespace_in_array_attributes.html +1 -1
  215. data/ext/mathematical/mtex2MML/tests/fixtures/basic/text_rendering.html +23 -0
  216. data/ext/mathematical/mtex2MML/tests/fixtures/basic/text_rendering.txt +23 -0
  217. data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/align.html +1 -0
  218. data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/align.txt +3 -0
  219. data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/alignat-1a.html +1 -0
  220. data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/alignat-1a.txt +4 -0
  221. data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/aligned_ex_spacing.html +1 -0
  222. data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/aligned_ex_spacing.txt +4 -0
  223. data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/basic_array.html +1 -0
  224. data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/basic_array.txt +3 -0
  225. data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/mixed_env.html +8 -0
  226. data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/mixed_env.txt +11 -0
  227. data/ext/mathematical/mtex2MML/tests/fixtures/performance/big_file.html +6 -6
  228. data/ext/mathematical/mtex2MML/tests/fixtures/symbols/gt.html +1 -0
  229. data/ext/mathematical/mtex2MML/tests/fixtures/symbols/gt.txt +1 -0
  230. data/ext/mathematical/mtex2MML/tests/fixtures/symbols/lt.html +1 -0
  231. data/ext/mathematical/mtex2MML/tests/fixtures/symbols/lt.txt +1 -0
  232. data/ext/mathematical/mtex2MML/tests/fixtures/symbols/textgreater.html +1 -0
  233. data/ext/mathematical/mtex2MML/tests/fixtures/symbols/textgreater.txt +1 -0
  234. data/ext/mathematical/mtex2MML/tests/fixtures/symbols/textless.html +1 -0
  235. data/ext/mathematical/mtex2MML/tests/fixtures/symbols/textless.txt +1 -0
  236. data/ext/mathematical/mtex2MML/tests/symbols.c +69 -0
  237. data/lib/mathematical.rb +19 -1
  238. data/lib/mathematical/version.rb +1 -1
  239. data/mathematical.gemspec +2 -1
  240. data/test/mathematical/basic_test.rb +16 -3
  241. data/test/mathematical/fixtures/png/numeric_test_1.png +0 -0
  242. data/test/mathematical/fixtures/png/numeric_test_3.png +0 -0
  243. data/test/mathematical/fixtures/png/pmatrix.png +0 -0
  244. data/test/mathematical/maliciousness_test.rb +0 -1
  245. data/test/mathematical/multiples_test.rb +3 -0
  246. data/test/mathematical/png_test.rb +4 -1
  247. data/test/test_helper.rb +2 -0
  248. metadata +54 -18
  249. data/ext/mathematical/FindNewerRubies.cmake +0 -292
  250. data/ext/mathematical/mtex2MML/build.ps1 +0 -2
  251. data/ext/mathematical/mtex2MML/build/CMakeFiles/2.8.10.1/CMakeCCompiler.cmake +0 -55
  252. data/ext/mathematical/mtex2MML/build/CMakeFiles/2.8.10.1/CMakeCXXCompiler.cmake +0 -56
  253. data/ext/mathematical/mtex2MML/build/CMakeFiles/2.8.10.1/CMakeSystem.cmake +0 -15
  254. data/ext/mathematical/mtex2MML/src/y.output +0 -117655
@@ -0,0 +1,108 @@
1
+ /*
2
+ Copyright (c) 2008-2016, Troy D. Hanson http://troydhanson.github.com/uthash/
3
+ All rights reserved.
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ * Redistributions of source code must retain the above copyright
9
+ notice, this list of conditions and the following disclaimer.
10
+
11
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
12
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
13
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
14
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
15
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
16
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
17
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
18
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
19
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
20
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
21
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22
+ */
23
+
24
+ /* a ring-buffer implementation using macros
25
+ */
26
+ #ifndef UTRINGBUFFER_H
27
+ #define UTRINGBUFFER_H
28
+
29
+ #define UTRINGBUFFER_VERSION 2.0.1
30
+
31
+ #include <stdlib.h>
32
+ #include <string.h>
33
+ #include "utarray.h" // for "UT_icd"
34
+
35
+ typedef struct {
36
+ unsigned i; /* index of next available slot; wraps at n */
37
+ unsigned n; /* capacity */
38
+ unsigned char f; /* full */
39
+ UT_icd icd; /* initializer, copy and destructor functions */
40
+ char *d; /* n slots of size icd->sz */
41
+ } UT_ringbuffer;
42
+
43
+ #define utringbuffer_init(a, _n, _icd) do { \
44
+ memset(a, 0, sizeof(UT_ringbuffer)); \
45
+ (a)->icd = *(_icd); \
46
+ (a)->n = (_n); \
47
+ if ((a)->n) { (a)->d = (char*)malloc((a)->n * (_icd)->sz); } \
48
+ } while(0)
49
+
50
+ #define utringbuffer_clear(a) do { \
51
+ if ((a)->icd.dtor) { \
52
+ if ((a)->f) { \
53
+ unsigned _ut_i; \
54
+ for (_ut_i = 0; _ut_i < (a)->n; ++_ut_i) { \
55
+ (a)->icd.dtor(utringbuffer_eltptr(a, _ut_i)); \
56
+ } \
57
+ } else { \
58
+ unsigned _ut_i; \
59
+ for (_ut_i = 0; _ut_i < (a)->i; ++_ut_i) { \
60
+ (a)->icd.dtor(utringbuffer_eltptr(a, _ut_i)); \
61
+ } \
62
+ } \
63
+ } \
64
+ (a)->i = 0; \
65
+ (a)->f = 0; \
66
+ } while(0)
67
+
68
+ #define utringbuffer_done(a) do { \
69
+ utringbuffer_clear(a); \
70
+ free((a)->d); (a)->d = NULL; \
71
+ (a)->n = 0; \
72
+ } while(0)
73
+
74
+ #define utringbuffer_new(a,n,_icd) do { \
75
+ a = (UT_ringbuffer*)malloc(sizeof(UT_ringbuffer)); \
76
+ utringbuffer_init(a, n, _icd); \
77
+ } while(0)
78
+
79
+ #define utringbuffer_free(a) do { \
80
+ utringbuffer_done(a); \
81
+ free(a); \
82
+ } while(0)
83
+
84
+ #define utringbuffer_push_back(a,p) do { \
85
+ if ((a)->icd.dtor && (a)->f) { (a)->icd.dtor(_utringbuffer_internalptr(a,(a)->i)); } \
86
+ if ((a)->icd.copy) { (a)->icd.copy( _utringbuffer_internalptr(a,(a)->i), p); } \
87
+ else { memcpy(_utringbuffer_internalptr(a,(a)->i), p, (a)->icd.sz); }; \
88
+ if (++(a)->i == (a)->n) { (a)->i = 0; (a)->f = 1; } \
89
+ } while(0)
90
+
91
+ #define utringbuffer_len(a) ((a)->f ? (a)->n : (a)->i)
92
+ #define utringbuffer_empty(a) ((a)->i == 0 && !(a)->f)
93
+ #define utringbuffer_full(a) ((a)->f != 0)
94
+
95
+ #define _utringbuffer_real_idx(a,j) ((a)->f ? ((j) + (a)->i) % (a)->n : (j))
96
+ #define _utringbuffer_internalptr(a,j) ((void*)((a)->d + ((a)->icd.sz * (j))))
97
+ #define utringbuffer_eltptr(a,j) ((0 <= (j) && (j) < utringbuffer_len(a)) ? _utringbuffer_internalptr(a,_utringbuffer_real_idx(a,j)) : NULL)
98
+
99
+ #define _utringbuffer_fake_idx(a,j) ((a)->f ? ((j) + (a)->n - (a)->i) % (a)->n : (j))
100
+ #define _utringbuffer_internalidx(a,e) (((char*)(e) >= (a)->d) ? (((char*)(e) - (a)->d)/(a)->icd.sz) : -1)
101
+ #define utringbuffer_eltidx(a,e) _utringbuffer_fake_idx(a, _utringbuffer_internalidx(a,e))
102
+
103
+ #define utringbuffer_front(a) utringbuffer_eltptr(a,0)
104
+ #define utringbuffer_next(a,e) ((e)==NULL ? utringbuffer_front(a) : utringbuffer_eltptr(a, utringbuffer_eltidx(a,e)+1))
105
+ #define utringbuffer_prev(a,e) ((e)==NULL ? utringbuffer_back(a) : utringbuffer_eltptr(a, utringbuffer_eltidx(a,e)-1))
106
+ #define utringbuffer_back(a) (utringbuffer_empty(a) ? NULL : utringbuffer_eltptr(a, utringbuffer_len(a) - 1))
107
+
108
+ #endif /* UTRINGBUFFER_H */
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright (c) 2008-2014, Troy D. Hanson http://troydhanson.github.com/uthash/
2
+ Copyright (c) 2008-2016, Troy D. Hanson http://troydhanson.github.com/uthash/
3
3
  All rights reserved.
4
4
 
5
5
  Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
26
  #ifndef UTSTRING_H
27
27
  #define UTSTRING_H
28
28
 
29
- #define UTSTRING_VERSION 1.9.9
29
+ #define UTSTRING_VERSION 2.0.1
30
30
 
31
31
  #ifdef __GNUC__
32
32
  #define _UNUSED_ __attribute__ ((__unused__))
@@ -38,7 +38,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38
38
  #include <string.h>
39
39
  #include <stdio.h>
40
40
  #include <stdarg.h>
41
+
42
+ #ifndef oom
41
43
  #define oom() exit(-1)
44
+ #endif
42
45
 
43
46
  typedef struct {
44
47
  char *d;
@@ -49,9 +52,11 @@ typedef struct {
49
52
  #define utstring_reserve(s,amt) \
50
53
  do { \
51
54
  if (((s)->n - (s)->i) < (size_t)(amt)) { \
52
- (s)->d = (char*)realloc((s)->d, (s)->n + amt); \
53
- if ((s)->d == NULL) oom(); \
54
- (s)->n += amt; \
55
+ char *utstring_tmp = (char*)realloc( \
56
+ (s)->d, (s)->n + (amt)); \
57
+ if (utstring_tmp == NULL) oom(); \
58
+ (s)->d = utstring_tmp; \
59
+ (s)->n += (amt); \
55
60
  } \
56
61
  } while(0)
57
62
 
@@ -59,7 +64,7 @@ do { \
59
64
  do { \
60
65
  (s)->n = 0; (s)->i = 0; (s)->d = NULL; \
61
66
  utstring_reserve(s,100); \
62
- (s)->d[0] = '\0'; \
67
+ (s)->d[0] = '\0'; \
63
68
  } while(0)
64
69
 
65
70
  #define utstring_done(s) \
@@ -98,10 +103,10 @@ do { \
98
103
 
99
104
  #define utstring_bincpy(s,b,l) \
100
105
  do { \
101
- utstring_reserve((s),(l)+1); \
106
+ utstring_reserve((s),(l)+1); \
102
107
  if (l) memcpy(&(s)->d[(s)->i], b, l); \
103
- (s)->i += l; \
104
- (s)->d[(s)->i]='\0'; \
108
+ (s)->i += (l); \
109
+ (s)->d[(s)->i]='\0'; \
105
110
  } while(0)
106
111
 
107
112
  #define utstring_concat(dst,src) \
@@ -119,7 +124,7 @@ do { \
119
124
  _UNUSED_ static void utstring_printf_va(UT_string *s, const char *fmt, va_list ap) {
120
125
  int n;
121
126
  va_list cp;
122
- while (1) {
127
+ for (;;) {
123
128
  #ifdef _WIN32
124
129
  cp = ap;
125
130
  #else
@@ -5,7 +5,7 @@ set -e
5
5
  echo "==> Installing required libraries…"
6
6
 
7
7
  if [ "$(uname)" == "Darwin" ]; then
8
- for pkg in flex bison cmake; do
8
+ for pkg in flex bison cmake valgrind; do
9
9
  if brew list -1 | grep -q "^${pkg}\$"; then
10
10
  echo "Package '$pkg' is installed"
11
11
  else
@@ -14,17 +14,11 @@ if [ "$(uname)" == "Darwin" ]; then
14
14
  fi
15
15
  done
16
16
  elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
17
- sudo apt-get -qq -y install flex bison cmake
18
- fi
19
-
20
- if [ ${TRAVIS_OS_NAME:-'linux'} = 'linux' ]
21
- then
22
- echo 'yes' | sudo add-apt-repository ppa:kalakris/cmake
23
- sudo apt-get update -qq
24
- sudo apt-get install -qq cmake python3 valgrind
25
- elif [ ${TRAVIS_OS_NAME:-'linux'} = 'osx' ]
26
- then
27
- echo "Building without python3, to make sure that works."
17
+ if [ -z "$TRAVIS" ]; then
18
+ sudo apt-get -qq -y install flex bison cmake valgrind
19
+ else
20
+ echo "Packages already installed on Travis CI."
21
+ fi
28
22
  fi
29
23
 
30
24
  mkdir -p build
@@ -1,10 +1,56 @@
1
- #!/bin/bash
1
+ #!/bin/sh
2
2
 
3
3
  mkdir -p build
4
4
  cd build
5
5
  cmake ..
6
6
  make
7
7
  ctest -V
8
+
9
+ echo 'inline'
10
+ echo '\sin y' | ./mtex2MML --inline | grep "display='inline'" || exit 1
11
+ echo ''
12
+
13
+ echo 'display'
14
+ echo '\sin y' | ./mtex2MML --display | grep "display='block'" || exit 1
15
+ echo ''
16
+
17
+ echo 'inline print-mtex'
18
+ echo '\sin y' | ./mtex2MML --inline --print-mtex | grep '$\\sin y\$'|| exit 1
19
+ echo ''
20
+
21
+ echo 'display print-mtex'
22
+ echo '\sin y' | ./mtex2MML --display --print-mtex | grep '$$\\sin y\$\$' || exit 1
23
+ echo ''
24
+
25
+ echo 'dollar'
26
+ echo '$\sin y$' | ./mtex2MML | grep "display='inline'" || exit 1
27
+
28
+ echo 'double dollar'
29
+ echo '$$\sin y$$' | ./mtex2MML | grep "display='block'" || exit 1
30
+
31
+ echo 'parens'
32
+ echo '\(\sin y\)' | ./mtex2MML | grep "display='inline'" || exit 1
33
+
34
+ echo 'brackets'
35
+ echo '\[\sin y\]' | ./mtex2MML | grep "display='block'" || exit 1
36
+
37
+ echo 'dollar use-dollar'
38
+ echo '$\sin y$' | ./mtex2MML --use-dollar | grep "display='inline'" || exit 1
39
+
40
+ echo 'double dollar use-double'
41
+ echo '$$\sin y$$' | ./mtex2MML --use-double | grep "display='block'" || exit 1
42
+
43
+ echo 'parens use-parens'
44
+ echo '\(\sin y\)' | ./mtex2MML --use-parens | grep "display='inline'" || exit 1
45
+
46
+ echo 'brackets use-brackets'
47
+ echo '\[\sin y\]' | ./mtex2MML --use-brackets | grep "display='block'" || exit 1
48
+
49
+ echo 'env use-env'
50
+ echo '\\begin{align}3x + 9y &= -12\\end{align}' | ./mtex2MML --use-env | grep "display='block'" || exit 1
51
+
52
+ echo 'DONE with command check'
53
+
8
54
  if [ -n "$CI" ]
9
55
  then
10
56
  make memcheck
@@ -20,7 +20,7 @@ puts "Creating tag #{TAG_NAME}..."
20
20
  `git tag #{TAG_NAME}`
21
21
 
22
22
  puts 'Creating release...'
23
- client = Octokit::Client.new(:access_token => ENV['MY_PERSONAL_TOKEN'])
23
+ client = Octokit::Client.new(:access_token => ENV['GITHUB_TOKEN'])
24
24
  release_response = client.create_release 'gjtorikian/mtex2MML', TAG_NAME, \
25
25
  :name => VERSION
26
26
 
@@ -10,6 +10,8 @@
10
10
  static const char *BEGIN = "\\begin";
11
11
  static const char *END = "\\end";
12
12
  static const char *BEGIN_SVG = "begin{svg}";
13
+ static const char *BEGIN_SUBSTACK = "\\substack";
14
+ static const char *BEGIN_CASES = "\\cases";
13
15
 
14
16
  const char *HLINE = "\\hline", *HDASHLINE = "\\hdashline",
15
17
  *LINE_SEPARATOR = "\\\\",
@@ -20,26 +22,54 @@ const char *HLINE = "\\hline", *HDASHLINE = "\\hdashline",
20
22
 
21
23
  int mtex2MML_determine_environment(const char *environment)
22
24
  {
23
- if (strstr(environment, "\\end{smallmatrix}") != NULL) {
24
- return ENV_SMALLMATRIX;
25
+ if (strstr(environment, "\\end{align}") != NULL) {
26
+ return ENV_ALIGN;
27
+ } else if (strstr(environment, "\\end{align*}") != NULL) {
28
+ return ENV_ALIGNSTAR;
29
+ } else if (strstr(environment, "\\end{alignat") != NULL) {
30
+ return ENV_ALIGNAT;
31
+ } else if (strstr(environment, "\\end{aligned}") != NULL) {
32
+ return ENV_ALIGNED;
33
+ } else if (strstr(environment, "\\end{alignedat}") != NULL) {
34
+ return ENV_ALIGNEDAT;
35
+ } else if (strstr(environment, "\\end{array}") != NULL) {
36
+ return ENV_ARRAY;
37
+ } else if (strstr(environment, "\\end{bmatrix}") != NULL) {
38
+ return ENV_BMATRIX;
39
+ } else if (strstr(environment, "\\end{Bmatrix}") != NULL) {
40
+ return ENV_BBMATRIX;
41
+ } else if (strstr(environment, "\\end{cases}") != NULL) {
42
+ return ENV_CASES;
43
+ } else if (strstr(environment, "\\end{eqnarray") != NULL) {
44
+ return ENV_EQNARRAY;
45
+ } else if (strstr(environment, "\\end{equation}") != NULL) {
46
+ return ENV_EQUATION;
25
47
  } else if (strstr(environment, "\\end{gather}") != NULL) {
26
48
  return ENV_GATHER;
49
+ } else if (strstr(environment, "\\end{gather*}") != NULL) {
50
+ return ENV_GATHERSTAR;
27
51
  } else if (strstr(environment, "\\end{gathered}") != NULL) {
28
52
  return ENV_GATHERED;
29
- } else if (strstr(environment, "\\end{eqnarray") != NULL) {
30
- return ENV_EQNARRAY;
53
+ } else if (strstr(environment, "\\end{matrix}") != NULL) {
54
+ return ENV_MATRIX;
31
55
  } else if (strstr(environment, "\\end{multline}") != NULL) {
32
56
  return ENV_MULTLINE;
33
57
  } else if (strstr(environment, "\\end{multline*}") != NULL) {
34
58
  return ENV_MULTLINESTAR;
35
- } else if (strstr(environment, "\\end{alignat") != NULL) {
36
- return ENV_ALIGNAT;
37
- } else if (strstr(environment, "\\end{aligned}") != NULL) {
38
- return ENV_ALIGNED;
39
- } else if (strstr(environment, "\\end{equation}") != NULL) {
40
- return ENV_EQUATION;
41
- } else if (strstr(environment, "\\end{align}") != NULL) {
42
- return ENV_ALIGN;
59
+ } else if (strstr(environment, "\\end{pmatrix}") != NULL) {
60
+ return ENV_PMATRIX;
61
+ } else if (strstr(environment, "\\end{smallmatrix}") != NULL) {
62
+ return ENV_SMALLMATRIX;
63
+ } else if (strstr(environment, "\\end{split}") != NULL) {
64
+ return ENV_SPLIT;
65
+ } else if (strstr(environment, "\\end{subarray}") != NULL) {
66
+ return ENV_SUBARRAY;
67
+ } else if (strstr(environment, "\\substack") != NULL) {
68
+ return ENV_SUBSTACK;
69
+ } else if (strstr(environment, "\\end{vmatrix}") != NULL) {
70
+ return ENV_VMATRIX;
71
+ } else if (strstr(environment, "\\end{Vmatrix}") != NULL) {
72
+ return ENV_VVMATRIX;
43
73
  }
44
74
 
45
75
  return OTHER;
@@ -65,6 +95,36 @@ int mtex2MML_identify_eqn_number(envType environment_type, char *line)
65
95
 
66
96
  void mtex2MML_env_replacements(UT_array **environment_data_stack, encaseType **encase, const char *environment)
67
97
  {
98
+ /* TODO: these next detections are gross, but substack and cases are rather special */
99
+ if (strstr(environment, BEGIN_SUBSTACK) != NULL) {
100
+ UT_array *eqn_number_stack;
101
+ utarray_new(eqn_number_stack, &ut_int_icd);
102
+ envdata_t env_data;
103
+ env_data.rowspacing = "";
104
+ env_data.rowlines = "";
105
+ env_data.environment_type = ENV_SUBSTACK;
106
+ env_data.eqn_numbers = eqn_number_stack;
107
+ env_data.line_count = 0;
108
+
109
+ utarray_push_back(*environment_data_stack, &env_data);
110
+ utarray_free(eqn_number_stack);
111
+
112
+ return;
113
+ }
114
+ if (strstr(environment, BEGIN_CASES) != NULL) {
115
+ UT_array *eqn_number_stack;
116
+ utarray_new(eqn_number_stack, &ut_int_icd);
117
+ envdata_t env_data;
118
+ env_data.rowspacing = "";
119
+ env_data.rowlines = "";
120
+ env_data.environment_type = ENV_CASES;
121
+ env_data.eqn_numbers = eqn_number_stack;
122
+ env_data.line_count = 0;
123
+
124
+ utarray_push_back(*environment_data_stack, &env_data);
125
+ utarray_free(eqn_number_stack);
126
+ return;
127
+ }
68
128
  /* if not an environment, don't bother going on */
69
129
  if ((strstr(environment, BEGIN) == NULL && strstr(environment, END) == NULL) || strstr(environment, BEGIN_SVG)) {
70
130
  return;
@@ -435,7 +495,7 @@ int mtex2MML_fetch_eqn_number(UT_array **environment_data_stack)
435
495
  envType mtex2MML_current_env_type(UT_array **environment_data_stack)
436
496
  {
437
497
  if (utarray_len(*environment_data_stack) == 0) {
438
- return -1;
498
+ return OTHER;
439
499
  }
440
500
 
441
501
  envdata_t *row_data_elem = (envdata_t*) utarray_front(*environment_data_stack);
@@ -9,7 +9,7 @@ extern "C" {
9
9
  #endif
10
10
 
11
11
  typedef enum {NONE = 0, TOPENCLOSE} encaseType;
12
- typedef enum {OTHER = 0, ENV_ALIGN, ENV_ALIGNAT, ENV_ALIGNATSTAR, ENV_ALIGNED, ENV_EQUATION, ENV_GATHER, ENV_GATHERED, ENV_EQNARRAY, ENV_MULTLINE, ENV_MULTLINESTAR, ENV_SMALLMATRIX} envType;
12
+ typedef enum {OTHER = 0, ENV_ALIGN, ENV_ALIGNSTAR, ENV_ALIGNAT, ENV_ALIGNATSTAR, ENV_ALIGNED, ENV_ALIGNEDAT, ENV_ARRAY, ENV_BMATRIX, ENV_BBMATRIX, ENV_CASES, ENV_EQUATION, ENV_GATHER, ENV_GATHERSTAR, ENV_GATHERED, ENV_EQNARRAY, ENV_MATRIX, ENV_MULTLINE, ENV_MULTLINESTAR, ENV_PMATRIX, ENV_SMALLMATRIX, ENV_SPLIT, ENV_SUBARRAY, ENV_SUBSTACK, ENV_VMATRIX, ENV_VVMATRIX} envType;
13
13
 
14
14
  typedef struct {
15
15
  char *rowspacing;
@@ -13,7 +13,11 @@
13
13
  #include "string_extras.h"
14
14
 
15
15
  #define YY_NEVER_INTERACTIVE 1
16
- #define YY_INPUT(buffer,result,max_size) result = s_mtex2MML_read (buffer, max_size)
16
+ #define YY_INPUT(buffer,result,max_size) result = s_mtex2MML_read (buffer, max_size);
17
+
18
+ #if defined __FreeBSD__ || defined __OpenBSD__ || defined __NetBSD__ || defined __DragonFly__
19
+ #undef fileno
20
+ #endif
17
21
 
18
22
  extern int fileno(FILE *); /* avoids gcc warning */
19
23
 
@@ -39,6 +43,9 @@ char * mtex2MML_str;
39
43
 
40
44
  int mtex2MML_rowposn = 0;
41
45
 
46
+ typedef enum {NO_PARSE = 0, OPEN_PARSE, CLOSE_PARSE} parsingEnv;
47
+ int parsing_environment = NO_PARSE;
48
+
42
49
  envType environment_type;
43
50
 
44
51
  /* TODO: I'm not sure what the next option does. My addition
@@ -54,16 +61,18 @@ int display_style = 0;
54
61
  %}
55
62
 
56
63
  /* "Basic heuristic is: opening $ can't be followed by whitespace, closing $ can't be followed by
57
- a digit or preceded by whitespace." -- @jgm, http://bit.ly/1HVtemx */
64
+ a digit or preceded by whitespace." -- @jgm, http://bit.ly/1HVtemx */
58
65
 
59
- <INITIAL>"$$" if (mtex2MML_delimiter_type(MTEX2MML_DELIMITER_DOUBLE)) { BEGIN(MATH); mtex2MML_inoptarg[0] = 0; mtex2MML_rowposn=2; mtex2MML_displaymode=1; return STARTDMATH; }
66
+ <INITIAL>"$$" if (mtex2MML_delimiter_type(MTEX2MML_DELIMITER_DOUBLE)) {BEGIN(MATH); mtex2MML_inoptarg[0] = 0; mtex2MML_rowposn=2; mtex2MML_displaymode=1; return STARTDMATH; }
60
67
 
61
- <INITIAL>"$"[\t\r\n ]? if (mtex2MML_delimiter_type(MTEX2MML_DELIMITER_DOLLAR)) { mtex2MML_inoptarg[0] = 0; mtex2MML_rowposn=2; if (yyleng==2) { BEGIN(ENDMATH); return INITIAL;}; BEGIN(MATH); mtex2MML_displaymode=0; return STARTMATH; }
68
+ <INITIAL>"$"[\t\r\n ]? if (mtex2MML_delimiter_type(MTEX2MML_DELIMITER_DOLLAR)) {mtex2MML_inoptarg[0] = 0; mtex2MML_rowposn=2; if (yyleng==2) { BEGIN(ENDMATH); return INITIAL;}; BEGIN(MATH); mtex2MML_displaymode=0; return STARTMATH; }
62
69
 
63
70
  <INITIAL>"\\(" if (mtex2MML_delimiter_type(MTEX2MML_DELIMITER_PARENS)) {BEGIN(MATH); mtex2MML_inoptarg[0] = 0; mtex2MML_rowposn=2; mtex2MML_displaymode=0; return STARTMATH; }
64
71
 
65
72
  <INITIAL>"\\[" if (mtex2MML_delimiter_type(MTEX2MML_DELIMITER_BRACKETS)) {BEGIN(MATH); mtex2MML_inoptarg[0] = 0; mtex2MML_rowposn=2; mtex2MML_displaymode=1; return STARTDMATH; }
66
73
 
74
+ <INITIAL>"\\begin" if (mtex2MML_delimiter_type(MTEX2MML_DELIMITER_ENVIRONMENTS)) {BEGIN(MATHENV); parsing_environment = OPEN_PARSE; mtex2MML_env_start = 1; mtex2MML_inoptarg[0] = 0; mtex2MML_rowposn=2; mtex2MML_displaymode=0; return BEGINENV; }
75
+
67
76
  <INITIAL>EOF return 0;
68
77
  <INITIAL>"\n" {mtex2MML_lineno++; yylval=mtex2MML_copy_string(yytext); return CHAR;}
69
78
  <INITIAL>. {yylval=mtex2MML_copy_string(yytext); return CHAR;}
@@ -73,7 +82,7 @@ int display_style = 0;
73
82
 
74
83
  "$"{1,2} if (mtex2MML_delimiter_type(MTEX2MML_DELIMITER_DOLLAR) || mtex2MML_delimiter_type(MTEX2MML_DELIMITER_DOUBLE)) { mtex2MML_eqn_src[mtex2MML_eqn_end-mtex2MML_eqn_src-yyleng]=0; mtex2MML_eqn_end=mtex2MML_eqn_src; yylval=mtex2MML_copy_escaped(mtex2MML_eqn_src); BEGIN(INITIAL); return ENDMATH;} else {yylval=mtex2MML_copy_string("$"); return MI;}
75
84
 
76
- "\\)" if (mtex2MML_delimiter_type(MTEX2MML_DELIMITER_PARENS)) {mtex2MML_eqn_src[mtex2MML_eqn_end-mtex2MML_eqn_src-yyleng]=0; mtex2MML_eqn_end=mtex2MML_eqn_src; yylval=mtex2MML_copy_escaped(mtex2MML_eqn_src); BEGIN(INITIAL); return ENDMATH;}
85
+ "\\)" if (mtex2MML_delimiter_type(MTEX2MML_DELIMITER_PARENS)) {mtex2MML_eqn_src[mtex2MML_eqn_end-mtex2MML_eqn_src-yyleng]=0; mtex2MML_eqn_end=mtex2MML_eqn_src; yylval=mtex2MML_copy_escaped(mtex2MML_eqn_src); BEGIN(INITIAL); return ENDMATH;}
77
86
 
78
87
  "\\]" if (mtex2MML_delimiter_type(MTEX2MML_DELIMITER_BRACKETS)) {mtex2MML_eqn_src[mtex2MML_eqn_end-mtex2MML_eqn_src-yyleng]=0; mtex2MML_eqn_end=mtex2MML_eqn_src; yylval=mtex2MML_copy_escaped(mtex2MML_eqn_src); BEGIN(INITIAL); return ENDMATH;}
79
88
 
@@ -134,7 +143,7 @@ int display_style = 0;
134
143
  "\\\\"[\n\r\t ]*\[[0-9\.]+(em|ex|px|in|cm|mm|mu|pt|pc|%)\] |
135
144
  "\\newline"[\n\r\t ]* |
136
145
  "\\cr"[\n\r\t ]* |
137
- "\\\\"[\n\r\t ]* { mtex2MML_rowposn=2; return ROWSEP; }
146
+ "\\\\"[\n\r\t ]* { mtex2MML_rowposn=2; if (mtex2MML_current_env_type(mtex2MML_get_environment_data_stack()) == OTHER) return NEWLINE; return ROWSEP;}
138
147
 
139
148
  [0-9\.,]+(em|ex|px|in|cm|mm|mu|pt|pc|%) {char * normalized_px = mtex2MML_str_replace(yytext, ",", "."); yylval=mtex2MML_copy_string(normalized_px); mtex2MML_free_string(normalized_px); return PXSTRING; }
140
149
 
@@ -751,6 +760,10 @@ int display_style = 0;
751
760
  "\\bigtriangledown" |
752
761
  "\\nprec" {yylval=mtex2MML_copy2(yytext, ";"); if (yylval != mtex2MML_empty_string) yylval[0]='&'; return MOL;}
753
762
 
763
+ "\\textgreater" |
764
+ " > " {yylval=mtex2MML_copy_string("&gt;"); return MOL;}
765
+ "\\textless" |
766
+ " < " {yylval=mtex2MML_copy_string("&lt;"); return MOL;}
754
767
  "\\land" {yylval=mtex2MML_copy_string("&and;"); return MOL;}
755
768
  "\\lor" {yylval=mtex2MML_copy_string("&or;"); return MOL;}
756
769
  "\\surd" {yylval=mtex2MML_copy_string("&radic;"); return MOL;}
@@ -1137,7 +1150,7 @@ int display_style = 0;
1137
1150
  "\\mathcal" {BEGIN(CALLIGRAPHIC); return CAL;}
1138
1151
 
1139
1152
  "\\begin" {mtex2MML_env_start = 1; BEGIN(MATHENV); return BEGINENV;}
1140
- "\\end" {environment_type = OTHER;BEGIN(MATHENV); return ENDENV;}
1153
+ "\\end" { if (parsing_environment == OPEN_PARSE) parsing_environment = CLOSE_PARSE; environment_type = OTHER; BEGIN(MATHENV); return ENDENV;}
1141
1154
 
1142
1155
  "\\notag" |
1143
1156
  "\\nonumber" { /* ignore, but address in .y */}
@@ -1291,34 +1304,34 @@ int display_style = 0;
1291
1304
  }
1292
1305
 
1293
1306
  <MATHENV>{
1294
- "\{equation\}" { BEGIN(MATH); return EQUATION;}
1295
- "\{equation*\}" { BEGIN(MATH); return EQUATION_STAR;}
1296
- "\{matrix\}" {BEGIN(MATH); return MATRIX;}
1297
- "\{pmatrix\}" {BEGIN(MATH); return PMATRIX;}
1298
- "\{bmatrix\}" {BEGIN(MATH); return BMATRIX;}
1299
- "\{Bmatrix\}" {BEGIN(MATH); return BBMATRIX;}
1300
- "\{vmatrix\}" {BEGIN(MATH); return VMATRIX;}
1301
- "\{Vmatrix\}" {BEGIN(MATH); return VVMATRIX;}
1302
- "\{smallmatrix\}" {BEGIN(MATH); return SMALLMATRIX;}
1303
- "\{cases\}" {BEGIN(MATH); return CASES;}
1307
+ "\{equation\}" { if (parsing_environment == CLOSE_PARSE) { mtex2MML_reset_parsing_environment(); } else { BEGIN(MATH); } return EQUATION;}
1308
+ "\{equation*\}" { if (parsing_environment == CLOSE_PARSE) { mtex2MML_reset_parsing_environment(); } else { BEGIN(MATH); } return EQUATION_STAR;}
1309
+ "\{matrix\}" {if (parsing_environment == CLOSE_PARSE) { mtex2MML_reset_parsing_environment(); } else { BEGIN(MATH); } return MATRIX;}
1310
+ "\{pmatrix\}" {if (parsing_environment == CLOSE_PARSE) { mtex2MML_reset_parsing_environment(); } else { BEGIN(MATH); } return PMATRIX;}
1311
+ "\{bmatrix\}" {if (parsing_environment == CLOSE_PARSE) { mtex2MML_reset_parsing_environment(); } else { BEGIN(MATH); } return BMATRIX;}
1312
+ "\{Bmatrix\}" {if (parsing_environment == CLOSE_PARSE) { mtex2MML_reset_parsing_environment(); } else { BEGIN(MATH); } return BBMATRIX;}
1313
+ "\{vmatrix\}" {if (parsing_environment == CLOSE_PARSE) { mtex2MML_reset_parsing_environment(); } else { BEGIN(MATH); } return VMATRIX;}
1314
+ "\{Vmatrix\}" {if (parsing_environment == CLOSE_PARSE) { mtex2MML_reset_parsing_environment(); } else { BEGIN(MATH); } return VVMATRIX;}
1315
+ "\{smallmatrix\}" {if (parsing_environment == CLOSE_PARSE) { mtex2MML_reset_parsing_environment(); } else { BEGIN(MATH); }; return SMALLMATRIX;}
1316
+ "\{cases\}" {if (parsing_environment == CLOSE_PARSE) { mtex2MML_reset_parsing_environment(); } else { BEGIN(MATH); } return CASES;}
1304
1317
  "\{aligned\}[" {BEGIN(ENVOPTIONS); return ALIGNED;}
1305
- "\{aligned\}" {BEGIN(MATH); return ALIGNED;}
1306
- "\{align\}" {BEGIN(MATH); return ALIGNENV;}
1307
- "\{align*\}" {BEGIN(MATH); return ALIGNENV_STAR;}
1308
- "\{alignat\}" {environment_type = ENV_ALIGNAT; if (mtex2MML_env_start == 1) BEGIN(ALIGNATOPTS); else BEGIN(MATH); return ALIGNAT;}
1309
- "\{alignat*\}" {environment_type = ENV_ALIGNATSTAR; if (mtex2MML_env_start == 1) BEGIN(ALIGNATOPTS); else BEGIN(MATH); return ALIGNAT_STAR;}
1310
- "\{alignedat\}" {if (mtex2MML_env_start == 1) BEGIN(ALIGNATOPTS); else BEGIN(MATH); return ALIGNEDAT;}
1311
- "\{eqnarray*\}" {BEGIN(MATH); return EQNARRAY_STAR;}
1312
- "\{eqnarray\}" {BEGIN(MATH); return EQNARRAY;}
1313
- "\{gather\}" {BEGIN(MATH); return GATHER;}
1314
- "\{gather*\}" {BEGIN(MATH); return GATHER_STAR;}
1318
+ "\{aligned\}" {if (parsing_environment == CLOSE_PARSE) { mtex2MML_reset_parsing_environment(); } else { BEGIN(MATH); } return ALIGNED;}
1319
+ "\{align\}" { if (parsing_environment == CLOSE_PARSE) { mtex2MML_reset_parsing_environment(); } else { BEGIN(MATH); } return ALIGNENV;}
1320
+ "\{align*\}" {if (parsing_environment == CLOSE_PARSE) { mtex2MML_reset_parsing_environment(); } else { BEGIN(MATH); } return ALIGNENV_STAR;}
1321
+ "\{alignat\}" {environment_type = ENV_ALIGNAT; if (mtex2MML_env_start == 1) BEGIN(ALIGNATOPTS); else if (parsing_environment == CLOSE_PARSE) { mtex2MML_reset_parsing_environment(); } else { BEGIN(MATH); } return ALIGNAT;}
1322
+ "\{alignat*\}" {environment_type = ENV_ALIGNATSTAR; if (mtex2MML_env_start == 1) BEGIN(ALIGNATOPTS); else if (parsing_environment == CLOSE_PARSE) { mtex2MML_reset_parsing_environment(); } else { BEGIN(MATH); } return ALIGNAT_STAR;}
1323
+ "\{alignedat\}" {if (mtex2MML_env_start == 1) BEGIN(ALIGNATOPTS); else if (parsing_environment == CLOSE_PARSE) { mtex2MML_reset_parsing_environment(); } else { BEGIN(MATH); } return ALIGNEDAT;}
1324
+ "\{eqnarray*\}" {if (parsing_environment == CLOSE_PARSE) { mtex2MML_reset_parsing_environment(); } else { BEGIN(MATH); } return EQNARRAY_STAR;}
1325
+ "\{eqnarray\}" {if (parsing_environment == CLOSE_PARSE) { mtex2MML_reset_parsing_environment(); } else { BEGIN(MATH); } return EQNARRAY;}
1326
+ "\{gather\}" {if (parsing_environment == CLOSE_PARSE) { mtex2MML_reset_parsing_environment(); } else { BEGIN(MATH); } return GATHER;}
1327
+ "\{gather*\}" {if (parsing_environment == CLOSE_PARSE) { mtex2MML_reset_parsing_environment(); } else { BEGIN(MATH); } return GATHER_STAR;}
1315
1328
  "\{gathered\}[" {BEGIN(ENVOPTIONS); return GATHERED;}
1316
- "\{gathered\}" {BEGIN(MATH); return GATHERED;}
1317
- "\{multline*\}" {BEGIN(MATH); return MULTLINE_STAR;}
1318
- "\{multline\}" {BEGIN(MATH); return MULTLINE;}
1319
- "\{split\}" {BEGIN(MATH); return ALIGNED;}
1320
- "\{array\}" {if (mtex2MML_env_start == 1) BEGIN(ARRAYOPTIONS); else BEGIN(MATH); return ARRAY;}
1321
- "\{subarray\}" {if (mtex2MML_env_start == 1) BEGIN(ARRAYOPTIONS); else BEGIN(MATH); return SUBARRAY;}
1329
+ "\{gathered\}" {if (parsing_environment == CLOSE_PARSE) { mtex2MML_reset_parsing_environment(); } else { BEGIN(MATH); } return GATHERED;}
1330
+ "\{multline*\}" {if (parsing_environment == CLOSE_PARSE) { mtex2MML_reset_parsing_environment(); } else { BEGIN(MATH); } return MULTLINE_STAR;}
1331
+ "\{multline\}" {if (parsing_environment == CLOSE_PARSE) { mtex2MML_reset_parsing_environment(); } else { BEGIN(MATH); } return MULTLINE;}
1332
+ "\{split\}" {if (parsing_environment == CLOSE_PARSE) { mtex2MML_reset_parsing_environment(); } else { BEGIN(MATH); } return ALIGNED;}
1333
+ "\{array\}" {if (mtex2MML_env_start == 1) BEGIN(ARRAYOPTIONS); else if (parsing_environment == CLOSE_PARSE) { mtex2MML_reset_parsing_environment(); } else { BEGIN(MATH); } return ARRAY;}
1334
+ "\{subarray\}" {if (mtex2MML_env_start == 1) BEGIN(ARRAYOPTIONS); else if (parsing_environment == CLOSE_PARSE) { mtex2MML_reset_parsing_environment(); } else { BEGIN(MATH); } return SUBARRAY;}
1322
1335
  "\{svg\}" {mtex2MML_env_start = 0; BEGIN(SVGENV); return SVG;}
1323
1336
  }
1324
1337
 
@@ -1365,27 +1378,27 @@ int display_style = 0;
1365
1378
  }
1366
1379
 
1367
1380
  <ROMAN>{
1368
- "\{" {mtex2MML_variant_start = 1; return ST;}
1369
- "\}" {mtex2MML_variant_start = 0; BEGIN(MATH); return END;}
1370
- [a-zA-Z]+ {yylval=mtex2MML_copy_string(yytext); if (mtex2MML_variant_start == 0) BEGIN(MATH); return RMCHAR;}
1381
+ "\{" {mtex2MML_variant_start = 1; return ST;}
1382
+ "\}" {mtex2MML_variant_start = 0; BEGIN(MATH); return END;}
1383
+ "\\ " {yylval=mtex2MML_copy_string(" "); return RMCHAR;}
1384
+ [^ ] {yylval=mtex2MML_copy_string(yytext); if (mtex2MML_variant_start == 0) BEGIN(MATH); return RMCHAR;}
1371
1385
  [\t\n\r ]+ ;
1372
- . {return yytext[0];}
1373
1386
  }
1374
1387
 
1375
1388
  <SCRIPT>{
1376
- "\{" {mtex2MML_variant_start = 1; return ST;}
1377
- "\}" {mtex2MML_variant_start = 0; BEGIN(MATH); return END;}
1378
- [a-zA-Z]+ {yylval=mtex2MML_copy_string(yytext); if (mtex2MML_variant_start == 0) BEGIN(MATH); return SCRCHAR;}
1389
+ "\{" {mtex2MML_variant_start = 1; return ST;}
1390
+ "\}" {mtex2MML_variant_start = 0; BEGIN(MATH); return END;}
1391
+ "\\ " {yylval=mtex2MML_copy_string(" "); return SCRCHAR;}
1392
+ [^ ] {yylval=mtex2MML_copy_string(yytext); if (mtex2MML_variant_start == 0) BEGIN(MATH); return SCRCHAR;}
1379
1393
  [\t\n\r ]+ ;
1380
- . {return yytext[0];}
1381
1394
  }
1382
1395
 
1383
1396
  <PMBSTRING>{
1384
- "\{" {mtex2MML_variant_start = 1; return ST;}
1385
- "\}" {mtex2MML_variant_start = 0; BEGIN(MATH); return END;}
1386
- [a-zA-Z]+ {yylval=mtex2MML_copy_string(yytext); if (mtex2MML_variant_start == 0) BEGIN(MATH); return PMBCHAR;}
1397
+ "\{" {mtex2MML_variant_start = 1; return ST;}
1398
+ "\}" {mtex2MML_variant_start = 0; BEGIN(MATH); return END;}
1399
+ "\\ " {yylval=mtex2MML_copy_string(" "); return PMBCHAR;}
1400
+ [^ ] {yylval=mtex2MML_copy_string(yytext); if (mtex2MML_variant_start == 0) BEGIN(MATH); return PMBCHAR;}
1387
1401
  [\t\n\r ]+ ;
1388
- . {return yytext[0];}
1389
1402
  }
1390
1403
 
1391
1404
  <BBOLD>{
@@ -1399,19 +1412,19 @@ int display_style = 0;
1399
1412
  }
1400
1413
 
1401
1414
  <CALLIGRAPHIC>{
1402
- "\{" {mtex2MML_variant_start = 1; return ST;}
1403
- "\}" {mtex2MML_variant_start = 0; BEGIN(MATH); return END;}
1404
- [a-zA-Z]+ {yylval=mtex2MML_copy_string(yytext); if (mtex2MML_variant_start == 0) BEGIN(MATH); return CALCHAR;}
1415
+ "\{" {mtex2MML_variant_start = 1; return ST;}
1416
+ "\}" {mtex2MML_variant_start = 0; BEGIN(MATH); return END;}
1417
+ "\\ " {yylval=mtex2MML_copy_string(" "); return CALCHAR;}
1418
+ [^ ] {yylval=mtex2MML_copy_string(yytext); if (mtex2MML_variant_start == 0) BEGIN(MATH); return CALCHAR;}
1405
1419
  [\t\n\r ]+ ;
1406
- . {return yytext[0];}
1407
1420
  }
1408
1421
 
1409
1422
  <FRAKTUR>{
1410
- "\{" {mtex2MML_variant_start = 1; return ST;}
1411
- "\}" {mtex2MML_variant_start = 0; BEGIN(MATH); return END;}
1412
- [a-zA-Z]+ {yylval=mtex2MML_copy_string(yytext); if (mtex2MML_variant_start == 0) BEGIN(MATH); return FRAKCHAR;}
1423
+ "\{" {mtex2MML_variant_start = 1; return ST;}
1424
+ "\}" {mtex2MML_variant_start = 0; BEGIN(MATH); return END;}
1425
+ "\\ " {yylval=mtex2MML_copy_string(" "); return FRAKCHAR;}
1426
+ [^ ] {yylval=mtex2MML_copy_string(yytext); if (mtex2MML_variant_start == 0) BEGIN(MATH); return FRAKCHAR;}
1413
1427
  [\t\n\r ]+ ;
1414
- . {return yytext[0];}
1415
1428
  }
1416
1429
 
1417
1430
  <PLAINTEXT>{
@@ -1509,6 +1522,15 @@ void mtex2MML_restart ()
1509
1522
  BEGIN(INITIAL);
1510
1523
  }
1511
1524
 
1525
+ void mtex2MML_reset_parsing_environment()
1526
+ {
1527
+ parsing_environment = NO_PARSE;
1528
+ mtex2MML_eqn_src[mtex2MML_eqn_end-mtex2MML_eqn_src-yyleng]=0;
1529
+ mtex2MML_eqn_end=mtex2MML_eqn_src;
1530
+
1531
+ BEGIN(INITIAL);
1532
+ }
1533
+
1512
1534
  static const char * s_mtex2MML_buffer = 0;
1513
1535
  static unsigned long s_mtex2MML_length = 0;
1514
1536