3b1b / manim

Animation engine for explanatory math videos
MIT License
60.43k stars 5.71k forks source link

Error when trying to add Chinese text #1027

Open mokkinghang opened 4 years ago

mokkinghang commented 4 years ago

Basically it is the same issue as in https://github.com/3b1b/manim/issues/570, however it was not clear how the person solved the issue, for he stated that he didn't know how he managed to solve it. I am using Windows 10 and MiKTeX. I tried to edit constants.py,TEX_USE_CTEX = False was changed to True and it returns the error:

 File "D:\Programs\manim\manim\manimlib\extract_scene.py", line 153, in main
    scene = SceneClass(**scene_kwargs)
  File "D:\Programs\manim\manim\manimlib\scene\scene.py", line 54, in __init__
    self.construct()
  File "tutorial/1_text_format.py", line 5, in construct
    text = TextMobject("你好")
  File "D:\Programs\manim\manim\manimlib\mobject\svg\tex_mobject.py", line 144, in __init__
    self, self.arg_separator.join(tex_strings), **kwargs
  File "D:\Programs\manim\manim\manimlib\mobject\svg\tex_mobject.py", line 45, in __init__
    self.template_tex_file_body
  File "D:\Programs\manim\manim\manimlib\utils\tex_file_writing.py", line 19, in tex_to_svg_file
    dvi_file = tex_to_dvi(tex_file)
  File "D:\Programs\manim\manim\manimlib\utils\tex_file_writing.py", line 67, in tex_to_dvi
    "See log output above or the log file: %s" % log_file)
Exception: Xelatex error converting to xdv. See log output above or the log file: D:\Programs\manim\manim\manimlib\files\Tex\6d518d13918960fc.log

And the command is extremely simple:

class WriteText(Scene): 
    def construct(self): 
        text = TextMobject("你好")
        self.play(Write(text))
        self.wait(3)

Anyway that has proven to work to solve the issue? For I am not the first one encountering this.

mokkinghang commented 4 years ago

By the way, it is what it says in D:\Programs\manim\manim\manimlib\files\Tex\6d518d13918960fc.log.

This is XeTeX, Version 3.14159265-2.6-0.999992 (MiKTeX 2.9.7400 64-bit) (preloaded format=xelatex 2020.5.4)  4 MAY 2020 05:14
entering extended mode
**D:/Programs/manim/manim/manimlib/files/Tex/6d518d13918960fc.tex
(D:/Programs/manim/manim/manimlib/files/Tex/6d518d13918960fc.tex
LaTeX2e <2020-02-02> patch level 5
L3 programming layer <2020-04-06>)
! Emergency stop.
<*> ...nim/manimlib/files/Tex/6d518d13918960fc.tex

Here is how much of TeX's memory you used:
 18 strings out of 414218
 562 string characters out of 2903153
 244959 words of memory out of 3000000
 17616 multiletter control sequences out of 15000+200000
 532338 words of font info for 24 fonts, out of 3000000 for 9000
 1348 hyphenation exceptions out of 8191
 12i,0n,15p,95b,8s stack positions out of 5000i,500n,10000p,200000b,50000s

No pages of output.

And the corresponding .tex file is empty.

TonyCrane commented 4 years ago

If you can read Chinese, you can find the answer in this file I written.

mokkinghang commented 4 years ago

If you can read Chinese, you can find the answer in this file I written.

Thank you, however it doesn't seem to solve my problem. I followed the instructions in the pdf: Change the following in manimlib/constants.py : Change MEDIA_DIR = "./media" to MEDIA_DIR = os.path.join(os.getcwd(), "media") and change TEX_USE_CTEX from False to True. It returns the following error messages:

Media will be written to D:\Programs\manim\manim-master\media\. You can change this behavior with the --media_dir flag.
Writing "\centering 你好" to D:\Programs\manim\manim-master\media\Tex\de13cf5ef7f6d002.tex

Sorry, but miktex-makemf did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  C:\Users\User\AppData\Local\MiKTeX\2.9\miktex\log\miktex-makemf.log
Couldn't open `OT:script=hani;language=dfl.cfg'

hbf2gf (CJK ver. 4.8.4)

Sorry, but miktex-maketfm did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  C:\Users\User\AppData\Local\MiKTeX\2.9\miktex\log\miktex-maketfm.log

Sorry, but miktex-makemf did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  C:\Users\User\AppData\Local\MiKTeX\2.9\miktex\log\miktex-makemf.log
Couldn't open `OT:script=hani;language=dfl.cfg'

hbf2gf (CJK ver. 4.8.4)

