Merge pull request #1783 from EbbDrop/more-special-string

Added a \overset as a special string
This commit is contained in:
Grant Sanderson 2022-04-11 09:50:33 -07:00 committed by GitHub
commit d26b8a826c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -100,6 +100,18 @@ class SingleStringTex(SVGMobject):
filler = "{\\quad}"
tex += filler
should_add_double_filler = reduce(op.or_, [
tex == "\\overset",
# TODO: these can't be used since they change
# the latex draw order.
# tex == "\\frac", # you can use \\over as a alternative
# tex == "\\dfrac",
# tex == "\\binom",
])
if should_add_double_filler:
filler = "{\\quad}{\\quad}"
tex += filler
if tex == "\\substack":
tex = "\\quad"