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
@@ -1,69 +1,102 @@
1
1
  # Swedish translation for lasem.
2
- # Copyright © 2011, 2014, 2015 Free Software Foundation, Inc.
2
+ # Copyright © 2011, 2014, 2015, 2016 Free Software Foundation, Inc.
3
3
  # This file is distributed under the same license as the lasem package.
4
4
  # Daniel Nylander <po@danielnylander.se>, 2011.
5
- # Anders Jonsson <anders.jonsson@norsjovallen.se>, 2014, 2015.
5
+ # Anders Jonsson <anders.jonsson@norsjovallen.se>, 2014, 2015, 2016.
6
6
  #
7
7
  msgid ""
8
8
  msgstr ""
9
9
  "Project-Id-Version: lasem\n"
10
10
  "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
11
11
  "product=lasem&keywords=I18N+L10N&component=general\n"
12
- "POT-Creation-Date: 2015-08-03 22:12+0000\n"
13
- "PO-Revision-Date: 2015-08-07 14:50+0200\n"
12
+ "POT-Creation-Date: 2016-07-04 19:36+0000\n"
13
+ "PO-Revision-Date: 2016-08-02 01:18+0200\n"
14
14
  "Last-Translator: Anders Jonsson <anders.jonsson@norsjovallen.se>\n"
15
15
  "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
16
16
  "Language: sv\n"
17
17
  "MIME-Version: 1.0\n"
18
18
  "Content-Type: text/plain; charset=UTF-8\n"
19
19
  "Content-Transfer-Encoding: 8bit\n"
20
- "X-Generator: Poedit 1.8.3\n"
20
+ "X-Generator: Poedit 1.8.8\n"
21
21
 
22
- #: ../src/lasemrender.c:67
22
+ #: ../src/lasemrender.c:70
23
23
  msgid "Output filename"
24
24
  msgstr "Filnamn för utdata"
25
25
 
26
- #: ../src/lasemrender.c:69
26
+ #: ../src/lasemrender.c:72
27
27
  msgid "Output format"
28
28
  msgstr "Format för utdata"
29
29
 
30
- #: ../src/lasemrender.c:71
30
+ #: ../src/lasemrender.c:74
31
31
  msgid "Pixel per inch"
32
32
  msgstr "Bildpunkter per tum"
33
33
 
34
- #: ../src/lasemrender.c:73
34
+ #: ../src/lasemrender.c:76
35
35
  msgid "Zoom"
36
36
  msgstr "Zoom"
37
37
 
38
- #: ../src/lasemrender.c:75
38
+ #: ../src/lasemrender.c:78
39
+ msgid "Element id"
40
+ msgstr "Element-id"
41
+
42
+ #: ../src/lasemrender.c:80
43
+ msgid "Offset"
44
+ msgstr "Position"
45
+
46
+ #: ../src/lasemrender.c:82
47
+ msgid "Size"
48
+ msgstr "Storlek"
49
+
50
+ #: ../src/lasemrender.c:84
39
51
  msgid "Debug domains"
40
52
  msgstr "Felsökningsdomäner"
41
53
 
42
- #: ../src/lasemrender.c:107
54
+ #: ../src/lasemrender.c:97
55
+ msgid "Invalid document type (SVG expected)"
56
+ msgstr "Ogiltig dokumenttyp (SVG förväntades)"
57
+
58
+ #: ../src/lasemrender.c:103
59
+ #, c-format
60
+ msgid "Element '%s' not found"
61
+ msgstr "Elementet ”%s” hittades inte"
62
+
63
+ #: ../src/lasemrender.c:154
43
64
  msgid "Option parsing failed:"
44
65
  msgstr "Tolkning av flaggor misslyckades:"
45
66
 
46
- #: ../src/lasemrender.c:114
67
+ #: ../src/lasemrender.c:161
47
68
  msgid "Invalid zoom value"
48
69
  msgstr "Ogiltigt zoomvärde"
49
70
 
50
- #: ../src/lasemrender.c:121
71
+ #: ../src/lasemrender.c:170
72
+ msgid "Invalid number of arguments for offset option"
73
+ msgstr "Ogiltigt antal argument för positionsflagga"
74
+
75
+ #: ../src/lasemrender.c:180
76
+ msgid "Invalid number of arguments for size option"
77
+ msgstr "Ogiltigt antal argument för storleksflagga"
78
+
79
+ #: ../src/lasemrender.c:185
80
+ msgid "Invalid export size"
81
+ msgstr "Ogiltig exportstorlek"
82
+
83
+ #: ../src/lasemrender.c:193
51
84
  msgid "Missing input filename"