Sorry, but miktex-maketfm did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  C:\Users\User\AppData\Local\MiKTeX\2.9\miktex\log\miktex-maketfm.log

Sorry, but miktex-makemf did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  C:\Users\User\AppData\Local\MiKTeX\2.9\miktex\log\miktex-makemf.log
Couldn't open `OT:script=hani;language=dfl.cfg'

hbf2gf (CJK ver. 4.8.4)

Sorry, but miktex-maketfm did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  C:\Users\User\AppData\Local\MiKTeX\2.9\miktex\log\miktex-maketfm.log

Sorry, but miktex-makemf did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  C:\Users\User\AppData\Local\MiKTeX\2.9\miktex\log\miktex-makemf.log
Couldn't open `OT:script=hani;language=dfl.cfg'

hbf2gf (CJK ver. 4.8.4)

Sorry, but miktex-maketfm did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  C:\Users\User\AppData\Local\MiKTeX\2.9\miktex\log\miktex-maketfm.log

Sorry, but miktex-makemf did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  C:\Users\User\AppData\Local\MiKTeX\2.9\miktex\log\miktex-makemf.log
Couldn't open `OT:script=hani;language=dfl.cfg'

hbf2gf (CJK ver. 4.8.4)

Sorry, but miktex-maketfm did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  C:\Users\User\AppData\Local\MiKTeX\2.9\miktex\log\miktex-maketfm.log

Traceback (most recent call last):
  File "D:\Programs\manim\manim-master\manimlib\extract_scene.py", line 155, in main
    scene = SceneClass(**scene_kwargs)
  File "D:\Programs\manim\manim-master\manimlib\scene\scene.py", line 53, in __init__
    self.construct()
  File "mycode.py", line 104, in construct
    text = TextMobject("你好")
  File "D:\Programs\manim\manim-master\manimlib\mobject\svg\tex_mobject.py", line 148, in __init__
    self, self.arg_separator.join(tex_strings), **kwargs
  File "D:\Programs\manim\manim-master\manimlib\mobject\svg\tex_mobject.py", line 44, in __init__
    self.template_tex_file_body
  File "D:\Programs\manim\manim-master\manimlib\utils\tex_file_writing.py", line 19, in tex_to_svg_file
    dvi_file = tex_to_dvi(tex_file)
  File "D:\Programs\manim\manim-master\manimlib\utils\tex_file_writing.py", line 67, in tex_to_dvi
    "See log output above or the log file: %s" % log_file)
Exception: Xelatex error converting to xdv. See log output above or the log file: D:\Programs\manim\manim-master\media\Tex\de13cf5ef7f6d002.log

and in the log file:

