mirror of
https://github.com/3b1b/manim.git
synced 2025-07-30 13:34:19 +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"
|
||||
|
||||
|
25
template.tex
25
template.tex
@ -1,25 +0,0 @@
|
||||
\documentclass[preview]{standalone}
|
||||
|
||||
\usepackage[english]{babel}
|
||||
\usepackage{amsmath}
|
||||
\usepackage{amssymb}
|
||||
\usepackage{dsfont}
|
||||
\usepackage{setspace}
|
||||
\usepackage{tipa}
|
||||
\usepackage{relsize}
|
||||
\usepackage{mathrsfs}
|
||||
\usepackage{calligra}
|
||||
\usepackage{wasysym}
|
||||
\usepackage{textcomp}
|
||||
\usepackage{microtype}
|
||||
\DisableLigatures{encoding = *, family = * }
|
||||
%\usepackage[UTF8]{ctex}
|
||||
|
||||
\begin{document}
|
||||
\centering
|
||||
|
||||
\begin{align*}
|
||||
YourTextHere
|
||||
\end{align*}
|
||||
|
||||
\end{document}
|
Reference in New Issue
Block a user