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
@@ -0,0 +1,17 @@
1
+ flex = find_program('flex', required: false)
2
+ bison = find_program('bison', required: false)
3
+
4
+ lgen = generator(flex,
5
+ output : '@BASENAME@.yy.c',
6
+ arguments : ['-P', '@BASENAME@_yy', '-o', '@OUTPUT@', '@INPUT@'])
7
+
8
+ pgen = generator(bison,
9
+ output : ['@BASENAME@.tab.c', '@BASENAME@.tab.h'],
10
+ arguments : ['@INPUT@', '--defines=@OUTPUT1@', '--output=@OUTPUT0@', '--warning=no-conflicts-rr', '--warnings=no-conflicts-sr', '-v', '-y', '-p', '@BASENAME@_yy', '-d'])
11
+
12
+ itex2mml_files = [
13
+ lgen.process ('itex2MML.l'),
14
+ pgen.process ('itex2MML.y')
15
+ ]
16
+
17
+ itex2mml_inc = include_directories ('.')
@@ -1,21 +1,21 @@
1
1
  <Project xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
2
2
  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
3
3
  xmlns:foaf="http://xmlns.com/foaf/0.1/"
4
- xmlns:gnome="http://api.gnome.org/doap-extensions#"
5
4
  xmlns="http://usefulinc.com/ns/doap#">
6
5
 
7
6
  <name xml:lang="en">Lasem</name>
8
7
  <shortdesc xml:lang="en">SVG and MathML rendering library</shortdesc>
9
- <homepage rdf:resource="https://wiki.gnome.org/Projects/Lasem" />
10
- <download-page rdf:resource="http://download.gnome.org/sources/lasem/" />
11
- <bug-database rdf:resource="https://gitlab.gnome.org/GNOME/lasem/issues/" />
12
- <!-- <category rdf:resource="http://api.gnome.org/doap-extensions#development" /> -->
8
+
9
+ <homepage rdf:resource="https://github.com/LasemProject/lasem" />
10
+ <download-page rdf:resource="https://github.com/LasemProject/lasem/releases" />
11
+ <bug-database rdf:resource="https://github.com/LasemProject/lasem/issues" />
12
+ <programming-language>C</programming-language>
13
13
 
14
14
  <maintainer>
15
15
  <foaf:Person>
16
16
  <foaf:name>Emmanuel Pacaud</foaf:name>
17
- <foaf:mbox rdf:resource="mailto:emmanuel@gnome.org" />
18
- <gnome:userid>emmanuel</gnome:userid>
17
+ <foaf:mbox rdf:resource="mailto:emmanuel.pacaud@free.fr" />
19
18
  </foaf:Person>
20
19
  </maintainer>
20
+
21
21
  </Project>
