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
@@ -1,5 +1,5 @@
|
|
1
|
-
/* itex2MML 1.
|
2
|
-
* itex2MML.y last modified
|
1
|
+
/* itex2MML 1.6.0
|
2
|
+
* itex2MML.y last modified 03/23/2019
|
3
3
|
*/
|
4
4
|
|
5
5
|
%parse-param {char **ret_str}
|
@@ -17,7 +17,8 @@
|
|
17
17
|
|
18
18
|
#define yytext itex2MML_yytext
|
19
19
|
|
20
|
-
extern int yylex (
|
20
|
+
extern int yylex ();
|
21
|
+
int itex2MML_do_html_filter (const char * buffer, size_t length, const int forbid_markup);
|
21
22
|
|
22
23
|
extern char * yytext;
|
23
24
|
|
@@ -29,7 +30,7 @@
|
|
29
30
|
|
30
31
|
void (*itex2MML_error) (const char * msg) = itex2MML_default_error;
|
31
32
|
|
32
|
-
static void yyerror (char **ret_str,
|
33
|
+
static void yyerror (char **ret_str, char * s)
|
33
34
|
{
|
34
35
|
char * msg = itex2MML_copy3 (s, " at token ", yytext);
|
35
36
|
if (itex2MML_error)
|
@@ -39,7 +40,7 @@
|
|
39
40
|
|
40
41
|
/* Note: If length is 0, then buffer is treated like a string; otherwise only length bytes are written.
|
41
42
|
*/
|
42
|
-
static void itex2MML_default_write (const char * buffer,
|
43
|
+
static void itex2MML_default_write (const char * buffer, size_t length)
|
43
44
|
{
|
44
45
|
if (buffer)
|
45
46
|
{
|
@@ -61,48 +62,48 @@
|
|
61
62
|
|
62
63
|
const char * itex2MML_output ()
|
63
64
|
{
|
64
|
-
char * copy = (char *) malloc(strlen(itex2MML_output_string) +1);
|
65
|
+
char * copy = (char *) malloc((itex2MML_output_string ? strlen(itex2MML_output_string) : 0) + 1);
|
65
66
|
if (copy)
|
66
67
|
{
|
67
68
|
if (itex2MML_output_string)
|
68
69
|
{
|
69
70
|
strcpy(copy, itex2MML_output_string);
|
70
|
-
if (itex2MML_output_string !=
|
71
|
+
if (*itex2MML_output_string != '\0')
|
71
72
|
free(itex2MML_output_string);
|
72
73
|
}
|
73
74
|
else
|
74
75
|
copy[0] = 0;
|
76
|
+
itex2MML_output_string = "";
|
75
77
|
}
|
76
|
-
itex2MML_output_string = "";
|
77
78
|
return copy;
|
78
79
|
}
|
79
80
|
|
80
|
-
static void itex2MML_capture (const char * buffer,
|
81
|
+
static void itex2MML_capture (const char * buffer, size_t length)
|
81
82
|
{
|
82
83
|
if (buffer)
|
83
84
|
{
|
84
85
|
if (length)
|
85
86
|
{
|
86
|
-
|
87
|
+
size_t first_length = itex2MML_output_string ? strlen(itex2MML_output_string) : 0;
|
87
88
|
char * copy = (char *) malloc(first_length + length + 1);
|
88
89
|
if (copy)
|
89
90
|
{
|
90
91
|
if (itex2MML_output_string)
|
91
92
|
{
|
92
93
|
strcpy(copy, itex2MML_output_string);
|
93
|
-
if (itex2MML_output_string !=
|
94
|
+
if (*itex2MML_output_string != '\0')
|
94
95
|
free(itex2MML_output_string);
|
95
96
|
}
|
96
97
|
else
|
97
98
|
copy[0] = 0;
|
98
99
|
strncat(copy, buffer, length);
|
100
|
+
itex2MML_output_string = copy;
|
99
101
|
}
|
100
|
-
itex2MML_output_string = copy;
|
101
102
|
}
|
102
103
|
else
|
103
104
|
{
|
104
105
|
char * copy = itex2MML_copy2(itex2MML_output_string, buffer);
|
105
|
-
if (itex2MML_output_string !=
|
106
|
+
if (*itex2MML_output_string != '\0')
|
106
107
|
free(itex2MML_output_string);
|
107
108
|
itex2MML_output_string = copy;
|
108
109
|
}
|
@@ -112,18 +113,18 @@
|
|
112
113
|
static void itex2MML_capture_mathml (const char * buffer)
|
113
114
|
{
|
114
115
|
char * temp = itex2MML_copy2(itex2MML_output_string, buffer);
|
115
|
-
if (itex2MML_output_string !=
|
116
|
+
if (*itex2MML_output_string != '\0')
|
116
117
|
free(itex2MML_output_string);
|
117
118
|
itex2MML_output_string = temp;
|
118
119
|
}
|
119
|
-
void (*itex2MML_write) (const char * buffer,
|
120
|
+
void (*itex2MML_write) (const char * buffer, size_t length) = itex2MML_capture;
|
120
121
|
void (*itex2MML_write_mathml) (const char * mathml) = itex2MML_capture_mathml;
|
121
122
|
#else
|
122
|
-
void (*itex2MML_write) (const char * buffer,
|
123
|
+
void (*itex2MML_write) (const char * buffer, size_t length) = itex2MML_default_write;
|
123
124
|
void (*itex2MML_write_mathml) (const char * mathml) = itex2MML_default_write_mathml;
|
124
125
|
#endif
|
125
126
|
|
126
|
-
char * itex2MML_empty_string =
|
127
|
+
char * itex2MML_empty_string = "";
|
127
128
|
|
128
129
|
/* Create a copy of a string, adding space for extra chars
|
129
130
|
*/
|
@@ -144,9 +145,9 @@
|
|
144
145
|
*/
|
145
146
|
char * itex2MML_copy3 (const char * first, const char * second, const char * third)
|
146
147
|
{
|
147
|
-
|
148
|
-
|
149
|
-
|
148
|
+
size_t first_length = first ? strlen( first) : 0;
|
149
|
+
size_t second_length = second ? strlen(second) : 0;
|
150
|
+
size_t third_length = third ? strlen( third) : 0;
|
150
151
|
|
151
152
|
char * copy = (char *) malloc(first_length + second_length + third_length + 1);
|
152
153
|
|
@@ -181,7 +182,7 @@
|
|
181
182
|
*/
|
182
183
|
char * itex2MML_copy_escaped (const char * str)
|
183
184
|
{
|
184
|
-
|
185
|
+
size_t length = 0;
|
185
186
|
|
186
187
|
const char * ptr1 = str;
|
187
188
|
|
@@ -262,7 +263,7 @@
|
|
262
263
|
|
263
264
|
/* Create a hex character reference string corresponding to code
|
264
265
|
*/
|
265
|
-
|
266
|
+
char * itex2MML_character_reference (unsigned long int code)
|
266
267
|
{
|
267
268
|
#define ENTITY_LENGTH 10
|
268
269
|
char * entity = (char *) malloc(ENTITY_LENGTH);
|
@@ -279,7 +280,7 @@
|
|
279
280
|
%}
|
280
281
|
|
281
282
|
%left TEXOVER TEXATOP
|
282
|
-
%token CHAR STARTMATH STARTDMATH ENDMATH MI MIB MN MO SUP SUB MROWOPEN MROWCLOSE LEFT RIGHT BIG BBIG BIGG BBIGG BIGL BBIGL BIGGL BBIGGL FRAC TFRAC OPERATORNAME MATHOP MATHBIN MATHREL MOP MOL MOLL MOF MOR PERIODDELIM OTHERDELIM LEFTDELIM RIGHTDELIM MOS MOB SQRT ROOT BINOM TBINOM UNDER OVER OVERBRACE UNDERLINE UNDERBRACE UNDEROVER TENSOR MULTI ARRAYALIGN COLUMNALIGN ARRAY COLSEP ROWSEP ARRAYOPTS COLLAYOUT COLALIGN ROWALIGN ALIGN EQROWS EQCOLS ROWLINES COLLINES FRAME PADDING ATTRLIST ITALICS BOLD BOXED SLASHED RM BB ST END BBLOWERCHAR BBUPPERCHAR BBDIGIT CALCHAR FRAKCHAR CAL FRAK CLAP LLAP RLAP ROWOPTS TEXTSIZE SCSIZE SCSCSIZE DISPLAY TEXTSTY TEXTBOX TEXTSTRING XMLSTRING CELLOPTS ROWSPAN COLSPAN THINSPACE MEDSPACE THICKSPACE QUAD QQUAD NEGSPACE PHANTOM HREF UNKNOWNCHAR EMPTYMROW STATLINE TOOLTIP TOGGLE FGHIGHLIGHT BGHIGHLIGHT SPACE INTONE INTTWO INTTHREE BAR WIDEBAR VEC WIDEVEC HAT WIDEHAT CHECK WIDECHECK TILDE WIDETILDE DOT DDOT DDDOT DDDDOT UNARYMINUS UNARYPLUS BEGINENV ENDENV MATRIX PMATRIX BMATRIX BBMATRIX VMATRIX VVMATRIX SVG ENDSVG SMALLMATRIX CASES ALIGNED GATHERED SUBSTACK PMOD RMCHAR COLOR BGCOLOR XARROW OPTARGOPEN OPTARGCLOSE
|
283
|
+
%token CHAR STARTMATH STARTDMATH ENDMATH MI MIB MN MO SUP SUB MROWOPEN MROWCLOSE LEFT RIGHT BIG BBIG BIGG BBIGG BIGL BBIGL BIGGL BBIGGL FRAC TFRAC OPERATORNAME MATHOP MATHBIN MATHREL MOP MOL MOLL MOF MOR PERIODDELIM OTHERDELIM LEFTDELIM RIGHTDELIM MOS MOB SQRT ROOT BINOM TBINOM UNDER OVER OVERBRACE UNDERLINE UNDERBRACE UNDEROVER TENSOR MULTI ARRAYALIGN COLUMNALIGN ARRAY COLSEP ROWSEP ARRAYOPTS COLLAYOUT COLALIGN ROWALIGN ALIGN EQROWS EQCOLS ROWLINES COLLINES FRAME PADDING ATTRLIST ITALICS SANS TT BOLD BOXED SLASHED RM BB ST END BBLOWERCHAR BBUPPERCHAR BBDIGIT CALCHAR FRAKCHAR CAL SCR FRAK CLAP LLAP RLAP ROWOPTS TEXTSIZE SCSIZE SCSCSIZE DISPLAY TEXTSTY TEXTBOX TEXTSTRING XMLSTRING CELLOPTS ROWSPAN COLSPAN THINSPACE MEDSPACE THICKSPACE QUAD QQUAD NEGSPACE NEGMEDSPACE NEGTHICKSPACE PHANTOM HREF UNKNOWNCHAR EMPTYMROW STATLINE TOOLTIP TOGGLE TOGGLESTART TOGGLEEND FGHIGHLIGHT BGHIGHLIGHT SPACE INTONE INTTWO INTTHREE BAR WIDEBAR VEC WIDEVEC WIDELVEC WIDELRVEC WIDEUVEC WIDEULVEC WIDEULRVEC HAT WIDEHAT CHECK WIDECHECK TILDE WIDETILDE DOT DDOT DDDOT DDDDOT UNARYMINUS UNARYPLUS BEGINENV ENDENV MATRIX PMATRIX BMATRIX BBMATRIX VMATRIX VVMATRIX SVG ENDSVG SMALLMATRIX CASES ALIGNED GATHERED SUBSTACK PMOD RMCHAR COLOR BGCOLOR XARROW OPTARGOPEN OPTARGCLOSE ITEXNUM RAISEBOX NEG
|
283
284
|
|
284
285
|
%%
|
285
286
|
|
@@ -298,8 +299,11 @@ expression: STARTMATH ENDMATH {/* empty math group - ignore*/}
|
|
298
299
|
| STARTDMATH ENDMATH {/* ditto */}
|
299
300
|
| STARTMATH compoundTermList ENDMATH {
|
300
301
|
char ** r = (char **) ret_str;
|
301
|
-
char *
|
302
|
-
|
302
|
+
char * p = itex2MML_copy3("<math xmlns='http://www.w3.org/1998/Math/MathML' display='inline'><semantics><mrow>", $2, "</mrow><annotation encoding='application/x-tex'>");
|
303
|
+
char * s = itex2MML_copy3(p, $3, "</annotation></semantics></math>");
|
304
|
+
itex2MML_free_string(p);
|
305
|
+
itex2MML_free_string($2);
|
306
|
+
itex2MML_free_string($3);
|
303
307
|
if (r) {
|
304
308
|
(*r) = (s == itex2MML_empty_string) ? 0 : s;
|
305
309
|
}
|
@@ -311,8 +315,11 @@ expression: STARTMATH ENDMATH {/* empty math group - ignore*/}
|
|
311
315
|
}
|
312
316
|
| STARTDMATH compoundTermList ENDMATH {
|
313
317
|
char ** r = (char **) ret_str;
|
314
|
-
char *
|
315
|
-
|
318
|
+
char * p = itex2MML_copy3("<math xmlns='http://www.w3.org/1998/Math/MathML' display='block'><semantics><mrow>", $2, "</mrow><annotation encoding='application/x-tex'>");
|
319
|
+
char * s = itex2MML_copy3(p, $3, "</annotation></semantics></math>");
|
320
|
+
itex2MML_free_string(p);
|
321
|
+
itex2MML_free_string($2);
|
322
|
+
itex2MML_free_string($3);
|
316
323
|
if (r) {
|
317
324
|
(*r) = (s == itex2MML_empty_string) ? 0 : s;
|
318
325
|
}
|
@@ -500,11 +507,11 @@ compoundTerm: mob SUB closedTerm SUP closedTerm {
|
|
500
507
|
itex2MML_free_string($3);
|
501
508
|
}
|
502
509
|
| SUB closedTerm {
|
503
|
-
$$ = itex2MML_copy3("<msub><mo
|
510
|
+
$$ = itex2MML_copy3("<msub><mo/>", $2, "</msub>");
|
504
511
|
itex2MML_free_string($2);
|
505
512
|
}
|
506
513
|
| SUP closedTerm {
|
507
|
-
$$ = itex2MML_copy3("<msup><mo
|
514
|
+
$$ = itex2MML_copy3("<msup><mo/>", $2, "</msup>");
|
508
515
|
itex2MML_free_string($2);
|
509
516
|
}
|
510
517
|
| closedTerm {
|
@@ -531,10 +538,16 @@ closedTerm: array
|
|
531
538
|
| binom
|
532
539
|
| msqrt
|
533
540
|
| mroot
|
541
|
+
| raisebox
|
534
542
|
| munder
|
535
543
|
| mover
|
536
544
|
| bar
|
537
545
|
| vec
|
546
|
+
| lvec
|
547
|
+
| lrvec
|
548
|
+
| uvec
|
549
|
+
| ulvec
|
550
|
+
| ulrvec
|
538
551
|
| hat
|
539
552
|
| dot
|
540
553
|
| ddot
|
@@ -556,6 +569,8 @@ closedTerm: array
|
|
556
569
|
| scriptsize
|
557
570
|
| scriptscriptsize
|
558
571
|
| italics
|
572
|
+
| sans
|
573
|
+
| mono
|
559
574
|
| bold
|
560
575
|
| roman
|
561
576
|
| rmchars
|
@@ -564,6 +579,7 @@ closedTerm: array
|
|
564
579
|
| slashed
|
565
580
|
| boxed
|
566
581
|
| cal
|
582
|
+
| scr
|
567
583
|
| space
|
568
584
|
| textstring
|
569
585
|
| thinspace
|
@@ -572,6 +588,8 @@ closedTerm: array
|
|
572
588
|
| quad
|
573
589
|
| qquad
|
574
590
|
| negspace
|
591
|
+
| negmedspace
|
592
|
+
| negthickspace
|
575
593
|
| phantom
|
576
594
|
| href
|
577
595
|
| statusline
|
@@ -730,11 +748,11 @@ unrecognized: UNKNOWNCHAR {
|
|
730
748
|
};
|
731
749
|
|
732
750
|
unaryminus: UNARYMINUS {
|
733
|
-
$$ = itex2MML_copy_string("<mo lspace=\"
|
751
|
+
$$ = itex2MML_copy_string("<mo lspace=\"0.11111em\" rspace=\"0em\">−</mo>");
|
734
752
|
};
|
735
753
|
|
736
754
|
unaryplus: UNARYPLUS {
|
737
|
-
$$ = itex2MML_copy_string("<mo lspace=\"
|
755
|
+
$$ = itex2MML_copy_string("<mo lspace=\"0.11111em\" rspace=\"0em\">+</mo>");
|
738
756
|
};
|
739
757
|
|
740
758
|
mi: MI;
|
@@ -745,11 +763,16 @@ mib: MIB {
|
|
745
763
|
itex2MML_free_string($1);
|
746
764
|
};
|
747
765
|
|
748
|
-
mn: MN
|
766
|
+
mn: MN
|
767
|
+
| ITEXNUM TEXTSTRING {
|
768
|
+
itex2MML_rowposn = 2;
|
769
|
+
$$ = itex2MML_copy_string($2);
|
770
|
+
itex2MML_free_string($2);
|
771
|
+
};
|
749
772
|
|
750
773
|
mob: MOB {
|
751
774
|
itex2MML_rowposn = 2;
|
752
|
-
$$ = itex2MML_copy3("<mo lspace=\"
|
775
|
+
$$ = itex2MML_copy3("<mo lspace=\"0.16667em\" rspace=\"0.16667em\">", $1, "</mo>");
|
753
776
|
itex2MML_free_string($1);
|
754
777
|
};
|
755
778
|
|
@@ -793,44 +816,44 @@ mo: mob
|
|
793
816
|
}
|
794
817
|
| MOS {
|
795
818
|
itex2MML_rowposn=2;
|
796
|
-
$$ = itex2MML_copy3("<mo lspace=\"
|
819
|
+
$$ = itex2MML_copy3("<mo lspace=\"0.22222em\" rspace=\"0.22222em\">", $1, "</mo>");
|
797
820
|
itex2MML_free_string($1);
|
798
821
|
}
|
799
822
|
| MOP {
|
800
823
|
itex2MML_rowposn = 2;
|
801
|
-
$$ = itex2MML_copy3("<mo lspace=\"0em\" rspace=\"
|
824
|
+
$$ = itex2MML_copy3("<mo lspace=\"0em\" rspace=\"0.16667em\">", $1, "</mo>");
|
802
825
|
itex2MML_free_string($1);
|
803
826
|
}
|
804
827
|
| MOR {
|
805
828
|
itex2MML_rowposn = 2;
|
806
|
-
$$ = itex2MML_copy3("<mo lspace=\"
|
829
|
+
$$ = itex2MML_copy3("<mo lspace=\"0.11111em\">", $1, "</mo>");
|
807
830
|
itex2MML_free_string($1);
|
808
831
|
}
|
809
832
|
| OPERATORNAME TEXTSTRING {
|
810
833
|
itex2MML_rowposn = 2;
|
811
|
-
$$ = itex2MML_copy3("<mo lspace=\"0em\" rspace=\"
|
834
|
+
$$ = itex2MML_copy3("<mo lspace=\"0em\" rspace=\"0.16667em\">", $2, "</mo>");
|
812
835
|
itex2MML_free_string($2);
|
813
836
|
}
|
814
837
|
| MATHOP TEXTSTRING {
|
815
838
|
itex2MML_rowposn = 2;
|
816
|
-
$$ = itex2MML_copy3("<mo lspace=\"
|
839
|
+
$$ = itex2MML_copy3("<mo lspace=\"0.16667em\" rspace=\"0.16667em\">", $2, "</mo>");
|
817
840
|
itex2MML_free_string($2);
|
818
841
|
}
|
819
842
|
| MATHBIN TEXTSTRING {
|
820
843
|
itex2MML_rowposn = 2;
|
821
|
-
$$ = itex2MML_copy3("<mo lspace=\"
|
844
|
+
$$ = itex2MML_copy3("<mo lspace=\"0.22222em\" rspace=\"0.22222em\">", $2, "</mo>");
|
822
845
|
itex2MML_free_string($2);
|
823
846
|
}
|
824
847
|
| MATHREL TEXTSTRING {
|
825
848
|
itex2MML_rowposn = 2;
|
826
|
-
$$ = itex2MML_copy3("<mo lspace=\"
|
849
|
+
$$ = itex2MML_copy3("<mo lspace=\"0.27778em\" rspace=\"0.27778em\">", $2, "</mo>");
|
827
850
|
itex2MML_free_string($2);
|
828
851
|
};
|
829
852
|
|
830
853
|
space: SPACE ST INTONE END ST INTTWO END ST INTTHREE END {
|
831
854
|
char * s1 = itex2MML_copy3("<mspace height=\"", $3, "ex\" depth=\"");
|
832
855
|
char * s2 = itex2MML_copy3($6, "ex\" width=\"", $9);
|
833
|
-
$$ = itex2MML_copy3(s1, s2, "em\"
|
856
|
+
$$ = itex2MML_copy3(s1, s2, "em\"/>");
|
834
857
|
itex2MML_free_string(s1);
|
835
858
|
itex2MML_free_string(s2);
|
836
859
|
itex2MML_free_string($3);
|
@@ -860,6 +883,10 @@ toggle: TOGGLE closedTerm closedTerm {
|
|
860
883
|
itex2MML_free_string(s1);
|
861
884
|
itex2MML_free_string($2);
|
862
885
|
itex2MML_free_string($3);
|
886
|
+
}
|
887
|
+
| TOGGLESTART compoundTermList TOGGLEEND {
|
888
|
+
$$ = itex2MML_copy3("<maction actiontype=\"toggle\">", $2, "</maction>");
|
889
|
+
itex2MML_free_string($2);
|
863
890
|
};
|
864
891
|
|
865
892
|
fghighlight: FGHIGHLIGHT ATTRLIST closedTerm {
|
@@ -894,17 +921,17 @@ color: COLOR ATTRLIST compoundTermList {
|
|
894
921
|
};
|
895
922
|
|
896
923
|
mathrlap: RLAP closedTerm {
|
897
|
-
$$ = itex2MML_copy3("<mpadded width=\"
|
924
|
+
$$ = itex2MML_copy3("<mpadded width=\"0px\">", $2, "</mpadded>");
|
898
925
|
itex2MML_free_string($2);
|
899
926
|
};
|
900
927
|
|
901
928
|
mathllap: LLAP closedTerm {
|
902
|
-
$$ = itex2MML_copy3("<mpadded width=\"
|
929
|
+
$$ = itex2MML_copy3("<mpadded width=\"0px\" lspace=\"-100%width\">", $2, "</mpadded>");
|
903
930
|
itex2MML_free_string($2);
|
904
931
|
};
|
905
932
|
|
906
933
|
mathclap: CLAP closedTerm {
|
907
|
-
$$ = itex2MML_copy3("<mpadded width=\"
|
934
|
+
$$ = itex2MML_copy3("<mpadded width=\"0px\" lspace=\"-50%width\">", $2, "</mpadded>");
|
908
935
|
itex2MML_free_string($2);
|
909
936
|
};
|
910
937
|
|
@@ -913,27 +940,27 @@ textstring: TEXTBOX TEXTSTRING {
|
|
913
940
|
itex2MML_free_string($2);
|
914
941
|
};
|
915
942
|
|
916
|
-
displaystyle: DISPLAY
|
943
|
+
displaystyle: DISPLAY compoundTermList {
|
917
944
|
$$ = itex2MML_copy3("<mstyle displaystyle=\"true\">", $2, "</mstyle>");
|
918
945
|
itex2MML_free_string($2);
|
919
946
|
};
|
920
947
|
|
921
|
-
textstyle: TEXTSTY
|
948
|
+
textstyle: TEXTSTY compoundTermList {
|
922
949
|
$$ = itex2MML_copy3("<mstyle displaystyle=\"false\">", $2, "</mstyle>");
|
923
950
|
itex2MML_free_string($2);
|
924
951
|
};
|
925
952
|
|
926
|
-
textsize: TEXTSIZE
|
953
|
+
textsize: TEXTSIZE compoundTermList {
|
927
954
|
$$ = itex2MML_copy3("<mstyle scriptlevel=\"0\">", $2, "</mstyle>");
|
928
955
|
itex2MML_free_string($2);
|
929
956
|
};
|
930
957
|
|
931
|
-
scriptsize: SCSIZE
|
958
|
+
scriptsize: SCSIZE compoundTermList {
|
932
959
|
$$ = itex2MML_copy3("<mstyle scriptlevel=\"1\">", $2, "</mstyle>");
|
933
960
|
itex2MML_free_string($2);
|
934
961
|
};
|
935
962
|
|
936
|
-
scriptscriptsize: SCSCSIZE
|
963
|
+
scriptscriptsize: SCSCSIZE compoundTermList {
|
937
964
|
$$ = itex2MML_copy3("<mstyle scriptlevel=\"2\">", $2, "</mstyle>");
|
938
965
|
itex2MML_free_string($2);
|
939
966
|
};
|
@@ -943,6 +970,16 @@ italics: ITALICS closedTerm {
|
|
943
970
|
itex2MML_free_string($2);
|
944
971
|
};
|
945
972
|
|
973
|
+
sans: SANS closedTerm {
|
974
|
+
$$ = itex2MML_copy3("<mstyle mathvariant=\"sans-serif\">", $2, "</mstyle>");
|
975
|
+
itex2MML_free_string($2);
|
976
|
+
};
|
977
|
+
|
978
|
+
mono: TT closedTerm {
|
979
|
+
$$ = itex2MML_copy3("<mstyle mathvariant=\"monospace\">", $2, "</mstyle>");
|
980
|
+
itex2MML_free_string($2);
|
981
|
+
};
|
982
|
+
|
946
983
|
slashed: SLASHED closedTerm {
|
947
984
|
$$ = itex2MML_copy3("<menclose notation=\"updiagonalstrike\">", $2, "</menclose>");
|
948
985
|
itex2MML_free_string($2);
|
@@ -1029,6 +1066,11 @@ cal: CAL ST calletters END {
|
|
1029
1066
|
itex2MML_free_string($3);
|
1030
1067
|
};
|
1031
1068
|
|
1069
|
+
scr: SCR ST calletters END {
|
1070
|
+
$$ = itex2MML_copy3("<mi class='mathscript'>", $3, "</mi>");
|
1071
|
+
itex2MML_free_string($3);
|
1072
|
+
};
|
1073
|
+
|
1032
1074
|
calletters: calletter {
|
1033
1075
|
$$ = itex2MML_copy_string($1);
|
1034
1076
|
itex2MML_free_string($1);
|
@@ -1045,27 +1087,35 @@ calletter: CALCHAR {
|
|
1045
1087
|
};
|
1046
1088
|
|
1047
1089
|
thinspace: THINSPACE {
|
1048
|
-
$$ = itex2MML_copy_string("<mspace width=\"
|
1090
|
+
$$ = itex2MML_copy_string("<mspace width=\"0.16667em\"/>");
|
1049
1091
|
};
|
1050
1092
|
|
1051
1093
|
medspace: MEDSPACE {
|
1052
|
-
$$ = itex2MML_copy_string("<mspace width=\"
|
1094
|
+
$$ = itex2MML_copy_string("<mspace width=\"0.22222em\"/>");
|
1053
1095
|
};
|
1054
1096
|
|
1055
1097
|
thickspace: THICKSPACE {
|
1056
|
-
$$ = itex2MML_copy_string("<mspace width=\"
|
1098
|
+
$$ = itex2MML_copy_string("<mspace width=\"0.27778em\"/>");
|
1057
1099
|
};
|
1058
1100
|
|
1059
1101
|
quad: QUAD {
|
1060
|
-
$$ = itex2MML_copy_string("<mspace width=\"1em\"
|
1102
|
+
$$ = itex2MML_copy_string("<mspace width=\"1em\"/>");
|
1061
1103
|
};
|
1062
1104
|
|
1063
1105
|
qquad: QQUAD {
|
1064
|
-
$$ = itex2MML_copy_string("<mspace width=\"2em\"
|
1106
|
+
$$ = itex2MML_copy_string("<mspace width=\"2em\"/>");
|
1065
1107
|
};
|
1066
1108
|
|
1067
1109
|
negspace: NEGSPACE {
|
1068
|
-
$$ = itex2MML_copy_string("<mspace width=\"-0.
|
1110
|
+
$$ = itex2MML_copy_string("<mspace width=\"-0.16667em\"/>");
|
1111
|
+
};
|
1112
|
+
|
1113
|
+
negmedspace: NEGMEDSPACE {
|
1114
|
+
$$ = itex2MML_copy_string("<mspace width=\"-0.22222em\"/>");
|
1115
|
+
};
|
1116
|
+
|
1117
|
+
negthickspace: NEGTHICKSPACE {
|
1118
|
+
$$ = itex2MML_copy_string("<mspace width=\"-0.27778em\"/>");
|
1069
1119
|
};
|
1070
1120
|
|
1071
1121
|
phantom: PHANTOM closedTerm {
|
@@ -1074,9 +1124,11 @@ phantom: PHANTOM closedTerm {
|
|
1074
1124
|
};
|
1075
1125
|
|
1076
1126
|
href: HREF TEXTSTRING closedTerm {
|
1077
|
-
char * s1 = itex2MML_copy3("<mrow xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:type=\"simple\" xlink:href=\""
|
1078
|
-
|
1127
|
+
char * s1 = itex2MML_copy3("<mrow href=\"", $2, "\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:type=\"simple\" xlink:href=\"");
|
1128
|
+
char * s2 = itex2MML_copy3(s1, $2, "\">");
|
1129
|
+
$$ = itex2MML_copy3(s2, $3, "</mrow>");
|
1079
1130
|
itex2MML_free_string(s1);
|
1131
|
+
itex2MML_free_string(s2);
|
1080
1132
|
itex2MML_free_string($2);
|
1081
1133
|
itex2MML_free_string($3);
|
1082
1134
|
};
|
@@ -1098,7 +1150,7 @@ tensor: TENSOR closedTerm MROWOPEN subsupList MROWCLOSE {
|
|
1098
1150
|
|
1099
1151
|
multi: MULTI MROWOPEN subsupList MROWCLOSE closedTerm MROWOPEN subsupList MROWCLOSE {
|
1100
1152
|
char * s1 = itex2MML_copy3("<mmultiscripts>", $5, $7);
|
1101
|
-
char * s2 = itex2MML_copy3("<mprescripts
|
1153
|
+
char * s2 = itex2MML_copy3("<mprescripts/>", $3, "</mmultiscripts>");
|
1102
1154
|
$$ = itex2MML_copy2(s1, s2);
|
1103
1155
|
itex2MML_free_string(s1);
|
1104
1156
|
itex2MML_free_string(s2);
|
@@ -1108,7 +1160,7 @@ multi: MULTI MROWOPEN subsupList MROWCLOSE closedTerm MROWOPEN subsupList MROWCL
|
|
1108
1160
|
}
|
1109
1161
|
| MULTI MROWOPEN subsupList MROWCLOSE closedTerm EMPTYMROW {
|
1110
1162
|
char * s1 = itex2MML_copy2("<mmultiscripts>", $5);
|
1111
|
-
char * s2 = itex2MML_copy3("<mprescripts
|
1163
|
+
char * s2 = itex2MML_copy3("<mprescripts/>", $3, "</mmultiscripts>");
|
1112
1164
|
$$ = itex2MML_copy2(s1, s2);
|
1113
1165
|
itex2MML_free_string(s1);
|
1114
1166
|
itex2MML_free_string(s2);
|
@@ -1139,15 +1191,15 @@ subsupTerm: SUB closedTerm SUP closedTerm {
|
|
1139
1191
|
itex2MML_free_string($4);
|
1140
1192
|
}
|
1141
1193
|
| SUB closedTerm {
|
1142
|
-
$$ = itex2MML_copy2($2, " <none
|
1194
|
+
$$ = itex2MML_copy2($2, " <none/>");
|
1143
1195
|
itex2MML_free_string($2);
|
1144
1196
|
}
|
1145
1197
|
| SUP closedTerm {
|
1146
|
-
$$ = itex2MML_copy2("<none
|
1198
|
+
$$ = itex2MML_copy2("<none/> ", $2);
|
1147
1199
|
itex2MML_free_string($2);
|
1148
1200
|
}
|
1149
1201
|
| SUB SUP closedTerm {
|
1150
|
-
$$ = itex2MML_copy2("<none
|
1202
|
+
$$ = itex2MML_copy2("<none/> ", $3);
|
1151
1203
|
itex2MML_free_string($3);
|
1152
1204
|
};
|
1153
1205
|
|
@@ -1167,7 +1219,7 @@ mfrac: FRAC closedTerm closedTerm {
|
|
1167
1219
|
};
|
1168
1220
|
|
1169
1221
|
pmod: PMOD closedTerm {
|
1170
|
-
$$ = itex2MML_copy3( "<mo lspace=\"
|
1222
|
+
$$ = itex2MML_copy3( "<mrow><mo lspace=\"0.22222em\">(</mo><mo rspace=\"0.16667em\">mod</mo>", $2, "<mo rspace=\"0.22222em\">)</mo></mrow>");
|
1171
1223
|
itex2MML_free_string($2);
|
1172
1224
|
}
|
1173
1225
|
|
@@ -1193,14 +1245,14 @@ texover: MROWOPEN compoundTermList TEXOVER compoundTermList MROWCLOSE {
|
|
1193
1245
|
};
|
1194
1246
|
|
1195
1247
|
texatop: MROWOPEN compoundTermList TEXATOP compoundTermList MROWCLOSE {
|
1196
|
-
char * s1 = itex2MML_copy3("<mfrac linethickness=\"
|
1248
|
+
char * s1 = itex2MML_copy3("<mfrac linethickness=\"0px\"><mrow>", $2, "</mrow><mrow>");
|
1197
1249
|
$$ = itex2MML_copy3(s1, $4, "</mrow></mfrac>");
|
1198
1250
|
itex2MML_free_string(s1);
|
1199
1251
|
itex2MML_free_string($2);
|
1200
1252
|
itex2MML_free_string($4);
|
1201
1253
|
}
|
1202
1254
|
| left compoundTermList TEXATOP compoundTermList right {
|
1203
|
-
char * s1 = itex2MML_copy3("<mrow>", $1, "<mfrac linethickness=\"
|
1255
|
+
char * s1 = itex2MML_copy3("<mrow>", $1, "<mfrac linethickness=\"0px\"><mrow>");
|
1204
1256
|
char * s2 = itex2MML_copy3($2, "</mrow><mrow>", $4);
|
1205
1257
|
char * s3 = itex2MML_copy3("</mrow></mfrac>", $5, "</mrow>");
|
1206
1258
|
$$ = itex2MML_copy3(s1, s2, s3);
|
@@ -1214,14 +1266,14 @@ texatop: MROWOPEN compoundTermList TEXATOP compoundTermList MROWCLOSE {
|
|
1214
1266
|
};
|
1215
1267
|
|
1216
1268
|
binom: BINOM closedTerm closedTerm {
|
1217
|
-
char * s1 = itex2MML_copy3("<mrow><mo>(</mo><mfrac linethickness=\"
|
1269
|
+
char * s1 = itex2MML_copy3("<mrow><mo>(</mo><mfrac linethickness=\"0px\">", $2, $3);
|
1218
1270
|
$$ = itex2MML_copy2(s1, "</mfrac><mo>)</mo></mrow>");
|
1219
1271
|
itex2MML_free_string(s1);
|
1220
1272
|
itex2MML_free_string($2);
|
1221
1273
|
itex2MML_free_string($3);
|
1222
1274
|
}
|
1223
1275
|
| TBINOM closedTerm closedTerm {
|
1224
|
-
char * s1 = itex2MML_copy3("<mrow><mo>(</mo><mstyle displaystyle=\"false\"><mfrac linethickness=\"
|
1276
|
+
char * s1 = itex2MML_copy3("<mrow><mo>(</mo><mstyle displaystyle=\"false\"><mfrac linethickness=\"0px\">", $2, $3);
|
1225
1277
|
$$ = itex2MML_copy2(s1, "</mfrac></mstyle><mo>)</mo></mrow>");
|
1226
1278
|
itex2MML_free_string(s1);
|
1227
1279
|
itex2MML_free_string($2);
|
@@ -1253,11 +1305,32 @@ bar: BAR closedTerm {
|
|
1253
1305
|
};
|
1254
1306
|
|
1255
1307
|
vec: VEC closedTerm {
|
1256
|
-
$$ = itex2MML_copy3("<mover>", $2, "<mo stretchy=\"false\">&
|
1308
|
+
$$ = itex2MML_copy3("<mover>", $2, "<mo stretchy=\"false\">→</mo></mover>");
|
1257
1309
|
itex2MML_free_string($2);
|
1258
1310
|
}
|
1259
1311
|
| WIDEVEC closedTerm {
|
1260
|
-
$$ = itex2MML_copy3("<mover>", $2, "<mo>&
|
1312
|
+
$$ = itex2MML_copy3("<mover>", $2, "<mo>→</mo></mover>");
|
1313
|
+
itex2MML_free_string($2);
|
1314
|
+
};
|
1315
|
+
|
1316
|
+
lvec: WIDELVEC closedTerm {
|
1317
|
+
$$ = itex2MML_copy3("<mover>", $2, "<mo>←</mo></mover>");
|
1318
|
+
itex2MML_free_string($2);
|
1319
|
+
};
|
1320
|
+
lrvec: WIDELRVEC closedTerm {
|
1321
|
+
$$ = itex2MML_copy3("<mover>", $2, "<mo>↔</mo></mover>");
|
1322
|
+
itex2MML_free_string($2);
|
1323
|
+
};
|
1324
|
+
uvec: WIDEUVEC closedTerm {
|
1325
|
+
$$ = itex2MML_copy3("<munder>", $2, "<mo>→</mo></munder>");
|
1326
|
+
itex2MML_free_string($2);
|
1327
|
+
};
|
1328
|
+
ulvec: WIDEULVEC closedTerm {
|
1329
|
+
$$ = itex2MML_copy3("<munder>", $2, "<mo>←</mo></munder>");
|
1330
|
+
itex2MML_free_string($2);
|
1331
|
+
};
|
1332
|
+
ulrvec: WIDEULRVEC closedTerm {
|
1333
|
+
$$ = itex2MML_copy3("<munder>", $2, "<mo>↔</mo></munder>");
|
1261
1334
|
itex2MML_free_string($2);
|
1262
1335
|
};
|
1263
1336
|
|
@@ -1328,6 +1401,73 @@ mroot: SQRT OPTARGOPEN compoundTermList OPTARGCLOSE closedTerm {
|
|
1328
1401
|
itex2MML_free_string($3);
|
1329
1402
|
};
|
1330
1403
|
|
1404
|
+
raisebox: RAISEBOX TEXTSTRING TEXTSTRING TEXTSTRING closedTerm {
|
1405
|
+
char * s1 = itex2MML_copy3("<mpadded voffset='", $2, "' height='");
|
1406
|
+
char * s2 = itex2MML_copy3(s1, $3, "' depth='");
|
1407
|
+
char * s3 = itex2MML_copy3(s2, $4, "'>");
|
1408
|
+
$$ = itex2MML_copy3(s3, $5, "</mpadded>");
|
1409
|
+
itex2MML_free_string(s1);
|
1410
|
+
itex2MML_free_string(s2);
|
1411
|
+
itex2MML_free_string(s3);
|
1412
|
+
itex2MML_free_string($2);
|
1413
|
+
itex2MML_free_string($3);
|
1414
|
+
itex2MML_free_string($4);
|
1415
|
+
itex2MML_free_string($5);
|
1416
|
+
}
|
1417
|
+
| RAISEBOX NEG TEXTSTRING TEXTSTRING TEXTSTRING closedTerm {
|
1418
|
+
char * s1 = itex2MML_copy3("<mpadded voffset='-", $3, "' height='");
|
1419
|
+
char * s2 = itex2MML_copy3(s1, $4, "' depth='");
|
1420
|
+
char * s3 = itex2MML_copy3(s2, $5, "'>");
|
1421
|
+
$$ = itex2MML_copy3(s3, $6, "</mpadded>");
|
1422
|
+
itex2MML_free_string(s1);
|
1423
|
+
itex2MML_free_string(s2);
|
1424
|
+
itex2MML_free_string(s3);
|
1425
|
+
itex2MML_free_string($3);
|
1426
|
+
itex2MML_free_string($4);
|
1427
|
+
itex2MML_free_string($5);
|
1428
|
+
itex2MML_free_string($6);
|
1429
|
+
}
|
1430
|
+
| RAISEBOX TEXTSTRING TEXTSTRING closedTerm {
|
1431
|
+
char * s1 = itex2MML_copy3("<mpadded voffset='", $2, "' height='");
|
1432
|
+
char * s2 = itex2MML_copy3(s1, $3, "' depth='depth'>");
|
1433
|
+
$$ = itex2MML_copy3(s2, $4, "</mpadded>");
|
1434
|
+
itex2MML_free_string(s1);
|
1435
|
+
itex2MML_free_string(s2);
|
1436
|
+
itex2MML_free_string($2);
|
1437
|
+
itex2MML_free_string($3);
|
1438
|
+
itex2MML_free_string($4);
|
1439
|
+
}
|
1440
|
+
| RAISEBOX NEG TEXTSTRING TEXTSTRING closedTerm {
|
1441
|
+
char * s1 = itex2MML_copy3("<mpadded voffset='-", $3, "' height='");
|
1442
|
+
char * s2 = itex2MML_copy3(s1, $4, "' depth='+");
|
1443
|
+
char * s3 = itex2MML_copy3(s2, $3, "'>");
|
1444
|
+
$$ = itex2MML_copy3(s3, $5, "</mpadded>");
|
1445
|
+
itex2MML_free_string(s1);
|
1446
|
+
itex2MML_free_string(s2);
|
1447
|
+
itex2MML_free_string(s3);
|
1448
|
+
itex2MML_free_string($3);
|
1449
|
+
itex2MML_free_string($4);
|
1450
|
+
itex2MML_free_string($5);
|
1451
|
+
}
|
1452
|
+
| RAISEBOX TEXTSTRING closedTerm {
|
1453
|
+
char * s1 = itex2MML_copy3("<mpadded voffset='", $2, "' height='+");
|
1454
|
+
char * s2 = itex2MML_copy3(s1, $2, "' depth='depth'>");
|
1455
|
+
$$ = itex2MML_copy3(s2, $3, "</mpadded>");
|
1456
|
+
itex2MML_free_string(s1);
|
1457
|
+
itex2MML_free_string(s2);
|
1458
|
+
itex2MML_free_string($2);
|
1459
|
+
itex2MML_free_string($3);
|
1460
|
+
}
|
1461
|
+
| RAISEBOX NEG TEXTSTRING closedTerm {
|
1462
|
+
char * s1 = itex2MML_copy3("<mpadded voffset='-", $3, "' height='0pt' depth='+");
|
1463
|
+
char * s2 = itex2MML_copy3(s1, $3, "'>");
|
1464
|
+
$$ = itex2MML_copy3(s2, $4, "</mpadded>");
|
1465
|
+
itex2MML_free_string(s1);
|
1466
|
+
itex2MML_free_string(s2);
|
1467
|
+
itex2MML_free_string($3);
|
1468
|
+
itex2MML_free_string($4);
|
1469
|
+
};
|
1470
|
+
|
1331
1471
|
munder: XARROW OPTARGOPEN compoundTermList OPTARGCLOSE EMPTYMROW {
|
1332
1472
|
char * s1 = itex2MML_copy3("<munder><mo>", $1, "</mo><mrow>");
|
1333
1473
|
$$ = itex2MML_copy3(s1, $3, "</mrow></munder>");
|
@@ -1378,51 +1518,51 @@ munderover: XARROW OPTARGOPEN compoundTermList OPTARGCLOSE closedTerm {
|
|
1378
1518
|
};
|
1379
1519
|
|
1380
1520
|
emptymrow: EMPTYMROW {
|
1381
|
-
$$ = itex2MML_copy_string("<mrow
|
1521
|
+
$$ = itex2MML_copy_string("<mrow/>");
|
1382
1522
|
};
|
1383
1523
|
|
1384
1524
|
mathenv: BEGINENV MATRIX tableRowList ENDENV MATRIX {
|
1385
|
-
$$ = itex2MML_copy3("<mrow><mtable rowspacing=\"0.5ex\">", $3, "</mtable></mrow>");
|
1525
|
+
$$ = itex2MML_copy3("<mrow><mtable displaystyle=\"false\" rowspacing=\"0.5ex\">", $3, "</mtable></mrow>");
|
1386
1526
|
itex2MML_free_string($3);
|
1387
1527
|
}
|
1388
1528
|
| BEGINENV GATHERED tableRowList ENDENV GATHERED {
|
1389
|
-
$$ = itex2MML_copy3("<mrow><mtable rowspacing=\"1.0ex\">", $3, "</mtable></mrow>");
|
1529
|
+
$$ = itex2MML_copy3("<mrow><mtable displaystyle=\"true\" rowspacing=\"1.0ex\">", $3, "</mtable></mrow>");
|
1390
1530
|
itex2MML_free_string($3);
|
1391
1531
|
}
|
1392
1532
|
| BEGINENV PMATRIX tableRowList ENDENV PMATRIX {
|
1393
|
-
$$ = itex2MML_copy3("<mrow><mo>(</mo><mrow><mtable rowspacing=\"0.5ex\">", $3, "</mtable></mrow><mo>)</mo></mrow>");
|
1533
|
+
$$ = itex2MML_copy3("<mrow><mo>(</mo><mrow><mtable displaystyle=\"false\" rowspacing=\"0.5ex\">", $3, "</mtable></mrow><mo>)</mo></mrow>");
|
1394
1534
|
itex2MML_free_string($3);
|
1395
1535
|
}
|
1396
1536
|
| BEGINENV BMATRIX tableRowList ENDENV BMATRIX {
|
1397
|
-
$$ = itex2MML_copy3("<mrow><mo>[</mo><mrow><mtable rowspacing=\"0.5ex\">", $3, "</mtable></mrow><mo>]</mo></mrow>");
|
1537
|
+
$$ = itex2MML_copy3("<mrow><mo>[</mo><mrow><mtable displaystyle=\"false\" rowspacing=\"0.5ex\">", $3, "</mtable></mrow><mo>]</mo></mrow>");
|
1398
1538
|
itex2MML_free_string($3);
|
1399
1539
|
}
|
1400
1540
|
| BEGINENV VMATRIX tableRowList ENDENV VMATRIX {
|
1401
|
-
$$ = itex2MML_copy3("<mrow><mo>∣</mo><mrow><mtable rowspacing=\"0.5ex\">", $3, "</mtable></mrow><mo>∣</mo></mrow>");
|
1541
|
+
$$ = itex2MML_copy3("<mrow><mo>∣</mo><mrow><mtable displaystyle=\"false\" rowspacing=\"0.5ex\">", $3, "</mtable></mrow><mo>∣</mo></mrow>");
|
1402
1542
|
itex2MML_free_string($3);
|
1403
1543
|
}
|
1404
1544
|
| BEGINENV BBMATRIX tableRowList ENDENV BBMATRIX {
|
1405
|
-
$$ = itex2MML_copy3("<mrow><mo>{</mo><mrow><mtable rowspacing=\"0.5ex\">", $3, "</mtable></mrow><mo>}</mo></mrow>");
|
1545
|
+
$$ = itex2MML_copy3("<mrow><mo>{</mo><mrow><mtable displaystyle=\"false\" rowspacing=\"0.5ex\">", $3, "</mtable></mrow><mo>}</mo></mrow>");
|
1406
1546
|
itex2MML_free_string($3);
|
1407
1547
|
}
|
1408
1548
|
| BEGINENV VVMATRIX tableRowList ENDENV VVMATRIX {
|
1409
|
-
$$ = itex2MML_copy3("<mrow><mo>∥</mo><mrow><mtable rowspacing=\"0.5ex\">", $3, "</mtable></mrow><mo>∥</mo></mrow>");
|
1549
|
+
$$ = itex2MML_copy3("<mrow><mo>∥</mo><mrow><mtable displaystyle=\"false\" rowspacing=\"0.5ex\">", $3, "</mtable></mrow><mo>∥</mo></mrow>");
|
1410
1550
|
itex2MML_free_string($3);
|
1411
1551
|
}
|
1412
1552
|
| BEGINENV SMALLMATRIX tableRowList ENDENV SMALLMATRIX {
|
1413
|
-
$$ = itex2MML_copy3("<mstyle scriptlevel=\"2\"><mrow><mtable rowspacing=\"0.5ex\">", $3, "</mtable></mrow></mstyle>");
|
1553
|
+
$$ = itex2MML_copy3("<mstyle scriptlevel=\"2\"><mrow><mtable displaystyle=\"false\" rowspacing=\"0.5ex\">", $3, "</mtable></mrow></mstyle>");
|
1414
1554
|
itex2MML_free_string($3);
|
1415
1555
|
}
|
1416
1556
|
| BEGINENV CASES tableRowList ENDENV CASES {
|
1417
|
-
$$ = itex2MML_copy3("<mrow><mo>{</mo><mrow><mtable columnalign=\"left left\">", $3, "</mtable></mrow></mrow>");
|
1557
|
+
$$ = itex2MML_copy3("<mrow><mo>{</mo><mrow><mtable displaystyle=\"false\" columnalign=\"left left\">", $3, "</mtable></mrow></mrow>");
|
1418
1558
|
itex2MML_free_string($3);
|
1419
1559
|
}
|
1420
1560
|
| BEGINENV ALIGNED tableRowList ENDENV ALIGNED {
|
1421
|
-
$$ = itex2MML_copy3("<mrow><mtable columnalign=\"right left right left right left right left right left\" columnspacing=\"0em\">", $3, "</mtable></mrow>");
|
1561
|
+
$$ = itex2MML_copy3("<mrow><mtable displaystyle=\"true\" columnalign=\"right left right left right left right left right left\" columnspacing=\"0em\">", $3, "</mtable></mrow>");
|
1422
1562
|
itex2MML_free_string($3);
|
1423
1563
|
}
|
1424
1564
|
| BEGINENV ARRAY ARRAYALIGN ST columnAlignList END tableRowList ENDENV ARRAY {
|
1425
|
-
char * s1 = itex2MML_copy3("<mtable rowspacing=\"0.5ex\" align=\"", $3, "\" columnalign=\"");
|
1565
|
+
char * s1 = itex2MML_copy3("<mtable displaystyle=\"false\" rowspacing=\"0.5ex\" align=\"", $3, "\" columnalign=\"");
|
1426
1566
|
char * s2 = itex2MML_copy3(s1, $5, "\">");
|
1427
1567
|
$$ = itex2MML_copy3(s2, $7, "</mtable>");
|
1428
1568
|
itex2MML_free_string(s1);
|
@@ -1432,7 +1572,7 @@ mathenv: BEGINENV MATRIX tableRowList ENDENV MATRIX {
|
|
1432
1572
|
itex2MML_free_string($7);
|
1433
1573
|
}
|
1434
1574
|
| BEGINENV ARRAY ST columnAlignList END tableRowList ENDENV ARRAY {
|
1435
|
-
char * s1 = itex2MML_copy3("<mtable rowspacing=\"0.5ex\" columnalign=\"", $4, "\">");
|
1575
|
+
char * s1 = itex2MML_copy3("<mtable displaystyle=\"false\" rowspacing=\"0.5ex\" columnalign=\"", $4, "\">");
|
1436
1576
|
$$ = itex2MML_copy3(s1, $6, "</mtable>");
|
1437
1577
|
itex2MML_free_string(s1);
|
1438
1578
|
itex2MML_free_string($4);
|
@@ -1633,7 +1773,7 @@ arowopt: colalign {
|
|
1633
1773
|
};
|
1634
1774
|
|
1635
1775
|
tableCell: {
|
1636
|
-
$$ = itex2MML_copy_string("<mtd
|
1776
|
+
$$ = itex2MML_copy_string("<mtd/>");
|
1637
1777
|
}
|
1638
1778
|
| compoundTermList {
|
1639
1779
|
$$ = itex2MML_copy3("<mtd>", $1, "</mtd>");
|
@@ -1686,7 +1826,7 @@ colspan: COLSPAN ATTRLIST {
|
|
1686
1826
|
|
1687
1827
|
%%
|
1688
1828
|
|
1689
|
-
char * itex2MML_parse (const char * buffer,
|
1829
|
+
char * itex2MML_parse (const char * buffer, size_t length)
|
1690
1830
|
{
|
1691
1831
|
char * mathml = 0;
|
1692
1832
|
|
@@ -1705,7 +1845,7 @@ char * itex2MML_parse (const char * buffer, unsigned long length)
|
|
1705
1845
|
return mathml;
|
1706
1846
|
}
|
1707
1847
|
|
1708
|
-
int itex2MML_filter (const char * buffer,
|
1848
|
+
int itex2MML_filter (const char * buffer, size_t length)
|
1709
1849
|
{
|
1710
1850
|
itex2MML_setup (buffer, length);
|
1711
1851
|
itex2MML_restart ();
|
@@ -1716,6 +1856,7 @@ int itex2MML_filter (const char * buffer, unsigned long length)
|
|
1716
1856
|
#define ITEX_DELIMITER_DOLLAR 0
|
1717
1857
|
#define ITEX_DELIMITER_DOUBLE 1
|
1718
1858
|
#define ITEX_DELIMITER_SQUARE 2
|
1859
|
+
#define ITEX_DELIMITER_PAREN 3
|
1719
1860
|
|
1720
1861
|
static char * itex2MML_last_error = 0;
|
1721
1862
|
|
@@ -1729,7 +1870,17 @@ static void itex2MML_keep_error (const char * msg)
|
|
1729
1870
|
itex2MML_last_error = itex2MML_copy_escaped (msg);
|
1730
1871
|
}
|
1731
1872
|
|
1732
|
-
|
1873
|
+
int itex2MML_html_filter (const char * buffer, size_t length)
|
1874
|
+
{
|
1875
|
+
return itex2MML_do_html_filter (buffer, length, 0);
|
1876
|
+
}
|
1877
|
+
|
1878
|
+
int itex2MML_strict_html_filter (const char * buffer, size_t length)
|
1879
|
+
{
|
1880
|
+
return itex2MML_do_html_filter (buffer, length, 1);
|
1881
|
+
}
|
1882
|
+
|
1883
|
+
int itex2MML_do_html_filter (const char * buffer, size_t length, const int forbid_markup)
|
1733
1884
|
{
|
1734
1885
|
int result = 0;
|
1735
1886
|
|
@@ -1756,7 +1907,7 @@ static int itex2MML_do_html_filter (const char * buffer, unsigned long length, c
|
|
1756
1907
|
if (*ptr2 == '$') break;
|
1757
1908
|
if ((*ptr2 == '\\') && (ptr2 + 1 < end))
|
1758
1909
|
{
|
1759
|
-
if (*(ptr2+1) == '[') break;
|
1910
|
+
if (*(ptr2+1) == '[' || *(ptr2+1) == '(') break;
|
1760
1911
|
}
|
1761
1912
|
++ptr2;
|
1762
1913
|
}
|
@@ -1774,6 +1925,11 @@ static int itex2MML_do_html_filter (const char * buffer, unsigned long length, c
|
|
1774
1925
|
type = ITEX_DELIMITER_SQUARE;
|
1775
1926
|
ptr2 += 2;
|
1776
1927
|
}
|
1928
|
+
else if ((*ptr2 == '\\') && (*(ptr2+1) == '('))
|
1929
|
+
{
|
1930
|
+
type = ITEX_DELIMITER_PAREN;
|
1931
|
+
ptr2 += 2;
|
1932
|
+
}
|
1777
1933
|
else if ((*ptr2 == '$') && (*(ptr2+1) == '$'))
|
1778
1934
|
{
|
1779
1935
|
type = ITEX_DELIMITER_DOUBLE;
|
@@ -1802,7 +1958,7 @@ static int itex2MML_do_html_filter (const char * buffer, unsigned long length, c
|
|
1802
1958
|
case '\\':
|
1803
1959
|
if (ptr2 + 1 < end)
|
1804
1960
|
{
|
1805
|
-
if (*(ptr2 + 1) == '[')
|
1961
|
+
if (*(ptr2 + 1) == '[' || *(ptr2 + 1) == '(')
|
1806
1962
|
{
|
1807
1963
|
skip = 1;
|
1808
1964
|
}
|
@@ -1818,11 +1974,28 @@ static int itex2MML_do_html_filter (const char * buffer, unsigned long length, c
|
|
1818
1974
|
skip = 1;
|
1819
1975
|
}
|
1820
1976
|
}
|
1977
|
+
else if (*(ptr2 + 1) == ')')
|
1978
|
+
{
|
1979
|
+
if (type == ITEX_DELIMITER_PAREN)
|
1980
|
+
{
|
1981
|
+
ptr2 += 2;
|
1982
|
+
match = 1;
|
1983
|
+
}
|
1984
|
+
else
|
1985
|
+
{
|
1986
|
+
skip = 1;
|
1987
|
+
}
|
1988
|
+
}
|
1989
|
+
|
1821
1990
|
}
|
1822
1991
|
break;
|
1823
1992
|
|
1824
1993
|
case '$':
|
1825
|
-
if (
|
1994
|
+
if (*(ptr2-1) == '\\')
|
1995
|
+
{
|
1996
|
+
skip = 0;
|
1997
|
+
}
|
1998
|
+
else if (type == ITEX_DELIMITER_SQUARE || type == ITEX_DELIMITER_PAREN)
|
1826
1999
|
{
|
1827
2000
|
skip = 1;
|
1828
2001
|
}
|
@@ -1933,13 +2106,3 @@ static int itex2MML_do_html_filter (const char * buffer, unsigned long length, c
|
|
1933
2106
|
|
1934
2107
|
return result;
|
1935
2108
|
}
|
1936
|
-
|
1937
|
-
int itex2MML_html_filter (const char * buffer, unsigned long length)
|
1938
|
-
{
|
1939
|
-
return itex2MML_do_html_filter (buffer, length, 0);
|
1940
|
-
}
|
1941
|
-
|
1942
|
-
int itex2MML_strict_html_filter (const char * buffer, unsigned long length)
|
1943
|
-
{
|
1944
|
-
return itex2MML_do_html_filter (buffer, length, 1);
|
1945
|
-
}
|