mathematical 1.6.14 → 1.6.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -1
- data/Rakefile +31 -21
- data/ext/mathematical/extconf.rb +71 -69
- data/ext/mathematical/lasem/COPYING +118 -99
- data/ext/mathematical/lasem/{NEWS → NEWS.md} +10 -0
- data/ext/mathematical/lasem/README.md +65 -0
- data/ext/mathematical/lasem/docs/lasem-render-0.6.1 +2 -2
- data/ext/mathematical/lasem/docs/meson.build +3 -0
- data/ext/mathematical/lasem/docs/reference/lasem/building.md +32 -0
- data/ext/mathematical/lasem/docs/reference/lasem/lasem.toml.in +47 -0
- data/ext/mathematical/lasem/docs/reference/lasem/meson.build +44 -0
- data/ext/mathematical/lasem/docs/reference/lasem/overview.md +24 -0
- data/ext/mathematical/lasem/docs/reference/lasem/urlmap.js +5 -0
- data/ext/mathematical/lasem/itex2mml/README.itex2MML +5 -2
- data/ext/mathematical/lasem/itex2mml/itex2MML.h +10 -10
- data/ext/mathematical/lasem/itex2mml/itex2MML.l +126 -27
- data/ext/mathematical/lasem/itex2mml/itex2MML.y +262 -99
- data/ext/mathematical/lasem/itex2mml/meson.build +17 -0
- data/ext/mathematical/lasem/lasem.doap +7 -7
- data/ext/mathematical/lasem/meson.build +46 -0
- data/ext/mathematical/lasem/meson_options.txt +5 -0
- data/ext/mathematical/lasem/org.lasem.Viewer.json +41 -0
- data/ext/mathematical/lasem/po/LINGUAS +0 -2
- data/ext/mathematical/lasem/po/eu.po +30 -66
- data/ext/mathematical/lasem/po/meson.build +4 -0
- data/ext/mathematical/lasem/src/lasemrender.c +1 -6
- data/ext/mathematical/lasem/src/lsm.c +2 -0
- data/ext/mathematical/lasem/src/lsmattributes.c +2 -5
- data/ext/mathematical/lasem/src/lsmmathmlglyphtableams.c +71 -7
- data/ext/mathematical/lasem/src/lsmmathmlitexelement.c +7 -5
- data/ext/mathematical/lasem/src/lsmmathmloperatordictionary.c +11 -1
- data/ext/mathematical/lasem/src/lsmmathmloperatordictionary.h +2 -1
- data/ext/mathematical/lasem/src/lsmmathmloperatorelement.c +6 -1
- data/ext/mathematical/lasem/src/lsmmathmlview.c +21 -3
- data/ext/mathematical/lasem/src/lsmmathmlview.h +2 -2
- data/ext/mathematical/lasem/src/lsmmisc.c +15 -0
- data/ext/mathematical/lasem/src/lsmmisc.h +32 -0
- data/ext/mathematical/lasem/src/lsmproperties.c +2 -5
- data/ext/mathematical/lasem/src/lsmsvgfiltersurface.c +6 -3
- data/ext/mathematical/lasem/src/lsmsvgtraits.c +10 -1
- data/ext/mathematical/lasem/src/meson.build +321 -0
- data/ext/mathematical/lasem/subprojects/gi-docgen.wrap +6 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/misc/array.tex +3 -0
- data/ext/mathematical/lasem/tests/dom.c +0 -6
- data/ext/mathematical/lasem/tests/filter.c +8 -7
- data/ext/mathematical/lasem/tests/lasem.supp +185 -0
- data/ext/mathematical/lasem/tests/lsmtest.c +2 -9
- data/ext/mathematical/lasem/tests/meson.build +39 -0
- data/ext/mathematical/lasem/tests/str.c +0 -4
- data/ext/mathematical/lasem/tests/suite.c +0 -4
- data/ext/mathematical/lasem/viewer/meson.build +17 -0
- data/ext/mathematical/lasem/viewer/viewer.c +248 -0
- data/ext/mathematical/mtex2MML/script/tag +15 -14
- data/ext/mathematical/mtex2MML/src/lexer.l +4 -4
- data/ext/mathematical/mtex2MML/src/mtex2MML.h +7 -7
- data/ext/mathematical/mtex2MML/src/parser.y +5 -5
- data/ext/mathematical/mtex2MML/tests/clar.c +2 -2
- data/ext/mathematical/mtex2MML/tests/deps/trim/package.json +2 -2
- data/lib/mathematical/configuration.rb +8 -4
- data/lib/mathematical/corrections.rb +3 -1
- data/lib/mathematical/validator.rb +11 -8
- data/lib/mathematical/version.rb +3 -1
- data/lib/mathematical.rb +21 -19
- data/mathematical.gemspec +21 -22
- metadata +36 -336
- data/ext/mathematical/lasem/AUTHORS +0 -1
- data/ext/mathematical/lasem/ChangeLog +0 -0
- data/ext/mathematical/lasem/MAINTAINERS +0 -3
- data/ext/mathematical/lasem/Makefile.am +0 -34
- data/ext/mathematical/lasem/Makefile.decl +0 -57
- data/ext/mathematical/lasem/README +0 -28
- data/ext/mathematical/lasem/RELEASING +0 -85
- data/ext/mathematical/lasem/autogen.sh +0 -180
- data/ext/mathematical/lasem/configure.ac +0 -139
- data/ext/mathematical/lasem/docs/Makefile.am +0 -14
- data/ext/mathematical/lasem/docs/reference/Makefile.am +0 -3
- data/ext/mathematical/lasem/docs/reference/lasem/Makefile.am +0 -205
- data/ext/mathematical/lasem/docs/reference/lasem/lasem-docs.xml +0 -75
- data/ext/mathematical/lasem/docs/reference/lasem/lasem-overview.xml +0 -64
- data/ext/mathematical/lasem/docs/reference/lasem/lasem-sections.txt +0 -213
- data/ext/mathematical/lasem/docs/reference/lasem/lasem.types +0 -110
- data/ext/mathematical/lasem/itex2mml/Makefile.am +0 -37
- data/ext/mathematical/lasem/lasem.pc.in +0 -11
- data/ext/mathematical/lasem/m4/introspection.m4 +0 -96
- data/ext/mathematical/lasem/po/ChangeLog +0 -0
- data/ext/mathematical/lasem/po/ro.po +0 -64
- data/ext/mathematical/lasem/src/Makefile.am +0 -349
- data/ext/mathematical/lasem/src/lsmdomenumtypes.c.template +0 -39
- data/ext/mathematical/lasem/src/lsmdomenumtypes.h.template +0 -26
- data/ext/mathematical/lasem/src/lsmmathmlenumtypes.c.template +0 -39
- data/ext/mathematical/lasem/src/lsmmathmlenumtypes.h.template +0 -26
- data/ext/mathematical/lasem/src/lsmsvgenumtypes.c.template +0 -39
- data/ext/mathematical/lasem/src/lsmsvgenumtypes.h.template +0 -26
- data/ext/mathematical/lasem/tests/Makefile.am +0 -34
- data/ext/mathematical/lib/liblasem.dylib +0 -0
- data/ext/mathematical/lib/libmtex2MML.a +0 -0
- data/ext/mathematical/mtex2MML/build/CMakeCache.txt +0 -512
- data/ext/mathematical/mtex2MML/build/CMakeFiles/3.16.2/CMakeCCompiler.cmake +0 -76
- data/ext/mathematical/mtex2MML/build/CMakeFiles/3.16.2/CMakeCXXCompiler.cmake +0 -88
- data/ext/mathematical/mtex2MML/build/CMakeFiles/3.16.2/CMakeDetermineCompilerABI_C.bin +0 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/3.16.2/CMakeDetermineCompilerABI_CXX.bin +0 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/3.16.2/CMakeSystem.cmake +0 -15
- data/ext/mathematical/mtex2MML/build/CMakeFiles/3.16.2/CompilerIdC/CMakeCCompilerId.c +0 -671
- data/ext/mathematical/mtex2MML/build/CMakeFiles/3.16.2/CompilerIdCXX/CMakeCXXCompilerId.cpp +0 -660
- data/ext/mathematical/mtex2MML/build/CMakeFiles/CMakeDirectoryInformation.cmake +0 -16
- data/ext/mathematical/mtex2MML/build/CMakeFiles/CMakeError.log +0 -22
- data/ext/mathematical/mtex2MML/build/CMakeFiles/CMakeOutput.log +0 -351
- data/ext/mathematical/mtex2MML/build/CMakeFiles/CMakeRuleHashes.txt +0 -34
- data/ext/mathematical/mtex2MML/build/CMakeFiles/Continuous.dir/DependInfo.cmake +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/Continuous.dir/build.make +0 -76
- data/ext/mathematical/mtex2MML/build/CMakeFiles/Continuous.dir/cmake_clean.cmake +0 -8
- data/ext/mathematical/mtex2MML/build/CMakeFiles/Continuous.dir/progress.make +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousBuild.dir/DependInfo.cmake +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousBuild.dir/build.make +0 -76
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousBuild.dir/cmake_clean.cmake +0 -8
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousBuild.dir/progress.make +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousConfigure.dir/DependInfo.cmake +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousConfigure.dir/build.make +0 -76
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousConfigure.dir/cmake_clean.cmake +0 -8
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousConfigure.dir/progress.make +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousCoverage.dir/DependInfo.cmake +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousCoverage.dir/build.make +0 -76
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousCoverage.dir/cmake_clean.cmake +0 -8
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousCoverage.dir/progress.make +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousMemCheck.dir/DependInfo.cmake +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousMemCheck.dir/build.make +0 -76
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousMemCheck.dir/cmake_clean.cmake +0 -8
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousMemCheck.dir/progress.make +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousStart.dir/DependInfo.cmake +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousStart.dir/build.make +0 -76
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousStart.dir/cmake_clean.cmake +0 -8
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousStart.dir/progress.make +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousSubmit.dir/DependInfo.cmake +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousSubmit.dir/build.make +0 -76
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousSubmit.dir/cmake_clean.cmake +0 -8
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousSubmit.dir/progress.make +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousTest.dir/DependInfo.cmake +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousTest.dir/build.make +0 -76
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousTest.dir/cmake_clean.cmake +0 -8
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousTest.dir/progress.make +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousUpdate.dir/DependInfo.cmake +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousUpdate.dir/build.make +0 -76
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousUpdate.dir/cmake_clean.cmake +0 -8
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousUpdate.dir/progress.make +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/Experimental.dir/DependInfo.cmake +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/Experimental.dir/build.make +0 -76
- data/ext/mathematical/mtex2MML/build/CMakeFiles/Experimental.dir/cmake_clean.cmake +0 -8
- data/ext/mathematical/mtex2MML/build/CMakeFiles/Experimental.dir/progress.make +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalBuild.dir/DependInfo.cmake +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalBuild.dir/build.make +0 -76
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalBuild.dir/cmake_clean.cmake +0 -8
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalBuild.dir/progress.make +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalConfigure.dir/DependInfo.cmake +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalConfigure.dir/build.make +0 -76
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalConfigure.dir/cmake_clean.cmake +0 -8
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalConfigure.dir/progress.make +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalCoverage.dir/DependInfo.cmake +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalCoverage.dir/build.make +0 -76
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalCoverage.dir/cmake_clean.cmake +0 -8
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalCoverage.dir/progress.make +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalMemCheck.dir/DependInfo.cmake +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalMemCheck.dir/build.make +0 -76
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalMemCheck.dir/cmake_clean.cmake +0 -8
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalMemCheck.dir/progress.make +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalStart.dir/DependInfo.cmake +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalStart.dir/build.make +0 -76
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalStart.dir/cmake_clean.cmake +0 -8
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalStart.dir/progress.make +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalSubmit.dir/DependInfo.cmake +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalSubmit.dir/build.make +0 -76
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalSubmit.dir/cmake_clean.cmake +0 -8
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalSubmit.dir/progress.make +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalTest.dir/DependInfo.cmake +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalTest.dir/build.make +0 -76
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalTest.dir/cmake_clean.cmake +0 -8
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalTest.dir/progress.make +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalUpdate.dir/DependInfo.cmake +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalUpdate.dir/build.make +0 -76
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalUpdate.dir/cmake_clean.cmake +0 -8
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalUpdate.dir/progress.make +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/Makefile.cmake +0 -177
- data/ext/mathematical/mtex2MML/build/CMakeFiles/Makefile2 +0 -1033
- data/ext/mathematical/mtex2MML/build/CMakeFiles/Nightly.dir/DependInfo.cmake +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/Nightly.dir/build.make +0 -76
- data/ext/mathematical/mtex2MML/build/CMakeFiles/Nightly.dir/cmake_clean.cmake +0 -8
- data/ext/mathematical/mtex2MML/build/CMakeFiles/Nightly.dir/progress.make +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyBuild.dir/DependInfo.cmake +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyBuild.dir/build.make +0 -76
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyBuild.dir/cmake_clean.cmake +0 -8
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyBuild.dir/progress.make +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyConfigure.dir/DependInfo.cmake +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyConfigure.dir/build.make +0 -76
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyConfigure.dir/cmake_clean.cmake +0 -8
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyConfigure.dir/progress.make +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyCoverage.dir/DependInfo.cmake +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyCoverage.dir/build.make +0 -76
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyCoverage.dir/cmake_clean.cmake +0 -8
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyCoverage.dir/progress.make +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemCheck.dir/DependInfo.cmake +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemCheck.dir/build.make +0 -76
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemCheck.dir/cmake_clean.cmake +0 -8
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemCheck.dir/progress.make +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemoryCheck.dir/DependInfo.cmake +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemoryCheck.dir/build.make +0 -76
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemoryCheck.dir/cmake_clean.cmake +0 -8
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemoryCheck.dir/progress.make +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyStart.dir/DependInfo.cmake +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyStart.dir/build.make +0 -76
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyStart.dir/cmake_clean.cmake +0 -8
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyStart.dir/progress.make +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlySubmit.dir/DependInfo.cmake +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlySubmit.dir/build.make +0 -76
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlySubmit.dir/cmake_clean.cmake +0 -8
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlySubmit.dir/progress.make +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyTest.dir/DependInfo.cmake +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyTest.dir/build.make +0 -76
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyTest.dir/cmake_clean.cmake +0 -8
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyTest.dir/progress.make +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyUpdate.dir/DependInfo.cmake +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyUpdate.dir/build.make +0 -76
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyUpdate.dir/cmake_clean.cmake +0 -8
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyUpdate.dir/progress.make +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/TargetDirectories.txt +0 -41
- data/ext/mathematical/mtex2MML/build/CMakeFiles/cmake.check_cache +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/format.dir/DependInfo.cmake +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/format.dir/build.make +0 -76
- data/ext/mathematical/mtex2MML/build/CMakeFiles/format.dir/cmake_clean.cmake +0 -8
- data/ext/mathematical/mtex2MML/build/CMakeFiles/format.dir/progress.make +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/DependInfo.cmake +0 -44
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/build.make +0 -206
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/cmake_clean.cmake +0 -20
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/depend.make +0 -2
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/flags.make +0 -10
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/link.txt +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/progress.make +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/C.includecache +0 -244
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/DependInfo.cmake +0 -42
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/build.make +0 -203
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/cmake_clean.cmake +0 -19
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/cmake_clean_target.cmake +0 -3
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/depend.internal +0 -49
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/depend.make +0 -49
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/flags.make +0 -10
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/link.txt +0 -2
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/progress.make +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/memcheck.dir/DependInfo.cmake +0 -11
- data/ext/mathematical/mtex2MML/build/CMakeFiles/memcheck.dir/build.make +0 -76
- data/ext/mathematical/mtex2MML/build/CMakeFiles/memcheck.dir/cmake_clean.cmake +0 -8
- data/ext/mathematical/mtex2MML/build/CMakeFiles/memcheck.dir/progress.make +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/DependInfo.cmake +0 -43
- data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/build.make +0 -217
- data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/cmake_clean.cmake +0 -20
- data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/depend.make +0 -2
- data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/flags.make +0 -10
- data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/link.txt +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/progress.make +0 -12
- data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/DependInfo.cmake +0 -59
- data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/build.make +0 -473
- data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/cmake_clean.cmake +0 -37
- data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/depend.make +0 -2
- data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/flags.make +0 -10
- data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/link.txt +0 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/progress.make +0 -29
- data/ext/mathematical/mtex2MML/build/CMakeFiles/progress.marks +0 -1
- data/ext/mathematical/mtex2MML/build/CTestTestfile.cmake +0 -8
- data/ext/mathematical/mtex2MML/build/DartConfiguration.tcl +0 -105
- data/ext/mathematical/mtex2MML/build/Makefile +0 -1485
- data/ext/mathematical/mtex2MML/build/cmake_install.cmake +0 -102
- data/ext/mathematical/mtex2MML/build/lexer.c +0 -8903
- data/ext/mathematical/mtex2MML/build/libmtex2MML.a +0 -0
- data/ext/mathematical/mtex2MML/build/libmtex2MML.pc +0 -10
- data/ext/mathematical/mtex2MML/build/mtex2mml_export.h +0 -42
- data/ext/mathematical/mtex2MML/build/parser.c +0 -10334
- data/ext/mathematical/mtex2MML/build/parser.h +0 -625
- data/ext/mathematical/mtex2MML/build/parser.output +0 -120719
- data/test/mathematical/basic_test.rb +0 -89
- data/test/mathematical/corrections_test.rb +0 -16
- data/test/mathematical/delimiters_test.rb +0 -69
- data/test/mathematical/fixtures/after/backslashes.html +0 -5
- data/test/mathematical/fixtures/after/brackets_display.html +0 -1
- data/test/mathematical/fixtures/after/compliance_accents.html +0 -17
- data/test/mathematical/fixtures/after/compliance_arrows.html +0 -71
- data/test/mathematical/fixtures/after/compliance_colors.html +0 -4
- data/test/mathematical/fixtures/after/compliance_greek_letters.html +0 -42
- data/test/mathematical/fixtures/after/compliance_large_math.html +0 -19
- data/test/mathematical/fixtures/after/compliance_log_symbols.html +0 -34
- data/test/mathematical/fixtures/after/compliance_operators.html +0 -262
- data/test/mathematical/fixtures/after/dollar_sign_inline.html +0 -1
- data/test/mathematical/fixtures/after/equation_display.html +0 -1
- data/test/mathematical/fixtures/after/multiple_dollar_inline.html +0 -1
- data/test/mathematical/fixtures/after/parens_inline.html +0 -1
- data/test/mathematical/fixtures/before/backslashes.text +0 -17
- data/test/mathematical/fixtures/before/brackets_display.text +0 -1
- data/test/mathematical/fixtures/before/compliance_accents.text +0 -17
- data/test/mathematical/fixtures/before/compliance_arrows.text +0 -71
- data/test/mathematical/fixtures/before/compliance_colors.text +0 -4
- data/test/mathematical/fixtures/before/compliance_greek_letters.text +0 -42
- data/test/mathematical/fixtures/before/compliance_large_math.text +0 -19
- data/test/mathematical/fixtures/before/compliance_log_symbols.text +0 -34
- data/test/mathematical/fixtures/before/compliance_operators.text +0 -262
- data/test/mathematical/fixtures/before/dollar_sign_inline.text +0 -1
- data/test/mathematical/fixtures/before/equation_display.text +0 -1
- data/test/mathematical/fixtures/before/multiple_dollar_inline.text +0 -1
- data/test/mathematical/fixtures/before/parens_inline.text +0 -1
- data/test/mathematical/fixtures/performance/big_file.text +0 -1755
- data/test/mathematical/fixtures/png/numeric_test_1.png +0 -0
- data/test/mathematical/fixtures/png/numeric_test_2.png +0 -0
- data/test/mathematical/fixtures/png/numeric_test_3.png +0 -0
- data/test/mathematical/fixtures/png/pmatrix.png +0 -0
- data/test/mathematical/fixtures_test.rb +0 -51
- data/test/mathematical/maliciousness_test.rb +0 -152
- data/test/mathematical/mathjax_test.rb +0 -26
- data/test/mathematical/mathml_test.rb +0 -21
- data/test/mathematical/multiples_test.rb +0 -71
- data/test/mathematical/performance_test.rb +0 -15
- data/test/mathematical/png_test.rb +0 -30
- 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
|
-
#
|
529
|
-
if (
|
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
|
@@ -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
|
4
|
+
require "octokit"
|
4
5
|
|
5
|
-
|
6
|
+
%x(git push origin)
|
6
7
|
|
7
|
-
|
8
|
-
|
8
|
+
%x(rm -rf build)
|
9
|
+
%x(mkdir build)
|
9
10
|
|
10
|
-
Dir.chdir
|
11
|
-
|
12
|
-
|
11
|
+
Dir.chdir("build") do
|
12
|
+
%x(cmake ..)
|
13
|
+
%x(make)
|
13
14
|
end
|
14
15
|
|
15
|
-
MTEX2MML_HEADER = File.read(File.join(
|
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
|
-
|
21
|
+
%x(git tag #{TAG_NAME})
|
21
22
|
|
22
|
-
puts
|
23
|
-
client = Octokit::Client.new(:
|
24
|
-
|
25
|
-
|
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
|
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,4 +1,6 @@
|
|
1
|
-
|
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
|
-
|
15
|
-
|
16
|
-
|
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(
|
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
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
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
|
-
|
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?
|
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
|
-
|
36
|
+
raise(ArgumentError, "input must be string!") unless maths.is_a?(String)
|
37
|
+
|
35
38
|
maths.strip
|
36
39
|
end
|
37
40
|
end
|
data/lib/mathematical/version.rb
CHANGED