@@ -0,0 +1,46 @@
1
+ project ('lasem', 'c', version: '0.5.2', meson_version: '>=0.56.0')
2
+
3
+ gnome = import('gnome')
4
+ i18n = import ('i18n')
5
+ pkg = import ('pkgconfig')
6
+
7
+ lasem_version = meson.project_version ()
8
+ lasem_api_version = '0.6'
9
+
10
+ versions = lasem_version.split ('.')
11
+ lasem_major_version = versions[0].to_int ()
12
+ lasem_minor_version = versions[1].to_int ()
13
+ lasem_micro_version = versions[2].to_int ()
14
+
15
+ cc = meson.get_compiler ('c')
16
+
17
+ glib_dep = dependency ('glib-2.0', version: '>=2.36', required: true)
18
+ gobject_dep = dependency ('gobject-2.0', required: true)
19
+ gio_dep = dependency ('gio-2.0', required: true)
20
+ gdk_dep = dependency ('gdk-pixbuf-2.0', required: true)
21
+ cairo_dep = dependency ('cairo', version: '>= 1.2', required: true)
22
+ pango_cairo_dep = dependency ('pangocairo', version: '>= 1.16.0', required: true)
23
+ libxml2_dep = dependency ('libxml-2.0', required: true)
24
+
25
+ libm = cc.find_library ('m', required: true)
26
+
27
+ lasem_dependencies = [glib_dep, gobject_dep, gio_dep, gdk_dep, cairo_dep, pango_cairo_dep, libxml2_dep, libm]
28
+
29
+ subdir ('po')
30
+ subdir ('itex2mml')
31
+ subdir ('src')
32
+ subdir ('tests')
33
+ subdir ('viewer')
34
+
35
+ doc_deps = dependency ('gi-docgen', version:'>= 2021.1', fallback: ['gi-docgen', 'dummy_dep'], required:get_option('documentation'))
36
+ subdir('docs', if_found: doc_deps)
37
+
38
+ summary (
39
+ {
40
+ 'prefix': get_option('prefix'),
41
+ 'bindir': get_option('bindir'),
42
+ 'libdir': get_option('libdir'),
43
+ 'datadir': get_option('datadir'),
44
+ },
45
+ section: 'Directories'
46
+ )
@@ -0,0 +1,5 @@
1
+ # Documentation and introspection
2
+
3
+ option('introspection', type: 'feature', value: 'auto', description: 'Build introspection data (requires gobject-introspection)')
4
+ option('documentation', type: 'feature', value: 'disabled', description: 'Build API reference (requires gi-docgen)')
5
+ option('viewer', type: 'feature', value: 'disabled', description: 'Build viewer application (requires gtk4)')
@@ -0,0 +1,41 @@
1
+ {
2
+ "app-id" : "org.lasem.Viewer",
3
+ "runtime" : "org.gnome.Platform",
4
+ "runtime-version" : "master",
5
+ "sdk" : "org.gnome.Sdk",
6
+ "command" : "lsm-viewer",
7
+ "finish-args" : [
8
+ "--share=network",
9
+ "--share=ipc",
10
+ "--socket=fallback-x11",
11
+ "--device=dri",
12
+ "--socket=wayland"
13
+ ],
14
+ "cleanup" : [
15
+ "/include",
16
+ "/lib/pkgconfig",
17
+ "/man",
18
+ "/share/doc",
19
+ "/share/gtk-doc",
20
+ "/share/man",
21
+ "/share/pkgconfig",
22
+ "*.la",
23
+ "*.a"
24
+ ],
25
+ "modules" : [
26
+ {
27
+ "name" : "lasem",
28
+ "builddir" : true,
29
+ "buildsystem" : "meson",
30
+ "config-opts" : [
31
+ "-Dviewer=enabled"
32
+ ],
33
+ "sources" : [
34
+ {
35
+ "type" : "git",
36
+ "path" : "./"
37
+ }
38
+ ]
39
+ }
40
+ ]
41
+ }
@@ -13,7 +13,6 @@ gl
13
13
  hu
14
14
  id
15
15
  it
16
- it
17
16
  lt
18
17
  lv
19
18
  nb
@@ -22,7 +21,6 @@ oc
22
21
  pl
23
22
  pt
24
23
  pt_BR
25
- ro
26
24
  ru
27
25
  sl
28
26
  sr
@@ -3,100 +3,64 @@
3
3
  # This file is distributed under the same license as the PACKAGE package.
4
4
  #
5
5
  # Iñaki Larrañaga Murgoitio <dooteo@zundan.com>, 2013.
6
- # Asier Sarasua Garmendia <asier.sarasua@gmail.com>, 2019.
7
6
  #
8
7
  msgid ""
