mirror of
https://github.com/3b1b/manim.git
synced 2025-07-29 13:03:31 +08:00
Reduced to a single tex_template file
This commit is contained in:
@ -135,12 +135,13 @@ for folder in [FILE_DIR, RASTER_IMAGE_DIR, SVG_IMAGE_DIR, ANIMATIONS_DIR, TEX_DI
|
||||
os.makedirs(folder)
|
||||
|
||||
TEX_TEXT_TO_REPLACE = "YourTextHere"
|
||||
TEMPLATE_TEX_FILE = os.path.join(THIS_DIR, "template.tex")
|
||||
TEMPLATE_TEXT_FILE = os.path.join(THIS_DIR, "text_template.tex")
|
||||
TEMPLATE_TEX_FILE = os.path.join(THIS_DIR, "tex_template.tex")
|
||||
with open(TEMPLATE_TEX_FILE, "r") as infile:
|
||||
TEMPLATE_TEX_FILE_BODY = infile.read()
|
||||
with open(TEMPLATE_TEXT_FILE, "r") as infile:
|
||||
TEMPLATE_TEXT_FILE_BODY = infile.read()
|
||||
TEMPLATE_TEX_FILE_BODY = TEMPLATE_TEXT_FILE_BODY.replace(
|
||||
TEX_TEXT_TO_REPLACE,
|
||||
"$${}$$".format(TEX_TEXT_TO_REPLACE)
|
||||
)
|
||||
|
||||
FFMPEG_BIN = "ffmpeg"
|
||||
|
||||
|
Reference in New Issue
Block a user