mathematical 1.6.14 → 1.6.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (318) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -1
  3. data/Rakefile +31 -21
  4. data/ext/mathematical/extconf.rb +71 -69
  5. data/ext/mathematical/lasem/COPYING +118 -99
  6. data/ext/mathematical/lasem/{NEWS → NEWS.md} +10 -0
  7. data/ext/mathematical/lasem/README.md +65 -0
  8. data/ext/mathematical/lasem/docs/lasem-render-0.6.1 +2 -2
  9. data/ext/mathematical/lasem/docs/meson.build +3 -0
  10. data/ext/mathematical/lasem/docs/reference/lasem/building.md +32 -0
  11. data/ext/mathematical/lasem/docs/reference/lasem/lasem.toml.in +47 -0
  12. data/ext/mathematical/lasem/docs/reference/lasem/meson.build +44 -0
  13. data/ext/mathematical/lasem/docs/reference/lasem/overview.md +24 -0
  14. data/ext/mathematical/lasem/docs/reference/lasem/urlmap.js +5 -0
  15. data/ext/mathematical/lasem/itex2mml/README.itex2MML +5 -2
  16. data/ext/mathematical/lasem/itex2mml/itex2MML.h +10 -10
  17. data/ext/mathematical/lasem/itex2mml/itex2MML.l +126 -27
  18. data/ext/mathematical/lasem/itex2mml/itex2MML.y +262 -99
  19. data/ext/mathematical/lasem/itex2mml/meson.build +17 -0
  20. data/ext/mathematical/lasem/lasem.doap +7 -7
  21. data/ext/mathematical/lasem/meson.build +46 -0
  22. data/ext/mathematical/lasem/meson_options.txt +5 -0
  23. data/ext/mathematical/lasem/org.lasem.Viewer.json +41 -0
  24. data/ext/mathematical/lasem/po/LINGUAS +0 -2
  25. data/ext/mathematical/lasem/po/eu.po +30 -66
  26. data/ext/mathematical/lasem/po/meson.build +4 -0
  27. data/ext/mathematical/lasem/src/lasemrender.c +1 -6
  28. data/ext/mathematical/lasem/src/lsm.c +2 -0
  29. data/ext/mathematical/lasem/src/lsmattributes.c +2 -5
  30. data/ext/mathematical/lasem/src/lsmmathmlglyphtableams.c +71 -7
  31. data/ext/mathematical/lasem/src/lsmmathmlitexelement.c +7 -5
  32. data/ext/mathematical/lasem/src/lsmmathmloperatordictionary.c +11 -1
  33. data/ext/mathematical/lasem/src/lsmmathmloperatordictionary.h +2 -1
  34. data/ext/mathematical/lasem/src/lsmmathmloperatorelement.c +6 -1
  35. data/ext/mathematical/lasem/src/lsmmathmlview.c +21 -3
  36. data/ext/mathematical/lasem/src/lsmmathmlview.h +2 -2
  37. data/ext/mathematical/lasem/src/lsmmisc.c +15 -0
  38. data/ext/mathematical/lasem/src/lsmmisc.h +32 -0
  39. data/ext/mathematical/lasem/src/lsmproperties.c +2 -5
  40. data/ext/mathematical/lasem/src/lsmsvgfiltersurface.c +6 -3
  41. data/ext/mathematical/lasem/src/lsmsvgtraits.c +10 -1
  42. data/ext/mathematical/lasem/src/meson.build +321 -0
  43. data/ext/mathematical/lasem/subprojects/gi-docgen.wrap +6 -0
  44. data/ext/mathematical/lasem/tests/data/mathml/tex/misc/array.tex +3 -0
  45. data/ext/mathematical/lasem/tests/dom.c +0 -6
  46. data/ext/mathematical/lasem/tests/filter.c +8 -7
  47. data/ext/mathematical/lasem/tests/lasem.supp +185 -0
  48. data/ext/mathematical/lasem/tests/lsmtest.c +2 -9
  49. data/ext/mathematical/lasem/tests/meson.build +39 -0
  50. data/ext/mathematical/lasem/tests/str.c +0 -4
  51. data/ext/mathematical/lasem/tests/suite.c +0 -4
  52. data/ext/mathematical/lasem/viewer/meson.build +17 -0
  53. data/ext/mathematical/lasem/viewer/viewer.c +248 -0
  54. data/ext/mathematical/mtex2MML/script/tag +15 -14
  55. data/ext/mathematical/mtex2MML/src/lexer.l +4 -4
  56. data/ext/mathematical/mtex2MML/src/mtex2MML.h +7 -7
  57. data/ext/mathematical/mtex2MML/src/parser.y +5 -5
  58. data/ext/mathematical/mtex2MML/tests/clar.c +2 -2
  59. data/ext/mathematical/mtex2MML/tests/deps/trim/package.json +2 -2
  60. data/lib/mathematical/configuration.rb +8 -4
  61. data/lib/mathematical/corrections.rb +3 -1
  62. data/lib/mathematical/validator.rb +11 -8
  63. data/lib/mathematical/version.rb +3 -1
  64. data/lib/mathematical.rb +21 -19
  65. data/mathematical.gemspec +21 -22
  66. metadata +36 -336
  67. data/ext/mathematical/lasem/AUTHORS +0 -1
  68. data/ext/mathematical/lasem/ChangeLog +0 -0
  69. data/ext/mathematical/lasem/MAINTAINERS +0 -3
  70. data/ext/mathematical/lasem/Makefile.am +0 -34
  71. data/ext/mathematical/lasem/Makefile.decl +0 -57
  72. data/ext/mathematical/lasem/README +0 -28
  73. data/ext/mathematical/lasem/RELEASING +0 -85
  74. data/ext/mathematical/lasem/autogen.sh +0 -180
  75. data/ext/mathematical/lasem/configure.ac +0 -139
  76. data/ext/mathematical/lasem/docs/Makefile.am +0 -14
  77. data/ext/mathematical/lasem/docs/reference/Makefile.am +0 -3
  78. data/ext/mathematical/lasem/docs/reference/lasem/Makefile.am +0 -205
  79. data/ext/mathematical/lasem/docs/reference/lasem/lasem-docs.xml +0 -75
  80. data/ext/mathematical/lasem/docs/reference/lasem/lasem-overview.xml +0 -64
  81. data/ext/mathematical/lasem/docs/reference/lasem/lasem-sections.txt +0 -213
  82. data/ext/mathematical/lasem/docs/reference/lasem/lasem.types +0 -110
  83. data/ext/mathematical/lasem/itex2mml/Makefile.am +0 -37
  84. data/ext/mathematical/lasem/lasem.pc.in +0 -11
  85. data/ext/mathematical/lasem/m4/introspection.m4 +0 -96
  86. data/ext/mathematical/lasem/po/ChangeLog +0 -0
  87. data/ext/mathematical/lasem/po/ro.po +0 -64
  88. data/ext/mathematical/lasem/src/Makefile.am +0 -349
  89. data/ext/mathematical/lasem/src/lsmdomenumtypes.c.template +0 -39
  90. data/ext/mathematical/lasem/src/lsmdomenumtypes.h.template +0 -26
  91. data/ext/mathematical/lasem/src/lsmmathmlenumtypes.c.template +0 -39
  92. data/ext/mathematical/lasem/src/lsmmathmlenumtypes.h.template +0 -26
  93. data/ext/mathematical/lasem/src/lsmsvgenumtypes.c.template +0 -39
  94. data/ext/mathematical/lasem/src/lsmsvgenumtypes.h.template +0 -26
  95. data/ext/mathematical/lasem/tests/Makefile.am +0 -34
  96. data/ext/mathematical/lib/liblasem.dylib +0 -0
  97. data/ext/mathematical/lib/libmtex2MML.a +0 -0
  98. data/ext/mathematical/mtex2MML/build/CMakeCache.txt +0 -512
  99. data/ext/mathematical/mtex2MML/build/CMakeFiles/3.16.2/CMakeCCompiler.cmake +0 -76
  100. data/ext/mathematical/mtex2MML/build/CMakeFiles/3.16.2/CMakeCXXCompiler.cmake +0 -88
  101. data/ext/mathematical/mtex2MML/build/CMakeFiles/3.16.2/CMakeDetermineCompilerABI_C.bin +0 -0
  102. data/ext/mathematical/mtex2MML/build/CMakeFiles/3.16.2/CMakeDetermineCompilerABI_CXX.bin +0 -0
  103. data/ext/mathematical/mtex2MML/build/CMakeFiles/3.16.2/CMakeSystem.cmake +0 -15
  104. data/ext/mathematical/mtex2MML/build/CMakeFiles/3.16.2/CompilerIdC/CMakeCCompilerId.c +0 -671
  105. data/ext/mathematical/mtex2MML/build/CMakeFiles/3.16.2/CompilerIdCXX/CMakeCXXCompilerId.cpp +0 -660
  106. data/ext/mathematical/mtex2MML/build/CMakeFiles/CMakeDirectoryInformation.cmake +0 -16
  107. data/ext/mathematical/mtex2MML/build/CMakeFiles/CMakeError.log +0 -22
  108. data/ext/mathematical/mtex2MML/build/CMakeFiles/CMakeOutput.log +0 -351
  109. data/ext/mathematical/mtex2MML/build/CMakeFiles/CMakeRuleHashes.txt +0 -34
  110. data/ext/mathematical/mtex2MML/build/CMakeFiles/Continuous.dir/DependInfo.cmake +0 -11
  111. data/ext/mathematical/mtex2MML/build/CMakeFiles/Continuous.dir/build.make +0 -76
  112. data/ext/mathematical/mtex2MML/build/CMakeFiles/Continuous.dir/cmake_clean.cmake +0 -8
  113. data/ext/mathematical/mtex2MML/build/CMakeFiles/Continuous.dir/progress.make +0 -1
  114. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousBuild.dir/DependInfo.cmake +0 -11
  115. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousBuild.dir/build.make +0 -76
  116. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousBuild.dir/cmake_clean.cmake +0 -8
  117. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousBuild.dir/progress.make +0 -1
  118. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousConfigure.dir/DependInfo.cmake +0 -11
  119. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousConfigure.dir/build.make +0 -76
  120. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousConfigure.dir/cmake_clean.cmake +0 -8
  121. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousConfigure.dir/progress.make +0 -1
  122. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousCoverage.dir/DependInfo.cmake +0 -11
  123. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousCoverage.dir/build.make +0 -76
  124. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousCoverage.dir/cmake_clean.cmake +0 -8
  125. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousCoverage.dir/progress.make +0 -1
  126. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousMemCheck.dir/DependInfo.cmake +0 -11
  127. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousMemCheck.dir/build.make +0 -76
  128. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousMemCheck.dir/cmake_clean.cmake +0 -8
  129. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousMemCheck.dir/progress.make +0 -1
  130. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousStart.dir/DependInfo.cmake +0 -11
  131. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousStart.dir/build.make +0 -76
  132. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousStart.dir/cmake_clean.cmake +0 -8
  133. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousStart.dir/progress.make +0 -1
  134. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousSubmit.dir/DependInfo.cmake +0 -11
  135. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousSubmit.dir/build.make +0 -76
  136. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousSubmit.dir/cmake_clean.cmake +0 -8
  137. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousSubmit.dir/progress.make +0 -1
  138. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousTest.dir/DependInfo.cmake +0 -11
  139. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousTest.dir/build.make +0 -76
  140. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousTest.dir/cmake_clean.cmake +0 -8
  141. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousTest.dir/progress.make +0 -1
  142. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousUpdate.dir/DependInfo.cmake +0 -11
  143. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousUpdate.dir/build.make +0 -76
  144. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousUpdate.dir/cmake_clean.cmake +0 -8
  145. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousUpdate.dir/progress.make +0 -1
  146. data/ext/mathematical/mtex2MML/build/CMakeFiles/Experimental.dir/DependInfo.cmake +0 -11
  147. data/ext/mathematical/mtex2MML/build/CMakeFiles/Experimental.dir/build.make +0 -76
  148. data/ext/mathematical/mtex2MML/build/CMakeFiles/Experimental.dir/cmake_clean.cmake +0 -8
  149. data/ext/mathematical/mtex2MML/build/CMakeFiles/Experimental.dir/progress.make +0 -1
  150. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalBuild.dir/DependInfo.cmake +0 -11
  151. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalBuild.dir/build.make +0 -76
  152. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalBuild.dir/cmake_clean.cmake +0 -8
  153. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalBuild.dir/progress.make +0 -1
  154. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalConfigure.dir/DependInfo.cmake +0 -11
  155. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalConfigure.dir/build.make +0 -76
  156. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalConfigure.dir/cmake_clean.cmake +0 -8
  157. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalConfigure.dir/progress.make +0 -1
  158. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalCoverage.dir/DependInfo.cmake +0 -11
  159. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalCoverage.dir/build.make +0 -76
  160. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalCoverage.dir/cmake_clean.cmake +0 -8
  161. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalCoverage.dir/progress.make +0 -1
  162. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalMemCheck.dir/DependInfo.cmake +0 -11
  163. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalMemCheck.dir/build.make +0 -76
  164. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalMemCheck.dir/cmake_clean.cmake +0 -8
  165. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalMemCheck.dir/progress.make +0 -1
  166. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalStart.dir/DependInfo.cmake +0 -11
  167. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalStart.dir/build.make +0 -76
  168. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalStart.dir/cmake_clean.cmake +0 -8
  169. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalStart.dir/progress.make +0 -1
  170. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalSubmit.dir/DependInfo.cmake +0 -11
  171. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalSubmit.dir/build.make +0 -76
  172. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalSubmit.dir/cmake_clean.cmake +0 -8
  173. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalSubmit.dir/progress.make +0 -1
  174. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalTest.dir/DependInfo.cmake +0 -11
  175. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalTest.dir/build.make +0 -76
  176. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalTest.dir/cmake_clean.cmake +0 -8
  177. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalTest.dir/progress.make +0 -1
  178. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalUpdate.dir/DependInfo.cmake +0 -11
  179. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalUpdate.dir/build.make +0 -76
  180. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalUpdate.dir/cmake_clean.cmake +0 -8
  181. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalUpdate.dir/progress.make +0 -1
  182. data/ext/mathematical/mtex2MML/build/CMakeFiles/Makefile.cmake +0 -177
  183. data/ext/mathematical/mtex2MML/build/CMakeFiles/Makefile2 +0 -1033
  184. data/ext/mathematical/mtex2MML/build/CMakeFiles/Nightly.dir/DependInfo.cmake +0 -11
  185. data/ext/mathematical/mtex2MML/build/CMakeFiles/Nightly.dir/build.make +0 -76
  186. data/ext/mathematical/mtex2MML/build/CMakeFiles/Nightly.dir/cmake_clean.cmake +0 -8
  187. data/ext/mathematical/mtex2MML/build/CMakeFiles/Nightly.dir/progress.make +0 -1
  188. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyBuild.dir/DependInfo.cmake +0 -11
  189. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyBuild.dir/build.make +0 -76
  190. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyBuild.dir/cmake_clean.cmake +0 -8
  191. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyBuild.dir/progress.make +0 -1
  192. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyConfigure.dir/DependInfo.cmake +0 -11
  193. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyConfigure.dir/build.make +0 -76
  194. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyConfigure.dir/cmake_clean.cmake +0 -8
  195. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyConfigure.dir/progress.make +0 -1
  196. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyCoverage.dir/DependInfo.cmake +0 -11
  197. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyCoverage.dir/build.make +0 -76
  198. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyCoverage.dir/cmake_clean.cmake +0 -8
  199. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyCoverage.dir/progress.make +0 -1
  200. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemCheck.dir/DependInfo.cmake +0 -11
  201. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemCheck.dir/build.make +0 -76
  202. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemCheck.dir/cmake_clean.cmake +0 -8
  203. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemCheck.dir/progress.make +0 -1
  204. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemoryCheck.dir/DependInfo.cmake +0 -11
  205. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemoryCheck.dir/build.make +0 -76
  206. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemoryCheck.dir/cmake_clean.cmake +0 -8
  207. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemoryCheck.dir/progress.make +0 -1
  208. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyStart.dir/DependInfo.cmake +0 -11
  209. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyStart.dir/build.make +0 -76
  210. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyStart.dir/cmake_clean.cmake +0 -8
  211. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyStart.dir/progress.make +0 -1
  212. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlySubmit.dir/DependInfo.cmake +0 -11
  213. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlySubmit.dir/build.make +0 -76
  214. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlySubmit.dir/cmake_clean.cmake +0 -8
  215. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlySubmit.dir/progress.make +0 -1
  216. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyTest.dir/DependInfo.cmake +0 -11
  217. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyTest.dir/build.make +0 -76
  218. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyTest.dir/cmake_clean.cmake +0 -8
  219. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyTest.dir/progress.make +0 -1
  220. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyUpdate.dir/DependInfo.cmake +0 -11
  221. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyUpdate.dir/build.make +0 -76
  222. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyUpdate.dir/cmake_clean.cmake +0 -8
  223. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyUpdate.dir/progress.make +0 -1
  224. data/ext/mathematical/mtex2MML/build/CMakeFiles/TargetDirectories.txt +0 -41
  225. data/ext/mathematical/mtex2MML/build/CMakeFiles/cmake.check_cache +0 -1
  226. data/ext/mathematical/mtex2MML/build/CMakeFiles/format.dir/DependInfo.cmake +0 -11
  227. data/ext/mathematical/mtex2MML/build/CMakeFiles/format.dir/build.make +0 -76
  228. data/ext/mathematical/mtex2MML/build/CMakeFiles/format.dir/cmake_clean.cmake +0 -8
  229. data/ext/mathematical/mtex2MML/build/CMakeFiles/format.dir/progress.make +0 -1
  230. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/DependInfo.cmake +0 -44
  231. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/build.make +0 -206
  232. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/cmake_clean.cmake +0 -20
  233. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/depend.make +0 -2
  234. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/flags.make +0 -10
  235. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/link.txt +0 -1
  236. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/progress.make +0 -11
  237. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/C.includecache +0 -244
  238. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/DependInfo.cmake +0 -42
  239. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/build.make +0 -203
  240. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/cmake_clean.cmake +0 -19
  241. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/cmake_clean_target.cmake +0 -3
  242. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/depend.internal +0 -49
  243. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/depend.make +0 -49
  244. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/flags.make +0 -10
  245. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/link.txt +0 -2
  246. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/progress.make +0 -11
  247. data/ext/mathematical/mtex2MML/build/CMakeFiles/memcheck.dir/DependInfo.cmake +0 -11
  248. data/ext/mathematical/mtex2MML/build/CMakeFiles/memcheck.dir/build.make +0 -76
  249. data/ext/mathematical/mtex2MML/build/CMakeFiles/memcheck.dir/cmake_clean.cmake +0 -8
  250. data/ext/mathematical/mtex2MML/build/CMakeFiles/memcheck.dir/progress.make +0 -1
  251. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/DependInfo.cmake +0 -43
  252. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/build.make +0 -217
  253. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/cmake_clean.cmake +0 -20
  254. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/depend.make +0 -2
  255. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/flags.make +0 -10
  256. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/link.txt +0 -1
  257. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/progress.make +0 -12
  258. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/DependInfo.cmake +0 -59
  259. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/build.make +0 -473
  260. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/cmake_clean.cmake +0 -37
  261. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/depend.make +0 -2
  262. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/flags.make +0 -10
  263. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/link.txt +0 -1
  264. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/progress.make +0 -29
  265. data/ext/mathematical/mtex2MML/build/CMakeFiles/progress.marks +0 -1
  266. data/ext/mathematical/mtex2MML/build/CTestTestfile.cmake +0 -8
  267. data/ext/mathematical/mtex2MML/build/DartConfiguration.tcl +0 -105
  268. data/ext/mathematical/mtex2MML/build/Makefile +0 -1485
  269. data/ext/mathematical/mtex2MML/build/cmake_install.cmake +0 -102
  270. data/ext/mathematical/mtex2MML/build/lexer.c +0 -8903
  271. data/ext/mathematical/mtex2MML/build/libmtex2MML.a +0 -0
  272. data/ext/mathematical/mtex2MML/build/libmtex2MML.pc +0 -10
  273. data/ext/mathematical/mtex2MML/build/mtex2mml_export.h +0 -42
  274. data/ext/mathematical/mtex2MML/build/parser.c +0 -10334
  275. data/ext/mathematical/mtex2MML/build/parser.h +0 -625
  276. data/ext/mathematical/mtex2MML/build/parser.output +0 -120719
  277. data/test/mathematical/basic_test.rb +0 -89
  278. data/test/mathematical/corrections_test.rb +0 -16
  279. data/test/mathematical/delimiters_test.rb +0 -69
  280. data/test/mathematical/fixtures/after/backslashes.html +0 -5
  281. data/test/mathematical/fixtures/after/brackets_display.html +0 -1
  282. data/test/mathematical/fixtures/after/compliance_accents.html +0 -17
  283. data/test/mathematical/fixtures/after/compliance_arrows.html +0 -71
  284. data/test/mathematical/fixtures/after/compliance_colors.html +0 -4
  285. data/test/mathematical/fixtures/after/compliance_greek_letters.html +0 -42
  286. data/test/mathematical/fixtures/after/compliance_large_math.html +0 -19
  287. data/test/mathematical/fixtures/after/compliance_log_symbols.html +0 -34
  288. data/test/mathematical/fixtures/after/compliance_operators.html +0 -262
  289. data/test/mathematical/fixtures/after/dollar_sign_inline.html +0 -1
  290. data/test/mathematical/fixtures/after/equation_display.html +0 -1
  291. data/test/mathematical/fixtures/after/multiple_dollar_inline.html +0 -1
  292. data/test/mathematical/fixtures/after/parens_inline.html +0 -1
  293. data/test/mathematical/fixtures/before/backslashes.text +0 -17
  294. data/test/mathematical/fixtures/before/brackets_display.text +0 -1
  295. data/test/mathematical/fixtures/before/compliance_accents.text +0 -17
  296. data/test/mathematical/fixtures/before/compliance_arrows.text +0 -71
  297. data/test/mathematical/fixtures/before/compliance_colors.text +0 -4
  298. data/test/mathematical/fixtures/before/compliance_greek_letters.text +0 -42
  299. data/test/mathematical/fixtures/before/compliance_large_math.text +0 -19
  300. data/test/mathematical/fixtures/before/compliance_log_symbols.text +0 -34
  301. data/test/mathematical/fixtures/before/compliance_operators.text +0 -262
  302. data/test/mathematical/fixtures/before/dollar_sign_inline.text +0 -1
  303. data/test/mathematical/fixtures/before/equation_display.text +0 -1
  304. data/test/mathematical/fixtures/before/multiple_dollar_inline.text +0 -1
  305. data/test/mathematical/fixtures/before/parens_inline.text +0 -1
  306. data/test/mathematical/fixtures/performance/big_file.text +0 -1755
  307. data/test/mathematical/fixtures/png/numeric_test_1.png +0 -0
  308. data/test/mathematical/fixtures/png/numeric_test_2.png +0 -0
  309. data/test/mathematical/fixtures/png/numeric_test_3.png +0 -0
  310. data/test/mathematical/fixtures/png/pmatrix.png +0 -0
  311. data/test/mathematical/fixtures_test.rb +0 -51
  312. data/test/mathematical/maliciousness_test.rb +0 -152
  313. data/test/mathematical/mathjax_test.rb +0 -26
  314. data/test/mathematical/mathml_test.rb +0 -21
  315. data/test/mathematical/multiples_test.rb +0 -71
  316. data/test/mathematical/performance_test.rb +0 -15
  317. data/test/mathematical/png_test.rb +0 -30
  318. data/test/test_helper.rb +0 -72
