@simonklee/opentui-tex-native-source 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -0
- package/LICENSE-PROJECT +21 -0
- package/README.md +7 -0
- package/build.zig +112 -0
- package/build.zig.zon +12 -0
- package/native/lib.zig +280 -0
- package/native/nanosvg.c +4 -0
- package/native/vendor/.bootstrap-v5 +1 -0
- package/native/vendor/LICENSE-NANOSVG +18 -0
- package/native/vendor/microtex/.clang-format +26 -0
- package/native/vendor/microtex/.github/workflows/ubuntu.yml +92 -0
- package/native/vendor/microtex/.github/workflows/windows-gdi.yml +34 -0
- package/native/vendor/microtex/.github/workflows/windows-qt.yml +52 -0
- package/native/vendor/microtex/CMakeLists.txt +110 -0
- package/native/vendor/microtex/LICENSE +21 -0
- package/native/vendor/microtex/MicroTeXInstall.cmake +42 -0
- package/native/vendor/microtex/README.md +600 -0
- package/native/vendor/microtex/build.zig +209 -0
- package/native/vendor/microtex/clatexmath.wrap +6 -0
- package/native/vendor/microtex/doc/meson.build +38 -0
- package/native/vendor/microtex/doc/microtex-doc.toml.in +47 -0
- package/native/vendor/microtex/doc/microtex.svg +39 -0
- package/native/vendor/microtex/doc/urlmap.js +6 -0
- package/native/vendor/microtex/example/gtk/CMakeLists.txt +68 -0
- package/native/vendor/microtex/example/gtk/gtk_main.c +170 -0
- package/native/vendor/microtex/example/gtk/isamples.cpp +21 -0
- package/native/vendor/microtex/example/gtk/isamples.h +15 -0
- package/native/vendor/microtex/example/gtk/meson.build +27 -0
- package/native/vendor/microtex/example/gtk/microtex-gtk.gresource.xml +6 -0
- package/native/vendor/microtex/example/gtk/microtex-gtk.ui +117 -0
- package/native/vendor/microtex/example/gtkmm/CMakeLists.txt +19 -0
- package/native/vendor/microtex/example/gtkmm/gtkmm_main.cpp +531 -0
- package/native/vendor/microtex/example/gtkmm/meson.build +19 -0
- package/native/vendor/microtex/example/memcheck/CMakeLists.txt +12 -0
- package/native/vendor/microtex/example/memcheck/mem_check_main.cpp +154 -0
- package/native/vendor/microtex/example/qt/CMakeLists.txt +37 -0
- package/native/vendor/microtex/example/qt/meson.build +25 -0
- package/native/vendor/microtex/example/qt/qt_main.cpp +70 -0
- package/native/vendor/microtex/example/qt/qt_mainwindow.cpp +107 -0
- package/native/vendor/microtex/example/qt/qt_mainwindow.h +40 -0
- package/native/vendor/microtex/example/qt/qt_skiatexwidget.cpp +149 -0
- package/native/vendor/microtex/example/qt/qt_skiatexwidget.h +48 -0
- package/native/vendor/microtex/example/qt/qt_tex_render.h +15 -0
- package/native/vendor/microtex/example/qt/qt_texqmlitem.cpp +56 -0
- package/native/vendor/microtex/example/qt/qt_texqmlitem.h +31 -0
- package/native/vendor/microtex/example/qt/qt_texwidget.cpp +62 -0
- package/native/vendor/microtex/example/qt/qt_texwidget.h +31 -0
- package/native/vendor/microtex/example/qtpng/CMakeLists.txt +11 -0
- package/native/vendor/microtex/example/qtpng/latex2png.cpp +115 -0
- package/native/vendor/microtex/example/samples/samples.cpp +52 -0
- package/native/vendor/microtex/example/samples/samples.h +32 -0
- package/native/vendor/microtex/example/win32/CMakeLists.txt +15 -0
- package/native/vendor/microtex/example/win32/meson.build +18 -0
- package/native/vendor/microtex/example/win32/win32_main.cpp +375 -0
- package/native/vendor/microtex/githooks/pre-commit +19 -0
- package/native/vendor/microtex/githooks/pre-push +103 -0
- package/native/vendor/microtex/lib/CMakeLists.txt +234 -0
- package/native/vendor/microtex/lib/atom/atom.cpp +14 -0
- package/native/vendor/microtex/lib/atom/atom.h +96 -0
- package/native/vendor/microtex/lib/atom/atom_accent.cpp +115 -0
- package/native/vendor/microtex/lib/atom/atom_accent.h +53 -0
- package/native/vendor/microtex/lib/atom/atom_basic.cpp +146 -0
- package/native/vendor/microtex/lib/atom/atom_basic.h +273 -0
- package/native/vendor/microtex/lib/atom/atom_box.cpp +41 -0
- package/native/vendor/microtex/lib/atom/atom_box.h +70 -0
- package/native/vendor/microtex/lib/atom/atom_char.cpp +99 -0
- package/native/vendor/microtex/lib/atom/atom_char.h +147 -0
- package/native/vendor/microtex/lib/atom/atom_delim.cpp +65 -0
- package/native/vendor/microtex/lib/atom/atom_delim.h +58 -0
- package/native/vendor/microtex/lib/atom/atom_fence.cpp +65 -0
- package/native/vendor/microtex/lib/atom/atom_fence.h +56 -0
- package/native/vendor/microtex/lib/atom/atom_font.cpp +20 -0
- package/native/vendor/microtex/lib/atom/atom_font.h +49 -0
- package/native/vendor/microtex/lib/atom/atom_frac.cpp +101 -0
- package/native/vendor/microtex/lib/atom/atom_frac.h +42 -0
- package/native/vendor/microtex/lib/atom/atom_matrix.cpp +756 -0
- package/native/vendor/microtex/lib/atom/atom_matrix.h +268 -0
- package/native/vendor/microtex/lib/atom/atom_misc.cpp +230 -0
- package/native/vendor/microtex/lib/atom/atom_misc.h +200 -0
- package/native/vendor/microtex/lib/atom/atom_operator.cpp +51 -0
- package/native/vendor/microtex/lib/atom/atom_operator.h +41 -0
- package/native/vendor/microtex/lib/atom/atom_root.cpp +61 -0
- package/native/vendor/microtex/lib/atom/atom_root.h +27 -0
- package/native/vendor/microtex/lib/atom/atom_row.cpp +334 -0
- package/native/vendor/microtex/lib/atom/atom_row.h +176 -0
- package/native/vendor/microtex/lib/atom/atom_scripts.cpp +182 -0
- package/native/vendor/microtex/lib/atom/atom_scripts.h +52 -0
- package/native/vendor/microtex/lib/atom/atom_sideset.cpp +92 -0
- package/native/vendor/microtex/lib/atom/atom_sideset.h +24 -0
- package/native/vendor/microtex/lib/atom/atom_space.cpp +22 -0
- package/native/vendor/microtex/lib/atom/atom_space.h +38 -0
- package/native/vendor/microtex/lib/atom/atom_stack.cpp +117 -0
- package/native/vendor/microtex/lib/atom/atom_stack.h +103 -0
- package/native/vendor/microtex/lib/atom/atom_text.cpp +17 -0
- package/native/vendor/microtex/lib/atom/atom_text.h +33 -0
- package/native/vendor/microtex/lib/atom/atom_vrow.cpp +96 -0
- package/native/vendor/microtex/lib/atom/atom_vrow.h +47 -0
- package/native/vendor/microtex/lib/atom/atom_zstack.cpp +66 -0
- package/native/vendor/microtex/lib/atom/atom_zstack.h +37 -0
- package/native/vendor/microtex/lib/atom/colors_def.cpp +157 -0
- package/native/vendor/microtex/lib/atom/meson.build +50 -0
- package/native/vendor/microtex/lib/box/box.cpp +49 -0
- package/native/vendor/microtex/lib/box/box.h +184 -0
- package/native/vendor/microtex/lib/box/box_factory.cpp +162 -0
- package/native/vendor/microtex/lib/box/box_factory.h +24 -0
- package/native/vendor/microtex/lib/box/box_group.cpp +503 -0
- package/native/vendor/microtex/lib/box/box_group.h +285 -0
- package/native/vendor/microtex/lib/box/box_single.cpp +179 -0
- package/native/vendor/microtex/lib/box/box_single.h +157 -0
- package/native/vendor/microtex/lib/box/meson.build +15 -0
- package/native/vendor/microtex/lib/core/debug_config.cpp +3 -0
- package/native/vendor/microtex/lib/core/debug_config.h +24 -0
- package/native/vendor/microtex/lib/core/formula.cpp +180 -0
- package/native/vendor/microtex/lib/core/formula.h +137 -0
- package/native/vendor/microtex/lib/core/formula_def.cpp +167 -0
- package/native/vendor/microtex/lib/core/glue.cpp +108 -0
- package/native/vendor/microtex/lib/core/glue.h +55 -0
- package/native/vendor/microtex/lib/core/localized_num.cpp +51 -0
- package/native/vendor/microtex/lib/core/meson.build +19 -0
- package/native/vendor/microtex/lib/core/parser.cpp +874 -0
- package/native/vendor/microtex/lib/core/parser.h +306 -0
- package/native/vendor/microtex/lib/core/split.cpp +185 -0
- package/native/vendor/microtex/lib/core/split.h +40 -0
- package/native/vendor/microtex/lib/env/env.cpp +141 -0
- package/native/vendor/microtex/lib/env/env.h +221 -0
- package/native/vendor/microtex/lib/env/meson.build +11 -0
- package/native/vendor/microtex/lib/env/units.cpp +109 -0
- package/native/vendor/microtex/lib/env/units.h +61 -0
- package/native/vendor/microtex/lib/graphic/font_style.cpp +63 -0
- package/native/vendor/microtex/lib/graphic/font_style.h +61 -0
- package/native/vendor/microtex/lib/graphic/graphic.cpp +38 -0
- package/native/vendor/microtex/lib/graphic/graphic.h +314 -0
- package/native/vendor/microtex/lib/graphic/graphic_basic.cpp +44 -0
- package/native/vendor/microtex/lib/graphic/graphic_basic.h +131 -0
- package/native/vendor/microtex/lib/graphic/meson.build +13 -0
- package/native/vendor/microtex/lib/macro/macro.cpp +143 -0
- package/native/vendor/microtex/lib/macro/macro.h +155 -0
- package/native/vendor/microtex/lib/macro/macro_accent.cpp +50 -0
- package/native/vendor/microtex/lib/macro/macro_accent.h +61 -0
- package/native/vendor/microtex/lib/macro/macro_boxes.h +68 -0
- package/native/vendor/microtex/lib/macro/macro_colors.cpp +42 -0
- package/native/vendor/microtex/lib/macro/macro_colors.h +42 -0
- package/native/vendor/microtex/lib/macro/macro_decl.h +16 -0
- package/native/vendor/microtex/lib/macro/macro_def.cpp +418 -0
- package/native/vendor/microtex/lib/macro/macro_delims.cpp +56 -0
- package/native/vendor/microtex/lib/macro/macro_delims.h +73 -0
- package/native/vendor/microtex/lib/macro/macro_env.h +212 -0
- package/native/vendor/microtex/lib/macro/macro_fonts.cpp +53 -0
- package/native/vendor/microtex/lib/macro/macro_fonts.h +78 -0
- package/native/vendor/microtex/lib/macro/macro_frac.cpp +138 -0
- package/native/vendor/microtex/lib/macro/macro_frac.h +50 -0
- package/native/vendor/microtex/lib/macro/macro_misc.cpp +211 -0
- package/native/vendor/microtex/lib/macro/macro_misc.h +217 -0
- package/native/vendor/microtex/lib/macro/macro_scripts.cpp +32 -0
- package/native/vendor/microtex/lib/macro/macro_scripts.h +17 -0
- package/native/vendor/microtex/lib/macro/macro_sizes.h +110 -0
- package/native/vendor/microtex/lib/macro/macro_space.cpp +31 -0
- package/native/vendor/microtex/lib/macro/macro_space.h +17 -0
- package/native/vendor/microtex/lib/macro/macro_styles.cpp +45 -0
- package/native/vendor/microtex/lib/macro/macro_styles.h +22 -0
- package/native/vendor/microtex/lib/macro/macro_types.h +48 -0
- package/native/vendor/microtex/lib/macro/meson.build +33 -0
- package/native/vendor/microtex/lib/meson.build +102 -0
- package/native/vendor/microtex/lib/microtex.cpp +208 -0
- package/native/vendor/microtex/lib/microtex.h +225 -0
- package/native/vendor/microtex/lib/microtexConfig.cmake.in +2 -0
- package/native/vendor/microtex/lib/microtexapi.h +22 -0
- package/native/vendor/microtex/lib/microtexconfig.h.in +7 -0
- package/native/vendor/microtex/lib/microtexexport.h +31 -0
- package/native/vendor/microtex/lib/otf/clm.cpp +405 -0
- package/native/vendor/microtex/lib/otf/clm.h +61 -0
- package/native/vendor/microtex/lib/otf/fontsense.cpp +191 -0
- package/native/vendor/microtex/lib/otf/fontsense.h +20 -0
- package/native/vendor/microtex/lib/otf/glyph.cpp +53 -0
- package/native/vendor/microtex/lib/otf/glyph.h +384 -0
- package/native/vendor/microtex/lib/otf/math_consts.h +154 -0
- package/native/vendor/microtex/lib/otf/meson.build +18 -0
- package/native/vendor/microtex/lib/otf/otf.cpp +84 -0
- package/native/vendor/microtex/lib/otf/otf.h +177 -0
- package/native/vendor/microtex/lib/otf/otfconfig.h +32 -0
- package/native/vendor/microtex/lib/otf/path.cpp +187 -0
- package/native/vendor/microtex/lib/otf/path.h +120 -0
- package/native/vendor/microtex/lib/render/builder.cpp +68 -0
- package/native/vendor/microtex/lib/render/builder.h +73 -0
- package/native/vendor/microtex/lib/render/meson.build +11 -0
- package/native/vendor/microtex/lib/render/render.cpp +136 -0
- package/native/vendor/microtex/lib/render/render.h +59 -0
- package/native/vendor/microtex/lib/unimath/font_meta.h +22 -0
- package/native/vendor/microtex/lib/unimath/font_src.cpp +21 -0
- package/native/vendor/microtex/lib/unimath/font_src.h +61 -0
- package/native/vendor/microtex/lib/unimath/math_type.cpp +318 -0
- package/native/vendor/microtex/lib/unimath/math_type.h +105 -0
- package/native/vendor/microtex/lib/unimath/meson.build +18 -0
- package/native/vendor/microtex/lib/unimath/uni_char.cpp +121 -0
- package/native/vendor/microtex/lib/unimath/uni_char.h +109 -0
- package/native/vendor/microtex/lib/unimath/uni_font.cpp +248 -0
- package/native/vendor/microtex/lib/unimath/uni_font.h +139 -0
- package/native/vendor/microtex/lib/unimath/uni_symbol.cpp +2929 -0
- package/native/vendor/microtex/lib/unimath/uni_symbol.h +31 -0
- package/native/vendor/microtex/lib/utils/dict_tree.h +68 -0
- package/native/vendor/microtex/lib/utils/exceptions.h +61 -0
- package/native/vendor/microtex/lib/utils/log.h +34 -0
- package/native/vendor/microtex/lib/utils/meson.build +18 -0
- package/native/vendor/microtex/lib/utils/nums.h +24 -0
- package/native/vendor/microtex/lib/utils/string_utils.cpp +85 -0
- package/native/vendor/microtex/lib/utils/string_utils.h +130 -0
- package/native/vendor/microtex/lib/utils/types.h +152 -0
- package/native/vendor/microtex/lib/utils/utf.cpp +115 -0
- package/native/vendor/microtex/lib/utils/utf.h +58 -0
- package/native/vendor/microtex/lib/utils/utils.cpp +40 -0
- package/native/vendor/microtex/lib/utils/utils.h +88 -0
- package/native/vendor/microtex/lib/wrapper/byte_seq.cpp +46 -0
- package/native/vendor/microtex/lib/wrapper/byte_seq.h +70 -0
- package/native/vendor/microtex/lib/wrapper/callback.cpp +10 -0
- package/native/vendor/microtex/lib/wrapper/callback.h +72 -0
- package/native/vendor/microtex/lib/wrapper/cwrapper.cpp +206 -0
- package/native/vendor/microtex/lib/wrapper/cwrapper.h +305 -0
- package/native/vendor/microtex/lib/wrapper/graphic_wrapper.cpp +211 -0
- package/native/vendor/microtex/lib/wrapper/graphic_wrapper.h +159 -0
- package/native/vendor/microtex/lib/wrapper/meson.build +22 -0
- package/native/vendor/microtex/meson.build +75 -0
- package/native/vendor/microtex/meson_options.txt +29 -0
- package/native/vendor/microtex/platform/cairo/CMakeLists.txt +36 -0
- package/native/vendor/microtex/platform/cairo/graphic_cairo.cpp +384 -0
- package/native/vendor/microtex/platform/cairo/graphic_cairo.h +119 -0
- package/native/vendor/microtex/platform/cairo/meson.build +47 -0
- package/native/vendor/microtex/platform/cairo/microtex-cairoConfig.cmake.in +11 -0
- package/native/vendor/microtex/platform/flutter/microtex/.metadata +10 -0
- package/native/vendor/microtex/platform/flutter/microtex/CHANGELOG.md +3 -0
- package/native/vendor/microtex/platform/flutter/microtex/LICENSE +1 -0
- package/native/vendor/microtex/platform/flutter/microtex/README.md +15 -0
- package/native/vendor/microtex/platform/flutter/microtex/analysis_options.yaml +4 -0
- package/native/vendor/microtex/platform/flutter/microtex/android/build.gradle +56 -0
- package/native/vendor/microtex/platform/flutter/microtex/android/settings.gradle +1 -0
- package/native/vendor/microtex/platform/flutter/microtex/android/src/main/AndroidManifest.xml +3 -0
- package/native/vendor/microtex/platform/flutter/microtex/android/src/main/kotlin/io/nano/microtex/microtex/MicrotexPlugin.kt +35 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/.metadata +10 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/README.md +16 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/analysis_options.yaml +31 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/android/app/build.gradle +68 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/android/app/src/debug/AndroidManifest.xml +7 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/android/app/src/main/AndroidManifest.xml +34 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/android/app/src/main/kotlin/io/nano/microtex/microtex_example/MainActivity.kt +6 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/android/app/src/main/res/drawable/launch_background.xml +12 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/android/app/src/main/res/drawable-v21/launch_background.xml +12 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/android/app/src/main/res/values/styles.xml +18 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/android/app/src/main/res/values-night/styles.xml +18 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/android/app/src/profile/AndroidManifest.xml +7 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/android/build.gradle +31 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/android/gradle/wrapper/gradle-wrapper.properties +6 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/android/gradle.properties +3 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/android/settings.gradle +11 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Flutter/AppFrameworkInfo.plist +26 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Flutter/Debug.xcconfig +2 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Flutter/Release.xcconfig +2 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Podfile +41 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Podfile.lock +22 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/AppDelegate.swift +13 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +122 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +23 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +5 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +37 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Base.lproj/Main.storyboard +26 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Info.plist +49 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Runner-Bridging-Header.h +1 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner.xcodeproj/project.pbxproj +549 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +87 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner.xcworkspace/contents.xcworkspacedata +10 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/lib/main.dart +23 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/lib/screen/edit_in_one.dart +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/lib/screen/edit_screen.dart +208 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/lib/utils/convert_spans.dart +63 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/lib/utils/string_ext.dart +10 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/lib/widget/cmp.dart +118 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/lib/widget/draggable.dart +75 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/lib/widget/rich.dart +23 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/lib/widget/split.dart +72 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/lib/widget/tex_highlight_controller.dart +66 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/lib/widget/tex_input_controller.dart +19 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/linux/CMakeLists.txt +116 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/linux/flutter/CMakeLists.txt +87 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/linux/flutter/generated_plugin_registrant.cc +15 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/linux/flutter/generated_plugin_registrant.h +15 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/linux/flutter/generated_plugins.cmake +24 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/linux/main.cc +6 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/linux/my_application.cc +104 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/linux/my_application.h +18 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/macos/Flutter/Flutter-Debug.xcconfig +2 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/macos/Flutter/Flutter-Release.xcconfig +2 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/macos/Flutter/GeneratedPluginRegistrant.swift +12 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/macos/Podfile +40 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/macos/Podfile.lock +22 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/AppDelegate.swift +9 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +68 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/Base.lproj/MainMenu.xib +343 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/Configs/AppInfo.xcconfig +14 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/Configs/Debug.xcconfig +2 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/Configs/Release.xcconfig +2 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/Configs/Warnings.xcconfig +13 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/DebugProfile.entitlements +12 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/Info.plist +32 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/MainFlutterWindow.swift +15 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/Release.entitlements +8 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner.xcodeproj/project.pbxproj +633 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +87 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner.xcworkspace/contents.xcworkspacedata +10 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/pubspec.lock +191 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/pubspec.yaml +56 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/test/widget_test.dart +26 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/windows/CMakeLists.txt +95 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/windows/flutter/CMakeLists.txt +103 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/windows/flutter/generated_plugin_registrant.cc +14 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/windows/flutter/generated_plugin_registrant.h +15 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/windows/flutter/generated_plugins.cmake +24 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/windows/runner/CMakeLists.txt +17 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/windows/runner/Runner.rc +121 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/windows/runner/flutter_window.cpp +61 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/windows/runner/flutter_window.h +33 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/windows/runner/main.cpp +43 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/windows/runner/resource.h +16 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/windows/runner/resources/app_icon.ico +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/windows/runner/runner.exe.manifest +20 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/windows/runner/utils.cpp +64 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/windows/runner/utils.h +19 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/windows/runner/win32_window.cpp +245 -0
- package/native/vendor/microtex/platform/flutter/microtex/example/windows/runner/win32_window.h +98 -0
- package/native/vendor/microtex/platform/flutter/microtex/ios/Assets/.gitkeep +0 -0
- package/native/vendor/microtex/platform/flutter/microtex/ios/Classes/MicrotexPlugin.h +4 -0
- package/native/vendor/microtex/platform/flutter/microtex/ios/Classes/MicrotexPlugin.m +19 -0
- package/native/vendor/microtex/platform/flutter/microtex/ios/Classes/SwiftMicrotexPlugin.swift +14 -0
- package/native/vendor/microtex/platform/flutter/microtex/ios/Classes/dummy.h +4 -0
- package/native/vendor/microtex/platform/flutter/microtex/ios/microtex.podspec +27 -0
- package/native/vendor/microtex/platform/flutter/microtex/lib/microtex.dart +7 -0
- package/native/vendor/microtex/platform/flutter/microtex/lib/src/bindings.dart +218 -0
- package/native/vendor/microtex/platform/flutter/microtex/lib/src/bounds.dart +10 -0
- package/native/vendor/microtex/platform/flutter/microtex/lib/src/context.dart +205 -0
- package/native/vendor/microtex/platform/flutter/microtex/lib/src/fontdesc.dart +14 -0
- package/native/vendor/microtex/platform/flutter/microtex/lib/src/fontmeta.dart +14 -0
- package/native/vendor/microtex/platform/flutter/microtex/lib/src/pathcache.dart +17 -0
- package/native/vendor/microtex/platform/flutter/microtex/lib/src/render.dart +291 -0
- package/native/vendor/microtex/platform/flutter/microtex/lib/src/texstyle.dart +11 -0
- package/native/vendor/microtex/platform/flutter/microtex/lib/src/textlayout.dart +93 -0
- package/native/vendor/microtex/platform/flutter/microtex/lib/src/widget.dart +163 -0
- package/native/vendor/microtex/platform/flutter/microtex/linux/CMakeLists.txt +33 -0
- package/native/vendor/microtex/platform/flutter/microtex/linux/include/microtex/microtex_plugin.h +26 -0
- package/native/vendor/microtex/platform/flutter/microtex/linux/microtex_plugin.cc +70 -0
- package/native/vendor/microtex/platform/flutter/microtex/macos/Classes/MicrotexPlugin.swift +20 -0
- package/native/vendor/microtex/platform/flutter/microtex/macos/Classes/dummy.h +4 -0
- package/native/vendor/microtex/platform/flutter/microtex/macos/Classes/microtex-Bridging-Header.h +1 -0
- package/native/vendor/microtex/platform/flutter/microtex/macos/microtex.podspec +26 -0
- package/native/vendor/microtex/platform/flutter/microtex/nativelib/CMakeLists.txt +44 -0
- package/native/vendor/microtex/platform/flutter/microtex/nativelib/builddarwin.sh +108 -0
- package/native/vendor/microtex/platform/flutter/microtex/pubspec.yaml +37 -0
- package/native/vendor/microtex/platform/flutter/microtex/test/microtex_test.dart +23 -0
- package/native/vendor/microtex/platform/flutter/microtex/windows/CMakeLists.txt +32 -0
- package/native/vendor/microtex/platform/flutter/microtex/windows/include/microtex/microtex_plugin.h +23 -0
- package/native/vendor/microtex/platform/flutter/microtex/windows/microtex_plugin.cpp +82 -0
- package/native/vendor/microtex/platform/gdi_win/CMakeLists.txt +20 -0
- package/native/vendor/microtex/platform/gdi_win/graphic_win32.cpp +352 -0
- package/native/vendor/microtex/platform/gdi_win/graphic_win32.h +137 -0
- package/native/vendor/microtex/platform/gdi_win/meson.build +39 -0
- package/native/vendor/microtex/platform/gtk/CMakeLists.txt +36 -0
- package/native/vendor/microtex/platform/gtk/meson.build +65 -0
- package/native/vendor/microtex/platform/gtk/microtex-gtkConfig.cmake.in +11 -0
- package/native/vendor/microtex/platform/gtk/microtexequation.cpp +708 -0
- package/native/vendor/microtex/platform/gtk/microtexequation.h +72 -0
- package/native/vendor/microtex/platform/qt/CMakeLists.txt +37 -0
- package/native/vendor/microtex/platform/qt/graphic_qt.cpp +355 -0
- package/native/vendor/microtex/platform/qt/graphic_qt.h +116 -0
- package/native/vendor/microtex/platform/qt/meson.build +38 -0
- package/native/vendor/microtex/platform/qt/microtex-qtConfig.cmake.in +7 -0
- package/native/vendor/microtex/platform/skia/CMakeLists.txt +46 -0
- package/native/vendor/microtex/platform/skia/graphic_skia.cpp +306 -0
- package/native/vendor/microtex/platform/skia/graphic_skia.h +125 -0
- package/native/vendor/microtex/platform/skia/microtex-skiaConfig.cmake.in +6 -0
- package/native/vendor/microtex/platform/wasm/CMakeLists.txt +38 -0
- package/native/vendor/microtex/platform/wasm/emscripten.cross +31 -0
- package/native/vendor/microtex/platform/wasm/main.cpp +15 -0
- package/native/vendor/microtex/platform/wasm/meson.build +8 -0
- package/native/vendor/microtex/platform/wasm/prebuild-example-meson.sh +21 -0
- package/native/vendor/microtex/platform/wasm/prebuild-example.sh +21 -0
- package/native/vendor/microtex/platform/wasm/prebuild-lib-meson.sh +28 -0
- package/native/vendor/microtex/platform/wasm/prebuild-lib.sh +31 -0
- package/native/vendor/microtex/platform/wasm/web/.babelrc +10 -0
- package/native/vendor/microtex/platform/wasm/web/example/examples.js +43 -0
- package/native/vendor/microtex/platform/wasm/web/example/hello.js +31 -0
- package/native/vendor/microtex/platform/wasm/web/example/index.html +55 -0
- package/native/vendor/microtex/platform/wasm/web/example/index.js +243 -0
- package/native/vendor/microtex/platform/wasm/web/example/styles.css +86 -0
- package/native/vendor/microtex/platform/wasm/web/example/utils.js +47 -0
- package/native/vendor/microtex/platform/wasm/web/lib/context.js +271 -0
- package/native/vendor/microtex/platform/wasm/web/lib/index.js +10 -0
- package/native/vendor/microtex/platform/wasm/web/lib/render.js +293 -0
- package/native/vendor/microtex/platform/wasm/web/lib/runtime.js +14 -0
- package/native/vendor/microtex/platform/wasm/web/lib/svg.js +237 -0
- package/native/vendor/microtex/platform/wasm/web/lib/textlayout.js +88 -0
- package/native/vendor/microtex/platform/wasm/web/package-lock.json +5931 -0
- package/native/vendor/microtex/platform/wasm/web/package.json +45 -0
- package/native/vendor/microtex/platform/wasm/web/publish-example.sh +17 -0
- package/native/vendor/microtex/platform/wasm/web/rollup.config.example.js +24 -0
- package/native/vendor/microtex/platform/wasm/web/rollup.config.lib.js +16 -0
- package/native/vendor/microtex/prebuilt/otf2clm.py +807 -0
- package/native/vendor/microtex/prebuilt/otf2clm.sh +9 -0
- package/native/vendor/microtex/prebuilt/preclms.sh +17 -0
- package/native/vendor/microtex/readme/example_bw_false.svg +680 -0
- package/native/vendor/microtex/readme/example_bw_true.svg +680 -0
- package/native/vendor/microtex/readme/example_cjk_trying.svg +54 -0
- package/native/vendor/microtex/readme/example_custom_symbols.svg +92 -0
- package/native/vendor/microtex/readme/example_debug.svg +764 -0
- package/native/vendor/microtex/readme/example_emoji.svg +199 -0
- package/native/vendor/microtex/readme/example_have_log.svg +79 -0
- package/native/vendor/microtex/readme/example_keep_trying.svg +101 -0
- package/native/vendor/microtex/readme/example_logos.svg +50 -0
- package/native/vendor/microtex/readme/example_ubuntu.png +0 -0
- package/native/vendor/microtex/readme/example_windows.png +0 -0
- package/native/vendor/microtex/readme/samples/sample_0.svg +665 -0
- package/native/vendor/microtex/readme/samples/sample_1.svg +1259 -0
- package/native/vendor/microtex/readme/samples/sample_10.svg +333 -0
- package/native/vendor/microtex/readme/samples/sample_11.svg +306 -0
- package/native/vendor/microtex/readme/samples/sample_2.svg +2461 -0
- package/native/vendor/microtex/readme/samples/sample_3.svg +2653 -0
- package/native/vendor/microtex/readme/samples/sample_4.svg +554 -0
- package/native/vendor/microtex/readme/samples/sample_5.svg +247 -0
- package/native/vendor/microtex/readme/samples/sample_6.svg +1082 -0
- package/native/vendor/microtex/readme/samples/sample_7.svg +518 -0
- package/native/vendor/microtex/readme/samples/sample_8.svg +529 -0
- package/native/vendor/microtex/readme/samples/sample_9.svg +1702 -0
- package/native/vendor/microtex/readme/samples.md +301 -0
- package/native/vendor/microtex/readme/tex_logo.svg +19 -0
- package/native/vendor/microtex/res/EXAMPLE.txt +25 -0
- package/native/vendor/microtex/res/SAMPLES.tex +946 -0
- package/native/vendor/microtex/res/firamath/FiraMath-Regular.clm1 +0 -0
- package/native/vendor/microtex/res/firamath/FiraMath-Regular.clm2 +0 -0
- package/native/vendor/microtex/res/firamath/FiraMath-Regular.otf +0 -0
- package/native/vendor/microtex/res/firamath/README.md +42 -0
- package/native/vendor/microtex/res/lm-math/README +92 -0
- package/native/vendor/microtex/res/lm-math/latinmodern-math.clm1 +0 -0
- package/native/vendor/microtex/res/lm-math/latinmodern-math.clm2 +0 -0
- package/native/vendor/microtex/res/lm-math/latinmodern-math.otf +0 -0
- package/native/vendor/microtex/res/tex-gyre/README-TeX-Gyre-DejaVu-Math.txt +82 -0
- package/native/vendor/microtex/res/tex-gyre/texgyredejavu-math.clm1 +0 -0
- package/native/vendor/microtex/res/tex-gyre/texgyredejavu-math.clm2 +0 -0
- package/native/vendor/microtex/res/tex-gyre/texgyredejavu-math.otf +0 -0
- package/native/vendor/microtex/res/xits/FONTLOG.txt +246 -0
- package/native/vendor/microtex/res/xits/OFL.txt +98 -0
- package/native/vendor/microtex/res/xits/README.txt +15 -0
- package/native/vendor/microtex/res/xits/XITS-Bold.clm1 +0 -0
- package/native/vendor/microtex/res/xits/XITS-Bold.clm2 +0 -0
- package/native/vendor/microtex/res/xits/XITS-Bold.otf +0 -0
- package/native/vendor/microtex/res/xits/XITS-BoldItalic.clm1 +0 -0
- package/native/vendor/microtex/res/xits/XITS-BoldItalic.clm2 +0 -0
- package/native/vendor/microtex/res/xits/XITS-BoldItalic.otf +0 -0
- package/native/vendor/microtex/res/xits/XITS-Italic.clm1 +0 -0
- package/native/vendor/microtex/res/xits/XITS-Italic.clm2 +0 -0
- package/native/vendor/microtex/res/xits/XITS-Italic.otf +0 -0
- package/native/vendor/microtex/res/xits/XITS-Regular.clm1 +0 -0
- package/native/vendor/microtex/res/xits/XITS-Regular.clm2 +0 -0
- package/native/vendor/microtex/res/xits/XITS-Regular.otf +0 -0
- package/native/vendor/microtex/res/xits/XITSMath-Bold.clm1 +0 -0
- package/native/vendor/microtex/res/xits/XITSMath-Bold.clm2 +0 -0
- package/native/vendor/microtex/res/xits/XITSMath-Bold.otf +0 -0
- package/native/vendor/microtex/res/xits/XITSMath-Regular.clm1 +0 -0
- package/native/vendor/microtex/res/xits/XITSMath-Regular.clm2 +0 -0
- package/native/vendor/microtex/res/xits/XITSMath-Regular.otf +0 -0
- package/native/vendor/microtex/test/clm/meson.build +10 -0
- package/native/vendor/microtex/test/clm/test_clm.cpp +140 -0
- package/native/vendor/microtex/test/env/meson.build +10 -0
- package/native/vendor/microtex/test/env/test_env.cpp +100 -0
- package/native/vendor/microtex/test/fuzzer/afl.native +20 -0
- package/native/vendor/microtex/test/fuzzer/fuzz.sh +135 -0
- package/native/vendor/microtex/test/fuzzer/fuzzer.cpp +61 -0
- package/native/vendor/microtex/test/fuzzer/generateSeed.java +33 -0
- package/native/vendor/microtex/test/fuzzer/meson.build +9 -0
- package/native/vendor/microtex/test/fuzzer/microtex.dict +3708 -0
- package/native/vendor/microtex/test/fuzzer/platform_none.cpp +100 -0
- package/native/vendor/microtex/test/has_filesystem.cpp +8 -0
- package/native/vendor/microtex/test/meson.build +6 -0
- package/native/vendor/nanosvg.h +3278 -0
- package/native/vendor/nanosvgrast.h +1472 -0
- package/native/vendor/zigtex/.github/assets/example.svg +27 -0
- package/native/vendor/zigtex/LICENSE +674 -0
- package/native/vendor/zigtex/README.md +52 -0
- package/native/vendor/zigtex/build.zig +52 -0
- package/native/vendor/zigtex/build.zig.zon +16 -0
- package/native/vendor/zigtex/fonts/latinmodern-math.clm2 +0 -0
- package/native/vendor/zigtex/src/main.zig +22 -0
- package/native/vendor/zigtex/src/root.zig +124 -0
- package/native/vendor/zigtex/src/svg.zig +273 -0
- package/native/vendor/zigtex/src/tex.zig +383 -0
- package/native/zigtex-0.16.patch +35 -0
- package/package.json +27 -0
- package/scripts/bootstrap-native +89 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#ifndef MICROTEX_UNI_SYMBOL_H
|
|
2
|
+
#define MICROTEX_UNI_SYMBOL_H
|
|
3
|
+
|
|
4
|
+
#include "utils/types.h"
|
|
5
|
+
#include "utils/utils.h"
|
|
6
|
+
|
|
7
|
+
namespace microtex {
|
|
8
|
+
|
|
9
|
+
struct Symbol {
|
|
10
|
+
const c32 unicode;
|
|
11
|
+
const u32 flag;
|
|
12
|
+
const char* name;
|
|
13
|
+
|
|
14
|
+
AtomType type() const;
|
|
15
|
+
|
|
16
|
+
LimitsType limitsType() const;
|
|
17
|
+
|
|
18
|
+
bool isVariable() const;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Get the symbol from the given name.
|
|
22
|
+
*
|
|
23
|
+
* @param name the name of the symbol
|
|
24
|
+
* @return the symbol of the given name or null if not found
|
|
25
|
+
*/
|
|
26
|
+
static const Symbol* get(const char* name);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
} // namespace microtex
|
|
30
|
+
|
|
31
|
+
#endif // MICROTEX_UNI_SYMBOL_H
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
#ifndef DICT_TREE_INCLUDED
|
|
2
|
+
#define DICT_TREE_INCLUDED
|
|
3
|
+
|
|
4
|
+
#include "utils/utils.h"
|
|
5
|
+
|
|
6
|
+
namespace microtex {
|
|
7
|
+
|
|
8
|
+
template <typename K, typename V>
|
|
9
|
+
struct SortedDictTree {
|
|
10
|
+
private:
|
|
11
|
+
K _key;
|
|
12
|
+
V _value;
|
|
13
|
+
u16 _childCount;
|
|
14
|
+
/** Children sorted by #_key */
|
|
15
|
+
SortedDictTree<K, V>** _children;
|
|
16
|
+
|
|
17
|
+
public:
|
|
18
|
+
no_copy_assign(SortedDictTree);
|
|
19
|
+
|
|
20
|
+
SortedDictTree() = delete;
|
|
21
|
+
|
|
22
|
+
SortedDictTree(const K& key, const V& value, u16 childCount)
|
|
23
|
+
: _key(key),
|
|
24
|
+
_value(value),
|
|
25
|
+
_childCount(childCount),
|
|
26
|
+
_children(childCount == 0 ? nullptr : new SortedDictTree<K, V>*[childCount]) {}
|
|
27
|
+
|
|
28
|
+
inline K key() const { return _key; }
|
|
29
|
+
|
|
30
|
+
inline V value() const { return _value; }
|
|
31
|
+
|
|
32
|
+
inline u16 childCount() const { return _childCount; }
|
|
33
|
+
|
|
34
|
+
/** Get child at the given index. */
|
|
35
|
+
inline SortedDictTree<K, V>*& child(u16 i) const { return _children[i]; }
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Get the child match the given key, or null if not found.
|
|
39
|
+
*
|
|
40
|
+
* @param key the key to match
|
|
41
|
+
*/
|
|
42
|
+
const SortedDictTree<K, V>* operator[](const K& key) const {
|
|
43
|
+
const int index = binIndexOf(_childCount, [&](int i) { return key - _children[i]->_key; });
|
|
44
|
+
return index < 0 ? nullptr : _children[index];
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
bool operator==(const SortedDictTree<K, V>& b) const {
|
|
48
|
+
if (&b == this) return true;
|
|
49
|
+
bool same = _key == b._key && _value == b._value && _childCount == b._childCount;
|
|
50
|
+
if (!same) return false;
|
|
51
|
+
for (u16 i = 0; i < _childCount; i++) {
|
|
52
|
+
same &= *child(i) == *(b.child(i));
|
|
53
|
+
if (!same) return false;
|
|
54
|
+
}
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
bool operator!=(const SortedDictTree<K, V>& b) const { return !(*this == b); }
|
|
59
|
+
|
|
60
|
+
~SortedDictTree() {
|
|
61
|
+
for (u16 i = 0; i < _childCount; i++) delete _children[i];
|
|
62
|
+
delete[] _children;
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
} // namespace microtex
|
|
67
|
+
|
|
68
|
+
#endif
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
#ifndef EXCEPTIONS_H_INCLUDED
|
|
2
|
+
#define EXCEPTIONS_H_INCLUDED
|
|
3
|
+
|
|
4
|
+
#include <exception>
|
|
5
|
+
#include <string>
|
|
6
|
+
#include <utility>
|
|
7
|
+
|
|
8
|
+
namespace microtex {
|
|
9
|
+
|
|
10
|
+
/** Superclass of all the possible exceptions that can be thrown */
|
|
11
|
+
class ex_tex : public std::exception {
|
|
12
|
+
private:
|
|
13
|
+
const std::string _msg;
|
|
14
|
+
|
|
15
|
+
public:
|
|
16
|
+
explicit ex_tex(std::string msg) : _msg(std::move(msg)) {}
|
|
17
|
+
|
|
18
|
+
explicit ex_tex(const std::string& msg, const exception& cause)
|
|
19
|
+
: _msg(msg + "\n caused by: " + cause.what()) {}
|
|
20
|
+
|
|
21
|
+
const char* what() const noexcept override { return _msg.c_str(); }
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** Error occurred while parsing a string to a formula */
|
|
25
|
+
class ex_parse : public ex_tex {
|
|
26
|
+
public:
|
|
27
|
+
explicit ex_parse(const std::string& msg, const exception& cause) : ex_tex(msg, cause) {}
|
|
28
|
+
|
|
29
|
+
explicit ex_parse(const std::string& msg) : ex_tex(msg) {}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** Error occurred while conditions not satisfied */
|
|
33
|
+
class ex_invalid_state : public ex_tex {
|
|
34
|
+
public:
|
|
35
|
+
explicit ex_invalid_state(const std::string& e) : ex_tex(e) {}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** Error occurred while an invalid param was given */
|
|
39
|
+
class ex_invalid_param : public ex_tex {
|
|
40
|
+
public:
|
|
41
|
+
explicit ex_invalid_param(const std::string& e) : ex_tex(e) {}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
class ex_file_not_found : public ex_tex {
|
|
45
|
+
public:
|
|
46
|
+
explicit ex_file_not_found(const std::string& e) : ex_tex(e) {}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
class ex_eof : public ex_tex {
|
|
50
|
+
public:
|
|
51
|
+
explicit ex_eof(const std::string& msg) : ex_tex(msg) {}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
class ex_unprivileged : public ex_tex {
|
|
55
|
+
public:
|
|
56
|
+
explicit ex_unprivileged(const std::string& msg) : ex_tex(msg) {}
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
} // namespace microtex
|
|
60
|
+
|
|
61
|
+
#endif
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#ifndef LOG_H_INCLUDED
|
|
2
|
+
#define LOG_H_INCLUDED
|
|
3
|
+
|
|
4
|
+
#ifdef HAVE_LOG
|
|
5
|
+
|
|
6
|
+
#include <cstdio>
|
|
7
|
+
|
|
8
|
+
// clang-format off
|
|
9
|
+
#define ANSI_BOLD "\x1b[1m"
|
|
10
|
+
#define ANSI_COLOR_CYAN "\x1b[36m"
|
|
11
|
+
#define ANSI_COLOR_RED "\x1b[31m"
|
|
12
|
+
#define ANSI_COLOR_GREEN "\x1b[32m"
|
|
13
|
+
#define ANSI_UNDERLINE "\x1b[4m"
|
|
14
|
+
#define ANSI_RESET "\x1b[0m"
|
|
15
|
+
// clang-format on
|
|
16
|
+
|
|
17
|
+
#define dbg(format, ...) \
|
|
18
|
+
fprintf( \
|
|
19
|
+
stdout, \
|
|
20
|
+
"FILE: " ANSI_UNDERLINE "%s" ANSI_RESET ", LINE: " ANSI_COLOR_RED "%d" ANSI_RESET \
|
|
21
|
+
", FUNCTION: " ANSI_COLOR_CYAN "%s" ANSI_RESET ", MSG: " format, \
|
|
22
|
+
__FILE__, \
|
|
23
|
+
__LINE__, \
|
|
24
|
+
__FUNCTION__, \
|
|
25
|
+
##__VA_ARGS__ \
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
#define logv(format, ...) fprintf(stdout, format, ##__VA_ARGS__);
|
|
29
|
+
|
|
30
|
+
#define loge(format, ...) fprintf(stderr, format, ##__VA_ARGS__);
|
|
31
|
+
|
|
32
|
+
#endif // HAVE_LOG
|
|
33
|
+
|
|
34
|
+
#endif
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
utils_src = [
|
|
2
|
+
'utils/string_utils.cpp',
|
|
3
|
+
'utils/utf.cpp',
|
|
4
|
+
'utils/utils.cpp'
|
|
5
|
+
]
|
|
6
|
+
|
|
7
|
+
if install_headerfiles
|
|
8
|
+
install_headers([
|
|
9
|
+
'dict_tree.h',
|
|
10
|
+
'exceptions.h',
|
|
11
|
+
'log.h',
|
|
12
|
+
'nums.h',
|
|
13
|
+
'string_utils.h',
|
|
14
|
+
'utf.h',
|
|
15
|
+
'utils.h',
|
|
16
|
+
'types.h'
|
|
17
|
+
], subdir: 'microtex/utils')
|
|
18
|
+
endif
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#ifndef NUMS_H_INCLUDED
|
|
2
|
+
#define NUMS_H_INCLUDED
|
|
3
|
+
|
|
4
|
+
#include <cmath>
|
|
5
|
+
#include <limits>
|
|
6
|
+
|
|
7
|
+
namespace microtex {
|
|
8
|
+
|
|
9
|
+
/** Positive infinity */
|
|
10
|
+
static constexpr float POS_INF = std::numeric_limits<float>::infinity();
|
|
11
|
+
/** Negative infinity */
|
|
12
|
+
static constexpr float NEG_INF = -POS_INF;
|
|
13
|
+
/** Max float value */
|
|
14
|
+
static constexpr float F_MAX = std::numeric_limits<float>::max();
|
|
15
|
+
/** Min float value */
|
|
16
|
+
static constexpr float F_MIN = -F_MAX;
|
|
17
|
+
/** Pi */
|
|
18
|
+
static constexpr double PI = 3.1415926535;
|
|
19
|
+
/** Precision, for compare with 0.0f, if a value < PREC, we trade it as 0.0f */
|
|
20
|
+
static constexpr float PREC = 0.01;
|
|
21
|
+
|
|
22
|
+
} // namespace microtex
|
|
23
|
+
|
|
24
|
+
#endif
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
#include "utils/string_utils.h"
|
|
2
|
+
|
|
3
|
+
#include <utility>
|
|
4
|
+
|
|
5
|
+
using namespace std;
|
|
6
|
+
using namespace microtex;
|
|
7
|
+
|
|
8
|
+
StrTokenizer::StrTokenizer(string str) : _str(std::move(str)) {
|
|
9
|
+
_del = " \t\n\r\f";
|
|
10
|
+
_ret = false;
|
|
11
|
+
_pos = 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
StrTokenizer::StrTokenizer(string str, string del, bool ret)
|
|
15
|
+
: _str(std::move(str)), _del(std::move(del)), _ret(ret) {
|
|
16
|
+
_pos = 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
int StrTokenizer::count() {
|
|
20
|
+
int c = 0;
|
|
21
|
+
bool in = false;
|
|
22
|
+
for (int i = _pos, len = _str.length(); i < len; i++) {
|
|
23
|
+
if (_del.find(_str[i]) != std::string::npos) {
|
|
24
|
+
if (_ret) c++;
|
|
25
|
+
if (in) {
|
|
26
|
+
c++;
|
|
27
|
+
in = false;
|
|
28
|
+
}
|
|
29
|
+
} else {
|
|
30
|
+
in = true;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (in) c++;
|
|
34
|
+
return c;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
std::string StrTokenizer::next() {
|
|
38
|
+
int i = _pos;
|
|
39
|
+
int len = _str.length();
|
|
40
|
+
|
|
41
|
+
if (i < len) {
|
|
42
|
+
if (_ret) {
|
|
43
|
+
if (_del.find(_str[_pos]) != std::string::npos) return std::string({_str[_pos++]});
|
|
44
|
+
for (_pos++; _pos < len; _pos++)
|
|
45
|
+
if (_del.find(_str[_pos]) != std::string::npos) return _str.substr(i, _pos - i);
|
|
46
|
+
return _str.substr(i);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
while (i < len && _del.find(_str[i]) != std::string::npos) i++;
|
|
50
|
+
|
|
51
|
+
_pos = i;
|
|
52
|
+
if (i < len) {
|
|
53
|
+
for (_pos++; _pos < len; _pos++)
|
|
54
|
+
if (_del.find(_str[_pos]) != std::string::npos) return _str.substr(i, _pos - i);
|
|
55
|
+
return _str.substr(i);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return "";
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
map<string, string> microtex::parseOption(const string& options) {
|
|
62
|
+
if (options.empty()) return {};
|
|
63
|
+
|
|
64
|
+
map<string, string> res;
|
|
65
|
+
StrTokenizer tokens(options, ";,");
|
|
66
|
+
const int c = tokens.count();
|
|
67
|
+
for (int i = 0; i < c; i++) {
|
|
68
|
+
std::string tok = tokens.next();
|
|
69
|
+
trim(tok);
|
|
70
|
+
StrTokenizer opt(tok, "=");
|
|
71
|
+
const int n = opt.count();
|
|
72
|
+
std::vector<std::string> optarg(n);
|
|
73
|
+
for (int j = 0; j < n; j++) {
|
|
74
|
+
optarg[j] = opt.next();
|
|
75
|
+
}
|
|
76
|
+
if (!optarg.empty()) {
|
|
77
|
+
if (optarg.size() == 2) {
|
|
78
|
+
res[trim(optarg[0])] = trim(optarg[1]);
|
|
79
|
+
} else if (optarg.size() == 1) {
|
|
80
|
+
res[trim(optarg[0])] = "";
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return res;
|
|
85
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
#ifndef STRING_UTILS_H_INCLUDED
|
|
2
|
+
#define STRING_UTILS_H_INCLUDED
|
|
3
|
+
|
|
4
|
+
#include <algorithm>
|
|
5
|
+
#include <cerrno>
|
|
6
|
+
#include <climits>
|
|
7
|
+
#include <functional>
|
|
8
|
+
#include <map>
|
|
9
|
+
#include <string>
|
|
10
|
+
#include <vector>
|
|
11
|
+
|
|
12
|
+
namespace microtex {
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Parse options from given string. The options are given in the form of
|
|
16
|
+
* [key=value,key=value...].
|
|
17
|
+
*/
|
|
18
|
+
std::map<std::string, std::string> parseOption(const std::string& options);
|
|
19
|
+
|
|
20
|
+
/** Convert a value to string */
|
|
21
|
+
template <class T>
|
|
22
|
+
inline std::string toString(T val) {
|
|
23
|
+
return std::to_string(val);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
inline std::string toString(char val) {
|
|
27
|
+
return {val};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
template <class T>
|
|
31
|
+
inline void valueOf(const std::string& s, T& val) {
|
|
32
|
+
char* endptr = nullptr;
|
|
33
|
+
val = strtod(s.c_str(), &endptr);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
inline bool str2int(const char* str, size_t len, int& res, int radix) {
|
|
37
|
+
char* endptr = nullptr;
|
|
38
|
+
errno = 0;
|
|
39
|
+
|
|
40
|
+
const long val = strtol(str, &endptr, radix);
|
|
41
|
+
|
|
42
|
+
if ((val == LONG_MAX || val == LONG_MIN) && errno == ERANGE) return false;
|
|
43
|
+
|
|
44
|
+
res = static_cast<int>(val);
|
|
45
|
+
return endptr == str + len;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** Transform a string to lowercase */
|
|
49
|
+
inline std::string& toLower(std::string& src) {
|
|
50
|
+
std::transform(src.begin(), src.end(), src.begin(), ::tolower);
|
|
51
|
+
return src;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/** Ignore left side whitespace in a string */
|
|
55
|
+
inline std::string& ltrim(std::string& s) {
|
|
56
|
+
s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](char c) { return !isspace(c); }));
|
|
57
|
+
return s;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** Ignore right side whitespace in a string */
|
|
61
|
+
inline std::string& rtrim(std::string& s) {
|
|
62
|
+
s.erase(std::find_if(s.rbegin(), s.rend(), [](char c) { return !isspace(c); }).base(), s.end());
|
|
63
|
+
return s;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** Ignore left and right side whitespace in a string */
|
|
67
|
+
inline std::string& trim(std::string& s) {
|
|
68
|
+
return ltrim(rtrim(s));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
inline bool startsWith(const std::string& str, const std::string& cmp) {
|
|
72
|
+
return str.find(cmp) == 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
inline bool endsWith(const std::string& str, const std::string& cmp) {
|
|
76
|
+
return str.rfind(cmp) == (str.length() - cmp.length());
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** Split string with delimiter */
|
|
80
|
+
class StrTokenizer {
|
|
81
|
+
private:
|
|
82
|
+
std::string _str;
|
|
83
|
+
std::string _del;
|
|
84
|
+
bool _ret;
|
|
85
|
+
int _pos;
|
|
86
|
+
|
|
87
|
+
public:
|
|
88
|
+
StrTokenizer(std::string str);
|
|
89
|
+
|
|
90
|
+
StrTokenizer(std::string str, std::string del, bool ret = false);
|
|
91
|
+
|
|
92
|
+
int count();
|
|
93
|
+
|
|
94
|
+
std::string next();
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Returns a replacement string for the given one that has all backslashes
|
|
99
|
+
* and dollar signs escaped
|
|
100
|
+
*/
|
|
101
|
+
inline std::string& quoteReplace(const std::string& src, std::string& out) {
|
|
102
|
+
for (size_t i = 0; i < src.length(); i++) {
|
|
103
|
+
char c = src[i];
|
|
104
|
+
if (c == '\\' || c == '$') out.append(1, '\\');
|
|
105
|
+
out.append(1, c);
|
|
106
|
+
}
|
|
107
|
+
return out;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/** Replace string with specified string in the first */
|
|
111
|
+
inline std::string& replaceFirst(std::string& src, const std::string& from, const std::string& to) {
|
|
112
|
+
size_t start = src.find(from);
|
|
113
|
+
if (start == std::string::npos) return src;
|
|
114
|
+
src.replace(start, from.length(), to);
|
|
115
|
+
return src;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
inline std::string& replaceAll(std::string& src, const std::string& from, const std::string& to) {
|
|
119
|
+
if (from.empty()) return src;
|
|
120
|
+
size_t start = 0;
|
|
121
|
+
while ((start = src.find(from, start)) != std::string::npos) {
|
|
122
|
+
src.replace(start, from.length(), to);
|
|
123
|
+
start += to.length();
|
|
124
|
+
}
|
|
125
|
+
return src;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
} // namespace microtex
|
|
129
|
+
|
|
130
|
+
#endif
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
#ifndef MICROTEX_TYPES_H
|
|
2
|
+
#define MICROTEX_TYPES_H
|
|
3
|
+
|
|
4
|
+
#include <cinttypes>
|
|
5
|
+
#include <memory>
|
|
6
|
+
|
|
7
|
+
namespace microtex {
|
|
8
|
+
|
|
9
|
+
using i8 = std::int8_t;
|
|
10
|
+
using u8 = std::uint8_t;
|
|
11
|
+
using i16 = std::int16_t;
|
|
12
|
+
using u16 = std::uint16_t;
|
|
13
|
+
using i32 = std::int32_t;
|
|
14
|
+
using u32 = std::uint32_t;
|
|
15
|
+
using c32 = char32_t;
|
|
16
|
+
|
|
17
|
+
/** Type alias shared_ptr<T> to sptr<T> */
|
|
18
|
+
template <typename T>
|
|
19
|
+
using sptr = std::shared_ptr<T>;
|
|
20
|
+
|
|
21
|
+
/** Type alias unique_ptr<T> to uptr<T> */
|
|
22
|
+
template <typename T>
|
|
23
|
+
using uptr = std::unique_ptr<T>;
|
|
24
|
+
|
|
25
|
+
/** Formula alignment. */
|
|
26
|
+
enum class Alignment : i8 {
|
|
27
|
+
/** Extra space will be added to the right of the formula. */
|
|
28
|
+
left,
|
|
29
|
+
/** Extra space will be added to the left of the formula. */
|
|
30
|
+
right,
|
|
31
|
+
/**
|
|
32
|
+
* The formula will be centered in the middle. This can
|
|
33
|
+
* be used for both horizontal and vertical alignment.
|
|
34
|
+
*/
|
|
35
|
+
center,
|
|
36
|
+
/** Extra space will be added under the formula. */
|
|
37
|
+
top,
|
|
38
|
+
/** Extra space will be added above the formula. */
|
|
39
|
+
bottom,
|
|
40
|
+
none = -1
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/** Space amount between formulas. */
|
|
44
|
+
enum class SpaceType : i8 {
|
|
45
|
+
thinMuSkip = 1,
|
|
46
|
+
medMuSkip = 2,
|
|
47
|
+
thickMuSkip = 3,
|
|
48
|
+
negThinMuSkip = -1,
|
|
49
|
+
negMedMuSkip = -2,
|
|
50
|
+
negThickMuSkip = -3,
|
|
51
|
+
quad = 3,
|
|
52
|
+
none = 0
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/** Script display type */
|
|
56
|
+
enum class LimitsType : i8 {
|
|
57
|
+
/** depending on TeX style */
|
|
58
|
+
normal,
|
|
59
|
+
/** scripts display on right of the base */
|
|
60
|
+
noLimits,
|
|
61
|
+
/** scripts display above/under the base */
|
|
62
|
+
limits
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
enum class AtomType : i8 {
|
|
66
|
+
/** Ordinary symbol, e.g. "slash" */
|
|
67
|
+
ordinary,
|
|
68
|
+
/** Big operator, e.g. "sum" */
|
|
69
|
+
bigOperator,
|
|
70
|
+
/** Binary operator, e.g. "plus" */
|
|
71
|
+
binaryOperator,
|
|
72
|
+
/** Relation, e.g. "equals" */
|
|
73
|
+
relation,
|
|
74
|
+
/** Opening symbol, e.g. "lbrace" */
|
|
75
|
+
opening,
|
|
76
|
+
/** Closing symbol, e.g. "rbrace" */
|
|
77
|
+
closing,
|
|
78
|
+
/** Punctuation, e.g. "comma" */
|
|
79
|
+
punctuation,
|
|
80
|
+
/** Inner atom (NOT FOR SYMBOLS) */
|
|
81
|
+
inner,
|
|
82
|
+
/** Accent, e.g. "hat" */
|
|
83
|
+
accent = 10,
|
|
84
|
+
/** Inter-text in matrix environment */
|
|
85
|
+
interText,
|
|
86
|
+
/** Multi-column in matrix environment */
|
|
87
|
+
multiColumn,
|
|
88
|
+
/** Horizontal line in matrix environment */
|
|
89
|
+
hline,
|
|
90
|
+
/** Multi-row in matrix environment */
|
|
91
|
+
multiRow,
|
|
92
|
+
/** No type specified */
|
|
93
|
+
none = -1
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
enum class TexStyle : i8 {
|
|
97
|
+
/**
|
|
98
|
+
* The larger versions of big operators are used and limits are placed under
|
|
99
|
+
* and over these operators (default). Symbols are rendered in the largest
|
|
100
|
+
* size.
|
|
101
|
+
*/
|
|
102
|
+
display,
|
|
103
|
+
display1,
|
|
104
|
+
/**
|
|
105
|
+
* The small versions of big operator are used and limits are attached to
|
|
106
|
+
* these operators as scripts (default). The same size as in the display
|
|
107
|
+
* style is used to render symbols.
|
|
108
|
+
*/
|
|
109
|
+
text,
|
|
110
|
+
text1,
|
|
111
|
+
/** The same as the the text style, but symbols are rendered in a smaller size. */
|
|
112
|
+
script,
|
|
113
|
+
script1,
|
|
114
|
+
/** The same as the script style, but symbols are rendered in a smaller size. */
|
|
115
|
+
scriptScript,
|
|
116
|
+
scriptScript1
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
enum class UnitType : i8 {
|
|
120
|
+
/** 1 em = the width of the capital 'M' in the current font */
|
|
121
|
+
em,
|
|
122
|
+
/** 1 ex = the height of the character 'x' in the current font */
|
|
123
|
+
ex,
|
|
124
|
+
pixel,
|
|
125
|
+
/** postscript point (also known as big-point (bp) in TeX) */
|
|
126
|
+
point,
|
|
127
|
+
/** 1 pica = 12 point */
|
|
128
|
+
pica,
|
|
129
|
+
/** 1 mu = 1/18 em */
|
|
130
|
+
mu,
|
|
131
|
+
/** 1 cm = 28.346456693 point */
|
|
132
|
+
cm,
|
|
133
|
+
/** 1 mm = 1/10 cm */
|
|
134
|
+
mm,
|
|
135
|
+
/** 1 in = 72 point */
|
|
136
|
+
in,
|
|
137
|
+
/** 1 sp = 65536 point, shortcut for `scaled-point` */
|
|
138
|
+
sp,
|
|
139
|
+
/** 1 pt = 0.99626401 point (pt means point in printer's) */
|
|
140
|
+
pt,
|
|
141
|
+
/** 1157 dd = 1238 pt, shortcut for `didot` */
|
|
142
|
+
dd,
|
|
143
|
+
/** 1 cc = 12 dd, shortcut for `cicero` */
|
|
144
|
+
cc,
|
|
145
|
+
/** 1 tt = the rule thickness */
|
|
146
|
+
tt,
|
|
147
|
+
none = -1
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
} // namespace microtex
|
|
151
|
+
|
|
152
|
+
#endif // MICROTEX_TYPES_H
|