52
85
  msgstr "Saknar filnamn för indata"
53
86
 
54
- #: ../src/lasemrender.c:132
87
+ #: ../src/lasemrender.c:204
55
88
  msgid "Unknown format:"
56
89
  msgstr "Okänt format: %s"
57
90
 
58
- #: ../src/lasemrender.c:172
91
+ #: ../src/lasemrender.c:244
59
92
  msgid ""
60
93
  "Don't know which format to use, please either give a format (-f) or an "
61
94
  "output filename (-o)"
62
95
  msgstr ""
63
- "Vet inte vilket format som ska användas, ange antingen ett format (-f) "
64
- "eller ett filnamn för utdata (-o)"
96
+ "Vet inte vilket format som ska användas, ange antingen ett format (-f) eller "
97
+ "ett filnamn för utdata (-o)"
65
98
 
66
- #: ../src/lasemrender.c:262
99
+ #: ../src/lasemrender.c:355
67
100
  #, c-format
68
101
  msgid "Can't load '%s'"
69
102
  msgstr "Kan inte läsa in ”%s”"
@@ -25,9 +25,9 @@
25
25
  #include <stdlib.h>
26
26
  #include <lsm.h>
27
27
  #include <lsmmathml.h>
28
+ #include <lsmsvg.h>
28
29
  #include <glib.h>
29
30
  #include <glib/gi18n.h>
30
- #include <glib/gprintf.h>
31
31
  #include <gio/gio.h>
32
32
  #include <cairo-pdf.h>
33
33
  #include <cairo-svg.h>
@@ -40,6 +40,9 @@ static char *option_debug_domains = NULL;
40
40
  static char *option_output_file_format = NULL;
41
41
  static char **option_input_filenames = NULL;
42
42
  static char *option_output_filename = NULL;
43
+ static char *option_element_id = NULL;
44
+ static char *option_offset = NULL;
45
+ static char *option_size = NULL;
43
46
  double option_ppi = 72.0;
44
47
  double option_zoom = 1.0;
45
48
 
@@ -71,12 +74,53 @@ static const GOptionEntry entries[] =
71
74
  &option_ppi, N_("Pixel per inch"), NULL },
72
75
  { "zoom", 'z', 0, G_OPTION_ARG_DOUBLE,
73
76
  &option_zoom, N_("Zoom"), NULL },
77
+ { "id", 'i', 0, G_OPTION_ARG_STRING,
78
+ &option_element_id, N_("Element id"), NULL },
79
+ { "offset", 't', 0, G_OPTION_ARG_STRING,
80
+ &option_offset, N_("Offset"), NULL },
81
+ { "size", 's', 0, G_OPTION_ARG_STRING,
82
+ &option_size, N_("Size"), NULL },
74
83
  { "debug", 'd', 0, G_OPTION_ARG_STRING,
75
84
  &option_debug_domains, N_("Debug domains"), NULL },
76
85
  { NULL }
77
86
  };
78
87
 