@@ -34,9 +34,6 @@
34
34
  #include <stdlib.h>
35
35
  #include <string.h>
36
36
  #include <assert.h>
37
- #ifdef HAVE_UNISTD_H
38
- #include <unistd.h>
39
- #endif
40
37
 
41
38
  #include <lsmmathml.h>
42
39
  #include <glib.h>
@@ -525,8 +522,8 @@ main (int argc, char **argv)
525
522
  if (!check_for_compare())
526
523
  return EXIT_FAILURE;
527
524
 
528
- #ifdef HAVE_UNISTD_H
529
- if (isatty (2)) {
525
+ #if GLIB_CHECK_VERSION(2,50,0)
526
+ if (g_log_writer_supports_color (STDOUT_FILENO)) {
530
527
  fail_face = "\033[41m\033[37m\033[1m";
531
528
  success_face = "\033[42m\033[37m\033[1m";
532
529
  normal_face = "\033[m";
@@ -542,10 +539,6 @@ main (int argc, char **argv)
542
539
  lasem_test_html ("<html xmlns=\"http://www.w3.org/1999/xhtml\">\n");
543
540
  lasem_test_html ("<body>\n");
544
541
 
545
- #if !GLIB_CHECK_VERSION(2,36,0)
546
- g_type_init ();
547
- #endif
548
-
549
542
  context = g_option_context_new (NULL);
550
543
  g_option_context_add_main_entries (context, entries, NULL);
551
544
 
@@ -0,0 +1,39 @@
1
+ add_test_setup (
2
+ 'valgrind',
3
+ exe_wrapper:[
4
+ 'valgrind',
5
+ '--tool=memcheck',
6
+ '--leak-check=yes',
7
+ '--suppressions=' + meson.project_source_root() / 'tests' / 'lasem.supp',
8
+ '--error-exitcode=1'
9
+ ],
10
+ timeout_multiplier:10
11
+ )
12
+
13
+ tests = [
14
+ ['dom', []],
15
+ ['str', []],
16
+ ['filter', []],
17
+ ['suite', ['-DSUITE_DATA_DIRECTORY="@0@/tests/data"'.format (meson.project_source_root ()),
18
+ '-DSUITE_OPTION_FILE="@0@/tests/suite.ini"'.format (meson.project_source_root ())]]
19
+ ]
20
+
21
+ foreach t: tests
22
+ exe = executable (t[0], '@0@.c'.format (t[0]),
23
+ c_args: [t[1]],
24
+ link_with: lasem_library,
25
+ dependencies: lasem_dependencies,
26
+ include_directories: [library_inc])
27
+ test (t[0], exe)
28
+ endforeach
29
+
30
+ examples = [
31
+ ['lsm-test', 'lsmtest.c']
32
+ ]
33
+
34
+ foreach example: examples
35
+ exe = executable (example[0], example[1],
36
+ link_with: lasem_library,
37
+ dependencies: lasem_dependencies,
38
+ include_directories: [library_inc])
39
+ endforeach
@@ -36,10 +36,6 @@ main (int argc, char *argv[])
36
36
 
37
37
  g_test_add_func ("/str/str-consolidate", str_consolidate_test);
38
38
 
39
- #if !GLIB_CHECK_VERSION(2,36,0)
40
- g_type_init ();
41
- #endif
42
-
43
39
  result = g_test_run();
44
40
 
45
41
  lsm_shutdown ();
@@ -118,10 +118,6 @@ main (int argc, char *argv[])
118
118
  GSList *files;
119
119
  int result;
120
120
 
121
- #if !GLIB_CHECK_VERSION(2,36,0)
122
- g_type_init ();
123
- #endif
124
-
125
121
  suite_options = g_key_file_new ();
126
122
  g_assert (g_key_file_load_from_file (suite_options, SUITE_OPTION_FILE, G_KEY_FILE_NONE, NULL));
127
123
 
@@ -0,0 +1,17 @@
1
+ if get_option('viewer').enabled()
2
+
3
+ demo_dependencies = [
4
+ lasem_dependencies,
5
+ dependency('gtk4', version : '>=4.9')
6
+ ]
7
+
8
+ lasemdemo = executable(
9
+ 'lsm-viewer',
10
+ 'viewer.c',
11
+ dependencies : demo_dependencies,
12
+ link_with : lasem_library,
13
+ include_directories : [library_inc],
14
+ install : true
15
+ )
16
+
17
+ endif
@@ -0,0 +1,248 @@
1
+ /* Lasem - SVG and Mathml library
2
+ *
3
+ * Copyright © 2010 Emmanuel Pacaud
4
+ * Copyright © 2023 Matthew Jakeman
5
+ *
6
+ * This library is free software; you can redistribute it and/or
7
+ * modify it under the terms of the GNU Lesser General Public
8
+ * License as published by the Free Software Foundation; either
9
+ * version 2 of the License, or (at your option) any later version.
10
+ *
11
+ * This library is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
+ * Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General
17
+ * Public License along with this library; if not, write to the
18
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19
+ * Boston, MA 02110-1335, USA.
20
+ *
21
+ * Author:
22
+ * Matthew Jakeman <mattjakemandev@gmail.com>
23
+ */
24
+
25
+ #include <gtk/gtk.h>
26
+
27
+ #include <lsm.h>
28
+ #include <lsmdom.h>
29
+ #include <cairo.h>
30
+
31
+ #define VIEWER_TYPE_WINDOW (viewer_window_get_type())
32
+ G_DECLARE_FINAL_TYPE (ViewerWindow, viewer_window, VIEWER, WINDOW, GtkApplicationWindow)
33
+
34
+ struct _ViewerWindow
35
+ {
36
+ GtkApplicationWindow parent_instance;
37
+
38
+ GtkWidget *lasem_view;
39
+
40
+ LsmDomDocument *document;
41
+ LsmDomView *view;
42
+ GError *error;
43
+ };
44
+
45
+ G_DEFINE_FINAL_TYPE (ViewerWindow, viewer_window, GTK_TYPE_APPLICATION_WINDOW)
46
+
47
+ static GtkWidget *
48
+ viewer_window_new (GtkApplication *app)
49
+ {
50
+ return GTK_WIDGET (g_object_new (VIEWER_TYPE_WINDOW,
51
+ "application", app,
52
+ NULL));
53
+ }
54
+
55
+ static void
56
+ viewer_window_finalize (GObject *object)
57
+ {
58
+ ViewerWindow *self = (ViewerWindow *)object;
59
+
60
+ g_clear_pointer (&self->view, g_object_unref);
61
+ g_clear_pointer (&self->document, g_object_unref);
62
+
63
+ G_OBJECT_CLASS (viewer_window_parent_class)->finalize (object);
64
+ }
65
+
66
+ static void
67
+ viewer_window_class_init (ViewerWindowClass *klass)
68
+ {
69
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
70
+
71
+ object_class->finalize = viewer_window_finalize;
72
+ }
73
+
74
+ static void
75
+ display_error (ViewerWindow *window, GError *error, const char *error_text)
76
+ {
77
+ char *message;
78
+
79
+ message = (error != NULL)
80
+ ? error->message
81
+ : "Undetermined Error";
82
+
83
+ GtkAlertDialog *dlg = gtk_alert_dialog_new ("%s: %s\n",
84
+ error_text,
85
+ message);
86
+
87
+ gtk_window_set_modal (GTK_WINDOW (dlg), TRUE);
88
+ g_signal_connect (dlg, "response", G_CALLBACK (gtk_window_destroy), NULL);
89
+
90
+ gtk_window_present (GTK_WINDOW (dlg));
91
+ }
92
+
93
+ static void
94
+ viewer_window_load_from_file (ViewerWindow *window, const char *path)
95
+ {
96
+ GError *error = NULL;
97
+
98
+ gchar *contents;
99
+ gsize length;
100
+
101
+ if (!g_file_get_contents (path, &contents, &length, &error))
102
+ {
103
+ display_error (window, error, "Could not read file");
104
+
105
+ if (error != NULL)
106
+ g_error_free (error);
107
+
108
+ return;
109
+ }
110
+
111
+ if (window->view)
112
+ {
113
+ g_clear_pointer (&window->view, g_object_unref);
114
+ g_clear_pointer (&window->document, g_object_unref);
115
+ g_clear_pointer (&window->error, g_object_unref);
116
+ }
117
+
118
+ window->document = lsm_dom_document_new_from_memory (contents, length, &error);
119
+
120
+ if (!LSM_IS_DOM_DOCUMENT (window->document))
121
+ {
122
+ display_error (window, error, "Could not read MathML/SVG");
123
+
124
+ if (error != NULL)
125
+ g_error_free (error);
126
+
127
+ return;
128
+ }
129
+
130
+ window->view = lsm_dom_document_create_view (window->document);
131
+ gtk_widget_queue_draw (window->lasem_view);
132
+ }
133
+
134
+ static void
135
+ lasem_view_draw (GtkDrawingArea *drawing_area,
136
+ cairo_t *cr,
137
+ int width,
138
+ int height,
139
+ ViewerWindow *window)
140
+ {
141
+ if (window->view == NULL)
142
+ return;
143
+
144
+ int margin = 25;
145
+
146
+ guint content_width = 0;
147
+ guint content_height = 0;
148
+ guint baseline = 0;
149
+ lsm_dom_view_get_size_pixels (window->view, &content_width, &content_height, &baseline);
150
+
151
+ float multiplier = ((float)width - (2 * margin)) / content_width;
152
+ lsm_dom_view_set_resolution (window->view, multiplier * LSM_DOM_VIEW_DEFAULT_RESOLUTION);
153
+
154
+ lsm_dom_view_render (window->view, cr, margin, margin);
155
+ }
156
+
157
+ static void
158
+ viewer_on_file_open (GtkFileDialog *dialog,
159
+ GAsyncResult *result,
160
+ ViewerWindow *self)
161
+ {
162
+ GFile *file;
163
+ GError *error = NULL;
164
+
165
+ file = gtk_file_dialog_open_finish (dialog, result, &error);
166
+
167
+ if (G_IS_FILE (file))
168
+ {
169
+ char *path;
170
+
171
+ path = g_file_get_path (file);
172
+ viewer_window_load_from_file (self, path);
173
+ g_free (path);
174
+ }
175
+ else
176
+ {
177
+ display_error (self, error, "File Chooser error");
178
+
179
+ if (error != NULL)
180
+ g_error_free (error);
181
+ }
182
+ }
183
+
184
+ static void
185
+ viewer_show_file_chooser (ViewerWindow *self)
186
+ {
187
+ GtkFileDialog *dialog;
188
+ GtkFileFilter *filter;
189
+
190
+ filter = gtk_file_filter_new ();
191
+ gtk_file_filter_add_mime_type (filter, "text/mathml");
192
+ gtk_file_filter_add_mime_type (filter, "image/svg+xml");
193
+ gtk_file_filter_set_name (filter, "MathML/SVG Files");
194
+
195
+ dialog = gtk_file_dialog_new ();
196
+ gtk_file_dialog_set_modal (dialog, TRUE);
197
+ gtk_file_dialog_set_default_filter (dialog, filter);
198
+
199
+ gtk_file_dialog_open (dialog, GTK_WINDOW (self),
200
+ NULL, (GAsyncReadyCallback) viewer_on_file_open,
201
+ self);
202
+ }
203
+
204
+ static void
205
+ viewer_window_init (ViewerWindow *self)
206
+ {
207
+ gtk_window_set_title (GTK_WINDOW (self), "Lasem Viewer");
208
+ gtk_window_set_default_size (GTK_WINDOW (self), 800, 600);
209
+ gtk_window_set_resizable (GTK_WINDOW (self), FALSE);
210
+
211
+ GtkWidget *header_bar = gtk_header_bar_new ();
212
+ gtk_window_set_titlebar (GTK_WINDOW (self), header_bar);
213
+
214
+ GtkWidget *open_btn = gtk_button_new_with_label ("Open");
215
+ gtk_widget_add_css_class (open_btn, "suggested-action");
216
+ g_signal_connect_swapped (open_btn, "clicked", G_CALLBACK (viewer_show_file_chooser), self);
217
+ gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), open_btn);
218
+
219
+ GtkWidget *lasem_view = gtk_drawing_area_new ();
220
+ gtk_window_set_child (GTK_WINDOW (self), lasem_view);
221
+ gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (lasem_view),
222
+ (GtkDrawingAreaDrawFunc) lasem_view_draw,
223
+ self, NULL);
224
+ self->lasem_view = lasem_view;
225
+ }
226
+
227
+ static void
228
+ activate (GtkApplication* app,
229
+ gpointer user_data)
230
+ {
231
+ GtkWidget *window = viewer_window_new(app);
232
+ gtk_widget_set_visible (window, TRUE);
233
+ }
234
+
235
+ int
236
+ main (int argc,
237
+ char **argv)
238
+ {
239
+ GtkApplication *app;
240
+ int status;
241
+
242
+ app = gtk_application_new ("org.lasem.Viewer", G_APPLICATION_DEFAULT_FLAGS);
243
+ g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
244
+ status = g_application_run (G_APPLICATION (app), argc, argv);
245
+ g_object_unref (app);
246
+
247
+ return status;
248
+ }
@@ -1,27 +1,28 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
- require 'octokit'
4
+ require "octokit"
4
5
 
