Closed
Description
Description of bug / unexpected behavior
I use ctex to display Chinese in latex, but there is a problem with the display of Chinese and division marks

How to reproduce the issue
Code for reproducing the problem
from manim import *
from manim_voiceover import VoiceoverScene
config.tex_template = TexTemplateLibrary.ctex
config["background_color"] = BLACK
class FourBasicOperations(Scene):
def construct(self):
# 标题
title = Text("你好,今天我们使用manim来展示四则运算", font_size=48, color=WHITE)
self.play(Write(title))
self.wait(1)
self.play(FadeOut(title))
add_exp = MathTex("2 + 3 = 5", color=GREEN)
sub_exp = MathTex("5 - 2 = 3", color=BLUE)
mul_exp = MathTex("3 \\times 4 = 12", color=RED)
div_exp = MathTex("12 \\div 3 3 = 4", color=PURPLE)
expressions = VGroup(add_exp, sub_exp, mul_exp, div_exp).arrange_in_grid(
rows=2, cols=2, buff=1.0
)
# 逐个显示运算
self.play(Write(add_exp))
self.wait(0.5)
self.play(Write(sub_exp))
self.wait(0.5)
self.play(Write(mul_exp))
self.wait(0.5)
self.play(Write(div_exp))
self.wait(2)
manim -pql question_video.py FourBasicOperations --disable_caching
Additional media files
Images/GIFs
FourBasicOperations.mp4
Logs
Terminal output
Manim Community v0.18.0
[05/04/25 21:26:13] INFO Caching disabled. cairo_renderer.py:68
DEBUG List of the first few animation hashes of the scene: ['uncached_00000'] cairo_renderer.py:87
[05/04/25 21:26:14] INFO Animation 0 : Partial movie file written in scene_file_writer.py:527
'D:\Teach-With-Video\media\videos\question_video\480p15\partial_movie_files\FourBasicOperations\uncached_00000.mp4'
DEBUG Animation with empty mobject animation.py:174
INFO Caching disabled. cairo_renderer.py:68
DEBUG List of the first few animation hashes of the scene: ['uncached_00000', 'uncached_00001'] cairo_renderer.py:87
INFO Animation 1 : Partial movie file written in scene_file_writer.py:527
'D:\Teach-With-Video\media\videos\question_video\480p15\partial_movie_files\FourBasicOperations\uncached_00001.mp4'
INFO Caching disabled. cairo_renderer.py:68
DEBUG List of the first few animation hashes of the scene: ['uncached_00000', 'uncached_00001', 'uncached_00002'] cairo_renderer.py:87
INFO Animation 2 : Partial movie file written in scene_file_writer.py:527
'D:\Teach-With-Video\media\videos\question_video\480p15\partial_movie_files\FourBasicOperations\uncached_00002.mp4'
INFO Writing 2 + 3 = 5 to media\Tex\a6f2e838154ec4c1.tex tex_file_writing.py:107
[05/04/25 21:26:16] INFO Writing 5 - 2 = 3 to media\Tex\adeeb0386f515e1f.tex tex_file_writing.py:107
[05/04/25 21:26:18] INFO Writing 3 \times 4 = 12 to media\Tex\cf00c678d412bfaf.tex tex_file_writing.py:107
[05/04/25 21:26:19] INFO Writing 12 \div 3 3 = 4 to media\Tex\7bb91a49ef55fc94.tex tex_file_writing.py:107
[05/04/25 21:26:21] INFO Caching disabled. cairo_renderer.py:68
DEBUG List of the first few animation hashes of the scene: ['uncached_00000', 'uncached_00001', 'uncached_00002', 'uncached_00003'] cairo_renderer.py:87
INFO Animation 3 : Partial movie file written in scene_file_writer.py:527
'D:\Teach-With-Video\media\videos\question_video\480p15\partial_movie_files\FourBasicOperations\uncached_00003.mp4'
DEBUG Animation with empty mobject animation.py:174
INFO Caching disabled. cairo_renderer.py:68
DEBUG List of the first few animation hashes of the scene: ['uncached_00000', 'uncached_00001', 'uncached_00002', 'uncached_00003', 'uncached_00004'] cairo_renderer.py:87
INFO Animation 4 : Partial movie file written in scene_file_writer.py:527
'D:\Teach-With-Video\media\videos\question_video\480p15\partial_movie_files\FourBasicOperations\uncached_00004.mp4'
INFO Caching disabled. cairo_renderer.py:68
DEBUG List of the first few animation hashes of the scene: ['uncached_00000', 'uncached_00001', 'uncached_00002', 'uncached_00003', 'uncached_00004'] cairo_renderer.py:87
INFO Animation 5 : Partial movie file written in scene_file_writer.py:527
'D:\Teach-With-Video\media\videos\question_video\480p15\partial_movie_files\FourBasicOperations\uncached_00005.mp4'
DEBUG Animation with empty mobject animation.py:174
INFO Caching disabled. cairo_renderer.py:68
DEBUG List of the first few animation hashes of the scene: ['uncached_00000', 'uncached_00001', 'uncached_00002', 'uncached_00003', 'uncached_00004'] cairo_renderer.py:87
INFO Animation 6 : Partial movie file written in scene_file_writer.py:527
'D:\Teach-With-Video\media\videos\question_video\480p15\partial_movie_files\FourBasicOperations\uncached_00006.mp4'
INFO Caching disabled. cairo_renderer.py:68
DEBUG List of the first few animation hashes of the scene: ['uncached_00000', 'uncached_00001', 'uncached_00002', 'uncached_00003', 'uncached_00004'] cairo_renderer.py:87
[05/04/25 21:26:22] INFO Animation 7 : Partial movie file written in scene_file_writer.py:527
'D:\Teach-With-Video\media\videos\question_video\480p15\partial_movie_files\FourBasicOperations\uncached_00007.mp4'
DEBUG Animation with empty mobject animation.py:174
INFO Caching disabled. cairo_renderer.py:68
DEBUG List of the first few animation hashes of the scene: ['uncached_00000', 'uncached_00001', 'uncached_00002', 'uncached_00003', 'uncached_00004'] cairo_renderer.py:87
INFO Animation 8 : Partial movie file written in scene_file_writer.py:527
'D:\Teach-With-Video\media\videos\question_video\480p15\partial_movie_files\FourBasicOperations\uncached_00008.mp4'
INFO Caching disabled. cairo_renderer.py:68
DEBUG List of the first few animation hashes of the scene: ['uncached_00000', 'uncached_00001', 'uncached_00002', 'uncached_00003', 'uncached_00004'] cairo_renderer.py:87
INFO Animation 9 : Partial movie file written in scene_file_writer.py:527
'D:\Teach-With-Video\media\videos\question_video\480p15\partial_movie_files\FourBasicOperations\uncached_00009.mp4'
DEBUG Animation with empty mobject animation.py:174
INFO Caching disabled. cairo_renderer.py:68
DEBUG List of the first few animation hashes of the scene: ['uncached_00000', 'uncached_00001', 'uncached_00002', 'uncached_00003', 'uncached_00004'] cairo_renderer.py:87
INFO Animation 10 : Partial movie file written in scene_file_writer.py:527
'D:\Teach-With-Video\media\videos\question_video\480p15\partial_movie_files\FourBasicOperations\uncached_00010.mp4'
INFO Combining to Movie file. scene_file_writer.py:617
DEBUG Partial movie files to combine (11 files): scene_file_writer.py:561
['D:\\Teach-With-Video\\media\\videos\\question_video\\480p15\\partial_movie_files\\FourBasicOperations\\uncached_00000.mp4',
'D:\\Teach-With-Video\\media\\videos\\question_video\\480p15\\partial_movie_files\\FourBasicOperations\\uncached_00001.mp4',
'D:\\Teach-With-Video\\media\\videos\\question_video\\480p15\\partial_movie_files\\FourBasicOperations\\uncached_00002.mp4',
'D:\\Teach-With-Video\\media\\videos\\question_video\\480p15\\partial_movie_files\\FourBasicOperations\\uncached_00003.mp4',
'D:\\Teach-With-Video\\media\\videos\\question_video\\480p15\\partial_movie_files\\FourBasicOperations\\uncached_00004.mp4']
INFO scene_file_writer.py:735
File ready at 'D:\Teach-With-Video\media\videos\question_video\480p15\FourBasicOperations.mp4'
INFO Rendered FourBasicOperations scene.py:241
Played 11 animations
[05/04/25 21:26:23] INFO Previewed File at: 'D:\Teach-With-Video\media\videos\question_video\480p15\FourBasicOperations.mp4' file_ops.py:227
DEBUG Connection Error: Cannot check if latest release of manim is installed commands.py:140
System specifications
System Details
- OS: Windows 10 22H2
- RAM:16.0 GB
- Python version:python3.9
- Installed modules :
Package Version
------------------------------ ---------------------
absl-py 0.15.0
aiohttp 3.9.1
aiosignal 1.3.1
alabaster 0.7.12
alfred 0.3
alfred-py 2.9.5
alibabacloud-credentials 0.3.2
alibabacloud-darabonba-env 0.0.1
alibabacloud-darabonba-string 0.0.4
alibabacloud-darabonba-time 0.0.1
alibabacloud-dysmsapi20170525 2.0.24
alibabacloud-endpoint-util 0.0.3
alibabacloud-gateway-spi 0.0.1
alibabacloud-openapi-util 0.2.2
alibabacloud-tea 0.3.5
alibabacloud-tea-util 0.3.11
alibabacloud-tea-xml 0.0.2
altair 4.2.0
altair-data-server 0.4.1
altair-viewer 0.4.0
altgraph 0.17.2
annotated-types 0.7.0
anyio 4.6.2.post1
appdirs 1.4.4
arabic-reshaper 3.0.0
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
asgiref 3.8.1
asn1crypto 1.5.1
astor 0.8.1
asttokens 2.0.5
astunparse 1.6.3
async-generator 1.10
async-timeout 4.0.3
atomicwrites 1.4.1
attention 4.1
attrs 25.3.0
Authlib 1.3.2
auto-py-to-exe 2.34.0
autopep8 1.7.0
av 13.1.0
azure-cognitiveservices-speech 1.43.0
Babel 2.10.3
backcall 0.2.0
beautifulsoup4 4.13.3
bleach 4.1.0
blis 0.7.9
bootle 0.1.1
bottle 0.12.25
bottle-websocket 0.2.9
branca 0.6.0
Brotli 1.1.0
cachetools 4.2.4
catalogue 1.0.2
certifi 2025.1.31
cffi 1.15.0
chardet 5.2.0
charset-normalizer 2.0.7
clang 5.0
click 8.1.7
click-default-group 1.2.4
click-plugins 1.1.1
cligj 0.7.2
cloudpickle 2.0.0
cloup 2.1.2
colorama 0.4.4
colour 0.1.5
commonmark 0.9.1
comtypes 1.4.10
ConfigArgParse 1.7
configparser 5.0.2
contextlib2 21.6.0
coremltools 5.0
coverage 6.5.0
cozepy 0.6.2
cryptography 43.0.3
cssselect2 0.7.0
cycler 0.10.0
cymem 2.0.7
Cython 0.29.28
debugpy 1.5.1
decorator 5.2.1
defusedxml 0.7.1
Deprecated 1.2.13
dgl-cu113 0.9.0
dglgo 0.0.2
Distance 0.1.3
distro 1.9.0
Django 4.2.20
django-csp 3.7
django-mathjax 0.0.8
djangorestframework 3.16.0
djangorestframework_simplejwt 5.5.0
docker-pycreds 0.4.0
docopt 0.6.2
docutils 0.19
easydict 1.9
edge-tts 7.0.0
Eel 0.16.0
en-core-web-sm 2.3.1
entrypoints 0.3
exceptiongroup 1.2.2
executing 0.8.3
fake-useragent 0.1.11
filelock 3.4.2
Fiona 1.9.4.post1
fire 0.4.0
Flask 2.1.3
flask-cors 5.0.1
Flask-Login 0.6.3
Flask-SQLAlchemy 2.5.1
flatbuffers 1.12
folium 0.14.0
fonttools 4.28.4
frozenlist 1.4.1
funcy 1.17
future 0.18.2
fuzzywuzzy 0.8.2
g2p-en 2.1.0
gast 0.4.0
gensim 4.2.0
geopandas 0.13.2
gevent 22.10.2
gevent-websocket 0.10.1
geventhttpclient 2.3.3
gitdb 4.0.9
GitPython 3.1.24
glcontext 3.0.0
google-auth-oauthlib 0.4.6
google-pasta 0.2.0
greenlet 2.0.2
gTTS 2.5.4
gunicorn 21.2.0
h11 0.14.0
h5py 3.1.0
hanlp 2.1.0b45
hanlp-common 0.0.19
hanlp-downloader 0.0.25
hanlp-trie 0.0.5
html5lib 1.1
httpcore 1.0.6
httplib2 0.21.0
httpx 0.27.2
huggingface-hub 0.12.1
hyperopt 0.1.2
idna 3.3
image 1.5.33
imageio 2.10.1
imageio-ffmpeg 0.4.8
imagesize 1.4.1
importlib_metadata 8.6.1
imutils 0.5.4
inflect 5.5.2
ipykernel 6.6.1
ipython 8.1.1
ipython-genutils 0.2.0
ipywidgets 7.6.5
iso8601 1.0.2
isort 5.10.1
isosurfaces 0.1.0
itsdangerous 2.1.2
jedi 0.18.1
jieba 0.42.1
Jinja2 3.1.6
jiter 0.9.0
joblib 1.1.0
json_repair 0.41.0
json-tricks 3.15.5
jsons 1.6.1
jsonschema 4.23.0
jsonschema-specifications 2025.4.1
jupyter 1.0.0
jupyter-client 7.1.0
jupyter-console 6.4.0
jupyter-core 4.9.1
jupyterlab-pygments 0.1.2
jupyterlab-widgets 1.0.2
kaleido 0.1.0.post1
keras 2.6.0
Keras-Applications 1.0.8
Keras-Preprocessing 1.1.2
keras2onnx 1.7.0
kiwisolver 1.3.2
labelImg 1.8.6
libclang 12.0.0
littleutils 0.2.2
locust 2.34.0
loguru 0.5.3
lxml 4.7.1
Mako 1.1.5
manim 0.18.0
manim-voiceover 0.3.7
ManimPango 0.6.0
mapbox_earcut 1.0.3
Markdown 3.3.4
MarkupSafe 2.0.1
matplotlib 3.5.1
matplotlib-inline 0.1.3
mistune 0.8.4
moderngl 5.12.0
moderngl-window 2.4.4
more-itertools 9.0.0
moviepy 1.0.3
mpmath 1.2.1
msgpack 1.1.0
multidict 6.0.4
multipledispatch 1.0.0
murmurhash 1.0.9
mutagen 1.47.0
mysqlclient 2.1.1
natsort 8.0.2
nbclient 0.5.9
nbconvert 6.4.0
nbformat 5.1.3
nest-asyncio 1.5.4
networkx 2.6.3
nl4dv 2.0.0
nltk 3.7
nni 2.6
notebook 6.4.6
numpy 1.26.4
numpydoc 1.4.0
oauthlib 3.1.1
ogb 1.3.4
oldest-supported-numpy 0.14
onnx 1.10.2
onnx-simplifier 0.3.10
onnx2pytorch 0.4.1
onnxconverter-common 1.9.0
onnxoptimizer 0.2.6
onnxruntime-gpu 1.11.1
openai 1.69.0
opencv-python 4.5.4.60
opendatalab 0.0.9
opt-einsum 3.3.0
oscrypto 1.3.0
outcome 1.1.0
outdated 0.2.1
pandas 1.3.5
pandoc 2.3
pandocfilters 1.5.0
parso 0.8.3
pascal-voc-writer 0.1.4
pathtools 0.1.2
patsy 0.5.2
pefile 2023.2.7
phrasetree 0.0.8
pickleshare 0.7.5
Pillow 9.5.0
Pillow-PIL 0.1.dev0
pip 22.1.2
pipreqs 0.4.13
plac 1.1.3
plotly 5.10.0
pluggy 1.0.0
plumbum 1.8.2
ply 3.11
portalocker 2.3.2
portpicker 1.5.2
preshed 3.0.8
prettytable 3.0.0
proglog 0.1.10
prometheus-client 0.12.0
promise 2.3
prompt-toolkit 3.0.24
psutil 7.0.0
ptflops 0.6.7
pure-eval 0.2.2
py 1.11.0
pyasn1 0.4.8
pyasn1-modules 0.2.8
PyAudio 0.2.12
pycairo 1.27.0
pycocotools 2.0.2
pycodestyle 2.9.1
pycparser 2.20
pycryptodome 3.18.0
pycuda 2021.1
pycv2 0.0.1
pydantic 2.9.2
pydantic_core 2.23.4
pydub 0.25.1
pydyf 0.11.0
pygame 2.1.2
pyglet 2.1.3
pyglm 2.8.0
Pygments 2.11.2
pyHanko 0.25.3
pyhanko-certvalidator 0.26.5
pyinstaller 5.10.1
pyinstaller-hooks-contrib 2022.2
PyJWT 2.8.0
pymongo 4.0.1
PyMySQL 1.1.1
pynvml 11.5.0
PyOpenGL 3.1.6
PyOpenGL-accelerate 3.1.6
pyOpenSSL 23.3.0
pypandoc 1.13
pyparsing 2.4.7
pypdf 5.1.0
pyperclip 1.9.0
pyphen 0.15.0
pypinyin 0.49.0
pypiwin32 223
pypng 0.20220715.0
pyproj 3.5.0
PyQt5 5.15.6
PyQt5-Qt5 5.15.2
PyQt5-sip 12.9.1
pyquaternion 0.9.9
pyrr 0.10.3
pyrsistent 0.18.0
pyserial 3.5
PySide6 6.3.2
PySide6-Addons 6.3.2
PySide6-Essentials 6.3.2
PySocks 1.7.1
pytest 3.10.1
pytest-cov 2.6.1
python-bidi 0.6.3
python-dateutil 2.8.2
python-dotenv 0.21.1
python-Levenshtein 0.12.2
python-slugify 8.0.4
PythonWebHDFS 0.2.3
pytools 2021.2.8
pytorch-crf 0.7.2
pyttsx3 2.98
pytz 2021.3
PyWavelets 1.1.1
pywin32 303
pywin32-ctypes 0.2.0
pywinpty 1.1.6
PyYAML 6.0
pyzmq 26.4.0
qrcode 7.4.2
qtconsole 5.2.2
QtPy 2.0.0
rdkit-pypi 2022.3.5
referencing 0.36.2
regex 2022.1.18
reportlab 4.2.5
requests 2.32.3
requests-oauthlib 1.3.0
resnet 0.1
responses 0.17.0
rich 12.4.4
rpds-py 0.24.0
rsa 4.7.2
ruamel.yaml 0.17.21
ruamel.yaml.clib 0.2.6
sacremoses 0.0.53
schema 0.7.5
scikit-image 0.18.3
scikit-learn 1.0.1
scipy 1.13.1
screeninfo 0.8.1
seaborn 0.11.2
selenium 3.14.0
Send2Trash 1.8.0
sentencepiece 0.1.97
sentry-sdk 1.4.3
setuptools 64.0.0
Shapely 1.8.0
shiboken6 6.3.2
shortuuid 1.0.1
si-prefix 1.2.2
simplejson 3.17.6
simutils 0.0.2
six 1.15.0
skia-pathops 0.7.4
sklearn 0.0
smart-open 6.1.0
smmap 5.0.0
sniffio 1.2.0
snowballstemmer 2.2.0
snownlp 0.12.3
sortedcontainers 2.4.0
soundfile 0.12.1
soupsieve 2.3.1
sox 1.5.0
spacy 2.3.8
SpeechRecognition 3.14.2
Sphinx 5.1.1
sphinxcontrib-applehelp 1.0.2
sphinxcontrib-devhelp 1.0.2
sphinxcontrib-htmlhelp 2.0.0
sphinxcontrib-jsmath 1.0.1
sphinxcontrib-qthelp 1.0.3
sphinxcontrib-serializinghtml 1.1.5
SQLAlchemy 1.4.39
sqlparse 0.4.3
srsly 1.0.6
srt 3.5.3
stack-data 0.2.0
statsmodels 0.13.2
subprocess32 3.5.4
svgelements 1.9.6
svglib 1.5.1
sympy 1.9
tabulate 0.8.9
tenacity 8.0.1
tensorboard 2.7.0
tensorboard-data-server 0.6.1
tensorboard-plugin-wit 1.8.0
tensorboardX 2.4.1
tensorflow 2.6.0
tensorflow-estimator 2.7.0
tensorflow-io-gcs-filesystem 0.23.1
tensorrt 8.4.1.5
termcolor 1.1.0
terminado 0.12.1
terminaltables 3.1.10
testpath 0.5.0
text-unidecode 1.3
tf-estimator-nightly 2.8.0.dev2021122109
Theano 1.0.5
thinc 7.4.6
thop 0.0.31.post2005241907
threadpoolctl 3.0.0
tifffile 2021.10.12
tiktoken 0.9.0
tinycss2 1.4.0
tinyhtml5 2.0.0
tokenizers 0.11.6
toml 0.10.2
tomli 2.2.1
toolz 0.12.0
toposort 1.5
torch 1.10.0+cu113
torchaudio 0.10.0+cu113
torchsummary 1.5.1
torchtext 0.11.2
torchvision 0.11.1+cu113
tornado 6.1
tqdm 4.64.0
traitlets 5.1.1
transformers 4.16.0
trio 0.19.0
trio-websocket 0.9.2
typeguard 2.13.3
typer 0.6.1
typing_extensions 4.13.0
typish 1.9.3
tzdata 2022.6
tzlocal 5.2
uncurl 0.0.11
Unidecode 1.3.6
uritools 4.0.3
urllib3 1.26.7
vega 3.6.0
vega-datasets 0.9.0
waitress 2.1.2
wandb 0.12.7
wasabi 0.10.1
watchdog 3.0.0
wcwidth 0.2.5
weasyprint 63.0
webdriver-manager 4.0.1
webencodings 0.5.1
websockets 10.1
wechatpayv3 1.2.43
Werkzeug 2.0.2
wheel 0.37.0
whichcraft 0.6.1
widgetsnbextension 3.5.2
win32-setctime 1.0.4
wordcloud 1.9.2
wrapt 1.12.1
wsproto 1.0.0
xhtml2pdf 0.2.16
xlrd 2.0.1
yarg 0.1.9
yarl 1.9.4
yaspin 2.1.0
yolo5 0.0.1
yolov5 6.0.4
zhipuai 2.1.5.20250410
zipp 3.21.0
zope.event 4.6
zope.interface 6.0
zopfli 0.2.3.post1
Additional comments
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
🆕 New