9
- msgstr "Project-Id-Version: lasem master\n"
10
- "Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/lasem/issues\n"
11
- "POT-Creation-Date: 2019-08-19 12:49+0000\n"
12
- "PO-Revision-Date: 2019-10-27 10:00+0100\n"
13
- "Last-Translator: Asier Sarasua Garmendia <asier.sarasua@gmail.com>\n"
14
- "Language-Team: Basque <librezale@librezale.eus>\n"
8
+ msgstr ""
9
+ "Project-Id-Version: lasem master\n"
10
+ "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
11
+ "product=lasem&keywords=I18N+L10N&component=general\n"
12
+ "POT-Creation-Date: 2013-08-30 17:44+0200\n"
13
+ "PO-Revision-Date: 2013-08-30 17:39+0200\n"
14
+ "Last-Translator: Iñaki Larrañaga Murgoitio <dooteo@zundan.com>\n"
15
+ "Language-Team: Basque <librezale@librezale.org>\n"
15
16
  "Language: eu\n"
16
17
  "MIME-Version: 1.0\n"
17
18
  "Content-Type: text/plain; charset=UTF-8\n"
18
19
  "Content-Transfer-Encoding: 8bit\n"
19
20
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
21
+ "X-Generator: Lokalize 1.4\n"
20
22
 
21
- #: ../src/lasemrender.c:70
23
+ #: ../src/lasemrender.c:67
22
24
  msgid "Output filename"
23
25
  msgstr "Irteerako fitxategi-izena"
24
26
 
25
- #: ../src/lasemrender.c:72
27
+ #: ../src/lasemrender.c:69
26
28
  msgid "Output format"
27
29
  msgstr "Irteerako formatua"
28
30
 
29
- #: ../src/lasemrender.c:74
31
+ #: ../src/lasemrender.c:71
30
32
  msgid "Pixel per inch"
31
33
  msgstr "Pixel hazbeteko"
32
34
 
33
- #: ../src/lasemrender.c:76
35
+ #: ../src/lasemrender.c:73
34
36
  msgid "Zoom"
35
37
  msgstr "Zooma"
36
38
 
37
- #: ../src/lasemrender.c:78
38
- msgid "Element id"
39
- msgstr "Elementuaren IDa"
40
-
41
- #: ../src/lasemrender.c:80
42
- msgid "Offset"
43
- msgstr "Desplazamendua"
44
-
45
- #: ../src/lasemrender.c:82
46
- msgid "Size"
47
- msgstr "Tamaina"
48
-
49
- #: ../src/lasemrender.c:84
39
+ #: ../src/lasemrender.c:75
50
40
  msgid "Debug domains"
51
41
  msgstr "Arazketaren domeinuak"
52
42
 
53
- #: ../src/lasemrender.c:97
54
- msgid "Invalid document type (SVG expected)"
55
- msgstr "Dokumentu mota baliogabea (SVG espero zen)"
56
-
57
- #: ../src/lasemrender.c:103
43
+ #: ../src/lasemrender.c:105
58
44
  #, c-format
59
- msgid "Element '%s' not found"
60
- msgstr "'%s' elementua ez da aurkitu"
45
+ msgid "Option parsing failed: %s\n"
46
+ msgstr "Huts egin du aukera aztertzean: %s\n"
61
47
 
62
- #: ../src/lasemrender.c:154
63
- msgid "Option parsing failed:"
64
- msgstr "Aukeren analisiak huts egin du:"
65
-
66
- #: ../src/lasemrender.c:161
48
+ #: ../src/lasemrender.c:112
49
+ #, c-format
67
50
  msgid "Invalid zoom value"
68
51
  msgstr "Zoomaren baliogabeko balioa"
69
52
 