5
- `git push origin`
6
+ %x(git push origin)
6
7
 
7
- `rm -rf build`
8
- `mkdir build`
8
+ %x(rm -rf build)
9
+ %x(mkdir build)
9
10
 
10
- Dir.chdir 'build' do
11
- `cmake ..`
12
- `make`
11
+ Dir.chdir("build") do
12
+ %x(cmake ..)
13
+ %x(make)
13
14
  end
14
15
 
15
- MTEX2MML_HEADER = File.read(File.join('src', 'mtex2MML.h'))
16
+ MTEX2MML_HEADER = File.read(File.join("src", "mtex2MML.h"))
16
17
  VERSION = MTEX2MML_HEADER.match(/MTEX2MML_VERSION\s*"(.+?)"/)[1]
17
18
  TAG_NAME = "v#{VERSION}"
18
19
 
19
20
  puts "Creating tag #{TAG_NAME}..."
20
- `git tag #{TAG_NAME}`
21
+ %x(git tag #{TAG_NAME})
21
22
 
22
- puts 'Creating release...'
23
- client = Octokit::Client.new(:access_token => ENV['GITHUB_TOKEN'])
24
- release_response = client.create_release 'gjtorikian/mtex2MML', TAG_NAME, \
25
- :name => VERSION
23
+ puts "Creating release..."
24
+ client = Octokit::Client.new(access_token: ENV["GITHUB_TOKEN"])
25
+ _release_response = client.create_release("gjtorikian/mtex2MML", TAG_NAME, \
26
+ name: VERSION)
26
27
 
27
- puts 'Done!'
28
+ puts "Done!"
@@ -1523,12 +1523,12 @@ int display_style = 0;
1523
1523
 
1524
1524
  %%
1525
1525
 
1526
- void mtex2MML_restart ()
1526
+ void mtex2MML_restart (void)
1527
1527
  {
1528
1528
  BEGIN(INITIAL);
1529
1529
  }
1530
1530
 
1531
- void mtex2MML_reset_parsing_environment()
1531
+ void mtex2MML_reset_parsing_environment(void)
1532
1532
  {
1533
1533
  parsing_environment = NO_PARSE;
1534
1534
  mtex2MML_eqn_src[mtex2MML_eqn_end-mtex2MML_eqn_src-yyleng]=0;
@@ -1548,7 +1548,7 @@ void mtex2MML_setup (const char * buffer, unsigned long length)
1548
1548
  s_mtex2MML_length = length;
1549
1549
  }
1550
1550
 
1551
- int mtex2MML_capture_eqn_src()
1551
+ int mtex2MML_capture_eqn_src(void)
1552
1552
  {
1553
1553
  if (YY_START != INITIAL && YY_START != SVGENV)
1554
1554
  return mtex2MML_do_capture_eqn();
@@ -1556,7 +1556,7 @@ int mtex2MML_capture_eqn_src()
1556
1556
  return -1;
1557
1557
  }
1558
1558
 
1559
- int mtex2MML_do_capture_eqn()
1559
+ int mtex2MML_do_capture_eqn(void)
1560
1560
  {
1561
1561
  if (mtex2MML_eqn_bufsize - (mtex2MML_eqn_end-mtex2MML_eqn_src+yyleng) > 1)
1562
1562
  {
@@ -51,24 +51,24 @@ extern void (*mtex2MML_error) (const char * msg); /* de
51
51
 
52
52
  extern char * mtex2MML_global_parse (const char * buffer, unsigned long length, const int options, const int global_start);
53
53
 
54
- extern int mtex2MML_delimiter_type();
54
+ extern int mtex2MML_delimiter_type(const int type);
55
55
 
56
56
  extern void mtex2MML_setup (const char * buffer, unsigned long length);
57
57
 
58
- extern void mtex2MML_restart ();
59
- extern void mtex2MML_reset_parsing_environment ();
58
+ extern void mtex2MML_restart (void);
59
+ extern void mtex2MML_reset_parsing_environment (void);
60
60
 
61
- extern int mtex2MML_do_capture_eqn();
62
- extern int mtex2MML_capture_eqn_src();
61
+ extern int mtex2MML_do_capture_eqn(void);
62
+ extern int mtex2MML_capture_eqn_src(void);
63
63
 
64
- extern char * mtex2MML_output ();
64
+ extern char * mtex2MML_output (void);
65
65
 
66
66
  extern char * mtex2MML_copy_string (const char * str);
67
67
  extern char * mtex2MML_copy_string_extra (const char * str, unsigned extra);
68
68
  extern char * mtex2MML_copy2 (const char * first, const char * second);
69
69
  extern char * mtex2MML_copy3 (const char * first, const char * second, const char * third);
70
70
  extern char * mtex2MML_copy_escaped (const char * str);
71
- extern UT_array ** mtex2MML_get_environment_data_stack();
71
+ extern UT_array ** mtex2MML_get_environment_data_stack(void);
72
72
 
73
73
  extern char * mtex2MML_empty_string;
74
74
 
@@ -36,7 +36,7 @@ yydebug = 1;
36
36
 
37
37
  encaseType encase = NONE;
38
38
 
39
- extern int yylex ();
39
+ extern int yylex (void);
40
40
 
41
41
  extern char * yytext;
42
42
 
@@ -86,7 +86,7 @@ yydebug = 1;
86
86
  #ifdef mtex2MML_CAPTURE
87
87
  static char * mtex2MML_output_string = "" ;
88
88
 
89
- char * mtex2MML_output ()
89
+ char * mtex2MML_output (void)
90
90
  {
91
91
  char * copy = (char *) malloc((mtex2MML_output_string ? strlen(mtex2MML_output_string) : 0) + 1);
92
92
  if (copy) {
@@ -279,7 +279,7 @@ yydebug = 1;
279
279
  }
280
280
 
281
281
  /* Returns a string representation of the global_label, and increments the label */
282
- char * mtex2MML_global_label()
282
+ char * mtex2MML_global_label(void)
283
283
  {
284
284
  char * n = (char *) malloc(256);
285
285
  #ifdef _WIN32
@@ -3507,7 +3507,7 @@ void format_additions(const char *buffer, const int options)
3507
3507
  encase = (encaseType) encase_pointer;
3508
3508
  }
3509
3509
 
3510
- void free_additions()
3510
+ void free_additions(void)
3511
3511
  {
3512
3512
  utarray_free(environment_data_stack);
3513
3513
 
@@ -3553,7 +3553,7 @@ char * mtex2MML_parse (const char * buffer, unsigned long length, const int opti
3553
3553
  return mathml;
3554
3554
  }
3555
3555
 
3556
- UT_array ** mtex2MML_get_environment_data_stack()
3556
+ UT_array ** mtex2MML_get_environment_data_stack(void)
3557
3557
  {
3558
3558
  return &environment_data_stack;
3559
3559
  }
@@ -411,7 +411,7 @@ clar_test_init(int argc, char **argv)
411
411
  }
412
412
 
413
413
  int
414
- clar_test_run()
414
+ clar_test_run(void)
415
415
  {
416
416
  if (_clar.argc > 1)
417
417
  clar_parse_args(_clar.argc, _clar.argv);
@@ -426,7 +426,7 @@ clar_test_run()
426
426
  }
427
427
 
428
428
  void
429
- clar_test_shutdown()
429
+ clar_test_shutdown(void)
430
430
  {
431
431
  clar_print_shutdown(
432
432
  _clar.tests_ran,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "trim",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "repo": "nami-doc/trim.c",
5
5
  "license": "MIT",
6
6
  "src": ["trim.c", "trim.h"]
7
- }
7
+ }
@@ -1,4 +1,6 @@
1
- require 'ruby-enum'
1
+ # frozen_string_literal: true
2
+
3
+ require "ruby-enum"
2
4
 
3
5
  class Configuration
4
6
  class Delimiters
@@ -11,9 +13,11 @@ class Configuration
11
13
  define :BRACKETS, 8
12
14
  define :ENVIRONMENTS, 16
13
15
 
14
- def self.option_exists?(option)
15
- unless Delimiters.keys.include?(option)
16
- fail TypeError, "delimiter type does not exist: #{option}"
16
+ class << self
17
+ def option_exists?(option)
18
+ unless Delimiters.key?(option)
19
+ raise(TypeError, "delimiter type does not exist: #{option}")
20
+ end
17
21
  end
18
22
  end
19
23
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Mathematical
2
4
  module Corrections
3
5
  def apply_corrections(maths)
@@ -9,7 +11,7 @@ class Mathematical
9
11
  # inside itex equations. So "<" and ">" are significant.
10
12
  # To obtain a less-than or greater-than sign, you should use \lt or \gt, respectively.
11
13
  def adjust_lt_gt(maths)
12
- maths.gsub(/</, '\lt').gsub(/>/, '\gt')
14
+ maths.gsub("<", '\lt').gsub(">", '\gt')
13
15
  end
14
16
  end
15
17
  end
@@ -1,14 +1,16 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Mathematical
2
4
  module Validator
3
-
4
5
  FORMAT_TYPES = [:svg, :png, :mathml].freeze
5
6
  RENDER_TYPES = [:parse, :filter, :text_filter, :strict_filter].freeze
6
7
 
7
8
  def validate_config(config)
8
- fail(TypeError, 'maxsize must be an integer!') unless config[:maxsize].is_a? Integer
9
- fail(TypeError, 'maxsize cannot be less than 0!') if config[:maxsize] < 0
10
- fail(TypeError, 'format must be a symbol!') unless config[:format].is_a? Symbol
11
- fail(TypeError, "format type must be one of the following formats: #{FORMAT_TYPES.join(', ')}") unless FORMAT_TYPES.include?(config[:format])
9
+ raise(TypeError, "maxsize must be an integer!") unless config[:maxsize].is_a?(Integer)
10
+ raise(TypeError, "maxsize cannot be less than 0!") if config[:maxsize] < 0
11
+ raise(TypeError, "format must be a symbol!") unless config[:format].is_a?(Symbol)
12
+ raise(TypeError, "format type must be one of the following formats: #{FORMAT_TYPES.join(", ")}") unless FORMAT_TYPES.include?(config[:format])
13
+
12
14
  if config[:delimiter].is_a?(Symbol)
13
15
  Configuration::Delimiters.option_exists?(config[:delimiter])
14
16
  elsif config[:delimiter].is_a?(Array)
@@ -18,12 +20,12 @@ class Mathematical
18
20
  Configuration::Delimiters.option_exists?(delim)
19
21
  end
20
22
  else
21
- fail(TypeError, 'delimiter type must be a valid symbol or array of symbols')
23
+ raise(TypeError, "delimiter type must be a valid symbol or array of symbols")
22
24
  end
23
25
  end
24
26
 
25
27
  def validate_content(maths)
26
- if maths.is_a? Array
28
+ if maths.is_a?(Array)
27
29
  maths.map { |m| validate_string(m) }
28
30
  else
29
31
  validate_string(maths)
@@ -31,7 +33,8 @@ class Mathematical
31
33
  end
32
34
 
33
35
  def validate_string(maths)
34
- fail(ArgumentError, 'input must be string!') unless maths.is_a?(String)
36
+ raise(ArgumentError, "input must be string!") unless maths.is_a?(String)
37
+
35
38
  maths.strip
36
39
  end
37
40
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Mathematical
2
- VERSION = '1.6.14'.freeze
4
+ VERSION = "1.6.18"
3
5
  end