79
- int main(int argc, char **argv)
88
+ static gboolean
89
+ _hide_before_object (LsmDomDocument *document, const char *id)
90
+ {
91
+ LsmDomNode *node;
92
+ LsmDomNode *sibling;
93
+ LsmDomNode *parent;
94
+
95
+ /* TODO: Handle other document types */
96
+ if (!LSM_IS_SVG_DOCUMENT (document)) {
97
+ fprintf (stderr, "%s\n", _("Invalid document type (SVG expected)"));
98
+ return FALSE;
99
+ }
100
+
101
+ node = LSM_DOM_NODE (lsm_svg_document_get_element_by_id (LSM_SVG_DOCUMENT (document), id));
102
+ if (!LSM_IS_DOM_NODE (node)) {
103
+ fprintf (stderr, _("Element '%s' not found"), id);
104
+ fprintf (stderr, "\n");
105
+ return FALSE;
106
+ }
107
+
108
+ for (parent = lsm_dom_node_get_parent_node (node);
109
+ LSM_IS_DOM_NODE (parent);
110
+ node = parent, parent = lsm_dom_node_get_parent_node (parent)) {
111
+ for (sibling = lsm_dom_node_get_first_child (parent);
112
+ LSM_IS_DOM_NODE (sibling);
113
+ sibling = lsm_dom_node_get_next_sibling (sibling)) {
114
+ if (sibling != node && LSM_IS_SVG_ELEMENT (sibling))
115
+ lsm_dom_element_set_attribute (LSM_DOM_ELEMENT (sibling), "display", "none");
116
+ }
117
+ }
118
+
119
+ return TRUE;
120
+ }
121
+
122
+ int
123
+ main(int argc, char **argv)
80
124
  {
81
125
  LsmDomDocument *document;
82
126
  LsmDomView *view;
@@ -87,8 +131,11 @@ int main(int argc, char **argv)
87
131
  FileFormat format;
88
132
  char *output_filename;
89
133
  char *input_filename;
134
+ double offset_x_pt, offset_y_pt;
90
135
  double height_pt, width_pt;
91
136
  unsigned int height, width;
137
+ double size[2];
138
+ double offset[2];
92
139
 
93
140
  bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
94
141
  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
@@ -104,21 +151,46 @@ int main(int argc, char **argv)
104
151
  if (!g_option_context_parse (context, &argc, &argv, &error))
105
152
  {
106
153
  g_option_context_free (context);
107
- printf ("%s %s\n", _("Option parsing failed:"), error->message);
154
+ fprintf (stderr, "%s %s\n", _("Option parsing failed:"), error->message);
108
155
  return EXIT_FAILURE;
109
156
  }
110
157
 
111
158
  g_option_context_free (context);
112
159
 
113
160
  if (option_zoom < 0.0) {
114
- printf ("%s\n", _("Invalid zoom value"));
161
+ fprintf (stderr, "%s\n", _("Invalid zoom value"));
115
162
  return EXIT_FAILURE;
116
163
  }
117
164
 
165
+ if (option_offset != NULL) {
166
+ unsigned n_values;
167
+
168
+ n_values = lsm_str_parse_double_list (&option_offset, 2, offset);
169
+ if (n_values != 2) {
170
+ fprintf (stderr, "%s\n", _("Invalid number of arguments for offset option"));
171
+ return EXIT_FAILURE;
172
+ }
173
+ }
174
+
175
+ if (option_size != NULL) {
176
+ unsigned n_values;
177
+
178
+ n_values = lsm_str_parse_double_list (&option_size, 2, size);
179
+ if (n_values != 2) {
180
+ fprintf (stderr, "%s\n", _("Invalid number of arguments for size option"));
181
+ return EXIT_FAILURE;
182
+ }
183
+ if (size[0] <= 0.0 ||
184
+ size[1] <= 0.0) {
185
+ fprintf (stderr, "%s\n", _("Invalid export size"));
186
+ return EXIT_FAILURE;
187
+ }
188
+ }
189
+
118
190
  lsm_debug_enable (option_debug_domains);
119
191
 
120
192
  if (option_input_filenames == NULL || g_strv_length (option_input_filenames) > 1) {
121
- printf ("%s\n", _("Missing input filename"));
193
+ fprintf (stderr, "%s\n", _("Missing input filename"));
122
194
  return EXIT_FAILURE;
123
195
  }
124
196
 
@@ -129,7 +201,7 @@ int main(int argc, char **argv)
129
201
  if (g_ascii_strcasecmp (option_output_file_format, file_formats[format]) == 0)
130
202
  break;
131
203
  if (FORMAT_UNKNOWN == format) {
132
- printf ("%s %s\n", _("Unknown format:"), option_output_file_format);
204
+ fprintf (stderr, "%s %s\n", _("Unknown format:"), option_output_file_format);
133
205
  return EXIT_FAILURE;
134
206
  }
135
207
  } else
@@ -169,7 +241,7 @@ int main(int argc, char **argv)
169
241
  }
170
242
 
171
243
  if (format == FORMAT_UNKNOWN) {
172
- printf ("%s\n", _("Don't know which format to use, please either give a format (-f) or an output filename (-o)"));
244
+ fprintf (stderr, "%s\n", _("Don't know which format to use, please either give a format (-f) or an output filename (-o)"));
173
245
  return EXIT_FAILURE;
174
246
  }
175
247
 
@@ -188,6 +260,13 @@ int main(int argc, char **argv)
188
260
  }
189
261
  }
190
262
 
263
+ if (document != NULL && option_element_id != NULL) {
264
+ if (!_hide_before_object (document, option_element_id)) {
265
+ g_object_unref (document);
266
+ return EXIT_FAILURE;
267
+ }
268
+ }
269
+
191
270
  if (document != NULL) {
192
271
  if (lsm_debug_check (&lsm_debug_category_dom, LSM_DEBUG_LEVEL_LOG)) {
193
272
  void *buffer;
@@ -209,11 +288,25 @@ int main(int argc, char **argv)
209
288
 
210
289
  lsm_dom_view_get_size (view, &width_pt, &height_pt, NULL);
211
290
  lsm_dom_view_get_size_pixels (view, &width, &height, NULL);
291
+
292
+ if (option_offset == NULL) {
293
+ offset_x_pt = offset_y_pt = 0.0;
294
+ } else {
295
+ offset_x_pt = option_zoom * offset[0];
296
+ offset_y_pt = option_zoom * offset[1];
297
+ }
212
298
 
213
- width_pt *= option_zoom;
214
- height_pt *= option_zoom;
215
- width *= option_zoom;
216
- height *= option_zoom;
299
+ if (option_size == NULL) {
300
+ width_pt *= option_zoom;
301
+ height_pt *= option_zoom;
302
+ width *= option_zoom;
303
+ height *= option_zoom;
304
+ } else {
305
+ width_pt = option_zoom * size[0];
306
+ height_pt = option_zoom * size[1];
307
+ width = width_pt;
308
+ height = height_pt;
309
+ }
217
310
 
218
311
  switch (format) {
219
312
  case FORMAT_PDF:
@@ -240,7 +333,7 @@ int main(int argc, char **argv)
240
333
  cairo_surface_destroy (surface);
241
334
  cairo_scale (cairo, option_zoom, option_zoom);
242
335
 
243
- lsm_dom_view_render (view, cairo, 0, 0);
336
+ lsm_dom_view_render (view, cairo, -offset_x_pt, -offset_y_pt);
244
337
 
245
338
  switch (format) {
246
339
  case FORMAT_PNG:
@@ -259,8 +352,8 @@ int main(int argc, char **argv)
259
352
 
260
353
  lsm_debug_render ("width = %g pt, height = %g pt", width_pt, height_pt);
261
354
  } else {
262
- printf (_("Can't load '%s'"), input_filename);
263
- printf ("\n");
355
+ fprintf (stderr, _("Can't load '%s'"), input_filename);
356
+ fprintf (stderr, "\n");
264
357
 
265
358
  return EXIT_FAILURE;
266
359
  }
@@ -76,3 +76,4 @@ lsm_itex_free_mathml_buffer (char *mathml)
76
76
 
77
77
  itex2MML_free_string (mathml);
78
78
  }
79
+
@@ -322,8 +322,6 @@ lsm_svg_element_finalize (GObject *object)
322
322
 
323
323
  /* LsmSvgElement class */
324
324
 
325
- static const LsmSvgMatrix matrix_default = { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, LSM_SVG_MATRIX_FLAGS_IDENTITY};
326
-
327
325
  static const LsmAttributeInfos lsm_svg_attribute_infos[] = {
328
326
  {
329
327
  .name = "id",
@@ -32,7 +32,7 @@ lsm_svg_viewbox_new (double resolution_ppi,
32
32
  {
33
33
  LsmSvgViewbox *svg_viewbox;
34
34
 
35
- svg_viewbox = g_new (LsmSvgViewbox, 1);
35
+ svg_viewbox = g_slice_new (LsmSvgViewbox);
36
36
  svg_viewbox->resolution_ppi = resolution_ppi;
37
37
  svg_viewbox->viewbox = *viewbox;
38
38
  svg_viewbox->diagonal = sqrt (viewbox->width * viewbox->width +
@@ -44,7 +44,7 @@ lsm_svg_viewbox_new (double resolution_ppi,
44
44
  void
45
45
  lsm_svg_viewbox_free (LsmSvgViewbox *viewbox)
46
46
  {
47
- g_free (viewbox);
47
+ g_slice_free (LsmSvgViewbox, viewbox);
48
48
  }
49
49
 
50
50
  double
@@ -30,6 +30,22 @@ lsm_svg_matrix_is_identity (const LsmSvgMatrix *matrix)
30
30
  return ((matrix->flags & LSM_SVG_MATRIX_FLAGS_IDENTITY) != 0);
31
31
  }
32
32
 
33
+ static double
34
+ _compute_determinant (const LsmSvgMatrix *matrix)
35
+ {
36
+ return matrix->a * matrix->d - matrix->b * matrix->c;
37
+ }
38
+
39
+ gboolean
40
+ lsm_svg_matrix_is_invertible (const LsmSvgMatrix *matrix)
41
+ {
42
+ double det;
43
+
44
+ det = _compute_determinant (matrix);
45
+
46
+ return isfinite (det) && det != 0.;
47
+ }
48
+
33
49
  void
34
50
  lsm_svg_matrix_init (LsmSvgMatrix *matrix, double a, double b, double c, double d, double e, double f)
35
51
  {
@@ -35,7 +35,8 @@ typedef struct {
35
35
  LsmSvgMatrixFlags flags;
36
36
  } LsmSvgMatrix;
37
37
 
38
- gboolean lsm_svg_matrix_is_identity (const LsmSvgMatrix *matrix);
38
+ gboolean lsm_svg_matrix_is_identity (const LsmSvgMatrix *matrix);
39
+ gboolean lsm_svg_matrix_is_invertible (const LsmSvgMatrix *matrix);
39
40
 
40
41
  void lsm_svg_matrix_init (LsmSvgMatrix *matrix, double a, double b,
41
42
  double c, double d,
@@ -142,7 +142,8 @@ _svg_element_render (LsmSvgElement *self, LsmSvgView *view)
142
142
  lsm_svg_view_show_viewport (view, &viewport);
143
143
 
144
144
  lsm_svg_view_push_viewport (view, &viewport, is_viewbox_defined ? &svg->viewbox.value : NULL,
145
- &svg->preserve_aspect_ratio.value, LSM_SVG_OVERFLOW_HIDDEN);
145
+ &svg->preserve_aspect_ratio.value,
146
+ is_outermost_svg ? LSM_SVG_OVERFLOW_VISIBLE : LSM_SVG_OVERFLOW_HIDDEN);
146
147
 
147
148
  LSM_SVG_ELEMENT_CLASS (parent_class)->render (self, view);
148
149
 
@@ -154,7 +155,12 @@ _svg_element_render (LsmSvgElement *self, LsmSvgView *view)
154
155
  void
155
156
  lsm_svg_svg_element_render (LsmSvgSvgElement *svg, LsmSvgView *view)
156
157
  {
157
- lsm_svg_view_push_viewport (view, &svg->svg_box, NULL, NULL, LSM_SVG_OVERFLOW_HIDDEN);
158
+ gboolean is_outermost_svg;
159
+
160
+ is_outermost_svg = LSM_IS_SVG_DOCUMENT (lsm_dom_node_get_parent_node (LSM_DOM_NODE (svg)));
161
+
162
+ lsm_svg_view_push_viewport (view, &svg->svg_box, NULL, NULL,
163
+ is_outermost_svg ? LSM_SVG_OVERFLOW_VISIBLE : LSM_SVG_OVERFLOW_HIDDEN);
158
164
  lsm_svg_element_render (LSM_SVG_ELEMENT (svg), view);
159
165
  lsm_svg_view_pop_viewport (view);
160
166
  }
@@ -1,7 +1,7 @@
1
- #include "ruby.h"
2
-
3
1
  #include "lasem_overrides.h"
4
- #include <string.h>
2
+ #ifdef IS_TRAVISCI
3
+ #define HAVE_STRDUP
4
+ #endif
5
5
  #include <mtex2MML.h>
6
6
 
7
7
  void
@@ -99,7 +99,7 @@ VALUE process(VALUE self, unsigned long maxsize, const char *latex_code, unsigne
99
99
  char * mathml = lsm_mtex_to_mathml(latex_code, latex_size, delimiter, parse_type);
100
100
  if (mathml == NULL) { print_and_raise(rb_eParseError, "Failed to parse mtex"); }
101
101
 
102
- if (format == FORMAT_MATHML) {
102
+ if (format == FORMAT_MATHML || parse_type == TEXT_FILTER) {
103
103
  rb_hash_aset (result_hash, CSTR2SYM ("data"), rb_str_new2(mathml));
104
104
  mtex2MML_free_string(mathml);
105
105
  return result_hash;