-
Notifications
You must be signed in to change notification settings - Fork 2.2k
division sign \ div is displayed as\ nabla when using ctex #4237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I cannot reproduce the additional lines and otherwise strange rendering of the Chinese text on my system - are you using the opengl renderer? When it comes to the display of the Nabla operator - this is already caused by LaTeX itself and thus not an issue which Manim could resolve. This is the result of the rendering of the LaTeX file separately using MikTeX's xelatex: Actually the display of Nabla for \div appears to be as intended by LaTeX when the Use 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(r"3 \times 4 = 12", color=RED)
div_exp = MathTex(r"12 \divisionsymbol 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) FourBasicOperations.mp4 |
Update to the current version Manim 0.19.0 and see if the rendering of the Chinese characters improves. |
Thank you for your reply. Here is my test.
I also tried changing the font pack, but it didn't work either. |
https://github.com/user-attachments/assets/b73b6c95-9643-45a9-8d83-8839826c0952 |
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



The correct \div display should be like this.(I achieve this effect by deleting this sentence "config.tex_template = TexTemplateLibrary.ctex", i.e. without using ctex.)
How to reproduce the issue
Code for reproducing the problem
Additional media files
Images/GIFs
FourBasicOperations.mp4
Logs
Terminal output
System specifications
System Details
LaTeX details
Additional comments
The text was updated successfully, but these errors were encountered: