manim/docs/source
Henrik Skov Midtiby 357bb3fbba
Rewrite MathTex to make it more robust regarding splitting (#4515)
* Extracted the method get_mob_from_shape_element

* Moved more functionality to get_mob_from_shape_element

* More cleanup

* Parse the svg file while maintaining the group structure.

* Make the svg groups available

* Handle PERF401 issue

* [pre-commit.ci] pre-commit autoupdate (#4506)

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.14.7 → v0.14.8](https://github.com/astral-sh/ruff-pre-commit/compare/v0.14.7...v0.14.8)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Added an example of the issue

* Experimenting with coloring elements from the latex equation

* ...

* Regular expression can now match more than one object

* Process the string by applying the substrings in the order they match

* Code refactoring and added type annotations

* ...

* Added a lot of test cases

* More examples

* More examples

* Use matched_strings_and_ids to simplify existing methods

* Remove unused code

* Update get_part_by_tex to use matched_strings_and_ids

* This is required for test_MathTable to pass

* Ensure that self.texstring is set.

* Added more examples from exising issues in the github repo

* Ensure that latex groups are maintained by adding an additional pair of curly braces around the extracted part

* ExampleScene -> Scene

* Added comment

* _break_up_by_substrings

* Refactor code

* Added comment to example

* Handle integer inputs well.

* Expose the original tex_string

* Do not treat the content of substrings_to_isolate as regular expressions.

* Updated examples

* Update examples

* Fix SVMobject caching issue.

* Remove traces from brace_notation_split_occurred

* Simplify MathTex::_break_up_by_substrings

* Fix small issue in tex that in some cases moved elements a tiny bit around

* No use of regular expressions for locate substrings.

* Updated notes to the set of test cases

* Handle issues with the center environment.

* Add example

* Fix issue with rectangles (e.g. from sqrt)

* ConvertToOpenGL

* Reduce the number of nesting levels.

* Use the specified arg_seperator

* Deal with the double curly brace markup

* Code cleanup

* Code cleanup

* Rollback a few changes

* Code cleanup

* Adjust paths the generated artefacts in tests that rely on MathTex

* Added a remark to the using text guide on enclosing snippets in curly braces for substrings_to_isolate to work

* Added space around the numerator argument to frac to avoid having double curly braces in the example.

This would otherwise trigger MathTex to split the string at that location.

* Log errors properly and display some information about the errors and their context.

* Code refactoring as suggested by Benjamin

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
2026-02-16 14:22:56 +01:00
..
_static Add option to run examples directly with binder (#3427) 2023-11-10 21:52:43 +01:00
_templates Added support for Manim type aliases in Sphinx docs + Added new TypeAliases (#3484) 2023-12-29 19:04:31 +01:00
changelog Rework and consolidate release changelog script, add previously skipped changelog entries (#4568) 2026-02-04 10:10:39 +01:00
contributing Add VectorNDLike type aliases (#4068) 2025-08-01 04:31:30 +00:00
faq Fix broken aquabeam OpenGL link using Wayback Machine (#4545) 2026-01-25 12:33:39 +00:00
guides Rewrite MathTex to make it more robust regarding splitting (#4515) 2026-02-16 14:22:56 +01:00
installation Revert "Set the default Python version to 3.13 in the uv installation guide (…" (#4534) 2026-01-18 08:49:10 +01:00
reference_index Add classes MethodWithArgs, SceneInteractContinue and SceneInteractRerun inside new module manim.data_structures (#4315) 2025-07-25 00:37:14 +02:00
tutorials docs: add explanation about the rate_func in the custom animation (#4278) 2025-06-11 09:50:11 +02:00
changelog.rst Rework and consolidate release changelog script, add previously skipped changelog entries (#4568) 2026-02-04 10:10:39 +01:00
conduct.md Added code of conduct (#935) 2021-01-18 19:14:57 +05:30
conf.py Rework and consolidate release changelog script, add previously skipped changelog entries (#4568) 2026-02-04 10:10:39 +01:00
contributing.rst Improve documentation section about contributing to docs (#3555) 2023-12-30 00:22:24 +01:00
examples.rst Refactor Rotating and add docstrings to Mobject.rotate() and Rotating (#4147) 2025-06-22 04:15:12 +00:00
index.rst Added license information to documentation landing page (#3986) 2025-08-18 23:16:45 +02:00
installation.rst Rewrite installation instructions (#3930) 2024-12-06 18:50:18 -05:00
plugins.rst Change project management tool from poetry to uv (#4138) 2025-02-02 17:16:46 +01:00
reference.rst Added :class:.ChangeSpeed, an animation wrapper that allows to smoothly change the speed at which an animation is played (#2749) 2022-07-06 16:39:55 +02:00
robots.txt Flake8 Changes + Fixing Warnings (#1968) 2021-09-03 13:45:48 -04:00
tutorials_guides.rst Refactored structure of documentation; added :doc:FAQ section <faq/index> (#2732) 2022-05-27 08:45:31 +00:00