{"id":13645141,"url":"https://github.com/NanoMichael/MicroTeX","last_synced_at":"2025-04-21T13:31:56.819Z","repository":{"id":38740714,"uuid":"61862023","full_name":"NanoMichael/MicroTeX","owner":"NanoMichael","description":"A dynamic, cross-platform, and embeddable LaTeX rendering library","archived":false,"fork":false,"pushed_at":"2024-08-06T02:17:12.000Z","size":12106,"stargazers_count":432,"open_issues_count":39,"forks_count":74,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-11-09T18:41:37.917Z","etag":null,"topics":["android","cross-platform","latex","macros","ubuntu"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NanoMichael.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-24T06:30:45.000Z","updated_at":"2024-11-05T01:40:06.000Z","dependencies_parsed_at":"2024-11-09T18:42:11.240Z","dependency_job_id":null,"html_url":"https://github.com/NanoMichael/MicroTeX","commit_stats":null,"previous_names":["nanomichael/clatexmath"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NanoMichael%2FMicroTeX","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NanoMichael%2FMicroTeX/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NanoMichael%2FMicroTeX/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NanoMichael%2FMicroTeX/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NanoMichael","download_url":"https://codeload.github.com/NanoMichael/MicroTeX/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250064716,"owners_count":21368959,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","cross-platform","latex","macros","ubuntu"],"created_at":"2024-08-02T01:02:29.073Z","updated_at":"2025-04-21T13:31:54.729Z","avatar_url":"https://github.com/NanoMichael.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"# ![logo](readme/tex_logo.svg)\n\nIt 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.\n\n![demo ubuntu](readme/example_ubuntu.png)\n\n![demo windows](readme/example_windows.png)\n\n[Here](readme/samples.md) contains more demos you may want to take a look.\n\n# Build demo\n\nFirst 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).\n\n- `CygWin` or `MinGW` is recommended to be installed on Windows, and `Gdiplus` is required.\n- `GTKMM` and `GSVMM` must be installed on Linux for a GTK build.\n- Qt development packages must be installed for a Qt installation.\n\nAfter all the dependencies have been satisfied, run the following commands to build:\n\n```sh\ncd your/project/dir\nmkdir build\ncd build\ncmake ..\nmake -j32\n```\n\nAfter all the works have done, run the executable file `LaTeX` in the directory `build` to check the demo.\n\nIf you wish to build in Qt mode on your plaform add `-DQT=ON` to the cmake command above.\n\n## Headless mode\n\nIt supports to run with headless mode (no GUI) on Linux OS, check the scripts below to learn how to do this.\n\nBatch mode:\n\n```sh\n./LaTeX -headless \\\n    -samples=res/SAMPLES.tex \\\n    -outputdir=samples \\\n    -prefix=sample_ \\\n    # common options\n    -textsize=14 \\\n    -foreground=black \\\n    -background=white \\\n    -padding=0 \\\n    -maxwidth=720\n```\n\nSingle mode:\n\n```sh\n./LaTeX -headless \\\n    \"-input=\\sqrt[3]{(x-y)^3}=x-y\" \\\n    -output=an_example.svg\n    # other options...\n```\n\n**COMMON OPTIONS**\n\n- `-h`: show usages and exit\n\n- `-headless`: tells the application to run with the headless mode, that converts the input LaTeX codes into SVG images\n\n- `-textsize`: config the font size (in point) to display formulas, the default is 20\n\n- `-foreground`: config the foreground color to display formulas; the value can be a color name or in the form of #AARRGGBB; default is black\n\n- `-background`: config the background color to display formulas; the value can be a color name or in the form of #AARRGGBB; default is transparent\n\n- `-padding`: config spaces to add to the SVG images, the default is 10\n\n- `-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\n\n**BATCH MODE OPTIONS**\n\nThe 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'.\n\n- `-outputdir`: indicates the directory to save the SVG images\n\n- `-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\n\n- `-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'\n\n**SINGLE MODE OPTIONS**\n\n- `-input`: the source code that is written in LaTeX\n\n- `-output`: indicates where to save the produced SVG image, only works if the option '-input' has given\n\n\u003e **NOTICE**\n\u003e\n\u003e If both '-outputdir' and '-input' are specified, the '-input' option wins. Run the command `./LaTeX -h` to get helps.\n\nPlease read [this section](#Display-mathmatical-formulas) to learn more.\n\n## Compile-time options\n\nThe 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.\n\n### HAVE_LOG\n\nIf 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:\n\n```tex\n\\sqrt[3]{(x-y)^3}=x-y\n```\n\n![example have log](readme/example_have_log.svg)\n\nwill produce the following box tree:\n\n```\n0    HBox\n1    ├── HBox\n2    │   ├── StrutBox\n2    │   ├── CharBox\n2    │   ├── StrutBox\n2    │   └── HBox\n3    │       ├── CharBox\n3    │       └── OverBar\n4    │           ├── StrutBox\n4    │           ├── RuleBox\n4    │           ├── StrutBox\n4    │           └── HBox\n5    │               ├── HBox\n6    │               │   ├── CharBox\n6    │               │   ├── GlueBox\n6    │               │   ├── CharBox\n6    │               │   ├── GlueBox\n6    │               │   ├── CharBox\n6    │               │   ├── GlueBox\n6    │               │   ├── CharBox\n6    │               │   ├── GlueBox\n6    │               │   └── HBox\n7    │               │       ├── CharBox\n7    │               │       ├── HBox\n8    │               │       │   ├── CharBox\n8    │               │       │   └── StrutBox\n7    │               │       └── StrutBox\n5    │               └── StrutBox\n1    ├── GlueBox\n1    ├── CharBox\n1    ├── GlueBox\n1    ├── CharBox\n1    ├── GlueBox\n1    ├── CharBox\n1    ├── GlueBox\n1    └── CharBox\n```\n\nThe number represents the depth of the tree node.\n\n### GRAPHICS_DEBUG\n\nIf 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:\n\n```tex\n\\debug\n\\newcolumntype{s}{\u003e{\\color{#1234B6}}c}\n\\begin{array}{|c|c|c|s|}\n  \\hline\n  \\rowcolor{Tan}\\multicolumn{4}{|c|}{\\textcolor{white}{\\bold{\\text{Table Head}}}}\\\\\n  \\hline\n  \\text{Matrix}\u0026\\multicolumn{2}{|c|}{\\text{Multicolumns}}\u0026\\text{Font size commands}\\\\\n  \\hline\n  \\begin{pmatrix}\n      \\alpha_{11}\u0026\\cdots\u0026\\alpha_{1n}\\\\\n      \\hdotsfor{3}\\\\\n      \\alpha_{n1}\u0026\\cdots\u0026\\alpha_{nn}\n  \\end{pmatrix}\n  \u0026\\large \\text{Left}\u0026\\cellcolor{#00bde5}\\small \\textcolor{white}{\\text{\\bold{Right}}}\n  \u0026\\small \\text{small Small}\\\\\n  \\hline\n  \\multicolumn{4}{|c|}{\\text{Table Foot}}\\\\\n  \\hline\n\\end{array}\n```\n\nwill produce:\n\n![example debug](readme/example_debug.svg)\n\nThe red blocks represent the depth of the boxes, and these rectangles represent the boxes' bounds.\n\n### MEM_CHECK\n\nBasically, 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`.\n\n```sh\ncmake \n    -DCMAKE_BUILD_TYPE=Debug \\\n    -DGRAPHICS_DEBUG=ON \\\n    -DMEM_CHECK=ON \\\n    -DHAVE_LOG=OFF ..\nmake -j32\nvalgrind --leak-check=full -v ./LaTeX\n```\n\nwill produce:\n\n```\n==26443== HEAP SUMMARY:\n==26443==     in use at exit: 72,704 bytes in 1 blocks\n==26443==   total heap usage: 84,520 allocs, 84,519 frees, 12,515,092 bytes allocated\n==26443== \n==26443== Searching for pointers to 1 not-freed blocks\n==26443== Checked 111,952 bytes\n==26443== \n==26443== LEAK SUMMARY:\n==26443==    definitely lost: 0 bytes in 0 blocks\n==26443==    indirectly lost: 0 bytes in 0 blocks\n==26443==      possibly lost: 0 bytes in 0 blocks\n==26443==    still reachable: 72,704 bytes in 1 blocks\n==26443==         suppressed: 0 bytes in 0 blocks\n==26443== Reachable blocks (those to which a pointer was found) are not shown.\n==26443== To see them, rerun with: --leak-check=full --show-leak-kinds=all\n==26443== \n==26443== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)\n```\n\n## Meson build manifest\n\nYou can also build the cairo version of cLaTeXMath with Meson:\n```sh\nmeson _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.\nninja -C _build\n_build/clatexmath\n```\n\n# Prebuilt packages\n\n[@sp1ritCS](https://github.com/sp1ritCS) maintains more or less upto date packages of cLaTeXMath/cairo for Arch, CentOS, Debian, Fedora, Mageia, SLE, openSUSE \u0026 Ubuntu on the openSUSE Buildservice: [home:sp1rit:notekit/clatexmath](https://build.opensuse.org/package/show/home:sp1rit:notekit/clatexmath).\n\nThe binaries (built packages) are publicly (without SUSE univention account) available here: [download.opensuse.org/repositories/home:/sp1rit:/notekit/](https://download.opensuse.org/repositories/home:/sp1rit:/notekit/).\nInstall instructions can be found on openSUSE's [software-o-o](https://github.com/openSUSE/software-o-o) instance:\n* Arch (and SRPMs): [software.opensuse.org//download.html?project=home:sp1rit:notekit\u0026package=clatexmath](https://software.opensuse.org//download.html?project=home%3Asp1rit%3Anotekit\u0026package=clatexmath)\n* RPM (CentOS, Fedora, Mageia, SLE \u0026 openSUSE): [software.opensuse.org//download.html?project=home:sp1rit:notekit\u0026package=clatexmath-devel](https://software.opensuse.org//download.html?project=home%3Asp1rit%3Anotekit\u0026package=clatexmath-devel)\n* DPKG (Debian, Raspbian \u0026 xUbuntu): [software.opensuse.org//download.html?project=home:sp1rit:notekit\u0026package=libclatexmath-dev](https://software.opensuse.org//download.html?project=home%3Asp1rit%3Anotekit\u0026package=libclatexmath-dev)\n\nIf you just want to use cLaTeXMath for your GTK/Cairo project, this may be best way to get started. \n\n# How to use\n\nThis section shows how to use this library to display mathematical formulas.\n\nFirst, load the required resources at the very beginning:\n\n```c++\n#include \"latex.h\"\n\nusing namespace tex;\n\n/**\n * Initialize the program with the default parameter (directory\n * path of the resources) value \"res\" to load required resources,\n * that may take a long time, you may call it from a background\n * thread.\n *\n * Also, you can use the code below to specifies your custom\n * resources directory:\n * \n *      LaTex::init(\"your/resources/root/directory\");\n */\nLaTeX::init();\n\n// After initialization, you could display your formulas now\n```\n\nYou could set the point size (pixels per point) use the code below:\n\n```c++\n/** \n * Set the point size; the default value is 1 that means\n * use 1 pixel to represent 1 point.\n */\nTeXFormula::PIXELS_PER_POINT = 2;\n```\n\nAlso, you could set the DPI (dots per inch) use the code below:\n\n```c++\n/**\n * For example, set the DPI-target to 74, the point size\n * will be 74/72\n */\nTeXFormula::setDPITarget(74);\n```\n\nWrite the code below to release resources before application exit, it is not necessary but is a good habit.\n\n```c++\n// ... some other code ...\n// before application exit\n\nLaTeX::release();\n```\n\n## Display mathematical formulas\n\nGeneral mode:\n\n```c++\n// ... initialization ...\n\n/**\n * The LaTeX code to parse.\n * \n * The program uses wide string to represent UTF characters, you\n * could use the code below to convert a string with UTF-8 encoding\n * to a wide string:\n * \n *      wstring wstr = utf82wide(\"A string with UTF-8 encoding.\");\n */\nwstring code = L\"\\\\int_{now}^{+\\\\infty} \\\\text{Keep trying}\";\n// Convert the code to a paintable object (TeXRender)\nauto r = LaTeX::parse(\n    code,   // LaTeX code to parse\n    720,    // logical width of the graphics context (in pixel)\n    20,     // font size (in point)\n    10,     // space between 2 lines (in pixel)\n    BLACK   // foreground color\n);\n```\n\nBuilder mode:\n\n```c++\nwstring code = L\"\\\\int_{now}^{+\\\\infty} \\\\text{Keep trying}\";\nTeXFormula formula;\nTeXRenderBuilder builder;\nformula.setLaTeX(code);\n\nauto r = builder\n    // environment style, see TeXConstants (defined in common.h) to\n    // get more details\n    .setStyle(STYLE_DISPLAY)\n    // text size (in point)\n    .setSize(20)\n    // the logical width and the alignment of the graphics context\n    .setWidth(UnitType::pixel, 720, Alignment::left)\n    // set if the logical width of the graphics context specified\n    // above is the max width to display the formula, the formula\n    // will be centered if set to true; you must call this method\n    // after 'setWidth' has called, otherwise an ex_invalid_state \n    // exception will be thrown\n    .setIsMaxWidth(false)\n    // space between 2 lines\n    .setLineSpace(UnitType::pixel, 10)\n    .setForground(tex::BLACK)\n    // convert the formula to a paintable object (TeXRender)\n    .build(formula);\n```\n\n\u003e **NOTICE**\n\u003e\n\u003e A style and text size are required to build a TeXRender, 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 TeXRender may be wide enough to overflow into the graphics context.\n\nNow you can draw the generated `TeXRender` (take `Graphics2D_cairo` that uses `cairomm` to implement the graphics (2D) context that run in Linux as an example):\n\n```c++\n// cairomm implementation\nGraphics2D_cairo g2;\n// draw the formula on the coordinate (10, 10) of the graphics context\nr-\u003edraw(10, 10);\n// IMPORTANT: remember to delete the generated TeXRender after there\n// is no use on it.\ndelete r;\n```\n\nThe code above will produce:\n\n![example keep trying](readme/example_keep_trying.svg)\n\n## Implement the graphical interfaces\n\nBasically, 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.\n\n- `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).\n\n- `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).\n\n- And implementations on Android OS can be found at [here](https://github.com/NanoMichael/AndroidLaTeXMath).\n\n- And the empty implementations to perform memory check are defined in [here](src/samples/mem_check_main.cpp).\n\nThe following sections illustrate these interfaces.\n\n### tex::Font\n\nThis 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`.\n\n```c++\n#include \"graphic/graphic.h\"\n\nnamespace tex {\n\nclass Font_impl : public tex::Font {\npublic:\n\n    Font_impl(const string\u0026 file, float size) {\n        // load platform-specific font from given file and size\n    }\n\n    Font_impl(const string\u0026 name, int style, float size) {\n        // create platform-specific font with given name, style\n        // and size\n    }\n\n    // ... implementations of the other methods ...\n};\n\n/**\n * IMPORTANT: do not forget to implement the 2 static methods below,\n * it is the factory methods to create a new font.\n */\n\nFont* Font::create(const string\u0026 file, float size) {\n    return new Font_impl(file, size);\n}\n\nsptr\u003cFont\u003e Font::_create(const string\u0026 name, int style, float size) {\n    return sptrOf\u003cFont_impl\u003e(name, style, size);\n}\n\n} // namespace tex\n```\n\n### tex::TextLayout\n\nAn alphabet contains several Unicode-blocks on a **Basic Multilingual Plane** (BMP), check [here](https://en.wikipedia.org/wiki/Plane_(Unicode)) for more information.\n\nFor these characters in unregistered alphabets, the library uses `tex::TextLayout` to layout it. For example, parse the following LaTeX code:\n\n```tex\n\\int_{now}^{\\infty} \\text{努力}\n```\n\nThe 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.\n\nThe LaTeX code above will produce:\n\n![example cjk trying](readme/example_cjk_trying.svg)\n\nThe predefined Unicode-blocks are list below, check [this file](src/fonts/alphabet.cpp) for more details.\n\n```\nname               code range\n-----------------  ---------------\nBASIC_LATIN        0x0020 ~ 0x007F\nLATIN1_SUPPLEMENT  0x0080 ~ 0x00FF\nCYRILLIC           0x0400 ~ 0x04FF\nGREEK              0x0370 ~ 0x03FF\nGREEK_EXTENDED     0x1f00 ~ 0x1FFF\nUNKNOWN            0xFFFF ~ 0xFFFF\n```\n\nWrite the code below to register a new alphabet with the program:\n\n```c++\nclass NewAlphabetRegistration : public AlphabetRegistration {\nprivate:\n    vector\u003cUnicodeBlock\u003e _blocks;\n\npublic:\n    NewAlphabetRegistration(const vector\u003cUnicodeBlock\u003e\u0026 blocks)\n        :_blocks(blocks) {}\n\n    const vector\u003cUnicodeBlock\u003e\u0026 getUnicodeBlock() const override {\n        return _blocks;\n    }\n\n    const string getPackage() const override {\n        // the root directory path of the font-mapping and\n        // symbols-mapping for this alphabet\n    }\n\n    const string getTeXFontFile() const override {\n        // language settings (a xml file) for this alphabet\n    }\n};\n\n// ... some other code ...\n\n// Define a new Unicode-block\nauto newBlock = UnicodeBlock::define(\n    newAlphabetCodePointStart, \n    newAlphabetCodePointEnd);\n\n// Register the new alphabet\nDefaultTeXFont::registerAlphabet(new NewAlphabetRegistration({newBlock});\n```\n\n### tex::Graphics2D\n\nThis 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.\n\n# Custom commands and symbols\n\n## \\debug and \\undebug\n\nAs mentioned [above](#GRAPHICS_DEBUG), the command `\\debug` and `\\undebug` is used to switch graphical debug mode on/off, please check it out.\n\n## \\fatalIfCmdConflict\n\nThis 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.\n\n```tex\n\\fatalIfCmdConflict{true}\n% define a new command with the name R\n\\newcommand{\\R}{\\mathbb{R}}\n\\R\n% here will cause the program throws an error\n% use \\fatalIfCmdConflict{false} to disable it\n\\newcommand{\\R}{\\mathcal{R}}\n```\n\n## \\breakEverywhere\n\nThis 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.\n\n```tex\n\\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}}}\n```\n\nWhen with `\\breakEverywhere{false}`, the result will be:\n\n![bw false](readme/example_bw_false.svg)\n\nAnd with `\\breakEverywhere{true}`, the result will be:\n\n![bw true](readme/example_bw_true.svg)\n\n\u003e **NOTICE**\n\u003e\n\u003e 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.\n\n## \\TeX and \\AndroidTeX\n\nThe logo and the logo of the Android version are produced by the command `\\TeX` and `\\AndroidTeX`, take a quick look:\n\n```tex\n\\TeX \\\\\n\\AndroidTeX\n```\n\n![logos](readme/example_logos.svg)\n\n## Custom symbols\n\nThere're 4 custom symbols in the script below:\n\n```tex\nAB \\varparallel CD\nAB \\nvarparallel CD\nAB \\varparalleleq CD\n\\parallelogram ABCD\n```\n\nthat will produce:\n\n![custom symbols](readme/example_custom_symbols.svg)\n\n# TODO\n\n- [ ] port Gtk+ 3 to Windows and macOS\n- [ ] buitin resources\n- [ ] support for webassembly\n- [ ] native support for SVG\n- [ ] make the use of XML configurable\n- [ ] make the built-in resources a loadable/unloadable dynamic plugin\n- [ ] eliminate the use of 'dynamic_cast'\n- [ ] rewrite the parsing algorithm, make it more efficient\n- [ ] support for dynamic parsing\n- [ ] implement the `\\def` command\n\n# License\n\nExcluding 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.\n\n```\n The MIT License (MIT)\n\n Copyright (c) 2020 Nano Michael\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNanoMichael%2FMicroTeX","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNanoMichael%2FMicroTeX","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNanoMichael%2FMicroTeX/lists"}