70
- #: ../src/lasemrender.c:170
71
- msgid "Invalid number of arguments for offset option"
72
- msgstr "Argumentu kopuru baliogabea desplazamenduaren aukerarako"
73
-
74
- #: ../src/lasemrender.c:180
75
- msgid "Invalid number of arguments for size option"
76
- msgstr "Argumentu kopuru baliogabea tamainaren aukerarako"
77
-
78
- #: ../src/lasemrender.c:185
79
- msgid "Invalid export size"
80
- msgstr "Esportazio-tamaina baliogabea"
81
-
82
- #: ../src/lasemrender.c:193
83
- msgid "Missing input filename"
84
- msgstr "Sarrerako fitxategi-izena falta da"
85
-
86
- #: ../src/lasemrender.c:204
87
- msgid "Unknown format:"
88
- msgstr "Formatu ezezaguna:"
89
-
90
- #: ../src/lasemrender.c:244
91
- msgid ""
92
- "Don't know which format to use, please either give a format (-f) or an "
93
- "output filename (-o)"
94
- msgstr "Ez dakit zein formatu erabili, eman formatu bat (-f) edo irteerako fitxategi-izen bat (-o)"
53
+ #: ../src/lasemrender.c:119
54
+ #, c-format
55
+ msgid "One input file name is required\n"
56
+ msgstr "Sarrerako fitxategi-izen bat behar da\n"
95
57
 
96
- #: ../src/lasemrender.c:355
58
+ #: ../src/lasemrender.c:130
97
59
  #, c-format
98
- msgid "Can't load '%s'"
99
- msgstr "Ezin da '%s' kargatu"
60
+ msgid "Unknown format: %s\n"
61
+ msgstr "Formatu ezezaguna: %s\n"
100
62
 
101
- #~ msgid "One input file name is required\n"
102
- #~ msgstr "Sarrerako fitxategi-izen bat behar da\n"
63
+ #: ../src/lasemrender.c:255
64
+ #, c-format
65
+ msgid "Can't load '%s'\n"
66
+ msgstr "Ezin da '%s' kargatu\n"
@@ -0,0 +1,4 @@
1
+ add_project_arguments('-DGETTEXT_PACKAGE="lasem-@0@"'.format (lasem_api_version), language:'c')
2
+
3
+ i18n.gettext ('lasem-@0@'.format (lasem_api_version),
4
+ args: '--directory=' + meson.project_source_root())
@@ -32,7 +32,6 @@
32
32
  #include <cairo-pdf.h>
33
33
  #include <cairo-svg.h>
34
34
  #include <cairo-ps.h>
35
- #include <../config.h>
36
35
 
37
36
  #include <../itex2mml/itex2MML.h>
38
37
 
@@ -141,10 +140,6 @@ main(int argc, char **argv)
141
140
  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
142
141
  textdomain (GETTEXT_PACKAGE);
143
142
 
144
- #if !GLIB_CHECK_VERSION(2,36,0)
145
- g_type_init ();
146
- #endif
147
-
148
143
  context = g_option_context_new (NULL);
149
144
  g_option_context_add_main_entries (context, entries, NULL);
150
145
 
@@ -288,7 +283,7 @@ main(int argc, char **argv)
288
283
 
289
284
  lsm_dom_view_get_size (view, &width_pt, &height_pt, NULL);
290
285
  lsm_dom_view_get_size_pixels (view, &width, &height, NULL);
