mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
Allow for LaTeX in DecimalNumber, e.g. for units
This commit is contained in:
parent
c6b9826f84
commit
5b88d2347c
1 changed files with 6 additions and 1 deletions
|
@ -22,7 +22,12 @@ if TYPE_CHECKING:
|
|||
|
||||
@lru_cache()
|
||||
def char_to_cahced_mob(char: str, **text_config):
|
||||
return Text(char, **text_config)
|
||||
if "\\" in char:
|
||||
# This is for when the "character" is a LaTeX command
|
||||
# like ^\circ or \dots
|
||||
return Tex(char, **text_config)
|
||||
else:
|
||||
return Text(char, **text_config)
|
||||
|
||||
|
||||
class DecimalNumber(VMobject):
|
||||
|
|
Loading…
Add table
Reference in a new issue