3b1b / 3b1b/manim

Cannot type Chinese and Latex in one line

Open
#1,515 15 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
93.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

I'm a math teacher in China. I want to show some math questions which contains latex symbols and Chinese descriptions to my students by manim. However I meet the trouble to type these math questions.
` English= TexText("""
This works good
$\\displaystyle\\frac{x}{y}$,
$$x^2+y^2=a^2$$
""")
`
The codes above work good, but when it comes to Chinese like the codes below manim failed.
`
Chinese = TexText("""
无法运行
$\\displaystyle\\frac{x}{y}$,
$$x^2+y^2=a^2$$
""")
`

> Warning: Using the default configuration file, which you can modify in /Users/tech/Downloads/animation/manim-master/venv/lib/python3.9/site-packages/manimlib/default_config.yml
> If you want to create a local configuration file, you can create a file named custom_config.yml, or run manimgl --config
>
> 2021-05-18 11:06:55.416 Python[24219:386229] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to /var/folders/sy/pkxzmw0906q_9vfq7_1_yj040000gn/T/org.python.python.savedState
> ERROR:root:
>
> LaTeX Error! Not a worry, it happens to the best of us.
>
> Package inputenc Error: Unicode character 中 (U+4E2D)
>

I work on MACm11.3.1 and I git the latest manim(2021/5/18).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.