291
-
286
+
292
287
  if (option_offset == NULL) {
293
288
  offset_x_pt = offset_y_pt = 0.0;
294
289
  } else {
@@ -22,10 +22,12 @@
22
22
  */
23
23
 
24
24
  #include <lsmdomimplementation.h>
25
+ #include <lsmmathmloperatordictionary.h>
25
26
  #include <lsm.h>
26
27
 
27
28
  void
28
29
  lsm_shutdown (void)
29
30
  {
30
31
  lsm_dom_implementation_cleanup ();
32
+ lsm_mathml_operator_dictionary_cleanup ();
31
33
  }
@@ -23,6 +23,7 @@
23
23
 
24
24
  #include <lsmattributes.h>
25
25
  #include <lsmdebug.h>
26
+ #include <lsmmisc.h>
26
27
  #include <string.h>
27
28
  #include <stdlib.h>
28
29
  #include <math.h>
@@ -240,7 +241,6 @@ lsm_attribute_manager_serialize (LsmAttributeManager *manager,
240
241
  LsmAttribute *attribute;
241
242
  GString *string;
242
243
  GHashTableIter iter;
243
- char *c_string;
244
244
  gpointer key, value;
245
245
  gboolean attribute_found = FALSE;
246
246
 
@@ -272,8 +272,5 @@ lsm_attribute_manager_serialize (LsmAttributeManager *manager,
272
272
  return NULL;
273
273
  }
274
274
 
275
- c_string = string->str;
276
- g_string_free (string, FALSE);
277
-
278
- return c_string;
275
+ return lsm_g_string_free_and_steal (string);
279
276
  }
@@ -432,7 +432,7 @@ const LsmMathmlOperatorGlyph AMS_table[] = {
432
432
  {LSM_MATHML_FONT_ERROR, ""},
433
433
  1,
434
434
  {
435
- {LSM_MATHML_FONT_DEFAULT, "\xcc\xb2"}
435
+ {LSM_MATHML_FONT_DEFAULT, "\xe2\x80\x8c\xcc\xb2"}
436
436
  }
437
437
  },
438
438
  {
@@ -482,7 +482,7 @@ const LsmMathmlOperatorGlyph AMS_table[] = {
482
482
  {
483
483
  {LSM_MATHML_FONT_CMEX10, "e"},
484
484
  {LSM_MATHML_FONT_CMEX10, "f"},
485
- {LSM_MATHML_FONT_CMEX10, "g"}
485
+ {LSM_MATHML_FONT_CMEX10, "g"},
486
486
  }
487
487
  },
488
488
  {
@@ -535,7 +535,7 @@ const LsmMathmlOperatorGlyph AMS_table[] = {
535
535
  },
536
536
  {
537
537
  "-",
538
- 0,
538
+ LSM_MATHML_GLYPH_FLAG_STRETCH_HORIZONTAL,
539
539
  {LSM_MATHML_FONT_ERROR, ""},
540
540
  {LSM_MATHML_FONT_ERROR, ""},
541
541
  {LSM_MATHML_FONT_ERROR, ""},
@@ -556,22 +556,86 @@ const LsmMathmlOperatorGlyph AMS_table[] = {
556
556
  {
557
557
  {LSM_MATHML_FONT_DEFAULT, "|"}
558
558
  }
559
- }
559
+ },
560
+ {
561
+ "\x5e" /* ^ &Hat; */,
562
+ LSM_MATHML_GLYPH_FLAG_STRETCH_HORIZONTAL,
563
+ {LSM_MATHML_FONT_ERROR, ""},
564
+ {LSM_MATHML_FONT_ERROR, ""},
565
+ {LSM_MATHML_FONT_ERROR, ""},
566
+ {LSM_MATHML_FONT_ERROR, ""},
567
+ 1,
568
+ {
569
+ {LSM_MATHML_FONT_DEFAULT, "\x5e"}
570
+ }
571
+ },
560
572
  };
561
573
 
562
574
  static GHashTable *
563
575
  _get_glyph_table (void)
564
576
  {
565
577
  static GHashTable *glyph_table = NULL;
578
+ LsmMathmlOperatorGlyph glyph_template =
579
+ {
580
+ "\xcc\x80",
581
+ 0,
582
+ {LSM_MATHML_FONT_ERROR, ""},
583
+ {LSM_MATHML_FONT_ERROR, ""},
584
+ {LSM_MATHML_FONT_ERROR, ""},
585
+ {LSM_MATHML_FONT_ERROR, ""},
586
+ 1,
587
+ {
588
+ {LSM_MATHML_FONT_DEFAULT, "\xe2\x80\x8c\xcc\x80"}
589
+ }
590
+ };
591
+ char *utf8 = (char *) &glyph_template.utf8;
592
+ char *sized_utf8 = (char *) &glyph_template.sized_glyphs[0].utf8;
566
593
  unsigned int i;
567
594
 
568
595
  if (glyph_table != NULL)
569
596
  return glyph_table;
570
597
 
571
- glyph_table = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, NULL);
598
+ glyph_table = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, g_free);
599
+
600
+ for (i = 0; i < G_N_ELEMENTS (AMS_table); i++) {
601
+ LsmMathmlOperatorGlyph *glyph;
602
+
603
+ glyph = g_new(LsmMathmlOperatorGlyph, 1);
604
+ memcpy (glyph, &AMS_table[i], sizeof (LsmMathmlOperatorGlyph));
605
+
606
+ g_hash_table_insert (glyph_table, (void *) AMS_table[i].utf8, glyph);
607
+ }
608
+
609
+ /* Add a Zero Width Non-joiner character to combining characters in order to avoid dotted circles */
610
+ for (i = 0x80; i < 0xbf; i++) {
611
+ LsmMathmlOperatorGlyph *glyph;
612
+
613
+ utf8[1] = i;
614
+ sized_utf8[4] = i;
615
+
616
+ glyph = g_new(LsmMathmlOperatorGlyph, 1);
617
+ memcpy (glyph, &glyph_template, sizeof (LsmMathmlOperatorGlyph));
618
+
619
+ if (g_hash_table_lookup (glyph_table, (char *) glyph->utf8) == NULL)
620
+ g_hash_table_insert (glyph_table, (char *) glyph->utf8, glyph);
621
+ }
572
622
 
573
- for (i = 0; i < G_N_ELEMENTS (AMS_table); i++)
574
- g_hash_table_insert (glyph_table, (void *) AMS_table[i].utf8, (void *) &AMS_table[i]);
623
+ utf8[0] = '\xcd';
624
+ sized_utf8[3] = '\xcd';
625
+ for (i = 0x80; i < 0xaf; i++) {
626
+ LsmMathmlOperatorGlyph *glyph;
627
+ char *utf8 = (char *) &glyph_template.utf8;
628
+ char *sized_utf8 = (char *) &glyph_template.sized_glyphs[0].utf8;
629
+
630
+ utf8[1] = i;
631
+ sized_utf8[4] = i;
632
+
633
+ glyph = g_new(LsmMathmlOperatorGlyph, 1);
634
+ memcpy (glyph, &glyph_template, sizeof (LsmMathmlOperatorGlyph));
635
+
636
+ if (g_hash_table_lookup (glyph_table, (char *) glyph->utf8) == NULL)
637
+ g_hash_table_insert (glyph_table, (char *) glyph->utf8, glyph);
638
+ }
575
639
 
576
640
  return glyph_table;
577
641
  }
