Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor MTex and some clean-ups #1716

Merged
merged 4 commits into from
Jan 26, 2022
Merged

Refactor MTex and some clean-ups #1716

merged 4 commits into from
Jan 26, 2022

Conversation

YishiMichael
Copy link
Contributor

Proposed changes

  • M manimlib/mobject/svg/mtex_mobject.py: add generate_plain_tex_file config option (default False) to allow users generate another svg without additional \color commands to prevent the shape of svg from being altered by them; some refactors for efficiency improvememt; fix the bug that multi-line tex fails rendering
  • M manimlib/utils/simple_functions.py: refactor choose with lru_cache and scipy's func (borrowed from community edition); delete clip_in_place func (unused)
  • M manimlib/utils/color.py: delete get_shaded_rgb func (unused)
  • D manimlib/utils/string.py: clean up unused functions
  • M manimlib/mobject/coordinate_systems.py: remove redundancies
  • M manimlib/__init__.py: remove manimlib/utils/string.py import

@YishiMichael YishiMichael marked this pull request as draft January 26, 2022 11:08
@YishiMichael YishiMichael marked this pull request as ready for review January 26, 2022 15:52
@TonyCrane TonyCrane requested a review from 3b1b January 26, 2022 15:58
@YishiMichael
Copy link
Contributor Author

I noticed that breaking up every pair of braces may cause unexpected issues, so in the current version only tex enclosed by a pair of double-braces ({{ ... }}) are split out, making sure that these splitting are intended.
Note, this version only works after #1717 is merged.
MTex currently cannot handle tex originally including \color command. Users may use tex_to_color_map parameter instead.

@3b1b 3b1b merged commit 3baa141 into 3b1b:master Jan 26, 2022
TonyCrane added a commit that referenced this pull request Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants