@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.
Files changed (529) hide show
  1. package/LICENSE +674 -0
  2. package/LICENSE-PROJECT +21 -0
  3. package/README.md +7 -0
  4. package/build.zig +112 -0
  5. package/build.zig.zon +12 -0
  6. package/native/lib.zig +280 -0
  7. package/native/nanosvg.c +4 -0
  8. package/native/vendor/.bootstrap-v5 +1 -0
  9. package/native/vendor/LICENSE-NANOSVG +18 -0
  10. package/native/vendor/microtex/.clang-format +26 -0
  11. package/native/vendor/microtex/.github/workflows/ubuntu.yml +92 -0
  12. package/native/vendor/microtex/.github/workflows/windows-gdi.yml +34 -0
  13. package/native/vendor/microtex/.github/workflows/windows-qt.yml +52 -0
  14. package/native/vendor/microtex/CMakeLists.txt +110 -0
  15. package/native/vendor/microtex/LICENSE +21 -0
  16. package/native/vendor/microtex/MicroTeXInstall.cmake +42 -0
  17. package/native/vendor/microtex/README.md +600 -0
  18. package/native/vendor/microtex/build.zig +209 -0
  19. package/native/vendor/microtex/clatexmath.wrap +6 -0
  20. package/native/vendor/microtex/doc/meson.build +38 -0
  21. package/native/vendor/microtex/doc/microtex-doc.toml.in +47 -0
  22. package/native/vendor/microtex/doc/microtex.svg +39 -0
  23. package/native/vendor/microtex/doc/urlmap.js +6 -0
  24. package/native/vendor/microtex/example/gtk/CMakeLists.txt +68 -0
  25. package/native/vendor/microtex/example/gtk/gtk_main.c +170 -0
  26. package/native/vendor/microtex/example/gtk/isamples.cpp +21 -0
  27. package/native/vendor/microtex/example/gtk/isamples.h +15 -0
  28. package/native/vendor/microtex/example/gtk/meson.build +27 -0
  29. package/native/vendor/microtex/example/gtk/microtex-gtk.gresource.xml +6 -0
  30. package/native/vendor/microtex/example/gtk/microtex-gtk.ui +117 -0
  31. package/native/vendor/microtex/example/gtkmm/CMakeLists.txt +19 -0
  32. package/native/vendor/microtex/example/gtkmm/gtkmm_main.cpp +531 -0
  33. package/native/vendor/microtex/example/gtkmm/meson.build +19 -0
  34. package/native/vendor/microtex/example/memcheck/CMakeLists.txt +12 -0
  35. package/native/vendor/microtex/example/memcheck/mem_check_main.cpp +154 -0
  36. package/native/vendor/microtex/example/qt/CMakeLists.txt +37 -0
  37. package/native/vendor/microtex/example/qt/meson.build +25 -0
  38. package/native/vendor/microtex/example/qt/qt_main.cpp +70 -0
  39. package/native/vendor/microtex/example/qt/qt_mainwindow.cpp +107 -0
  40. package/native/vendor/microtex/example/qt/qt_mainwindow.h +40 -0
  41. package/native/vendor/microtex/example/qt/qt_skiatexwidget.cpp +149 -0
  42. package/native/vendor/microtex/example/qt/qt_skiatexwidget.h +48 -0
  43. package/native/vendor/microtex/example/qt/qt_tex_render.h +15 -0
  44. package/native/vendor/microtex/example/qt/qt_texqmlitem.cpp +56 -0
  45. package/native/vendor/microtex/example/qt/qt_texqmlitem.h +31 -0
  46. package/native/vendor/microtex/example/qt/qt_texwidget.cpp +62 -0
  47. package/native/vendor/microtex/example/qt/qt_texwidget.h +31 -0
  48. package/native/vendor/microtex/example/qtpng/CMakeLists.txt +11 -0
  49. package/native/vendor/microtex/example/qtpng/latex2png.cpp +115 -0
  50. package/native/vendor/microtex/example/samples/samples.cpp +52 -0
  51. package/native/vendor/microtex/example/samples/samples.h +32 -0
  52. package/native/vendor/microtex/example/win32/CMakeLists.txt +15 -0
  53. package/native/vendor/microtex/example/win32/meson.build +18 -0
  54. package/native/vendor/microtex/example/win32/win32_main.cpp +375 -0
  55. package/native/vendor/microtex/githooks/pre-commit +19 -0
  56. package/native/vendor/microtex/githooks/pre-push +103 -0
  57. package/native/vendor/microtex/lib/CMakeLists.txt +234 -0
  58. package/native/vendor/microtex/lib/atom/atom.cpp +14 -0
  59. package/native/vendor/microtex/lib/atom/atom.h +96 -0
  60. package/native/vendor/microtex/lib/atom/atom_accent.cpp +115 -0
  61. package/native/vendor/microtex/lib/atom/atom_accent.h +53 -0
  62. package/native/vendor/microtex/lib/atom/atom_basic.cpp +146 -0
  63. package/native/vendor/microtex/lib/atom/atom_basic.h +273 -0
  64. package/native/vendor/microtex/lib/atom/atom_box.cpp +41 -0
  65. package/native/vendor/microtex/lib/atom/atom_box.h +70 -0
  66. package/native/vendor/microtex/lib/atom/atom_char.cpp +99 -0
  67. package/native/vendor/microtex/lib/atom/atom_char.h +147 -0
  68. package/native/vendor/microtex/lib/atom/atom_delim.cpp +65 -0
  69. package/native/vendor/microtex/lib/atom/atom_delim.h +58 -0
  70. package/native/vendor/microtex/lib/atom/atom_fence.cpp +65 -0
  71. package/native/vendor/microtex/lib/atom/atom_fence.h +56 -0
  72. package/native/vendor/microtex/lib/atom/atom_font.cpp +20 -0
  73. package/native/vendor/microtex/lib/atom/atom_font.h +49 -0
  74. package/native/vendor/microtex/lib/atom/atom_frac.cpp +101 -0
  75. package/native/vendor/microtex/lib/atom/atom_frac.h +42 -0
  76. package/native/vendor/microtex/lib/atom/atom_matrix.cpp +756 -0
  77. package/native/vendor/microtex/lib/atom/atom_matrix.h +268 -0
  78. package/native/vendor/microtex/lib/atom/atom_misc.cpp +230 -0
  79. package/native/vendor/microtex/lib/atom/atom_misc.h +200 -0
  80. package/native/vendor/microtex/lib/atom/atom_operator.cpp +51 -0
  81. package/native/vendor/microtex/lib/atom/atom_operator.h +41 -0
  82. package/native/vendor/microtex/lib/atom/atom_root.cpp +61 -0
  83. package/native/vendor/microtex/lib/atom/atom_root.h +27 -0
  84. package/native/vendor/microtex/lib/atom/atom_row.cpp +334 -0
  85. package/native/vendor/microtex/lib/atom/atom_row.h +176 -0
  86. package/native/vendor/microtex/lib/atom/atom_scripts.cpp +182 -0
  87. package/native/vendor/microtex/lib/atom/atom_scripts.h +52 -0
  88. package/native/vendor/microtex/lib/atom/atom_sideset.cpp +92 -0
  89. package/native/vendor/microtex/lib/atom/atom_sideset.h +24 -0
  90. package/native/vendor/microtex/lib/atom/atom_space.cpp +22 -0
  91. package/native/vendor/microtex/lib/atom/atom_space.h +38 -0
  92. package/native/vendor/microtex/lib/atom/atom_stack.cpp +117 -0
  93. package/native/vendor/microtex/lib/atom/atom_stack.h +103 -0
  94. package/native/vendor/microtex/lib/atom/atom_text.cpp +17 -0
  95. package/native/vendor/microtex/lib/atom/atom_text.h +33 -0
  96. package/native/vendor/microtex/lib/atom/atom_vrow.cpp +96 -0
  97. package/native/vendor/microtex/lib/atom/atom_vrow.h +47 -0
  98. package/native/vendor/microtex/lib/atom/atom_zstack.cpp +66 -0
  99. package/native/vendor/microtex/lib/atom/atom_zstack.h +37 -0
  100. package/native/vendor/microtex/lib/atom/colors_def.cpp +157 -0
  101. package/native/vendor/microtex/lib/atom/meson.build +50 -0
  102. package/native/vendor/microtex/lib/box/box.cpp +49 -0
  103. package/native/vendor/microtex/lib/box/box.h +184 -0
  104. package/native/vendor/microtex/lib/box/box_factory.cpp +162 -0
  105. package/native/vendor/microtex/lib/box/box_factory.h +24 -0
  106. package/native/vendor/microtex/lib/box/box_group.cpp +503 -0
  107. package/native/vendor/microtex/lib/box/box_group.h +285 -0
  108. package/native/vendor/microtex/lib/box/box_single.cpp +179 -0
  109. package/native/vendor/microtex/lib/box/box_single.h +157 -0
  110. package/native/vendor/microtex/lib/box/meson.build +15 -0
  111. package/native/vendor/microtex/lib/core/debug_config.cpp +3 -0
  112. package/native/vendor/microtex/lib/core/debug_config.h +24 -0
  113. package/native/vendor/microtex/lib/core/formula.cpp +180 -0
  114. package/native/vendor/microtex/lib/core/formula.h +137 -0
  115. package/native/vendor/microtex/lib/core/formula_def.cpp +167 -0
  116. package/native/vendor/microtex/lib/core/glue.cpp +108 -0
  117. package/native/vendor/microtex/lib/core/glue.h +55 -0
  118. package/native/vendor/microtex/lib/core/localized_num.cpp +51 -0
  119. package/native/vendor/microtex/lib/core/meson.build +19 -0
  120. package/native/vendor/microtex/lib/core/parser.cpp +874 -0
  121. package/native/vendor/microtex/lib/core/parser.h +306 -0
  122. package/native/vendor/microtex/lib/core/split.cpp +185 -0
  123. package/native/vendor/microtex/lib/core/split.h +40 -0
  124. package/native/vendor/microtex/lib/env/env.cpp +141 -0
  125. package/native/vendor/microtex/lib/env/env.h +221 -0
  126. package/native/vendor/microtex/lib/env/meson.build +11 -0
  127. package/native/vendor/microtex/lib/env/units.cpp +109 -0
  128. package/native/vendor/microtex/lib/env/units.h +61 -0
  129. package/native/vendor/microtex/lib/graphic/font_style.cpp +63 -0
  130. package/native/vendor/microtex/lib/graphic/font_style.h +61 -0
  131. package/native/vendor/microtex/lib/graphic/graphic.cpp +38 -0
  132. package/native/vendor/microtex/lib/graphic/graphic.h +314 -0
  133. package/native/vendor/microtex/lib/graphic/graphic_basic.cpp +44 -0
  134. package/native/vendor/microtex/lib/graphic/graphic_basic.h +131 -0
  135. package/native/vendor/microtex/lib/graphic/meson.build +13 -0
  136. package/native/vendor/microtex/lib/macro/macro.cpp +143 -0
  137. package/native/vendor/microtex/lib/macro/macro.h +155 -0
  138. package/native/vendor/microtex/lib/macro/macro_accent.cpp +50 -0
  139. package/native/vendor/microtex/lib/macro/macro_accent.h +61 -0
  140. package/native/vendor/microtex/lib/macro/macro_boxes.h +68 -0
  141. package/native/vendor/microtex/lib/macro/macro_colors.cpp +42 -0
  142. package/native/vendor/microtex/lib/macro/macro_colors.h +42 -0
  143. package/native/vendor/microtex/lib/macro/macro_decl.h +16 -0
  144. package/native/vendor/microtex/lib/macro/macro_def.cpp +418 -0
  145. package/native/vendor/microtex/lib/macro/macro_delims.cpp +56 -0
  146. package/native/vendor/microtex/lib/macro/macro_delims.h +73 -0
  147. package/native/vendor/microtex/lib/macro/macro_env.h +212 -0
  148. package/native/vendor/microtex/lib/macro/macro_fonts.cpp +53 -0
  149. package/native/vendor/microtex/lib/macro/macro_fonts.h +78 -0
  150. package/native/vendor/microtex/lib/macro/macro_frac.cpp +138 -0
  151. package/native/vendor/microtex/lib/macro/macro_frac.h +50 -0
  152. package/native/vendor/microtex/lib/macro/macro_misc.cpp +211 -0
  153. package/native/vendor/microtex/lib/macro/macro_misc.h +217 -0
  154. package/native/vendor/microtex/lib/macro/macro_scripts.cpp +32 -0
  155. package/native/vendor/microtex/lib/macro/macro_scripts.h +17 -0
  156. package/native/vendor/microtex/lib/macro/macro_sizes.h +110 -0
  157. package/native/vendor/microtex/lib/macro/macro_space.cpp +31 -0
  158. package/native/vendor/microtex/lib/macro/macro_space.h +17 -0
  159. package/native/vendor/microtex/lib/macro/macro_styles.cpp +45 -0
  160. package/native/vendor/microtex/lib/macro/macro_styles.h +22 -0
  161. package/native/vendor/microtex/lib/macro/macro_types.h +48 -0
  162. package/native/vendor/microtex/lib/macro/meson.build +33 -0
  163. package/native/vendor/microtex/lib/meson.build +102 -0
  164. package/native/vendor/microtex/lib/microtex.cpp +208 -0
  165. package/native/vendor/microtex/lib/microtex.h +225 -0
  166. package/native/vendor/microtex/lib/microtexConfig.cmake.in +2 -0
  167. package/native/vendor/microtex/lib/microtexapi.h +22 -0
  168. package/native/vendor/microtex/lib/microtexconfig.h.in +7 -0
  169. package/native/vendor/microtex/lib/microtexexport.h +31 -0
  170. package/native/vendor/microtex/lib/otf/clm.cpp +405 -0
  171. package/native/vendor/microtex/lib/otf/clm.h +61 -0
  172. package/native/vendor/microtex/lib/otf/fontsense.cpp +191 -0
  173. package/native/vendor/microtex/lib/otf/fontsense.h +20 -0
  174. package/native/vendor/microtex/lib/otf/glyph.cpp +53 -0
  175. package/native/vendor/microtex/lib/otf/glyph.h +384 -0
  176. package/native/vendor/microtex/lib/otf/math_consts.h +154 -0
  177. package/native/vendor/microtex/lib/otf/meson.build +18 -0
  178. package/native/vendor/microtex/lib/otf/otf.cpp +84 -0
  179. package/native/vendor/microtex/lib/otf/otf.h +177 -0
  180. package/native/vendor/microtex/lib/otf/otfconfig.h +32 -0
  181. package/native/vendor/microtex/lib/otf/path.cpp +187 -0
  182. package/native/vendor/microtex/lib/otf/path.h +120 -0
  183. package/native/vendor/microtex/lib/render/builder.cpp +68 -0
  184. package/native/vendor/microtex/lib/render/builder.h +73 -0
  185. package/native/vendor/microtex/lib/render/meson.build +11 -0
  186. package/native/vendor/microtex/lib/render/render.cpp +136 -0
  187. package/native/vendor/microtex/lib/render/render.h +59 -0
  188. package/native/vendor/microtex/lib/unimath/font_meta.h +22 -0
  189. package/native/vendor/microtex/lib/unimath/font_src.cpp +21 -0
  190. package/native/vendor/microtex/lib/unimath/font_src.h +61 -0
  191. package/native/vendor/microtex/lib/unimath/math_type.cpp +318 -0
  192. package/native/vendor/microtex/lib/unimath/math_type.h +105 -0
  193. package/native/vendor/microtex/lib/unimath/meson.build +18 -0
  194. package/native/vendor/microtex/lib/unimath/uni_char.cpp +121 -0
  195. package/native/vendor/microtex/lib/unimath/uni_char.h +109 -0
  196. package/native/vendor/microtex/lib/unimath/uni_font.cpp +248 -0
  197. package/native/vendor/microtex/lib/unimath/uni_font.h +139 -0
  198. package/native/vendor/microtex/lib/unimath/uni_symbol.cpp +2929 -0
  199. package/native/vendor/microtex/lib/unimath/uni_symbol.h +31 -0
  200. package/native/vendor/microtex/lib/utils/dict_tree.h +68 -0
  201. package/native/vendor/microtex/lib/utils/exceptions.h +61 -0
  202. package/native/vendor/microtex/lib/utils/log.h +34 -0
  203. package/native/vendor/microtex/lib/utils/meson.build +18 -0
  204. package/native/vendor/microtex/lib/utils/nums.h +24 -0
  205. package/native/vendor/microtex/lib/utils/string_utils.cpp +85 -0
  206. package/native/vendor/microtex/lib/utils/string_utils.h +130 -0
  207. package/native/vendor/microtex/lib/utils/types.h +152 -0
  208. package/native/vendor/microtex/lib/utils/utf.cpp +115 -0
  209. package/native/vendor/microtex/lib/utils/utf.h +58 -0
  210. package/native/vendor/microtex/lib/utils/utils.cpp +40 -0
  211. package/native/vendor/microtex/lib/utils/utils.h +88 -0
  212. package/native/vendor/microtex/lib/wrapper/byte_seq.cpp +46 -0
  213. package/native/vendor/microtex/lib/wrapper/byte_seq.h +70 -0
  214. package/native/vendor/microtex/lib/wrapper/callback.cpp +10 -0
  215. package/native/vendor/microtex/lib/wrapper/callback.h +72 -0
  216. package/native/vendor/microtex/lib/wrapper/cwrapper.cpp +206 -0
  217. package/native/vendor/microtex/lib/wrapper/cwrapper.h +305 -0
  218. package/native/vendor/microtex/lib/wrapper/graphic_wrapper.cpp +211 -0
  219. package/native/vendor/microtex/lib/wrapper/graphic_wrapper.h +159 -0
  220. package/native/vendor/microtex/lib/wrapper/meson.build +22 -0
  221. package/native/vendor/microtex/meson.build +75 -0
  222. package/native/vendor/microtex/meson_options.txt +29 -0
  223. package/native/vendor/microtex/platform/cairo/CMakeLists.txt +36 -0
  224. package/native/vendor/microtex/platform/cairo/graphic_cairo.cpp +384 -0
  225. package/native/vendor/microtex/platform/cairo/graphic_cairo.h +119 -0
  226. package/native/vendor/microtex/platform/cairo/meson.build +47 -0
  227. package/native/vendor/microtex/platform/cairo/microtex-cairoConfig.cmake.in +11 -0
  228. package/native/vendor/microtex/platform/flutter/microtex/.metadata +10 -0
  229. package/native/vendor/microtex/platform/flutter/microtex/CHANGELOG.md +3 -0
  230. package/native/vendor/microtex/platform/flutter/microtex/LICENSE +1 -0
  231. package/native/vendor/microtex/platform/flutter/microtex/README.md +15 -0
  232. package/native/vendor/microtex/platform/flutter/microtex/analysis_options.yaml +4 -0
  233. package/native/vendor/microtex/platform/flutter/microtex/android/build.gradle +56 -0
  234. package/native/vendor/microtex/platform/flutter/microtex/android/settings.gradle +1 -0
  235. package/native/vendor/microtex/platform/flutter/microtex/android/src/main/AndroidManifest.xml +3 -0
  236. package/native/vendor/microtex/platform/flutter/microtex/android/src/main/kotlin/io/nano/microtex/microtex/MicrotexPlugin.kt +35 -0
  237. package/native/vendor/microtex/platform/flutter/microtex/example/.metadata +10 -0
  238. package/native/vendor/microtex/platform/flutter/microtex/example/README.md +16 -0
  239. package/native/vendor/microtex/platform/flutter/microtex/example/analysis_options.yaml +31 -0
  240. package/native/vendor/microtex/platform/flutter/microtex/example/android/app/build.gradle +68 -0
  241. package/native/vendor/microtex/platform/flutter/microtex/example/android/app/src/debug/AndroidManifest.xml +7 -0
  242. package/native/vendor/microtex/platform/flutter/microtex/example/android/app/src/main/AndroidManifest.xml +34 -0
  243. package/native/vendor/microtex/platform/flutter/microtex/example/android/app/src/main/kotlin/io/nano/microtex/microtex_example/MainActivity.kt +6 -0
  244. package/native/vendor/microtex/platform/flutter/microtex/example/android/app/src/main/res/drawable/launch_background.xml +12 -0
  245. package/native/vendor/microtex/platform/flutter/microtex/example/android/app/src/main/res/drawable-v21/launch_background.xml +12 -0
  246. package/native/vendor/microtex/platform/flutter/microtex/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  247. package/native/vendor/microtex/platform/flutter/microtex/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  248. package/native/vendor/microtex/platform/flutter/microtex/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  249. package/native/vendor/microtex/platform/flutter/microtex/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  250. package/native/vendor/microtex/platform/flutter/microtex/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  251. package/native/vendor/microtex/platform/flutter/microtex/example/android/app/src/main/res/values/styles.xml +18 -0
  252. package/native/vendor/microtex/platform/flutter/microtex/example/android/app/src/main/res/values-night/styles.xml +18 -0
  253. package/native/vendor/microtex/platform/flutter/microtex/example/android/app/src/profile/AndroidManifest.xml +7 -0
  254. package/native/vendor/microtex/platform/flutter/microtex/example/android/build.gradle +31 -0
  255. package/native/vendor/microtex/platform/flutter/microtex/example/android/gradle/wrapper/gradle-wrapper.properties +6 -0
  256. package/native/vendor/microtex/platform/flutter/microtex/example/android/gradle.properties +3 -0
  257. package/native/vendor/microtex/platform/flutter/microtex/example/android/settings.gradle +11 -0
  258. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Flutter/AppFrameworkInfo.plist +26 -0
  259. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Flutter/Debug.xcconfig +2 -0
  260. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Flutter/Release.xcconfig +2 -0
  261. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Podfile +41 -0
  262. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Podfile.lock +22 -0
  263. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/AppDelegate.swift +13 -0
  264. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +122 -0
  265. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png +0 -0
  266. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png +0 -0
  267. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png +0 -0
  268. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png +0 -0
  269. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png +0 -0
  270. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png +0 -0
  271. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png +0 -0
  272. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png +0 -0
  273. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png +0 -0
  274. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png +0 -0
  275. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png +0 -0
  276. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png +0 -0
  277. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png +0 -0
  278. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png +0 -0
  279. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png +0 -0
  280. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +23 -0
  281. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png +0 -0
  282. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png +0 -0
  283. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png +0 -0
  284. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +5 -0
  285. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +37 -0
  286. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Base.lproj/Main.storyboard +26 -0
  287. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Info.plist +49 -0
  288. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner/Runner-Bridging-Header.h +1 -0
  289. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner.xcodeproj/project.pbxproj +549 -0
  290. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  291. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  292. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
  293. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +87 -0
  294. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner.xcworkspace/contents.xcworkspacedata +10 -0
  295. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  296. package/native/vendor/microtex/platform/flutter/microtex/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
  297. package/native/vendor/microtex/platform/flutter/microtex/example/lib/main.dart +23 -0
  298. package/native/vendor/microtex/platform/flutter/microtex/example/lib/screen/edit_in_one.dart +0 -0
  299. package/native/vendor/microtex/platform/flutter/microtex/example/lib/screen/edit_screen.dart +208 -0
  300. package/native/vendor/microtex/platform/flutter/microtex/example/lib/utils/convert_spans.dart +63 -0
  301. package/native/vendor/microtex/platform/flutter/microtex/example/lib/utils/string_ext.dart +10 -0
  302. package/native/vendor/microtex/platform/flutter/microtex/example/lib/widget/cmp.dart +118 -0
  303. package/native/vendor/microtex/platform/flutter/microtex/example/lib/widget/draggable.dart +75 -0
  304. package/native/vendor/microtex/platform/flutter/microtex/example/lib/widget/rich.dart +23 -0
  305. package/native/vendor/microtex/platform/flutter/microtex/example/lib/widget/split.dart +72 -0
  306. package/native/vendor/microtex/platform/flutter/microtex/example/lib/widget/tex_highlight_controller.dart +66 -0
  307. package/native/vendor/microtex/platform/flutter/microtex/example/lib/widget/tex_input_controller.dart +19 -0
  308. package/native/vendor/microtex/platform/flutter/microtex/example/linux/CMakeLists.txt +116 -0
  309. package/native/vendor/microtex/platform/flutter/microtex/example/linux/flutter/CMakeLists.txt +87 -0
  310. package/native/vendor/microtex/platform/flutter/microtex/example/linux/flutter/generated_plugin_registrant.cc +15 -0
  311. package/native/vendor/microtex/platform/flutter/microtex/example/linux/flutter/generated_plugin_registrant.h +15 -0
  312. package/native/vendor/microtex/platform/flutter/microtex/example/linux/flutter/generated_plugins.cmake +24 -0
  313. package/native/vendor/microtex/platform/flutter/microtex/example/linux/main.cc +6 -0
  314. package/native/vendor/microtex/platform/flutter/microtex/example/linux/my_application.cc +104 -0
  315. package/native/vendor/microtex/platform/flutter/microtex/example/linux/my_application.h +18 -0
  316. package/native/vendor/microtex/platform/flutter/microtex/example/macos/Flutter/Flutter-Debug.xcconfig +2 -0
  317. package/native/vendor/microtex/platform/flutter/microtex/example/macos/Flutter/Flutter-Release.xcconfig +2 -0
  318. package/native/vendor/microtex/platform/flutter/microtex/example/macos/Flutter/GeneratedPluginRegistrant.swift +12 -0
  319. package/native/vendor/microtex/platform/flutter/microtex/example/macos/Podfile +40 -0
  320. package/native/vendor/microtex/platform/flutter/microtex/example/macos/Podfile.lock +22 -0
  321. package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/AppDelegate.swift +9 -0
  322. package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +68 -0
  323. package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png +0 -0
  324. package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png +0 -0
  325. package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png +0 -0
  326. package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png +0 -0
  327. package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png +0 -0
  328. package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png +0 -0
  329. package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png +0 -0
  330. package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/Base.lproj/MainMenu.xib +343 -0
  331. package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/Configs/AppInfo.xcconfig +14 -0
  332. package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/Configs/Debug.xcconfig +2 -0
  333. package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/Configs/Release.xcconfig +2 -0
  334. package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/Configs/Warnings.xcconfig +13 -0
  335. package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/DebugProfile.entitlements +12 -0
  336. package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/Info.plist +32 -0
  337. package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/MainFlutterWindow.swift +15 -0
  338. package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner/Release.entitlements +8 -0
  339. package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner.xcodeproj/project.pbxproj +633 -0
  340. package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  341. package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +87 -0
  342. package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner.xcworkspace/contents.xcworkspacedata +10 -0
  343. package/native/vendor/microtex/platform/flutter/microtex/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  344. package/native/vendor/microtex/platform/flutter/microtex/example/pubspec.lock +191 -0
  345. package/native/vendor/microtex/platform/flutter/microtex/example/pubspec.yaml +56 -0
  346. package/native/vendor/microtex/platform/flutter/microtex/example/test/widget_test.dart +26 -0
  347. package/native/vendor/microtex/platform/flutter/microtex/example/windows/CMakeLists.txt +95 -0
  348. package/native/vendor/microtex/platform/flutter/microtex/example/windows/flutter/CMakeLists.txt +103 -0
  349. package/native/vendor/microtex/platform/flutter/microtex/example/windows/flutter/generated_plugin_registrant.cc +14 -0
  350. package/native/vendor/microtex/platform/flutter/microtex/example/windows/flutter/generated_plugin_registrant.h +15 -0
  351. package/native/vendor/microtex/platform/flutter/microtex/example/windows/flutter/generated_plugins.cmake +24 -0
  352. package/native/vendor/microtex/platform/flutter/microtex/example/windows/runner/CMakeLists.txt +17 -0
  353. package/native/vendor/microtex/platform/flutter/microtex/example/windows/runner/Runner.rc +121 -0
  354. package/native/vendor/microtex/platform/flutter/microtex/example/windows/runner/flutter_window.cpp +61 -0
  355. package/native/vendor/microtex/platform/flutter/microtex/example/windows/runner/flutter_window.h +33 -0
  356. package/native/vendor/microtex/platform/flutter/microtex/example/windows/runner/main.cpp +43 -0
  357. package/native/vendor/microtex/platform/flutter/microtex/example/windows/runner/resource.h +16 -0
  358. package/native/vendor/microtex/platform/flutter/microtex/example/windows/runner/resources/app_icon.ico +0 -0
  359. package/native/vendor/microtex/platform/flutter/microtex/example/windows/runner/runner.exe.manifest +20 -0
  360. package/native/vendor/microtex/platform/flutter/microtex/example/windows/runner/utils.cpp +64 -0
  361. package/native/vendor/microtex/platform/flutter/microtex/example/windows/runner/utils.h +19 -0
  362. package/native/vendor/microtex/platform/flutter/microtex/example/windows/runner/win32_window.cpp +245 -0
  363. package/native/vendor/microtex/platform/flutter/microtex/example/windows/runner/win32_window.h +98 -0
  364. package/native/vendor/microtex/platform/flutter/microtex/ios/Assets/.gitkeep +0 -0
  365. package/native/vendor/microtex/platform/flutter/microtex/ios/Classes/MicrotexPlugin.h +4 -0
  366. package/native/vendor/microtex/platform/flutter/microtex/ios/Classes/MicrotexPlugin.m +19 -0
  367. package/native/vendor/microtex/platform/flutter/microtex/ios/Classes/SwiftMicrotexPlugin.swift +14 -0
  368. package/native/vendor/microtex/platform/flutter/microtex/ios/Classes/dummy.h +4 -0
  369. package/native/vendor/microtex/platform/flutter/microtex/ios/microtex.podspec +27 -0
  370. package/native/vendor/microtex/platform/flutter/microtex/lib/microtex.dart +7 -0
  371. package/native/vendor/microtex/platform/flutter/microtex/lib/src/bindings.dart +218 -0
  372. package/native/vendor/microtex/platform/flutter/microtex/lib/src/bounds.dart +10 -0
  373. package/native/vendor/microtex/platform/flutter/microtex/lib/src/context.dart +205 -0
  374. package/native/vendor/microtex/platform/flutter/microtex/lib/src/fontdesc.dart +14 -0
  375. package/native/vendor/microtex/platform/flutter/microtex/lib/src/fontmeta.dart +14 -0
  376. package/native/vendor/microtex/platform/flutter/microtex/lib/src/pathcache.dart +17 -0
  377. package/native/vendor/microtex/platform/flutter/microtex/lib/src/render.dart +291 -0
  378. package/native/vendor/microtex/platform/flutter/microtex/lib/src/texstyle.dart +11 -0
  379. package/native/vendor/microtex/platform/flutter/microtex/lib/src/textlayout.dart +93 -0
  380. package/native/vendor/microtex/platform/flutter/microtex/lib/src/widget.dart +163 -0
  381. package/native/vendor/microtex/platform/flutter/microtex/linux/CMakeLists.txt +33 -0
  382. package/native/vendor/microtex/platform/flutter/microtex/linux/include/microtex/microtex_plugin.h +26 -0
  383. package/native/vendor/microtex/platform/flutter/microtex/linux/microtex_plugin.cc +70 -0
  384. package/native/vendor/microtex/platform/flutter/microtex/macos/Classes/MicrotexPlugin.swift +20 -0
  385. package/native/vendor/microtex/platform/flutter/microtex/macos/Classes/dummy.h +4 -0
  386. package/native/vendor/microtex/platform/flutter/microtex/macos/Classes/microtex-Bridging-Header.h +1 -0
  387. package/native/vendor/microtex/platform/flutter/microtex/macos/microtex.podspec +26 -0
  388. package/native/vendor/microtex/platform/flutter/microtex/nativelib/CMakeLists.txt +44 -0
  389. package/native/vendor/microtex/platform/flutter/microtex/nativelib/builddarwin.sh +108 -0
  390. package/native/vendor/microtex/platform/flutter/microtex/pubspec.yaml +37 -0
  391. package/native/vendor/microtex/platform/flutter/microtex/test/microtex_test.dart +23 -0
  392. package/native/vendor/microtex/platform/flutter/microtex/windows/CMakeLists.txt +32 -0
  393. package/native/vendor/microtex/platform/flutter/microtex/windows/include/microtex/microtex_plugin.h +23 -0
  394. package/native/vendor/microtex/platform/flutter/microtex/windows/microtex_plugin.cpp +82 -0
  395. package/native/vendor/microtex/platform/gdi_win/CMakeLists.txt +20 -0
  396. package/native/vendor/microtex/platform/gdi_win/graphic_win32.cpp +352 -0
  397. package/native/vendor/microtex/platform/gdi_win/graphic_win32.h +137 -0
  398. package/native/vendor/microtex/platform/gdi_win/meson.build +39 -0
  399. package/native/vendor/microtex/platform/gtk/CMakeLists.txt +36 -0
  400. package/native/vendor/microtex/platform/gtk/meson.build +65 -0
  401. package/native/vendor/microtex/platform/gtk/microtex-gtkConfig.cmake.in +11 -0
  402. package/native/vendor/microtex/platform/gtk/microtexequation.cpp +708 -0
  403. package/native/vendor/microtex/platform/gtk/microtexequation.h +72 -0
  404. package/native/vendor/microtex/platform/qt/CMakeLists.txt +37 -0
  405. package/native/vendor/microtex/platform/qt/graphic_qt.cpp +355 -0
  406. package/native/vendor/microtex/platform/qt/graphic_qt.h +116 -0
  407. package/native/vendor/microtex/platform/qt/meson.build +38 -0
  408. package/native/vendor/microtex/platform/qt/microtex-qtConfig.cmake.in +7 -0
  409. package/native/vendor/microtex/platform/skia/CMakeLists.txt +46 -0
  410. package/native/vendor/microtex/platform/skia/graphic_skia.cpp +306 -0
  411. package/native/vendor/microtex/platform/skia/graphic_skia.h +125 -0
  412. package/native/vendor/microtex/platform/skia/microtex-skiaConfig.cmake.in +6 -0
  413. package/native/vendor/microtex/platform/wasm/CMakeLists.txt +38 -0
  414. package/native/vendor/microtex/platform/wasm/emscripten.cross +31 -0
  415. package/native/vendor/microtex/platform/wasm/main.cpp +15 -0
  416. package/native/vendor/microtex/platform/wasm/meson.build +8 -0
  417. package/native/vendor/microtex/platform/wasm/prebuild-example-meson.sh +21 -0
  418. package/native/vendor/microtex/platform/wasm/prebuild-example.sh +21 -0
  419. package/native/vendor/microtex/platform/wasm/prebuild-lib-meson.sh +28 -0
  420. package/native/vendor/microtex/platform/wasm/prebuild-lib.sh +31 -0
  421. package/native/vendor/microtex/platform/wasm/web/.babelrc +10 -0
  422. package/native/vendor/microtex/platform/wasm/web/example/examples.js +43 -0
  423. package/native/vendor/microtex/platform/wasm/web/example/hello.js +31 -0
  424. package/native/vendor/microtex/platform/wasm/web/example/index.html +55 -0
  425. package/native/vendor/microtex/platform/wasm/web/example/index.js +243 -0
  426. package/native/vendor/microtex/platform/wasm/web/example/styles.css +86 -0
  427. package/native/vendor/microtex/platform/wasm/web/example/utils.js +47 -0
  428. package/native/vendor/microtex/platform/wasm/web/lib/context.js +271 -0
  429. package/native/vendor/microtex/platform/wasm/web/lib/index.js +10 -0
  430. package/native/vendor/microtex/platform/wasm/web/lib/render.js +293 -0
  431. package/native/vendor/microtex/platform/wasm/web/lib/runtime.js +14 -0
  432. package/native/vendor/microtex/platform/wasm/web/lib/svg.js +237 -0
  433. package/native/vendor/microtex/platform/wasm/web/lib/textlayout.js +88 -0
  434. package/native/vendor/microtex/platform/wasm/web/package-lock.json +5931 -0
  435. package/native/vendor/microtex/platform/wasm/web/package.json +45 -0
  436. package/native/vendor/microtex/platform/wasm/web/publish-example.sh +17 -0
  437. package/native/vendor/microtex/platform/wasm/web/rollup.config.example.js +24 -0
  438. package/native/vendor/microtex/platform/wasm/web/rollup.config.lib.js +16 -0
  439. package/native/vendor/microtex/prebuilt/otf2clm.py +807 -0
  440. package/native/vendor/microtex/prebuilt/otf2clm.sh +9 -0
  441. package/native/vendor/microtex/prebuilt/preclms.sh +17 -0
  442. package/native/vendor/microtex/readme/example_bw_false.svg +680 -0
  443. package/native/vendor/microtex/readme/example_bw_true.svg +680 -0
  444. package/native/vendor/microtex/readme/example_cjk_trying.svg +54 -0
  445. package/native/vendor/microtex/readme/example_custom_symbols.svg +92 -0
  446. package/native/vendor/microtex/readme/example_debug.svg +764 -0
  447. package/native/vendor/microtex/readme/example_emoji.svg +199 -0
  448. package/native/vendor/microtex/readme/example_have_log.svg +79 -0
  449. package/native/vendor/microtex/readme/example_keep_trying.svg +101 -0
  450. package/native/vendor/microtex/readme/example_logos.svg +50 -0
  451. package/native/vendor/microtex/readme/example_ubuntu.png +0 -0
  452. package/native/vendor/microtex/readme/example_windows.png +0 -0
  453. package/native/vendor/microtex/readme/samples/sample_0.svg +665 -0
  454. package/native/vendor/microtex/readme/samples/sample_1.svg +1259 -0
  455. package/native/vendor/microtex/readme/samples/sample_10.svg +333 -0
  456. package/native/vendor/microtex/readme/samples/sample_11.svg +306 -0
  457. package/native/vendor/microtex/readme/samples/sample_2.svg +2461 -0
  458. package/native/vendor/microtex/readme/samples/sample_3.svg +2653 -0
  459. package/native/vendor/microtex/readme/samples/sample_4.svg +554 -0
  460. package/native/vendor/microtex/readme/samples/sample_5.svg +247 -0
  461. package/native/vendor/microtex/readme/samples/sample_6.svg +1082 -0
  462. package/native/vendor/microtex/readme/samples/sample_7.svg +518 -0
  463. package/native/vendor/microtex/readme/samples/sample_8.svg +529 -0
  464. package/native/vendor/microtex/readme/samples/sample_9.svg +1702 -0
  465. package/native/vendor/microtex/readme/samples.md +301 -0
  466. package/native/vendor/microtex/readme/tex_logo.svg +19 -0
  467. package/native/vendor/microtex/res/EXAMPLE.txt +25 -0
  468. package/native/vendor/microtex/res/SAMPLES.tex +946 -0
  469. package/native/vendor/microtex/res/firamath/FiraMath-Regular.clm1 +0 -0
  470. package/native/vendor/microtex/res/firamath/FiraMath-Regular.clm2 +0 -0
  471. package/native/vendor/microtex/res/firamath/FiraMath-Regular.otf +0 -0
  472. package/native/vendor/microtex/res/firamath/README.md +42 -0
  473. package/native/vendor/microtex/res/lm-math/README +92 -0
  474. package/native/vendor/microtex/res/lm-math/latinmodern-math.clm1 +0 -0
  475. package/native/vendor/microtex/res/lm-math/latinmodern-math.clm2 +0 -0
  476. package/native/vendor/microtex/res/lm-math/latinmodern-math.otf +0 -0
  477. package/native/vendor/microtex/res/tex-gyre/README-TeX-Gyre-DejaVu-Math.txt +82 -0
  478. package/native/vendor/microtex/res/tex-gyre/texgyredejavu-math.clm1 +0 -0
  479. package/native/vendor/microtex/res/tex-gyre/texgyredejavu-math.clm2 +0 -0
  480. package/native/vendor/microtex/res/tex-gyre/texgyredejavu-math.otf +0 -0
  481. package/native/vendor/microtex/res/xits/FONTLOG.txt +246 -0
  482. package/native/vendor/microtex/res/xits/OFL.txt +98 -0
  483. package/native/vendor/microtex/res/xits/README.txt +15 -0
  484. package/native/vendor/microtex/res/xits/XITS-Bold.clm1 +0 -0
  485. package/native/vendor/microtex/res/xits/XITS-Bold.clm2 +0 -0
  486. package/native/vendor/microtex/res/xits/XITS-Bold.otf +0 -0
  487. package/native/vendor/microtex/res/xits/XITS-BoldItalic.clm1 +0 -0
  488. package/native/vendor/microtex/res/xits/XITS-BoldItalic.clm2 +0 -0
  489. package/native/vendor/microtex/res/xits/XITS-BoldItalic.otf +0 -0
  490. package/native/vendor/microtex/res/xits/XITS-Italic.clm1 +0 -0
  491. package/native/vendor/microtex/res/xits/XITS-Italic.clm2 +0 -0
  492. package/native/vendor/microtex/res/xits/XITS-Italic.otf +0 -0
  493. package/native/vendor/microtex/res/xits/XITS-Regular.clm1 +0 -0
  494. package/native/vendor/microtex/res/xits/XITS-Regular.clm2 +0 -0
  495. package/native/vendor/microtex/res/xits/XITS-Regular.otf +0 -0
  496. package/native/vendor/microtex/res/xits/XITSMath-Bold.clm1 +0 -0
  497. package/native/vendor/microtex/res/xits/XITSMath-Bold.clm2 +0 -0
  498. package/native/vendor/microtex/res/xits/XITSMath-Bold.otf +0 -0
  499. package/native/vendor/microtex/res/xits/XITSMath-Regular.clm1 +0 -0
  500. package/native/vendor/microtex/res/xits/XITSMath-Regular.clm2 +0 -0
  501. package/native/vendor/microtex/res/xits/XITSMath-Regular.otf +0 -0
  502. package/native/vendor/microtex/test/clm/meson.build +10 -0
  503. package/native/vendor/microtex/test/clm/test_clm.cpp +140 -0
  504. package/native/vendor/microtex/test/env/meson.build +10 -0
  505. package/native/vendor/microtex/test/env/test_env.cpp +100 -0
  506. package/native/vendor/microtex/test/fuzzer/afl.native +20 -0
  507. package/native/vendor/microtex/test/fuzzer/fuzz.sh +135 -0
  508. package/native/vendor/microtex/test/fuzzer/fuzzer.cpp +61 -0
  509. package/native/vendor/microtex/test/fuzzer/generateSeed.java +33 -0
  510. package/native/vendor/microtex/test/fuzzer/meson.build +9 -0
  511. package/native/vendor/microtex/test/fuzzer/microtex.dict +3708 -0
  512. package/native/vendor/microtex/test/fuzzer/platform_none.cpp +100 -0
  513. package/native/vendor/microtex/test/has_filesystem.cpp +8 -0
  514. package/native/vendor/microtex/test/meson.build +6 -0
  515. package/native/vendor/nanosvg.h +3278 -0
  516. package/native/vendor/nanosvgrast.h +1472 -0
  517. package/native/vendor/zigtex/.github/assets/example.svg +27 -0
  518. package/native/vendor/zigtex/LICENSE +674 -0
  519. package/native/vendor/zigtex/README.md +52 -0
  520. package/native/vendor/zigtex/build.zig +52 -0
  521. package/native/vendor/zigtex/build.zig.zon +16 -0
  522. package/native/vendor/zigtex/fonts/latinmodern-math.clm2 +0 -0
  523. package/native/vendor/zigtex/src/main.zig +22 -0
  524. package/native/vendor/zigtex/src/root.zig +124 -0
  525. package/native/vendor/zigtex/src/svg.zig +273 -0
  526. package/native/vendor/zigtex/src/tex.zig +383 -0
  527. package/native/zigtex-0.16.patch +35 -0
  528. package/package.json +27 -0
  529. package/scripts/bootstrap-native +89 -0