@@ -25,6 +25,7 @@
25
25
  #include <lsmmathmlview.h>
26
26
  #include <lsmdomtext.h>
27
27
  #include <lsmdebug.h>
28
+ #include <lsmmisc.h>
28
29
 
29
30
  static GObjectClass *parent_class;
30
31
 
@@ -74,24 +75,25 @@ _update (LsmMathmlElement *self, LsmMathmlStyle *style)
74
75
 
75
76
  if (need_conversion) {
76
77
  LsmMathmlDocument *document;
78
+ size_t length;
77
79
 
78
80
  g_free (itex_element->itex);
79
- itex_element->itex = string->str;
81
+ length = string->len;
82
+ itex_element->itex = lsm_g_string_free_and_steal (string);
80
83
 
81
84
  lsm_debug_update ("[MathmlItex::update] need conversion");
82
85
 
83
- document = lsm_mathml_document_new_from_itex (itex_element->itex,
84
- string->len, NULL);
86
+ document = lsm_mathml_document_new_from_itex (itex_element->itex, length, NULL);
85
87
  if (document != NULL) {
86
88
  if (itex_element->math != NULL)
87
89
  g_object_unref (lsm_dom_node_get_owner_document (LSM_DOM_NODE (itex_element->math)));
88
90
 
89
91
  itex_element->math = LSM_MATHML_ELEMENT (lsm_mathml_document_get_root_element (document));
90
92
  }
93
+ } else {
94
+ g_string_free (string, TRUE);
91
95
  }
