Skip to content

Conversation

mathsvisualization
Copy link

Fixes #2390

Motivation

LaTeX compilation in Manim was failing due to missing directory configuration for cached compilation results.
By adding a dedicated latex_cache directory, we can avoid repeated compilation and resolve errors caused by missing paths.

This improves both performance (fewer recompilations) and reliability (LaTeX renders without errors).

Proposed changes

  • Added a new latex_cache entry in default_config.yml for storing cached LaTeX compilation results.
  • Updated tex_file_writing.py to use the latex_cache directory.
  • Ensured that LaTeX intermediate files are properly stored and reused.

Test

To test the changes:

  1. Run any scene that uses Tex or MathTex.
  2. Verify that LaTeX compiles without errors.
  3. Check that cached files are stored in the latex_cache directory.
  4. Re-run the same scene and confirm that compilation is faster (files are reused).

✅ This PR fixes the LaTeX compilation error and introduces a caching mechanism for more efficient rendering.

Result

Before

Latex-UnFix

After

Latex-Fix

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.

LaTeX compilation failed when running simple ManimGL scene
1 participant