Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Added a small fix to the issue of Tex inputs starting with a new line

Grant Sanderson72006334f598
diff --git a/manimlib/mobject/svg/tex_mobject.py b/manimlib/mobject/svg/tex_mobject.py
index f51f15885..881392e7a 100644
--- a/manimlib/mobject/svg/tex_mobject.py
+++ b/manimlib/mobject/svg/tex_mobject.py
@@ -78,6 +78,9 @@ class SingleStringTexMobject(SVGMobject):
if tex == "":
tex = "\\quad"
+ # To keep files from starting with a line break
+ tex = tex.replace("\\\\", "\\quad\\\\")
+
# Handle imbalanced \left and \right
num_lefts, num_rights = [
len([