92
96
 
93
- g_string_free (string, FALSE);
94
-
95
97
  if (itex_element->math != NULL) {
96
98
  lsm_dom_node_changed (LSM_DOM_NODE (itex_element->math));
97
99
  self->need_measure = lsm_mathml_element_update (itex_element->math, style);
@@ -3213,10 +3213,11 @@ static const LsmMathmlOperatorDictionaryEntry lsm_mathml_operator_entries[] = {
3213
3213
  }
3214
3214
  };
3215
3215
 
3216
+ static GHashTable *operator_hash = NULL;
3217
+
3216
3218
  static GHashTable *
3217
3219
  _get_operator_dictionary (void)
3218
3220
  {
3219
- static GHashTable *operator_hash = NULL;
3220
3221
  const char *utf8, *prefix;
3221
3222
  char *key;
3222
3223
  int i;
@@ -3246,6 +3247,8 @@ _get_operator_dictionary (void)
3246
3247
  if (g_hash_table_lookup (operator_hash, key) == NULL)
3247
3248
  g_hash_table_insert (operator_hash, key,
3248
3249
  (void *) &lsm_mathml_operator_entries[i]);
3250
+ else
3251
+ g_free (key);
3249
3252
  }
3250
3253
 
3251
3254
  return operator_hash;
@@ -3330,3 +3333,10 @@ lsm_mathml_operator_dictionary_lookup (const char *utf8, LsmMathmlForm form)
3330
3333
 
3331
3334
  return &lsm_mathml_operator_dictionary_default_entry;
3332
3335
  }
3336
+
3337
+ void
3338
+ lsm_mathml_operator_dictionary_cleanup (void)
3339
+ {
3340
+ if (operator_hash != NULL)
3341
+ g_hash_table_unref (operator_hash);
3342
+ }
@@ -46,7 +46,8 @@ typedef struct {
46
46
  gboolean symmetric;
47
47
  } LsmMathmlOperatorDictionaryEntry;
48
48
 
49
- const LsmMathmlOperatorDictionaryEntry * lsm_mathml_operator_dictionary_lookup (const char *utf8, LsmMathmlForm form);
49
+ const LsmMathmlOperatorDictionaryEntry * lsm_mathml_operator_dictionary_lookup (const char *utf8, LsmMathmlForm form);
50
+ void lsm_mathml_operator_dictionary_cleanup (void);
50
51
 
51
52
  G_END_DECLS
52
53
 
@@ -200,12 +200,17 @@ double
200
200
  lsm_mathml_operator_element_get_slant (const LsmMathmlOperatorElement *operator_element, LsmMathmlView *view)
201
201
  {
202
202
  char *text;
203
+ double slant;
203
204
 
204
205
  g_return_val_if_fail (LSM_IS_MATHML_OPERATOR_ELEMENT (operator_element), 0.0);
205
206
 
206
207
  text = lsm_mathml_presentation_token_get_text (LSM_MATHML_PRESENTATION_TOKEN (operator_element));
207
208
 
208
- return lsm_mathml_view_get_operator_slant (view, &LSM_MATHML_ELEMENT (operator_element)->style, text);
209
+ slant = lsm_mathml_view_get_operator_slant (view, &LSM_MATHML_ELEMENT (operator_element)->style, text);
210
+
211
+ g_free (text);
212
+
213
+ return slant;
209
214
  }
210
215
 
211
216
  LsmDomNode *
@@ -251,6 +251,16 @@ lsm_mathml_view_get_font_metrics (LsmMathmlView *view,
251
251
  *descent = bbox.depth;
252
252
  }
253
253
 
254
+ char *
255
+ _add_zero_width_non_joiner_to_combining (const char *text)
256
+ {
257
+ if (text != NULL && ((text[0] == '\xcc' && text[1] >= '\x80' && text[1] <= '\xbf') ||
258
+ (text[0] == '\xcd' && text[1] >= '\x80' && text[1] <= '\xaf')) && text[2] == '\0')
259
+ return g_strdup_printf ("\xe2\x80\x8c%s", text);
260
+ else
261
+ return g_strdup (text);
262
+ }
263
+
254
264
  void
255
265
  lsm_mathml_view_measure_text (LsmMathmlView *view,
256
266
  const LsmMathmlElementStyle *style,
@@ -258,6 +268,7 @@ lsm_mathml_view_measure_text (LsmMathmlView *view,
258
268
  LsmMathmlBbox *bbox)
259
269
  {
260
270
  PangoRectangle ink_rect;
271
+ char *actual_text;
261
272
  int baseline;
262
273
 
263
274
  g_return_if_fail (LSM_IS_MATHML_VIEW (view));
@@ -269,8 +280,10 @@ lsm_mathml_view_measure_text (LsmMathmlView *view,
269
280
  return;
270
281
  }
271
282
 
272
- lsm_mathml_view_update_layout_for_text (view, style, text,
283
+ actual_text = _add_zero_width_non_joiner_to_combining(text);
284
+ lsm_mathml_view_update_layout_for_text (view, style, actual_text,
273
285
  view->dom_view.measure_pango_layout, &ink_rect, NULL, &baseline);
286
+ g_free (actual_text);
274
287
 
275
288
  bbox->width = pango_units_to_double (ink_rect.width);
276
289
  bbox->height = pango_units_to_double (baseline - ink_rect.y);
@@ -285,6 +298,7 @@ lsm_mathml_view_show_text (LsmMathmlView *view,
285
298
  {
286
299
  PangoLayout *pango_layout;
287
300
  PangoRectangle rect, ink_rect;
301
+ char *actual_text;
288
302
  cairo_t *cairo;
289
303
  int baseline;
290
304
 
@@ -294,13 +308,17 @@ lsm_mathml_view_show_text (LsmMathmlView *view,
294
308
  if (text == NULL || strlen (text) < 1)
295
309
  return;
296
310
 
311
+ actual_text = _add_zero_width_non_joiner_to_combining (text);
312
+
313
+ actual_text = _add_zero_width_non_joiner_to_combining(text);
297
314
  lsm_debug_render ("[LsmMathmlView::show_text] '%s' at %g, %g (size = %g) %s",
298
- text, x, y, style->math_size,
315
+ actual_text, x, y, style->math_size,
299
316
  lsm_mathml_variant_to_string (style->math_variant));
300
317
 
301
- lsm_mathml_view_update_layout_for_text (view, style, text,
318
+ lsm_mathml_view_update_layout_for_text (view, style, actual_text,
302
319
  view->dom_view.pango_layout, &ink_rect, &rect, &baseline);
303
320
  lsm_mathml_view_show_layout (view, x, y, baseline, &ink_rect, &rect);
321
+ g_free (actual_text);
304
322
 
305
323
  if (ink_rect.width <= 0 || ink_rect.height <= 0)
306
324
  return;
@@ -53,11 +53,11 @@ typedef enum {
53
53
 
54
54
  typedef struct {
55
55
  LsmMathmlFont font;
56
- const char utf8[4];
56
+ const char utf8[6];
57
57
  } LsmMathmlGlyph;
58
58
 
59
59
  typedef struct {
60
- const char *utf8;
60
+ const char utf8[6];
61
61
  LsmMathmlGlyphFlags flags;
62
62
  LsmMathmlGlyph start_glyph;
63
63
  LsmMathmlGlyph middle_glyph;