This is XeTeX, Version 3.14159265-2.6-0.999992 (MiKTeX 2.9.7400 64-bit) (preloaded format=xelatex 2020.5.4)  5 MAY 2020 18:44
entering extended mode
**D:/Programs/manim/manim-master/media/Tex/de13cf5ef7f6d002.tex
(D:/Programs/manim/manim-master/media/Tex/de13cf5ef7f6d002.tex
LaTeX2e <2020-02-02> patch level 5
L3 programming layer <2020-04-06> (D:\Programs\manim\MikTeX\tex/latex/standalon
e\standalone.cls
Document Class: standalone 2018/03/26 v1.3a Class to compile TeX sub-files stan
dalone
(D:\Programs\manim\MikTeX\tex/latex/tools\shellesc.sty
Package: shellesc 2019/11/08 v1.0c unified shell escape interface for LaTeX
Package shellesc Info: Restricted shell escape enabled on input line 77.
) (D:\Programs\manim\MikTeX\tex/generic/iftex\ifluatex.sty
Package: ifluatex 2019/10/25 v1.5 ifluatex legacy package. Use iftex instead.
(D:\Programs\manim\MikTeX\tex/generic/iftex\iftex.sty
Package: iftex 2020/03/06 v1.0d TeX engine tests
)) (D:\Programs\manim\MikTeX\tex/latex/xkeyval\xkeyval.sty
Package: xkeyval 2014/12/03 v2.7a package option processing (HA)
(D:\Programs\manim\MikTeX\tex/generic/xkeyval\xkeyval.tex (D:\Programs\manim\Mi
kTeX\tex/generic/xkeyval\xkvutils.tex
\XKV@toks=\toks15
\XKV@tempa@toks=\toks16
(D:\Programs\manim\MikTeX\tex/generic/xkeyval\keyval.tex))
\XKV@depth=\count163
File: xkeyval.tex 2014/12/03 v2.7a key=value parser (HA)
))
\sa@internal=\count164
\c@sapage=\count165
(D:\Programs\manim\MikTeX\tex/latex/standalone\standalone.cfg
File: standalone.cfg 2018/03/26 v1.3a Default configuration file for 'standalon
e' class
) (D:\Programs\manim\MikTeX\tex/latex/base\article.cls
Document Class: article 2019/12/20 v1.4l Standard LaTeX document class
(D:\Programs\manim\MikTeX\tex/latex/base\size10.clo
File: size10.clo 2019/12/20 v1.4l Standard LaTeX file (size option)
)
\c@part=\count166
\c@section=\count167
\c@subsection=\count168
\c@subsubsection=\count169
\c@paragraph=\count170
\c@subparagraph=\count171
\c@figure=\count172
\c@table=\count173
\abovecaptionskip=\skip47
\belowcaptionskip=\skip48
\bibindent=\dimen134
) (D:\Programs\manim\MikTeX\tex/latex/preview\preview.sty
Package: preview 2017/04/24 11.91 (AUCTeX/preview-latex)
(D:\Programs\manim\MikTeX\tex/generic/luatex85\luatex85.sty
Package: luatex85 2016/06/15 v1.4 pdftex aliases for luatex
) (D:\Programs\manim\MikTeX\tex/latex/preview\prtightpage.def
\PreviewBorder=\dimen135
)
\pr@snippet=\count174
\pr@box=\box45
\pr@output=\toks17
)) (D:\Programs\manim\MikTeX\tex/generic/babel\babel.sty
Package: babel 2020/03/22 3.42 The Babel package
(D:\Programs\manim\MikTeX\tex/generic/babel\switch.def
File: switch.def 2020/03/22 3.42 Babel switching mechanism
)
*************************************
* Local config file bblopts.cfg used
*
(D:\Programs\manim\MikTeX\tex/latex/arabi\bblopts.cfg
File: bblopts.cfg 2005/09/08 v0.1 add Arabic and Farsi to "declared" options of
 babel
) (D:\Programs\manim\MikTeX\tex/latex/babel-english\english.ldf
Language: english 2017/06/06 v3.3r English support from the babel system
(D:\Programs\manim\MikTeX\tex/generic/babel\babel.def
File: babel.def 2020/03/22 3.42 Babel common definitions
\babel@savecnt=\count175
\U@D=\dimen136
(D:\Programs\manim\MikTeX\tex/generic/babel\xebabel.def (D:\Programs\manim\MikT
eX\tex/generic/babel\txtbabel.def))
\bbl@readstream=\read2
\bbl@dirlevel=\count176
)
Package babel Info: \l@canadian = using hyphenrules for english
(babel)             (\language0) on input line 102.
Package babel Info: \l@australian = using hyphenrules for ukenglish
(babel)             (\language72) on input line 105.
Package babel Info: \l@newzealand = using hyphenrules for ukenglish
(babel)             (\language72) on input line 108.
)) (D:\Programs\manim\MikTeX\tex/latex/amsmath\amsmath.sty
Package: amsmath 2020/01/20 v2.17e AMS math features
\@mathmargin=\skip49
For additional information on amsmath, use the `?' option.
(D:\Programs\manim\MikTeX\tex/latex/amsmath\amstext.sty
Package: amstext 2000/06/29 v2.01 AMS text
(D:\Programs\manim\MikTeX\tex/latex/amsmath\amsgen.sty
File: amsgen.sty 1999/11/30 v2.0 generic functions
\@emptytoks=\toks18
\ex@=\dimen137
)) (D:\Programs\manim\MikTeX\tex/latex/amsmath\amsbsy.sty
Package: amsbsy 1999/11/29 v1.2d Bold Symbols
\pmbraise@=\dimen138
) (D:\Programs\manim\MikTeX\tex/latex/amsmath\amsopn.sty
Package: amsopn 2016/03/08 v2.02 operator names
)
\inf@bad=\count177
LaTeX Info: Redefining \frac on input line 227.
\uproot@=\count178
\leftroot@=\count179
LaTeX Info: Redefining \overline on input line 389.
\classnum@=\count180
\DOTSCASE@=\count181
LaTeX Info: Redefining \ldots on input line 486.
LaTeX Info: Redefining \dots on input line 489.
LaTeX Info: Redefining \cdots on input line 610.
\Mathstrutbox@=\box46
\strutbox@=\box47
\big@size=\dimen139
LaTeX Font Info:    Redeclaring font encoding OML on input line 733.
LaTeX Font Info:    Redeclaring font encoding OMS on input line 734.
\macc@depth=\count182
\c@MaxMatrixCols=\count183
\dotsspace@=\muskip16
\c@parentequation=\count184
\dspbrk@lvl=\count185
\tag@help=\toks19
\row@=\count186
\column@=\count187
\maxfields@=\count188
\andhelp@=\toks20
\eqnshift@=\dimen140
\alignsep@=\dimen141
\tagshift@=\dimen142
\tagwidth@=\dimen143
\totwidth@=\dimen144
\lineht@=\dimen145
\@envbody=\toks21
\multlinegap=\skip50
\multlinetaggap=\skip51
\mathdisplay@stack=\toks22
LaTeX Info: Redefining \[ on input line 2859.
LaTeX Info: Redefining \] on input line 2860.
) (D:\Programs\manim\MikTeX\tex/latex/amsfonts\amssymb.sty
Package: amssymb 2013/01/14 v3.01 AMS font symbols
(D:\Programs\manim\MikTeX\tex/latex/amsfonts\amsfonts.sty
Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support
\symAMSa=\mathgroup4
\symAMSb=\mathgroup5
LaTeX Font Info:    Redeclaring math symbol \hbar on input line 98.
LaTeX Font Info:    Overwriting math alphabet `\mathfrak' in version `bold'
(Font)                  U/euf/m/n --> U/euf/b/n on input line 106.
)) (D:\Programs\manim\MikTeX\tex/latex/doublestroke\dsfont.sty
Package: dsfont 1995/08/01 v0.1 Double stroke roman fonts
) (D:\Programs\manim\MikTeX\tex/latex/setspace\setspace.sty
Package: setspace 2011/12/19 v6.7a set line spacing
) (D:\Programs\manim\MikTeX\tex/latex/tipa\tipa.sty
Package: tipa 2002/08/08 TIPA version 1.1
(D:\Programs\manim\MikTeX\tex/latex/base\fontenc.sty
Package: fontenc 2020/02/11 v2.0o Standard LaTeX package
(D:\Programs\manim\MikTeX\tex/latex/tipa\t3enc.def
File: t3enc.def 2001/12/31 T3 encoding
))) (D:\Programs\manim\MikTeX\tex/latex/relsize\relsize.sty
Package: relsize 2013/03/29 ver 4.1
) (D:\Programs\manim\MikTeX\tex/latex/base\textcomp.sty
Package: textcomp 2020/02/02 v2.0n Standard LaTeX package
) (D:\Programs\manim\MikTeX\tex/latex/jknappen\mathrsfs.sty
Package: mathrsfs 1996/01/01 Math RSFS package v1.0 (jk)
\symrsfs=\mathgroup6
) (D:\Programs\manim\MikTeX\tex/latex/fundus-calligra\calligra.sty
Package: calligra 2012/04/10 v1.9 LaTeX package calligra
) (D:\Programs\manim\MikTeX\tex/latex/wasysym\wasysym.sty
Package: wasysym 2020/01/19 v2.4 Wasy-2 symbol support package
\symwasy=\mathgroup7
LaTeX Font Info:    Overwriting symbol font `wasy' in version `bold'
(Font)                  U/wasy/m/n --> U/wasy/b/n on input line 93.
) (D:\Programs\manim\MikTeX\tex/latex/ragged2e\ragged2e.sty
Package: ragged2e 2019/07/28 v2.2 ragged2e Package (MS)
(D:\Programs\manim\MikTeX\tex/latex/ms\everysel.sty
Package: everysel 2011/10/28 v1.2 EverySelectfont Package (MS)
)
\CenteringLeftskip=\skip52
\RaggedLeftLeftskip=\skip53
\RaggedRightLeftskip=\skip54
\CenteringRightskip=\skip55
\RaggedLeftRightskip=\skip56
\RaggedRightRightskip=\skip57
\CenteringParfillskip=\skip58
\RaggedLeftParfillskip=\skip59
\RaggedRightParfillskip=\skip60
\JustifyingParfillskip=\skip61
\CenteringParindent=\skip62
\RaggedLeftParindent=\skip63
\RaggedRightParindent=\skip64
\JustifyingParindent=\skip65
) (D:\Programs\manim\MikTeX\tex/latex/physics\physics.sty
Package: physics 
(D:\Programs\manim\MikTeX\tex/latex/l3packages/xparse\xparse.sty (D:\Programs\m
anim\MikTeX\tex/latex/l3kernel\expl3.sty
Package: expl3 2020-04-06 L3 programming layer (loader) 
(D:\Programs\manim\MikTeX\tex/latex/l3backend\l3backend-xdvipdfmx.def
File: l3backend-xdvipdfmx.def 2020-03-12 L3 backend support: xdvipdfmx
\g__graphics_track_int=\count189
\l__pdf_internal_box=\box48
\g__pdf_backend_object_int=\count190
\g__pdf_backend_annotation_int=\count191
))
Package: xparse 2020-03-06 L3 Experimental document command parser
\l__xparse_current_arg_int=\count192
\g__xparse_grabber_int=\count193
\l__xparse_m_args_int=\count194
\l__xparse_v_nesting_int=\count195
)) (D:\Programs\manim\MikTeX\tex/latex/xcolor\xcolor.sty
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
(D:\Programs\manim\MikTeX\tex/latex/graphics-cfg\color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: xetex.def on input line 225.
(D:\Programs\manim\MikTeX\tex/latex/graphics-def\xetex.def
File: xetex.def 2017/06/24 v5.0h Graphics/color driver for xetex
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
) (D:\Programs\manim\MikTeX\tex/latex/microtype\microtype.sty
Package: microtype 2019/11/18 v2.7d Micro-typographical refinements (RS)
\MT@toks=\toks23
\MT@count=\count196
LaTeX Info: Redefining \textls on input line 790.
\MT@outer@kern=\dimen146
LaTeX Info: Redefining \textmicrotypecontext on input line 1354.
\MT@listname@count=\count197
(D:\Programs\manim\MikTeX\tex/latex/microtype\microtype-xetex.def
File: microtype-xetex.def 2019/11/18 v2.7d Definitions specific to xetex (RS)
LaTeX Info: Redefining \lsstyle on input line 258.
)
Package microtype Info: Loading configuration file microtype.cfg.
(D:\Programs\manim\MikTeX\tex/latex/microtype\microtype.cfg
File: microtype.cfg 2019/11/18 v2.7d microtype main configuration file (RS)
)) (D:\Programs\manim\MikTeX\tex/latex/ctex\ctex.sty
Package: ctex 2019/05/29 v2.4.16 Chinese adapter in LaTeX (CTEX)
(D:\Programs\manim\MikTeX\tex/latex/l3packages/l3keys2e\l3keys2e.sty
Package: l3keys2e 2020-03-06 LaTeX2e option processing using LaTeX3 keys
) (D:\Programs\manim\MikTeX\tex/latex/ctex\ctexhook.sty
Package: ctexhook 2019/05/29 v2.4.16 Document and package hooks (CTEX)
) (D:\Programs\manim\MikTeX\tex/latex/ctex\ctexpatch.sty
Package: ctexpatch 2019/05/29 v2.4.16 Patching commands (CTEX)
) (D:\Programs\manim\MikTeX\tex/latex/base\fix-cm.sty
Package: fix-cm 2015/01/14 v1.1t fixes to LaTeX
(D:\Programs\manim\MikTeX\tex/latex/base\ts1enc.def
File: ts1enc.def 2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file
LaTeX Font Info:    Redeclaring font encoding TS1 on input line 47.
))
\l__ctex_tmp_int=\count198
\l__ctex_tmp_box=\box49
\l__ctex_tmp_dim=\dimen147
\g__ctex_section_depth_int=\count199
\g__ctex_font_size_int=\count266
(D:\Programs\manim\MikTeX\tex/latex/ctex/config\ctexopts.cfg
File: ctexopts.cfg 2019/05/29 v2.4.16 Option configuration file (CTEX)
) (D:\Programs\manim\MikTeX\tex/latex/ctex/engine\ctex-engine-xetex.def
File: ctex-engine-xetex.def 2019/05/29 v2.4.16 XeLaTeX adapter (CTEX)
(D:\Programs\manim\MikTeX\tex/xelatex/xecjk\xeCJK.sty
Package: xeCJK 2020/02/18 v3.8.2 Typesetting CJK scripts with XeLaTeX
(D:\Programs\manim\MikTeX\tex/latex/l3packages/xtemplate\xtemplate.sty
Package: xtemplate 2020-03-06 L3 Experimental prototype document functions
\l__xtemplate_tmp_dim=\dimen148
\l__xtemplate_tmp_int=\count267
\l__xtemplate_tmp_muskip=\muskip17
\l__xtemplate_tmp_skip=\skip66
)
\l__xeCJK_tmp_int=\count268
\l__xeCJK_tmp_box=\box50
\l__xeCJK_tmp_dim=\dimen149
\l__xeCJK_tmp_skip=\skip67
\g__xeCJK_space_factor_int=\count269
\l__xeCJK_begin_int=\count270
\l__xeCJK_end_int=\count271
\c__xeCJK_CJK_class_int=\XeTeXcharclass1
\c__xeCJK_FullLeft_class_int=\XeTeXcharclass2
\c__xeCJK_FullRight_class_int=\XeTeXcharclass3
\c__xeCJK_HalfLeft_class_int=\XeTeXcharclass4
\c__xeCJK_HalfRight_class_int=\XeTeXcharclass5
\c__xeCJK_NormalSpace_class_int=\XeTeXcharclass6
\c__xeCJK_CM_class_int=\XeTeXcharclass7
\c__xeCJK_HangulJamo_class_int=\XeTeXcharclass8
\l__xeCJK_last_skip=\skip68
\g__xeCJK_node_int=\count272
\c__xeCJK_CJK_node_dim=\dimen150
\c__xeCJK_CJK-space_node_dim=\dimen151
\c__xeCJK_default_node_dim=\dimen152
\c__xeCJK_default-space_node_dim=\dimen153
\c__xeCJK_CJK-widow_node_dim=\dimen154
\c__xeCJK_normalspace_node_dim=\dimen155
\l__xeCJK_ccglue_skip=\skip69
\l__xeCJK_ecglue_skip=\skip70
\l__xeCJK_punct_kern_skip=\skip71
\l__xeCJK_last_penalty_int=\count273
\l__xeCJK_last_bound_dim=\dimen156
\l__xeCJK_last_kern_dim=\dimen157
\l__xeCJK_widow_penalty_int=\count274

Package xtemplate Info: Declaring object type 'xeCJK/punctuation' taking 0
(xtemplate)             argument(s) on line 2302.

\l__xeCJK_fixed_punct_width_dim=\dimen158
\l__xeCJK_mixed_punct_width_dim=\dimen159
\l__xeCJK_middle_punct_width_dim=\dimen160
\l__xeCJK_fixed_margin_width_dim=\dimen161
\l__xeCJK_mixed_margin_width_dim=\dimen162
\l__xeCJK_middle_margin_width_dim=\dimen163
\l__xeCJK_bound_punct_width_dim=\dimen164
\l__xeCJK_bound_margin_width_dim=\dimen165
\l__xeCJK_margin_minimum_dim=\dimen166
\l__xeCJK_kerning_total_width_dim=\dimen167
\l__xeCJK_same_align_margin_dim=\dimen168
\l__xeCJK_different_align_margin_dim=\dimen169
\l__xeCJK_kerning_margin_width_dim=\dimen170
\l__xeCJK_kerning_margin_minimum_dim=\dimen171
\l__xeCJK_bound_dim=\dimen172
\l__xeCJK_reverse_bound_dim=\dimen173
\l__xeCJK_margin_dim=\dimen174
\l__xeCJK_minimum_bound_dim=\dimen175
\l__xeCJK_kerning_margin_dim=\dimen176
\g__xeCJK_family_int=\count275
\l__xeCJK_fam_int=\count276
\g__xeCJK_fam_allocation_int=\count277
\l__xeCJK_verb_case_int=\count278
\l__xeCJK_verb_exspace_skip=\skip72
(D:\Programs\manim\MikTeX\tex/latex/fontspec\fontspec.sty
Package: fontspec 2020/02/21 v2.7i Font selection for XeLaTeX and LuaLaTeX
(D:\Programs\manim\MikTeX\tex/latex/fontspec\fontspec-xetex.sty
Package: fontspec-xetex 2020/02/21 v2.7i Font selection for XeLaTeX and LuaLaTe
X
\l__fontspec_script_int=\count279
\l__fontspec_language_int=\count280
\l__fontspec_strnum_int=\count281
\l__fontspec_tmp_int=\count282
\l__fontspec_tmpa_int=\count283
\l__fontspec_tmpb_int=\count284
\l__fontspec_tmpc_int=\count285
\l__fontspec_em_int=\count286
\l__fontspec_emdef_int=\count287
\l__fontspec_strong_int=\count288
\l__fontspec_strongdef_int=\count289
\l__fontspec_tmpa_dim=\dimen177
\l__fontspec_tmpb_dim=\dimen178
\l__fontspec_tmpc_dim=\dimen179
(D:\Programs\manim\MikTeX\tex/latex/base\fontenc.sty
Package: fontenc 2020/02/11 v2.0o Standard LaTeX package
) (D:\Programs\manim\MikTeX\tex/latex/fontspec\fontspec.cfg))) (D:\Programs\man
im\MikTeX\tex/xelatex/xecjk\xeCJK.cfg
File: xeCJK.cfg 2020/02/18 v3.8.2 Configuration file for xeCJK package
)) (D:\Programs\manim\MikTeX\tex/xelatex/xecjk\xeCJKfntef.sty
Package: xeCJKfntef 2020/02/18 v3.8.2 xeCJK font effect
(D:\Programs\manim\MikTeX\tex/latex/ulem\ulem.sty
\UL@box=\box51
\UL@hyphenbox=\box52
\UL@skip=\skip73
\UL@hook=\toks24
\UL@height=\dimen180
\UL@pe=\count290
\UL@pixel=\dimen181
\ULC@box=\box53
Package: ulem 2019/11/18
\ULdepth=\dimen182
)
\l__xeCJK_space_skip=\skip74
\c__xeCJK_ulem-begin_node_dim=\dimen183
\c__xeCJK_null_box=\box54
\l__xeCJK_fntef_box=\box55
\l__xeCJK_under_symbol_box=\box56
\c__xeCJK_filll_skip=\skip75
)
\ccwd=\dimen184
\l__ctex_ccglue_skip=\skip76
)
\l__ctex_ziju_dim=\dimen185
(D:\Programs\manim\MikTeX\tex/latex/zhnumber\zhnumber.sty
Package: zhnumber 2019/04/07 v2.7 Typesetting numbers with Chinese glyphs
\l__zhnum_scale_int=\count291
(D:\Programs\manim\MikTeX\tex/latex/zhnumber\zhnumber-utf8.cfg
File: zhnumber-utf8.cfg 2019/04/07 v2.7 Chinese numerals with UTF8 encoding
)) (D:\Programs\manim\MikTeX\tex/latex/ctex/scheme\ctex-scheme-chinese.def
File: ctex-scheme-chinese.def 2019/05/29 v2.4.16 Chinese scheme for generic (CT
EX)
(D:\Programs\manim\MikTeX\tex/latex/ctex/config\ctex-name-utf8.cfg
File: ctex-name-utf8.cfg 2019/05/29 v2.4.16 Caption with encoding UTF8 (CTEX)
)) (D:\Programs\manim\MikTeX\tex/latex/tools\indentfirst.sty
Package: indentfirst 1995/11/23 v1.03 Indent first paragraph (DPC)
) (D:\Programs\manim\MikTeX\tex/latex/ctex\ctex-c5size.clo
File: ctex-c5size.clo 2019/05/29 v2.4.16 c5size option (CTEX)
) (D:\Programs\manim\MikTeX\tex/latex/ctex/fontset\ctex-fontset-windows.def
File: ctex-fontset-windows.def 2019/05/29 v2.4.16 Windows fonts definition (CTE
X)
(D:\Programs\manim\MikTeX\tex/latex/ctex/fontset\ctex-fontset-windowsnew.def
File: ctex-fontset-windowsnew.def 2019/05/29 v2.4.16 Windows fonts definition f
or Vista or later version (CTEX)

Package fontspec Info: Could not resolve font "KaiTi/B" (it probably doesn't
(fontspec)             exist).

Package fontspec Info: Could not resolve font "SimHei/I" (it probably doesn't
(fontspec)             exist).

Package fontspec Info: Could not resolve font "SimSun/BI" (it probably doesn't
(fontspec)             exist).

! Package fontspec Error: The font "SimHei" cannot be found.

For immediate help type H <return>.
 ...                                              

l.110   }

Here is how much of TeX's memory you used:
 12008 strings out of 414218
 258349 string characters out of 2903153
 585000 words of memory out of 3000000
 29362 multiletter control sequences out of 15000+200000
 532532 words of font info for 36 fonts, out of 3000000 for 9000
 1348 hyphenation exceptions out of 8191
 56i,0n,68p,411b,244s stack positions out of 5000i,500n,10000p,200000b,50000s

No pages of output.
TonyCrane commented 4 years ago

The log file told you that you don't have 'SimHei' font(黑体).You can download and install it on the internet, or search about 'The font SimHei cannot be found' on baidu or google, that may help you.

mokkinghang commented 4 years ago

Sorry if it is a stupid question, so is the font to be installed directly in the OS or in MiKTeX? And it means that SimHei is some sort of a default font for Chinese here? Anyway to change the default font? Because it seems to be a simplified Chinese font, and I mainly work with traditional Chinese.

mokkinghang commented 4 years ago

This time I get some new error messages (font already installed in OS):

Traceback (most recent call last):
  File "C:\Users\User\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\User\Anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "D:\Programs\manim\manim-master\manim.py", line 5, in <module>
    manimlib.main()
  File "D:\Programs\manim\manim-master\manimlib\__init__.py", line 11, in main
    manimlib.extract_scene.main(config)
  File "D:\Programs\manim\manim-master\manimlib\extract_scene.py", line 138, in main
    scene_classes_to_render = get_scenes_to_render(all_scene_classes, config)
  File "D:\Programs\manim\manim-master\manimlib\extract_scene.py", line 119, in get_scenes_to_render
    return [scene_classes[0]] if len(scene_classes) == 1 else prompt_user_for_choice(scene_classes)
  File "D:\Programs\manim\manim-master\manimlib\extract_scene.py", line 82, in prompt_user_for_choice
    for num_str in user_input.split(",")
  File "D:\Programs\manim\manim-master\manimlib\extract_scene.py", line 82, in <listcomp>
    for num_str in user_input.split(",")
ValueError: invalid literal for int() with base 10: 'WriteText'

And even when I try to run a class with no Chinese characters involved:

Media will be written to D:\Programs\manim\manim-master\media\. You can change this behavior with the --media_dir flag.
Writing "\centering -6.0" to D:\Programs\manim\manim-master\media\Tex\4da29347e7d06d0b.tex

Sorry, but miktex-makemf did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  C:\Users\User\AppData\Local\MiKTeX\2.9\miktex\log\miktex-makemf.log
Couldn't open `OT:script=hani;language=dfl.cfg'

hbf2gf (CJK ver. 4.8.4)

Sorry, but miktex-maketfm did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  C:\Users\User\AppData\Local\MiKTeX\2.9\miktex\log\miktex-maketfm.log

Sorry, but miktex-makemf did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  C:\Users\User\AppData\Local\MiKTeX\2.9\miktex\log\miktex-makemf.log
Couldn't open `OT:script=hani;language=dfl.cfg'

hbf2gf (CJK ver. 4.8.4)

Sorry, but miktex-maketfm did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  C:\Users\User\AppData\Local\MiKTeX\2.9\miktex\log\miktex-maketfm.log

Sorry, but miktex-makemf did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  C:\Users\User\AppData\Local\MiKTeX\2.9\miktex\log\miktex-makemf.log
Couldn't open `OT:script=hani;language=dfl.cfg'

hbf2gf (CJK ver. 4.8.4)

Sorry, but miktex-maketfm did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  C:\Users\User\AppData\Local\MiKTeX\2.9\miktex\log\miktex-maketfm.log

Traceback (most recent call last):
  File "D:\Programs\manim\manim-master\manimlib\extract_scene.py", line 155, in main
    scene = SceneClass(**scene_kwargs)
  File "D:\Programs\manim\manim-master\manimlib\scene\scene.py", line 53, in __init__
    self.construct()
  File "mycode.py", line 96, in construct
    grid=ScreenGrid()
  File "mycode.py", line 84, in __init__
    leyenda=TextMobject("%s"%coord).scale(self.labels_scale)
  File "D:\Programs\manim\manim-master\manimlib\mobject\svg\tex_mobject.py", line 148, in __init__
    self, self.arg_separator.join(tex_strings), **kwargs
  File "D:\Programs\manim\manim-master\manimlib\mobject\svg\tex_mobject.py", line 44, in __init__
    self.template_tex_file_body
  File "D:\Programs\manim\manim-master\manimlib\utils\tex_file_writing.py", line 19, in tex_to_svg_file
    dvi_file = tex_to_dvi(tex_file)
  File "D:\Programs\manim\manim-master\manimlib\utils\tex_file_writing.py", line 67, in tex_to_dvi
    "See log output above or the log file: %s" % log_file)
Exception: Xelatex error converting to xdv. See log output above or the log file: D:\Programs\manim\manim-master\media\Tex\4da29347e7d06d0b.log
TonyCrane commented 4 years ago

emmm...did you install the font or running it under administrators' privilege.

angelfly2000 commented 4 years ago

I am running manim on win10,and having the same problem too.Debugging, I am thinking it is something wrong with TeXworks.

---- this is part of my log file below ---

LaTeX Warning: You have requested, on input line 4341, version 2020/02/03' of package fontspec, but only version 2017/11/09 v2.6g Font selection for XeLaTeX and LuaLaTeX' is available.

angelfly2000 commented 4 years ago

680 This is very helpful! And my project is working now. thanks a lot :)

mokkinghang commented 4 years ago

680 This is very helpful! And my project is working now. thanks a lot :)

Thanks, that's the best solution! Avoided the mess that happened when changing the constants.:)

angelfly2000 commented 4 years ago

680 This is very helpful! And my project is working now. thanks a lot :)

Thanks, that's the best solution! Avoided the mess that happened when changing the constants.:)

That's all right.

TonyCrane commented 3 years ago

Hey everybody, would you like to try #1187 ? One of my friends had faced the same problem and got the same log file as you. After doing this, he succeed.

There is one thing I have to say: even though Text is good to use, but it doesn’t support formulas and it has some bug now. So use Text entirely instead of Tex(t)Mobject is not a good idea.