@@ -0,0 +1,600 @@
1
+ # ![logo](readme/tex_logo.svg)
2
+
3
+ It is a dynamic, cross-platform, and embeddable LaTeX rendering library. Its main purpose is to display mathematical formulas written in LaTeX. It can be embedded in applications on various platforms (Android, iOS, Windows, Linux GTK, Qt...). The following pictures demonstrate the application run in Ubuntu (using GTK) and Windows.
4
+
5
+ ![demo ubuntu](readme/example_ubuntu.png)
6
+
7
+ ![demo windows](readme/example_windows.png)
8
+
9
+ [Here](readme/samples.md) contains more demos you may want to take a look.
10
+
11
+ # Build demo
12
+
13
+ First make sure you have a C++ compiler that supports `C++ 17` standard. It uses CMake to build the demo, make sure you have it installed. Currently support Windows and Linux on PC, the version on Mac OS is in the plan, and you can find the Android version in [here](https://github.com/NanoMichael/AndroidLaTeXMath).
14
+
15
+ - `CygWin` or `MinGW` is recommended to be installed on Windows, and `Gdiplus` is required.
16
+ - `GTKMM` and `GSVMM` must be installed on Linux for a GTK build.
17
+ - Qt development packages must be installed for a Qt installation.
18
+
19
+ After all the dependencies have been satisfied, run the following commands to build:
20
+
21
+ ```sh
22
+ cd your/project/dir
23
+ mkdir build
24
+ cd build
25
+ cmake ..
26
+ make -j32
27
+ ```
28
+
29
+ After all the works have done, run the executable file `LaTeX` in the directory `build` to check the demo.
30
+
31
+ If you wish to build in Qt mode on your plaform add `-DQT=ON` to the cmake command above.
32
+
33
+ ## Headless mode
34
+
35
+ It supports to run with headless mode (no GUI) on Linux OS, check the scripts below to learn how to do this.
36
+
37
+ Batch mode:
38
+
39
+ ```sh
40
+ ./LaTeX -headless \
41
+ -samples=res/SAMPLES.tex \
42
+ -outputdir=samples \
43
+ -prefix=sample_ \
44
+ # common options
45
+ -textsize=14 \
46
+ -foreground=black \
47
+ -background=white \
48
+ -padding=0 \
49
+ -maxwidth=720
50
+ ```
51
+
52
+ Single mode:
53
+
54
+ ```sh
55
+ ./LaTeX -headless \
56
+ "-input=\sqrt[3]{(x-y)^3}=x-y" \
57
+ -output=an_example.svg
58
+ # other options...
59
+ ```
60
+
61
+ **COMMON OPTIONS**
62
+
63
+ - `-h`: show usages and exit
64
+
65
+ - `-headless`: tells the application to run with the headless mode, that converts the input LaTeX codes into SVG images
66
+
67
+ - `-textsize`: config the font size (in point) to display formulas, the default is 20
68
+
69
+ - `-foreground`: config the foreground color to display formulas; the value can be a color name or in the form of #AARRGGBB; default is black
70
+
71
+ - `-background`: config the background color to display formulas; the value can be a color name or in the form of #AARRGGBB; default is transparent
72
+
73
+ - `-padding`: config spaces to add to the SVG images, the default is 10
74
+
75
+ - `-maxwidth`: config the max width of the graphics context, the default is 720 pixels; this option has weak limits on the SVG images, thus the width of the SVG image may be wider than the value defined by this option
76
+
77
+ **BATCH MODE OPTIONS**
78
+
79
+ The program will save the SVG images produced by the LaTeX codes that parsed from the given file (specified by the option '-samples') into the directory specified by the option '-outputdir'.
80
+
81
+ - `-outputdir`: indicates the directory to save the SVG images
82
+
83
+ - `-samples`: specifies the file that contains several LaTeX codes split by a line that consists of the character '%' only, the default is './res/SAMPLES.tex'; check [this file](res/SAMPLES.tex) to get more details
84
+
85
+ - `-prefix`: specifies the prefix of the filename of the SVG images, the default is ''; for example if 2 pieces of code have given with the option '-prefix=a_', the filename of the SVG images will be 'a_0.svg' and 'a_1.svg'
86
+
87
+ **SINGLE MODE OPTIONS**
88
+
89
+ - `-input`: the source code that is written in LaTeX
90
+
91
+ - `-output`: indicates where to save the produced SVG image, only works if the option '-input' has given
92
+
93
+ > **NOTICE**
94
+ >
95
+ > If both '-outputdir' and '-input' are specified, the '-input' option wins. Run the command `./LaTeX -h` to get helps.
96
+
97
+ Please read [this section](#Display-mathmatical-formulas) to learn more.
98
+
99
+ ## Compile-time options
100
+
101
+ The program can be built just fine using the default compilation options. However, if required, the options documented below can be used to omit some features (that can reduce the library size) and to check memory only.
102
+
103
+ ### HAVE_LOG
104
+
105
+ If HAVE_LOG is defined, the program will output some logs (e.g.: the symbols parse result, generated box tree and so on) during runtime to help us to find out if there're issues or bugs, the default is **ON**. The option will be disabled when building with release mode, you can set it to **OFF** manually to make double insurance. For example, when parsing the following LaTeX code with the option is defined:
106
+
107
+ ```tex
108
+ \sqrt[3]{(x-y)^3}=x-y
109
+ ```
110
+
111
+ ![example have log](readme/example_have_log.svg)
112
+
113
+ will produce the following box tree:
114
+
115
+ ```
116
+ 0 HBox
117
+ 1 ├── HBox
118
+ 2 │ ├── StrutBox
119
+ 2 │ ├── CharBox
120
+ 2 │ ├── StrutBox
121
+ 2 │ └── HBox
122
+ 3 │ ├── CharBox
123
+ 3 │ └── OverBar
124
+ 4 │ ├── StrutBox
125
+ 4 │ ├── RuleBox
126
+ 4 │ ├── StrutBox
127
+ 4 │ └── HBox
128
+ 5 │ ├── HBox
129
+ 6 │ │ ├── CharBox
130
+ 6 │ │ ├── GlueBox
131
+ 6 │ │ ├── CharBox
132
+ 6 │ │ ├── GlueBox
133
+ 6 │ │ ├── CharBox
134
+ 6 │ │ ├── GlueBox
135
+ 6 │ │ ├── CharBox
136
+ 6 │ │ ├── GlueBox
137
+ 6 │ │ └── HBox
138
+ 7 │ │ ├── CharBox
139
+ 7 │ │ ├── HBox
140
+ 8 │ │ │ ├── CharBox
141
+ 8 │ │ │ └── StrutBox
142
+ 7 │ │ └── StrutBox
143
+ 5 │ └── StrutBox
144
+ 1 ├── GlueBox
145
+ 1 ├── CharBox
146
+ 1 ├── GlueBox
147
+ 1 ├── CharBox
148
+ 1 ├── GlueBox
149
+ 1 ├── CharBox
150
+ 1 ├── GlueBox
151
+ 1 └── CharBox
152
+ ```
153
+
154
+ The number represents the depth of the tree node.
155
+
156
+ ### GRAPHICS_DEBUG
157
+
158
+ If this macro is defined, then the custom command `\debug` and `\undebug` will be compiled, the default is **ON**. The program will draw some assisted information to help us to check if there're issues when draw formulas after run `\debug`, and `\undebug` will close this feature. For example, parse the LaTeX code below:
159
+
160
+ ```tex
161
+ \debug
162
+ \newcolumntype{s}{>{\color{#1234B6}}c}
163
+ \begin{array}{|c|c|c|s|}
164
+ \hline
165
+ \rowcolor{Tan}\multicolumn{4}{|c|}{\textcolor{white}{\bold{\text{Table Head}}}}\\
166
+ \hline
167
+ \text{Matrix}&\multicolumn{2}{|c|}{\text{Multicolumns}}&\text{Font size commands}\\
168
+ \hline
169
+ \begin{pmatrix}
170
+ \alpha_{11}&\cdots&\alpha_{1n}\\
171
+ \hdotsfor{3}\\
172
+ \alpha_{n1}&\cdots&\alpha_{nn}
173
+ \end{pmatrix}
174
+ &\large \text{Left}&\cellcolor{#00bde5}\small \textcolor{white}{\text{\bold{Right}}}
175
+ &\small \text{small Small}\\
176
+ \hline
177
+ \multicolumn{4}{|c|}{\text{Table Foot}}\\
178
+ \hline
179
+ \end{array}
180
+ ```
181
+
182
+ will produce:
183
+
184
+ ![example debug](readme/example_debug.svg)
185
+
186
+ The red blocks represent the depth of the boxes, and these rectangles represent the boxes' bounds.
187
+
188
+ ### MEM_CHECK
189
+
190
+ Basically, the program implemented an empty graphics interface (check [this file](src/samples/mem_check_main.cpp)), all the other implementations will be ignored if the `MEM_CHECK` option is defined, the default is **OFF**. It is useful when using `valgrind` to detect memory leaks and memory misuse, make sure you have compiled it with the option `-DCMAKE_BUILD_TYPE=Debug` before using `valgrind`. The following script shows how to do memory check using `valgrind`.
191
+
192
+ ```sh
193
+ cmake
194
+ -DCMAKE_BUILD_TYPE=Debug \
195
+ -DGRAPHICS_DEBUG=ON \
196
+ -DMEM_CHECK=ON \
197
+ -DHAVE_LOG=OFF ..
198
+ make -j32
199
+ valgrind --leak-check=full -v ./LaTeX
200
+ ```
201
+
202
+ will produce:
203
+
204
+ ```
205
+ ==26443== HEAP SUMMARY:
206
+ ==26443== in use at exit: 72,704 bytes in 1 blocks
207
+ ==26443== total heap usage: 84,520 allocs, 84,519 frees, 12,515,092 bytes allocated
208
+ ==26443==
209
+ ==26443== Searching for pointers to 1 not-freed blocks
210
+ ==26443== Checked 111,952 bytes
211
+ ==26443==
212
+ ==26443== LEAK SUMMARY:
213
+ ==26443== definitely lost: 0 bytes in 0 blocks
214
+ ==26443== indirectly lost: 0 bytes in 0 blocks
215
+ ==26443== possibly lost: 0 bytes in 0 blocks
216
+ ==26443== still reachable: 72,704 bytes in 1 blocks
217
+ ==26443== suppressed: 0 bytes in 0 blocks
218
+ ==26443== Reachable blocks (those to which a pointer was found) are not shown.
219
+ ==26443== To see them, rerun with: --leak-check=full --show-leak-kinds=all
220
+ ==26443==
221
+ ==26443== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
222
+ ```
223
+
224
+ ## Meson build manifest
225
+
226
+ You can also build the cairo version of cLaTeXMath with Meson:
227
+ ```sh
228
+ meson _build -DTARGET_DEMO=NONE # you can specify TARGET_DEMO=GTK if you want a GTK+ GUI to test cLaTeXMath, otherwise only the library (TARGET_DEVEL) will be built.
229
+ ninja -C _build
230
+ _build/clatexmath
231
+ ```
232
+
233
+ <!-- WIP: clatexmath is not yet in home:sp1rit:notekit, its only in testing
234
+ # Prebuilt packages
235
+
236
+ [@sp1ritCS](https://github.com/sp1ritCS) maintains more or less upto date packages of cLaTeXMath/cairo for Arch, CentOS, Debian, Fedora, Mageia, SLE, openSUSE & Ubuntu on the openSUSE Buildservice: [home:sp1rit:notekit/clatexmath](https://build.opensuse.org/package/show/home:sp1rit:notekit/clatexmath). You can install them from here: [software.opensuse.org//download.html?project=home:sp1rit:notekit&package=clatexmath](https://software.opensuse.org//download.html?project=home%3Asp1rit%3Anotekit&package=clatexmath)
237
+
238
+ If you just want to use cLaTeXMath for your GTK/Cairo project, this may be best way to get started.
239
+ -->
240
+ # How to use
241
+
242
+ This section shows how to use this library to display mathematical formulas.
243
+
244
+ First, load the required resources at the very beginning:
245
+
246
+ ```c++
247
+ #include "microtex.h"
248
+
249
+ using namespace tex;
250
+
251
+ /**
252
+ * Initialize the program with the default parameter (directory
253
+ * path of the resources) value "res" to load required resources,
254
+ * that may take a long time, you may call it from a background
255
+ * thread.
256
+ *
257
+ * Also, you can use the code below to specifies your custom
258
+ * resources directory:
259
+ *
260
+ * LaTex::init("your/resources/root/directory");
261
+ */
262
+ LaTeX::init();
263
+
264
+ // After initialization, you could display your formulas now
265
+ ```
266
+
267
+ You could set the point size (pixels per point) use the code below:
268
+
269
+ ```c++
270
+ /**
271
+ * Set the point size; the default value is 1 that means
272
+ * use 1 pixel to represent 1 point.
273
+ */
274
+ TeXFormula::PIXELS_PER_POINT = 2;
275
+ ```
276
+
277
+ Also, you could set the DPI (dots per inch) use the code below:
278
+
279
+ ```c++
280
+ /**
281
+ * For example, set the DPI-target to 74, the point size
282
+ * will be 74/72
283
+ */
284
+ TeXFormula::setDPITarget(74);
285
+ ```
286
+
287
+ Write the code below to release resources before application exit, it is not necessary but is a good habit.
288
+
289
+ ```c++
290
+ // ... some other code ...
291
+ // before application exit
292
+
293
+ LaTeX::release();
294
+ ```
295
+
296
+ ## Display mathematical formulas
297
+
298
+ General mode:
299
+
300
+ ```c++
301
+ // ... initialization ...
302
+
303
+ /**
304
+ * The LaTeX code to parse.
305
+ *
306
+ * The program uses wide string to represent UTF characters, you
307
+ * could use the code below to convert a string with UTF-8 encoding
308
+ * to a wide string:
309
+ *
310
+ * wstring wstr = utf82wide("A string with UTF-8 encoding.");
311
+ */
312
+ wstring code = L"\\int_{now}^{+\\infty} \\text{Keep trying}";
313
+ // Convert the code to a paintable object (Render)
314
+ auto r = LaTeX::parse(
315
+ code, // LaTeX code to parse
316
+ 720, // logical width of the graphics context (in pixel)
317
+ 20, // font size (in point)
318
+ 10, // space between 2 lines (in pixel)
319
+ BLACK // foreground color
320
+ );
321
+ ```
322
+
323
+ Builder mode:
324
+
325
+ ```c++
326
+ wstring code = L"\\int_{now}^{+\\infty} \\text{Keep trying}";
327
+ TeXFormula formula;
328
+ RenderBuilder builder;
329
+ formula.setLaTeX(code);
330
+
331
+ auto r = builder
332
+ // environment style, see TeXConstants (defined in common.h) to
333
+ // get more details
334
+ .setStyle(STYLE_DISPLAY)
335
+ // text size (in point)
336
+ .setSize(20)
337
+ // the logical width and the alignment of the graphics context
338
+ .setWidth(UnitType::pixel, 720, Alignment::left)
339
+ // set if the logical width of the graphics context specified
340
+ // above is the max width to display the formula, the formula
341
+ // will be centered if set to true; you must call this method
342
+ // after 'setWidth' has called, otherwise an ex_invalid_state
343
+ // exception will be thrown
344
+ .setIsMaxWidth(false)
345
+ // space between 2 lines
346
+ .setLineSpace(UnitType::pixel, 10)
347
+ .setForground(tex::BLACK)
348
+ // convert the formula to a paintable object (Render)
349
+ .build(formula);
350
+ ```
351
+
352
+ > **NOTICE**
353
+ >
354
+ > A style and text size are required to build a Render, in another word, you must call method `setStyle` and `setSize` before method `build` has been called, otherwise an `ex_invalid_state` exception will be thrown. If the logical width has not set, the generated Render may be wide enough to overflow into the graphics context.
355
+
356
+ Now you can draw the generated `Render` (take `Graphics2D_cairo` that uses `cairomm` to implement the graphics (2D) context that run in Linux as an example):
357
+
358
+ ```c++
359
+ // cairomm implementation
360
+ Graphics2D_cairo g2;
361
+ // draw the formula on the coordinate (10, 10) of the graphics context
362
+ r->draw(10, 10);
363
+ // IMPORTANT: remember to delete the generated Render after there
364
+ // is no use on it.
365
+ delete r;
366
+ ```
367
+
368
+ The code above will produce:
369
+
370
+ ![example keep trying](readme/example_keep_trying.svg)
371
+
372
+ ## Implement the graphical interfaces
373
+
374
+ Basically, you need to implement all the interfaces declared in [this file](src/graphic/graphic.h). There're 4 implementations list below, check it out before the start.
375
+
376
+ - `graphic_cairo`: that uses `cairomm` and `gtkmm` to implement these interfaces that run in Linux, declared in [here](src/platform/cairo/graphic_cairo.h), and implemented [here](src/platform/cairo/graphic_cairo.cpp).
377
+
378
+ - `graphic_win32`: is a Windows implementation that uses `gdiplus` to implement these interfaces, please check [here](src/platform/gdi_win/graphic_win32.h) and [here](src/platform/gdi_win/graphic_win32.cpp).
379
+
380
+ - And implementations on Android OS can be found at [here](https://github.com/NanoMichael/AndroidLaTeXMath).
381
+
382
+ - And the empty implementations to perform memory check are defined in [here](src/samples/mem_check_main.cpp).
383
+
384
+ The following sections illustrate these interfaces.
385
+
386
+ ### tex::Font
387
+
388
+ This interface represents a font (typeface). The program uses it to draw characters and layout boxes. The code below shows how to implement this interface with the name `Font_impl`.
389
+
390
+ ```c++
391
+ #include "graphic/graphic.h"
392
+
393
+ namespace tex {
394
+
395
+ class Font_impl : public tex::Font {
396
+ public:
397
+
398
+ Font_impl(const string& file, float size) {
399
+ // load platform-specific font from given file and size
400
+ }
401
+
402
+ Font_impl(const string& name, int style, float size) {
403
+ // create platform-specific font with given name, style
404
+ // and size
405
+ }
406
+
407
+ // ... implementations of the other methods ...
408
+ };
409
+
410
+ /**
411
+ * IMPORTANT: do not forget to implement the 2 static methods below,
412
+ * it is the factory methods to create a new font.
413
+ */
414
+
415
+ Font* Font::create(const string& file, float size) {
416
+ return new Font_impl(file, size);
417
+ }
418
+
419
+ sptr<Font> Font::_create(const string& name, int style, float size) {
420
+ return sptrOf<Font_impl>(name, style, size);
421
+ }
422
+
423
+ } // namespace tex
424
+ ```
425
+
426
+ ### tex::TextLayout
427
+
428
+ An alphabet contains several Unicode-blocks on a **Basic Multilingual Plane** (BMP), check [here](https://en.wikipedia.org/wiki/Plane_(Unicode)) for more information.
429
+
430
+ For these characters in unregistered alphabets, the library uses `tex::TextLayout` to layout it. For example, parse the following LaTeX code:
431
+
432
+ ```tex
433
+ \int_{now}^{\infty} \text{努力}
434
+ ```
435
+
436
+ The character "努" and "力" are under the Unicode-block [CJK Unified Ideographs](https://en.wikipedia.org/wiki/CJK_Unified_Ideographs_(Unicode_block)) belongs to the alphabet CJK that has not registered with the program, it will use the implementation of the class `tex::TextLayout` to layout the text "努力" and calculate the layout bounds. The `tex::TextLayout_cairo` implementation (declared in [here](src/platform/cairo/graphic_cairo.h)) demonstrates how to do this.
437
+
438
+ The LaTeX code above will produce:
439
+
440
+ ![example cjk trying](readme/example_cjk_trying.svg)
441
+
442
+ The predefined Unicode-blocks are list below, check [this file](src/fonts/alphabet.cpp) for more details.
443
+
444
+ ```
445
+ name code range
446
+ ----------------- ---------------
447
+ BASIC_LATIN 0x0020 ~ 0x007F
448
+ LATIN1_SUPPLEMENT 0x0080 ~ 0x00FF
449
+ CYRILLIC 0x0400 ~ 0x04FF
450
+ GREEK 0x0370 ~ 0x03FF
451
+ GREEK_EXTENDED 0x1f00 ~ 0x1FFF
452
+ UNKNOWN 0xFFFF ~ 0xFFFF
453
+ ```
454
+
455
+ Write the code below to register a new alphabet with the program:
456
+
457
+ ```c++
458
+ class NewAlphabetRegistration : public AlphabetRegistration {
459
+ private:
460
+ vector<UnicodeBlock> _blocks;
461
+
462
+ public:
463
+ NewAlphabetRegistration(const vector<UnicodeBlock>& blocks)
464
+ :_blocks(blocks) {}
465
+
466
+ const vector<UnicodeBlock>& getUnicodeBlock() const override {
467
+ return _blocks;
468
+ }
469
+
470
+ const string getPackage() const override {
471
+ // the root directory path of the font-mapping and
472
+ // symbols-mapping for this alphabet
473
+ }
474
+
475
+ const string getTeXFontFile() const override {
476
+ // language settings (a xml file) for this alphabet
477
+ }
478
+ };
479
+
480
+ // ... some other code ...
481
+
482
+ // Define a new Unicode-block
483
+ auto newBlock = UnicodeBlock::define(
484
+ newAlphabetCodePointStart,
485
+ newAlphabetCodePointEnd);
486
+
487
+ // Register the new alphabet
488
+ DefaultTeXFont::registerAlphabet(new NewAlphabetRegistration({newBlock});
489
+ ```
490
+
491
+ ### tex::Graphics2D
492
+
493
+ This interface defines a 2D graphics context, all the TeX drawing operations will on it. It declares various basic 2D graphics operations, including affine transformations and meta graphical operations. The class `Graphics2D_cairo` (defined in [this file](src/platform/cairo/graphic_cairo.cpp)) uses `cariomm` to implement this interface, take it a look to learn how to achieve it. It is the most important part of the graphical environment, and also very simple, all you need to do is wrap these functions on a specific platform into the form of this interface declared. [This file](src/graphic/graphic_basic.h) declares some built-in colors and various entity classes to support the graphical environment.
494
+
495
+ # Custom commands and symbols
496
+
497
+ ## \debug and \undebug
498
+
499
+ As mentioned [above](#GRAPHICS_DEBUG), the command `\debug` and `\undebug` is used to switch graphical debug mode on/off, please check it out.
500
+
501
+ ## \fatalIfCmdConflict
502
+
503
+ This command takes a boolean argument to determine whether to raise an error that when defining a new command but it has defined already or redefining a command but it has not defined. The default value is true. The script below shows how to use it.
504
+
505
+ ```tex
506
+ \fatalIfCmdConflict{true}
507
+ % define a new command with the name R
508
+ \newcommand{\R}{\mathbb{R}}
509
+ \R
510
+ % here will cause the program throws an error
511
+ % use \fatalIfCmdConflict{false} to disable it
512
+ \newcommand{\R}{\mathcal{R}}
513
+ ```
514
+
515
+ ## \breakEverywhere
516
+
517
+ This command takes a boolean argument, the predefined value is false. Its functionality is hard to describe, an example worths thousands of words, the examples below show the difference between when it set to true and false.
518
+
519
+ ```tex
520
+ \text{What is real? How do you define ‘real’? If you're talking about what you can feel, what you can smell, what you can taste and see, then ‘real’ is simply electrical signals interpreted by your brain. \bold{\text{― Morpheus The Matrix}}}
521
+ ```
522
+
523
+ When with `\breakEverywhere{false}`, the result will be:
524
+
525
+ ![bw false](readme/example_bw_false.svg)
526
+
527
+ And with `\breakEverywhere{true}`, the result will be:
528
+
529
+ ![bw true](readme/example_bw_true.svg)
530
+
531
+ > **NOTICE**
532
+ >
533
+ > The program has a weak ability to handle line feeds when laying out texts, you should try to avoid using it to lay out large amounts of text, delegate these tasks to the text-layout system, and use this program to display formulas is a good choice.
534
+
535
+ ## \TeX and \AndroidTeX
536
+
537
+ The logo and the logo of the Android version are produced by the command `\TeX` and `\AndroidTeX`, take a quick look:
538
+
539
+ ```tex
540
+ \TeX \\
541
+ \AndroidTeX
542
+ ```
543
+
544
+ ![logos](readme/example_logos.svg)
545
+
546
+ ## Custom symbols
547
+
548
+ There're 4 custom symbols in the script below:
549
+
550
+ ```tex
551
+ AB \varparallel CD
552
+ AB \nvarparallel CD
553
+ AB \varparalleleq CD
554
+ \parallelogram ABCD
555
+ ```
556
+
557
+ that will produce:
558
+
559
+ ![custom symbols](readme/example_custom_symbols.svg)
560
+
561
+ # TODO
562
+
563
+ - [ ] port Gtk+ 3 to Windows and macOS
564
+ - [ ] buitin resources
565
+ - [ ] support for webassembly
566
+ - [ ] native support for SVG
567
+ - [ ] make the use of XML configurable
568
+ - [ ] make the built-in resources a loadable/unloadable dynamic plugin
569
+ - [ ] eliminate the use of 'dynamic_cast'
570
+ - [ ] rewrite the parsing algorithm, make it more efficient
571
+ - [ ] support for dynamic parsing
572
+ - [ ] implement the `\def` command
573
+
574
+ # License
575
+
576
+ Excluding the fonts and xml resources (under the directory `res`) that under different licenses (check out `res/fonts/license`, `res/greek` and `res/cyrillic`), this project is under the [MIT](https://opensource.org/licenses/MIT) license.
577
+
578
+ ```
579
+ The MIT License (MIT)
580
+
581
+ Copyright (c) 2020 Nano Michael
582
+
583
+ Permission is hereby granted, free of charge, to any person obtaining a copy
584
+ of this software and associated documentation files (the "Software"), to deal
585
+ in the Software without restriction, including without limitation the rights
586
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
587
+ copies of the Software, and to permit persons to whom the Software is
588
+ furnished to do so, subject to the following conditions:
589
+
590
+ The above copyright notice and this permission notice shall be included in all
591
+ copies or substantial portions of the Software.
592
+
593
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
594
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
595
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
596
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
597
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
598
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
599
+ SOFTWARE.
600
+ ```