3b1b / manim

Animation engine for explanatory math videos
MIT License
62.03k stars 5.77k forks source link

Exception: Xelatex error converting to xdv. See log output above or the log file: .\files\Tex\0edd36fe50692e98.log #570

Closed FitzMusk closed 5 years ago

FitzMusk commented 5 years ago

Hello, the moment I change "constants.py" from "TEX_USE_CTEX = False" to "TEX_USE_CTEX = True;, It returns an erro: File "D:\manim-master\manimlib\mobject\svg\tex_mobject.py", line 309, in __init__ TextMobject.__init__(self, *text_parts, **kwargs) File "D:\manim-master\manimlib\mobject\svg\tex_mobject.py", line 144, in __init__ self, self.arg_separator.join(tex_strings), **kwargs File "D:\manim-master\manimlib\mobject\svg\tex_mobject.py", line 44, in __init__ self.template_tex_file_body File "D:\manim-master\manimlib\utils\tex_file_writing.py", line 19, in tex_to_svg_file dvi_file = tex_to_dvi(tex_file) File "D:\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: .\files\Tex\0edd36fe50692e98.log , I need use Chinese, so I change "constants.py" .This erro has already been 3 days, and please tell me why, thanks. @HanwenZhu

FitzMusk commented 5 years ago

this is .\files\Tex\0edd36fe50692e98.log:

entering extended mode
**./files/Tex/0edd36fe50692e98.tex
(files/Tex/0edd36fe50692e98.tex
LaTeX2e <2018-04-01> patch level 5
("Z:\My program\MiKTeX 2.9\tex\latex\standalone\standalone.cls"
Document Class: standalone 2018/03/26 v1.3a Class to compile TeX sub-files stan
dalone
("Z:\My program\MiKTeX 2.9\tex\latex\tools\shellesc.sty"
Package: shellesc 2016/06/07 v0.02a unified shell escape interface for LaTeX
Package shellesc Info: Restricted shell escape enabled on input line 69.
) ("Z:\My program\MiKTeX 2.9\tex\generic\oberdiek\ifluatex.sty"
Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
) ("Z:\My program\MiKTeX 2.9\tex\generic\oberdiek\ifpdf.sty"
Package: ifpdf 2018/09/07 v3.3 Provides the ifpdf switch
) ("Z:\My program\MiKTeX 2.9\tex\generic\ifxetex\ifxetex.sty"
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
) ("Z:\My program\MiKTeX 2.9\tex\latex\xkeyval\xkeyval.sty"
Package: xkeyval 2014/12/03 v2.7a package option processing (HA)
("Z:\My program\MiKTeX 2.9\tex\generic\xkeyval\xkeyval.tex" ("Z:\My program\MiK
TeX 2.9\tex\generic\xkeyval\xkvutils.tex"
\XKV@toks=\toks14
\XKV@tempa@toks=\toks15
("Z:\My program\MiKTeX 2.9\tex\generic\xkeyval\keyval.tex"))
\XKV@depth=\count80
File: xkeyval.tex 2014/12/03 v2.7a key=value parser (HA)
))
\sa@internal=\count81
\c@sapage=\count82
("Z:\My program\MiKTeX 2.9\tex\latex\standalone\standalone.cfg"
File: standalone.cfg 2018/03/26 v1.3a Default configuration file for 'standalon
e' class
) ("Z:\My program\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
("Z:\My program\MiKTeX 2.9\tex\latex\base\size10.clo"
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count83
\c@section=\count84
\c@subsection=\count85
\c@subsubsection=\count86
\c@paragraph=\count87
\c@subparagraph=\count88
\c@figure=\count89
\c@table=\count90
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
) ("Z:\My program\MiKTeX 2.9\tex\latex\preview\preview.sty"
Package: preview 2017/04/24 11.91 (AUCTeX/preview-latex)
("Z:\My program\MiKTeX 2.9\tex\generic\luatex85\luatex85.sty"
Package: luatex85 2016/06/15 v1.4 pdftex aliases for luatex
) ("Z:\My program\MiKTeX 2.9\tex\latex\preview\prtightpage.def"
\PreviewBorder=\dimen103
)
\pr@snippet=\count91
\pr@box=\box26
\pr@output=\toks16
)) ("Z:\My program\MiKTeX 2.9\tex\generic\babel\babel.sty"
Package: babel 2018/09/26 3.24 The Babel package
("Z:\My program\MiKTeX 2.9\tex\generic\babel\switch.def"
File: switch.def 2018/09/26 3.24 Babel switching mechanism
)
*************************************
* Local config file bblopts.cfg used
*
("Z:\My program\MiKTeX 2.9\tex\latex\arabi\bblopts.cfg"
File: bblopts.cfg 2005/09/08 v0.1 add Arabic and Farsi to "declared" options of
 babel
) ("Z:\My program\MiKTeX 2.9\tex\latex\babel-english\english.ldf"
Language: english 2017/06/06 v3.3r English support from the babel system
("Z:\My program\MiKTeX 2.9\tex\generic\babel\babel.def"
File: babel.def 2018/09/26 3.24 Babel common definitions
\babel@savecnt=\count92
\U@D=\dimen104
("Z:\My program\MiKTeX 2.9\tex\generic\babel\xebabel.def" ("Z:\My program\MiKTe
X 2.9\tex\generic\babel\txtbabel.def"))
\bbl@dirlevel=\count93
)
\l@canadian = a dialect from \language\l@american 
\l@australian = a dialect from \language\l@british 
\l@newzealand = a dialect from \language\l@british 
)) ("Z:\My program\MiKTeX 2.9\tex\latex\amsmath\amsmath.sty"
Package: amsmath 2017/09/02 v2.17a AMS math features
\@mathmargin=\skip43
For additional information on amsmath, use the `?' option.
("Z:\My program\MiKTeX 2.9\tex\latex\amsmath\amstext.sty"
Package: amstext 2000/06/29 v2.01 AMS text
("Z:\My program\MiKTeX 2.9\tex\latex\amsmath\amsgen.sty"
File: amsgen.sty 1999/11/30 v2.0 generic functions
\@emptytoks=\toks17
\ex@=\dimen105
)) ("Z:\My program\MiKTeX 2.9\tex\latex\amsmath\amsbsy.sty"
Package: amsbsy 1999/11/29 v1.2d Bold Symbols
\pmbraise@=\dimen106
) ("Z:\My program\MiKTeX 2.9\tex\latex\amsmath\amsopn.sty"
Package: amsopn 2016/03/08 v2.02 operator names
)
\inf@bad=\count94
LaTeX Info: Redefining \frac on input line 213.
\uproot@=\count95
\leftroot@=\count96
LaTeX Info: Redefining \overline on input line 375.
\classnum@=\count97
\DOTSCASE@=\count98
LaTeX Info: Redefining \ldots on input line 472.
LaTeX Info: Redefining \dots on input line 475.
LaTeX Info: Redefining \cdots on input line 596.
\Mathstrutbox@=\box27
\strutbox@=\box28
\big@size=\dimen107
LaTeX Font Info:    Redeclaring font encoding OML on input line 712.
LaTeX Font Info:    Redeclaring font encoding OMS on input line 713.
\macc@depth=\count99
\c@MaxMatrixCols=\count100
\dotsspace@=\muskip10
\c@parentequation=\count101
\dspbrk@lvl=\count102
\tag@help=\toks18
\row@=\count103
\column@=\count104
\maxfields@=\count105
\andhelp@=\toks19
\eqnshift@=\dimen108
\alignsep@=\dimen109
\tagshift@=\dimen110
\tagwidth@=\dimen111
\totwidth@=\dimen112
\lineht@=\dimen113
\@envbody=\toks20
\multlinegap=\skip44
\multlinetaggap=\skip45
\mathdisplay@stack=\toks21
LaTeX Info: Redefining \[ on input line 2817.
LaTeX Info: Redefining \] on input line 2818.
) ("Z:\My program\MiKTeX 2.9\tex\latex\amsfonts\amssymb.sty"
Package: amssymb 2013/01/14 v3.01 AMS font symbols
("Z:\My program\MiKTeX 2.9\tex\latex\amsfonts\amsfonts.sty"
Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support
\symAMSa=\mathgroup4
\symAMSb=\mathgroup5
LaTeX Font Info:    Overwriting math alphabet `\mathfrak' in version `bold'
(Font)                  U/euf/m/n --> U/euf/b/n on input line 106.
)) ("Z:\My program\MiKTeX 2.9\tex\latex\doublestroke\dsfont.sty"
Package: dsfont 1995/08/01 v0.1 Double stroke roman fonts
) ("Z:\My program\MiKTeX 2.9\tex\latex\setspace\setspace.sty"
Package: setspace 2011/12/19 v6.7a set line spacing
) ("Z:\My program\MiKTeX 2.9\tex\latex\tipa\tipa.sty"
Package: tipa 2002/08/08 TIPA version 1.1
("Z:\My program\MiKTeX 2.9\tex\latex\base\fontenc.sty"
Package: fontenc 2017/04/05 v2.0i Standard LaTeX package
("Z:\My program\MiKTeX 2.9\tex\latex\tipa\t3enc.def"
File: t3enc.def 2001/12/31 T3 encoding
) ("Z:\My program\MiKTeX 2.9\tex\latex\base\tuenc.def"
File: tuenc.def 2017/04/05 v2.0i Standard LaTeX file
LaTeX Font Info:    Redeclaring font encoding TU on input line 82.
))) ("Z:\My program\MiKTeX 2.9\tex\latex\relsize\relsize.sty"
Package: relsize 2013/03/29 ver 4.1
) ("Z:\My program\MiKTeX 2.9\tex\latex\base\textcomp.sty"
Package: textcomp 2017/04/05 v2.0i Standard LaTeX package
Package textcomp Info: Sub-encoding information:
(textcomp)               5 = only ISO-Adobe without \textcurrency
(textcomp)               4 = 5 + \texteuro
(textcomp)               3 = 4 + \textohm
(textcomp)               2 = 3 + \textestimated + \textcurrency
(textcomp)               1 = TS1 - \textcircled - \t
(textcomp)               0 = TS1 (full)
(textcomp)             Font families with sub-encoding setting implement
(textcomp)             only a restricted character set as indicated.
(textcomp)             Family '?' is the default used for unknown fonts.
(textcomp)             See the documentation for details.
Package textcomp Info: Setting ? sub-encoding to TS1/1 on input line 79.
("Z:\My program\MiKTeX 2.9\tex\latex\base\ts1enc.def"
File: ts1enc.def 2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file
)
LaTeX Info: Redefining \oldstylenums on input line 334.
Package textcomp Info: Setting cmr sub-encoding to TS1/0 on input line 349.
Package textcomp Info: Setting cmss sub-encoding to TS1/0 on input line 350.
Package textcomp Info: Setting cmtt sub-encoding to TS1/0 on input line 351.
Package textcomp Info: Setting cmvtt sub-encoding to TS1/0 on input line 352.
Package textcomp Info: Setting cmbr sub-encoding to TS1/0 on input line 353.
Package textcomp Info: Setting cmtl sub-encoding to TS1/0 on input line 354.
Package textcomp Info: Setting ccr sub-encoding to TS1/0 on input line 355.
Package textcomp Info: Setting ptm sub-encoding to TS1/4 on input line 356.
Package textcomp Info: Setting pcr sub-encoding to TS1/4 on input line 357.
Package textcomp Info: Setting phv sub-encoding to TS1/4 on input line 358.
Package textcomp Info: Setting ppl sub-encoding to TS1/3 on input line 359.
Package textcomp Info: Setting pag sub-encoding to TS1/4 on input line 360.
Package textcomp Info: Setting pbk sub-encoding to TS1/4 on input line 361.
Package textcomp Info: Setting pnc sub-encoding to TS1/4 on input line 362.
Package textcomp Info: Setting pzc sub-encoding to TS1/4 on input line 363.
Package textcomp Info: Setting bch sub-encoding to TS1/4 on input line 364.
Package textcomp Info: Setting put sub-encoding to TS1/5 on input line 365.
Package textcomp Info: Setting uag sub-encoding to TS1/5 on input line 366.
Package textcomp Info: Setting ugq sub-encoding to TS1/5 on input line 367.
Package textcomp Info: Setting ul8 sub-encoding to TS1/4 on input line 368.
Package textcomp Info: Setting ul9 sub-encoding to TS1/4 on input line 369.
Package textcomp Info: Setting augie sub-encoding to TS1/5 on input line 370.
Package textcomp Info: Setting dayrom sub-encoding to TS1/3 on input line 371.
Package textcomp Info: Setting dayroms sub-encoding to TS1/3 on input line 372.

Package textcomp Info: Setting pxr sub-encoding to TS1/0 on input line 373.
Package textcomp Info: Setting pxss sub-encoding to TS1/0 on input line 374.
Package textcomp Info: Setting pxtt sub-encoding to TS1/0 on input line 375.
Package textcomp Info: Setting txr sub-encoding to TS1/0 on input line 376.
Package textcomp Info: Setting txss sub-encoding to TS1/0 on input line 377.
Package textcomp Info: Setting txtt sub-encoding to TS1/0 on input line 378.
Package textcomp Info: Setting lmr sub-encoding to TS1/0 on input line 379.
Package textcomp Info: Setting lmdh sub-encoding to TS1/0 on input line 380.
Package textcomp Info: Setting lmss sub-encoding to TS1/0 on input line 381.
Package textcomp Info: Setting lmssq sub-encoding to TS1/0 on input line 382.
Package textcomp Info: Setting lmvtt sub-encoding to TS1/0 on input line 383.
Package textcomp Info: Setting lmtt sub-encoding to TS1/0 on input line 384.
Package textcomp Info: Setting qhv sub-encoding to TS1/0 on input line 385.
Package textcomp Info: Setting qag sub-encoding to TS1/0 on input line 386.
Package textcomp Info: Setting qbk sub-encoding to TS1/0 on input line 387.
Package textcomp Info: Setting qcr sub-encoding to TS1/0 on input line 388.
Package textcomp Info: Setting qcs sub-encoding to TS1/0 on input line 389.
Package textcomp Info: Setting qpl sub-encoding to TS1/0 on input line 390.
Package textcomp Info: Setting qtm sub-encoding to TS1/0 on input line 391.
Package textcomp Info: Setting qzc sub-encoding to TS1/0 on input line 392.
Package textcomp Info: Setting qhvc sub-encoding to TS1/0 on input line 393.
Package textcomp Info: Setting futs sub-encoding to TS1/4 on input line 394.
Package textcomp Info: Setting futx sub-encoding to TS1/4 on input line 395.
Package textcomp Info: Setting futj sub-encoding to TS1/4 on input line 396.
Package textcomp Info: Setting hlh sub-encoding to TS1/3 on input line 397.
Package textcomp Info: Setting hls sub-encoding to TS1/3 on input line 398.
Package textcomp Info: Setting hlst sub-encoding to TS1/3 on input line 399.
Package textcomp Info: Setting hlct sub-encoding to TS1/5 on input line 400.
Package textcomp Info: Setting hlx sub-encoding to TS1/5 on input line 401.
Package textcomp Info: Setting hlce sub-encoding to TS1/5 on input line 402.
Package textcomp Info: Setting hlcn sub-encoding to TS1/5 on input line 403.
Package textcomp Info: Setting hlcw sub-encoding to TS1/5 on input line 404.
Package textcomp Info: Setting hlcf sub-encoding to TS1/5 on input line 405.
Package textcomp Info: Setting pplx sub-encoding to TS1/3 on input line 406.
Package textcomp Info: Setting pplj sub-encoding to TS1/3 on input line 407.
Package textcomp Info: Setting ptmx sub-encoding to TS1/4 on input line 408.
Package textcomp Info: Setting ptmj sub-encoding to TS1/4 on input line 409.
) ("Z:\My program\MiKTeX 2.9\tex\latex\jknappen\mathrsfs.sty"
Package: mathrsfs 1996/01/01 Math RSFS package v1.0 (jk)
\symrsfs=\mathgroup6
) ("Z:\My program\MiKTeX 2.9\tex\latex\fundus-calligra\calligra.sty"
Package: calligra 2012/04/10 v1.9 LaTeX package calligra
) ("Z:\My program\MiKTeX 2.9\tex\latex\wasysym\wasysym.sty"
Package: wasysym 2003/10/30 v2.0 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 90.
) ("Z:\My program\MiKTeX 2.9\tex\latex\ms\ragged2e.sty"
Package: ragged2e 2009/05/21 v2.1 ragged2e Package (MS)
("Z:\My program\MiKTeX 2.9\tex\latex\ms\everysel.sty"
Package: everysel 2011/10/28 v1.2 EverySelectfont Package (MS)
)
\CenteringLeftskip=\skip46
\RaggedLeftLeftskip=\skip47
\RaggedRightLeftskip=\skip48
\CenteringRightskip=\skip49
\RaggedLeftRightskip=\skip50
\RaggedRightRightskip=\skip51
\CenteringParfillskip=\skip52
\RaggedLeftParfillskip=\skip53
\RaggedRightParfillskip=\skip54
\JustifyingParfillskip=\skip55
\CenteringParindent=\skip56
\RaggedLeftParindent=\skip57
\RaggedRightParindent=\skip58
\JustifyingParindent=\skip59
) ("Z:\My program\MiKTeX 2.9\tex\latex\physics\physics.sty"
Package: physics 
("Z:\My program\MiKTeX 2.9\tex\latex\l3packages\xparse\xparse.sty" ("Z:\My prog
ram\MiKTeX 2.9\tex\latex\l3kernel\expl3.sty"
Package: expl3 2019-05-28 L3 programming layer (loader) 
("Z:\My program\MiKTeX 2.9\tex\latex\l3kernel\expl3-code.tex"
Package: expl3 2019-05-28 L3 programming layer (code)
\c_max_int=\count106
\l_tmpa_int=\count107
\l_tmpb_int=\count108
\g_tmpa_int=\count109
\g_tmpb_int=\count110
\g__kernel_prg_map_int=\count111
\c__ior_term_ior=\count112
\c_log_iow=\count113
\l_iow_line_count_int=\count114
\l__iow_line_target_int=\count115
\l__iow_one_indent_int=\count116
\l__iow_indent_int=\count117
\c_zero_dim=\dimen114
\c_max_dim=\dimen115
\l_tmpa_dim=\dimen116
\l_tmpb_dim=\dimen117
\g_tmpa_dim=\dimen118
\g_tmpb_dim=\dimen119
\c_zero_skip=\skip60
\c_max_skip=\skip61
\l_tmpa_skip=\skip62
\l_tmpb_skip=\skip63
\g_tmpa_skip=\skip64
\g_tmpb_skip=\skip65
\c_zero_muskip=\muskip11
\c_max_muskip=\muskip12
\l_tmpa_muskip=\muskip13
\l_tmpb_muskip=\muskip14
\g_tmpa_muskip=\muskip15
\g_tmpb_muskip=\muskip16
\l_keys_choice_int=\count118
\l__intarray_loop_int=\count119
\c__intarray_sp_dim=\dimen120
\g__intarray_font_int=\count120
\c__fp_leading_shift_int=\count121
\c__fp_middle_shift_int=\count122
\c__fp_trailing_shift_int=\count123
\c__fp_big_leading_shift_int=\count124
\c__fp_big_middle_shift_int=\count125
\c__fp_big_trailing_shift_int=\count126
\c__fp_Bigg_leading_shift_int=\count127
\c__fp_Bigg_middle_shift_int=\count128
\c__fp_Bigg_trailing_shift_int=\count129
\g__fp_array_int=\count130
\l__fp_array_loop_int=\count131
\l__sort_length_int=\count132
\l__sort_min_int=\count133
\l__sort_top_int=\count134
\l__sort_max_int=\count135
\l__sort_true_max_int=\count136
\l__sort_block_int=\count137
\l__sort_begin_int=\count138
\l__sort_end_int=\count139
\l__sort_A_int=\count140
\l__sort_B_int=\count141
\l__sort_C_int=\count142
\l__tl_analysis_normal_int=\count143
\l__tl_analysis_index_int=\count144
\l__tl_analysis_nesting_int=\count145
\l__tl_analysis_type_int=\count146
\l__regex_internal_a_int=\count147
\l__regex_internal_b_int=\count148
\l__regex_internal_c_int=\count149
\l__regex_balance_int=\count150
\l__regex_group_level_int=\count151
\l__regex_mode_int=\count152
\c__regex_cs_in_class_mode_int=\count153
\c__regex_cs_mode_int=\count154
\l__regex_catcodes_int=\count155
\l__regex_default_catcodes_int=\count156
\c__regex_catcode_L_int=\count157
\c__regex_catcode_O_int=\count158
\c__regex_catcode_A_int=\count159
\c__regex_all_catcodes_int=\count160
\l__regex_show_lines_int=\count161
\l__regex_min_state_int=\count162
\l__regex_max_state_int=\count163
\l__regex_left_state_int=\count164
\l__regex_right_state_int=\count165
\l__regex_capturing_group_int=\count166
\l__regex_min_pos_int=\count167
\l__regex_max_pos_int=\count168
\l__regex_curr_pos_int=\count169
\l__regex_start_pos_int=\count170
\l__regex_success_pos_int=\count171
\l__regex_curr_char_int=\count172
\l__regex_curr_catcode_int=\count173
\l__regex_last_char_int=\count174
\l__regex_case_changed_char_int=\count175
\l__regex_curr_state_int=\count176
\l__regex_step_int=\count177
\l__regex_min_active_int=\count178
\l__regex_max_active_int=\count179
\l__regex_replacement_csnames_int=\count180
\l__regex_match_count_int=\count181
\l__regex_min_submatch_int=\count182
\l__regex_submatch_int=\count183
\l__regex_zeroth_submatch_int=\count184
\g__regex_trace_regex_int=\count185
\c_empty_box=\box29
\l_tmpa_box=\box30
\l_tmpb_box=\box31
\g_tmpa_box=\box32
\g_tmpb_box=\box33
\l__box_top_dim=\dimen121
\l__box_bottom_dim=\dimen122
\l__box_left_dim=\dimen123
\l__box_right_dim=\dimen124
\l__box_top_new_dim=\dimen125
\l__box_bottom_new_dim=\dimen126
\l__box_left_new_dim=\dimen127
\l__box_right_new_dim=\dimen128
\l__box_internal_box=\box34
\l__coffin_internal_box=\box35
\l__coffin_internal_dim=\dimen129
\l__coffin_offset_x_dim=\dimen130
\l__coffin_offset_y_dim=\dimen131
\l__coffin_x_dim=\dimen132
\l__coffin_y_dim=\dimen133
\l__coffin_x_prime_dim=\dimen134
\l__coffin_y_prime_dim=\dimen135
\c_empty_coffin=\box36
\l__coffin_aligned_coffin=\box37
\l__coffin_aligned_internal_coffin=\box38
\l_tmpa_coffin=\box39
\l_tmpb_coffin=\box40
\g_tmpa_coffin=\box41
\g_tmpb_coffin=\box42
\l__coffin_bounding_shift_dim=\dimen136
\l__coffin_left_corner_dim=\dimen137
\l__coffin_right_corner_dim=\dimen138
\l__coffin_bottom_corner_dim=\dimen139
\l__coffin_top_corner_dim=\dimen140
\l__coffin_scaled_total_height_dim=\dimen141
\l__coffin_scaled_width_dim=\dimen142
\c__coffin_empty_coffin=\box43
\l__coffin_display_coffin=\box44
\l__coffin_display_coord_coffin=\box45
\l__coffin_display_pole_coffin=\box46
\l__coffin_display_offset_dim=\dimen143
\l__coffin_display_x_dim=\dimen144
\l__coffin_display_y_dim=\dimen145
\g__file_internal_ior=\read1
\c__deprecation_minus_one=\count186
) ("Z:\My program\MiKTeX 2.9\tex\latex\l3kernel\l3xdvipdfmx.def"
File: l3xdvipdfmx.def 2019-04-06 v L3 Experimental driver: xdvipdfmx
\l__driver_internal_box=\box47
\g__driver_graphics_int=\count187
\g__driver_pdf_object_int=\count188
\g__driver_pdf_annotation_int=\count189
))
Package: xparse 2019-05-28 L3 Experimental document command parser
\l__xparse_current_arg_int=\count190
\g__xparse_grabber_int=\count191
\l__xparse_m_args_int=\count192
\l__xparse_v_nesting_int=\count193
)) ("Z:\My program\MiKTeX 2.9\tex\latex\xcolor\xcolor.sty"
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
("Z:\My program\MiKTeX 2.9\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.
("Z:\My program\MiKTeX 2.9\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.
) ("Z:\My program\MiKTeX 2.9\tex\latex\microtype\microtype.sty"
Package: microtype 2019/02/28 v2.7b Micro-typographical refinements (RS)
\MT@toks=\toks22
\MT@count=\count194
LaTeX Info: Redefining \textls on input line 790.
\MT@outer@kern=\dimen146
LaTeX Info: Redefining \textmicrotypecontext on input line 1336.
\MT@listname@count=\count195
("Z:\My program\MiKTeX 2.9\tex\latex\microtype\microtype-xetex.def"
File: microtype-xetex.def 2019/02/28 v2.7b Definitions specific to xetex (RS)
LaTeX Info: Redefining \lsstyle on input line 258.
)
Package microtype Info: Loading configuration file microtype.cfg.
("Z:\My program\MiKTeX 2.9\tex\latex\microtype\microtype.cfg"
File: microtype.cfg 2019/02/28 v2.7b microtype main configuration file (RS)
)) ("Z:\My program\MiKTeX 2.9\tex\latex\ctex\ctex.sty"
Package: ctex 2019/05/29 v2.4.16 Chinese adapter in LaTeX (CTEX)
("Z:\My program\MiKTeX 2.9\tex\latex\l3packages\l3keys2e\l3keys2e.sty"
Package: l3keys2e 2019-05-28 LaTeX2e option processing using LaTeX3 keys
) ("Z:\My program\MiKTeX 2.9\tex\latex\ctex\ctexhook.sty"
Package: ctexhook 2019/05/29 v2.4.16 Document and package hooks (CTEX)
) ("Z:\My program\MiKTeX 2.9\tex\latex\ctex\ctexpatch.sty"
Package: ctexpatch 2019/05/29 v2.4.16 Patching commands (CTEX)
) ("Z:\My program\MiKTeX 2.9\tex\latex\base\fix-cm.sty"
Package: fix-cm 2015/01/14 v1.1t fixes to LaTeX
("Z:\My program\MiKTeX 2.9\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=\count196
\l__ctex_tmp_box=\box48
\l__ctex_tmp_dim=\dimen147
\g__ctex_section_depth_int=\count197
\g__ctex_font_size_int=\count198
("Z:\My program\MiKTeX 2.9\tex\latex\ctex\config\ctexopts.cfg"
File: ctexopts.cfg 2019/05/29 v2.4.16 Option configuration file (CTEX)
) ("Z:\My program\MiKTeX 2.9\tex\latex\ctex\engine\ctex-engine-xetex.def"
File: ctex-engine-xetex.def 2019/05/29 v2.4.16 XeLaTeX adapter (CTEX)
("Z:\My program\MiKTeX 2.9\tex\xelatex\xecjk\xeCJK.sty"
Package: xeCJK 2019/04/15 v3.7.2 Typesetting CJK scripts with XeLaTeX
("Z:\My program\MiKTeX 2.9\tex\latex\l3packages\xtemplate\xtemplate.sty"
Package: xtemplate 2019-05-28 L3 Experimental prototype document functions
\l__xtemplate_tmp_dim=\dimen148
\l__xtemplate_tmp_int=\count199
\l__xtemplate_tmp_muskip=\muskip17
\l__xtemplate_tmp_skip=\skip66
)
\l__xeCJK_tmp_int=\count266
\l__xeCJK_tmp_box=\box49
\l__xeCJK_tmp_dim=\dimen149
\l__xeCJK_tmp_skip=\skip67
\g__xeCJK_space_factor_int=\count267
\l__xeCJK_begin_int=\count268
\l__xeCJK_end_int=\count269
\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=\count270
\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=\count271
\l__xeCJK_last_bound_dim=\dimen156
\l__xeCJK_last_kern_dim=\dimen157
\l__xeCJK_widow_penalty_int=\count272

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

\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_minimum_bound_dim=\dimen174
\l__xeCJK_kerning_margin_dim=\dimen175
\l__xeCJK_original_margin_dim=\dimen176
\g__xeCJK_family_int=\count273
\l__xeCJK_fam_int=\count274
\g__xeCJK_fam_allocation_int=\count275
\l__xeCJK_verb_case_int=\count276
\l__xeCJK_verb_exspace_skip=\skip72
("Z:\My program\MiKTeX 2.9\tex\latex\fontspec\fontspec.sty"
Package: fontspec 2018/07/30 vv2.6h Font selection for XeLaTeX and LuaLaTeX
("Z:\My program\MiKTeX 2.9\tex\latex\fontspec\fontspec-xetex.sty"
Package: fontspec-xetex 2018/07/30 vv2.6h Font selection for XeLaTeX and LuaLaT
eX
\l__fontspec_script_int=\count277
\l__fontspec_language_int=\count278
\l__fontspec_strnum_int=\count279
\l__fontspec_tmp_int=\count280
\l__fontspec_em_int=\count281
\l__fontspec_emdef_int=\count282
\l__fontspec_strong_int=\count283
\l__fontspec_strongdef_int=\count284
\l__fontspec_tmpa_dim=\dimen177
\l__fontspec_tmpb_dim=\dimen178
\l__fontspec_tmpc_dim=\dimen179
("Z:\My program\MiKTeX 2.9\tex\latex\base\fontenc.sty"
Package: fontenc 2017/04/05 v2.0i Standard LaTeX package
("Z:\My program\MiKTeX 2.9\tex\latex\base\tuenc.def"
File: tuenc.def 2017/04/05 v2.0i Standard LaTeX file
LaTeX Font Info:    Redeclaring font encoding TU on input line 82.
)) ("Z:\My program\MiKTeX 2.9\tex\latex\fontspec\fontspec.cfg")
LaTeX Info: Redefining \itshape on input line 3910.
LaTeX Info: Redefining \slshape on input line 3915.
LaTeX Info: Redefining \scshape on input line 3920.
LaTeX Info: Redefining \upshape on input line 3925.
LaTeX Info: Redefining \em on input line 3955.
LaTeX Info: Redefining \emph on input line 3980.
LaTeX Info: Redefining \- on input line 4034.
))

LaTeX Warning: You have requested, on input line 4369, version
               `2019/03/15' of package fontspec,
               but only version
               `2018/07/30 vv2.6h Font selection for XeLaTeX and LuaLaTeX'
               is available.

("Z:\My program\MiKTeX 2.9\tex\xelatex\xecjk\xeCJK.cfg"
File: xeCJK.cfg 2019/04/15 v3.7.2 Configuration file for xeCJK package
)) ("Z:\My program\MiKTeX 2.9\tex\xelatex\xecjk\xeCJKfntef.sty"
Package: xeCJKfntef 2019/04/15 v3.7.2 xeCJK font effect
("Z:\My program\MiKTeX 2.9\tex\latex\ulem\ulem.sty"
\UL@box=\box50
\UL@hyphenbox=\box51
\UL@skip=\skip73
\UL@hook=\toks23
\UL@height=\dimen180
\UL@pe=\count285
\UL@pixel=\dimen181
\ULC@box=\box52
Package: ulem 2012/05/18
\ULdepth=\dimen182
) ("Z:\My program\MiKTeX 2.9\tex\latex\cjk\CJKfntef.sty"
Package: CJKfntef 2015/04/18 4.8.4
\CJK@fntefSkip=\skip74
\CJK@nest=\count286
\CJK@fntefDimen=\dimen183
\CJK@underdotBox=\box53
\CJK@ULbox=\box54
\CJK@underanyskip=\dimen184
)
\l__xeCJK_space_skip=\skip75
\c__xeCJK_ulem-begin_node_dim=\dimen185
\c__xeCJK_null_box=\box55
\l__xeCJK_fntef_box=\box56
\l__xeCJK_under_symbol_box=\box57
\c__xeCJK_filll_skip=\skip76
)
\ccwd=\dimen186
\l__ctex_ccglue_skip=\skip77
)
\l__ctex_ziju_dim=\dimen187
("Z:\My program\MiKTeX 2.9\tex\latex\zhnumber\zhnumber.sty"
Package: zhnumber 2019/04/07 v2.7 Typesetting numbers with Chinese glyphs
\l__zhnum_scale_int=\count287
("Z:\My program\MiKTeX 2.9\tex\latex\zhnumber\zhnumber-utf8.cfg"
File: zhnumber-utf8.cfg 2019/04/07 v2.7 Chinese numerals with UTF8 encoding
)) ("Z:\My program\MiKTeX 2.9\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)
("Z:\My program\MiKTeX 2.9\tex\latex\ctex\config\ctex-name-utf8.cfg"
File: ctex-name-utf8.cfg 2019/05/29 v2.4.16 Caption with encoding UTF8 (CTEX)
)) ("Z:\My program\MiKTeX 2.9\tex\latex\tools\indentfirst.sty"
Package: indentfirst 1995/11/23 v1.03 Indent first paragraph (DPC)
) ("Z:\My program\MiKTeX 2.9\tex\latex\ctex\ctex-c5size.clo"
File: ctex-c5size.clo 2019/05/29 v2.4.16 c5size option (CTEX)
) ("Z:\My program\MiKTeX 2.9\tex\latex\ctex\fontset\ctex-fontset-windows.def"
File: ctex-fontset-windows.def 2019/05/29 v2.4.16 Windows fonts definition (CTE
X)
("Z:\My program\MiKTeX 2.9\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)
! Undefined control sequence.
\xeCJK/family/rm ...e:n \fontspec_gset_family:Nnn 
                                                  \g__xeCJK_fontspec_family_...
l.110   }

Here is how much of TeX's memory you used:
 20490 strings out of 427796
 412625 string characters out of 3152336
 512836 words of memory out of 3000000
 24330 multiletter control sequences out of 15000+200000
 532500 words of font info for 32 fonts, out of 3000000 for 9000
 1328 hyphenation exceptions out of 8191
 52i,0n,56p,382b,446s stack positions out of 5000i,500n,10000p,200000b,50000s

No pages of output.
hanwenzhu commented 5 years ago

This means an error as occurred when rendering LaTeX. Can you post your python code that produces this error?

FitzMusk commented 5 years ago

  > File Name        : QSort.py
  > Author           : Tony
  > Created Time     : 2019/03/13 14:18:39
'''

from manimlib.imports import *
from manim_projects.MyUsefulScene.VideoStart import VideoStart
from manim_projects.MyUsefulScene.VideoCover import VideoCover

class VideoTitle(VideoStart):
    CONFIG = {
        "title_name": "快速排序",
    }

class Cover(VideoCover):
    CONFIG = {
        "en_title_name" : "Quick Sort",
        "title_name"    : "快速排序",
    }

data = Matrix(
    [["i", "0", "1", "2", "3", "4", "5"],
     ["a[i]", "6", "2", "7", "3", "9", "8"]]
)
for i in range(0, 8):
    data[0][i].set_color(DARK_BROWN)

class IntroProblem(Scene):
    def construct(self):
        problem = TextMobject(
            "现给出一数组,对其中的元素按从小到大排序"
        ).scale(0.8).to_corner(TOP)
        self.play(Write(problem))
        self.play(
            FadeIn(data),
            run_time=0.5
        )
        self.wait(3)

class QsortSolve(Scene):
    def construct(self):
        self.add(data)
        self.wait(1)
        self.color()
        self.mainidea()
        self.step1()
        self.step2()
        self.step3()
        self.step4()
        self.step5()

    def color(self):
        white = TextMobject(
            "未排序"
        ).scale(0.4).set_color(WHITE).to_corner(LEFT + UP)
        green = TextMobject(
            "基准数"
        ).scale(0.4).set_color(GREEN).next_to(white, direction=DOWN, buff=SMALL_BUFF)
        red = TextMobject(
            "排序后"
        ).scale(0.4).set_color(RED).next_to(green, direction=DOWN, buff=SMALL_BUFF)
        self.play(
            FadeIn(white),
            FadeIn(green),
            FadeIn(red),
            run_time=0.3
        )

    def mainidea(self):
        title = TextMobject(
            "主要思路"
        ).scale(0.8).set_color(BLUE).to_corner(TOP)
        text = TextMobject(
            "选取一个数,把比它小的放到左边,大的放到右边,并对左右两边同样处理"
        ).scale(0.6).to_corner(DOWN).set_color(GOLD)
        self.play(Write(title), Write(text))
        transtext = TextMobject(
            "选取一个数,把比它小的放到左边,大的放到右边,并对左右两边同样处理"
        ).scale(0.3).to_corner(RIGHT + UP).set_color(GOLD)
        self.play(Transform(text, transtext))
        self.title = title
        self.MainIdeaText = transtext
        self.wait(1)

    def step1(self):
        title = TextMobject(
            "初始化"
        ).scale(0.8).set_color(BLUE).to_corner(TOP)
        text = TextMobject(
            "0. 将指针变量$i,j$放在数组要排序部分两端,设$a[i]=key$"
        ).scale(0.6).to_corner(DOWN).set_color(YELLOW)
        self.play(
            Write(text),
            Transform(self.title, title)
        )
        texti = TextMobject("$i$").set_color(RED).next_to(
            data[0][8], direction=DOWN, buff=1.25)
        textj = TextMobject("$j$").set_color(RED).next_to(
            data[0][13], direction=DOWN, buff=1.25)
        textarrowi = Arrow(texti, data[0][8]).set_color(RED)
        textarrowj = Arrow(textj, data[0][13]).set_color(RED)
        self.TextI = VGroup(texti, textarrowi)
        self.TextJ = VGroup(textj, textarrowj)
        self.textk = TextMobject("$key=$""6").set_color(
            GREEN).scale(0.8).to_corner(RIGHT)
        transdata8 = data[0][8].set_color(GREEN)
        self.play(
            Write(self.TextI),
            Write(self.TextJ),
            Write(self.textk),
            Transform(data[0][8], transdata8),
            run_time=2
        )
        transtext = TextMobject(
            "0. 将指针变量$i,j$放在数组要排序部分两端,设$a[i]=key$"
        ).scale(0.3).next_to(self.MainIdeaText, direction=DOWN, buff=0.1).set_color(YELLOW)
        self.play(Transform(text, transtext))
        self.Step1Text = transtext
        self.wait(1)

    def step2(self):
        title = TextMobject(
            "第一步操作"
        ).scale(0.8).set_color(BLUE).to_corner(TOP)
        text = TextMobject(
            "1. 将$j$逐个向左移,直至$a[j] < key$,交换$a[i]$与$a[j]$"
        ).scale(0.6).to_corner(DOWN).set_color(YELLOW)
        self.play(
            Write(text),
            Transform(self.title, title)
        )
        TextJ = self.TextJ.next_to(data[0][13], direction=DOWN, buff=0.2)
        self.play(
            Transform(self.TextJ, TextJ)
        )
        ajkey = TextMobject(
            "$a[j] > key$"
        ).scale(0.7).set_color(YELLOW).next_to(TextJ, direction=RIGHT)
        self.play(Write(ajkey))
        self.play(FadeOut(ajkey))
        TextJ = self.TextJ.next_to(data[0][12], direction=DOWN, buff=0.2)
        self.play(
            Transform(self.TextJ, TextJ)
        )
        ajkey.next_to(TextJ, direction=RIGHT)
        self.play(Transform(self.TextJ, TextJ))
        self.play(Write(ajkey))
        self.play(FadeOut(ajkey))

        TextJ = self.TextJ.next_to(data[0][11], direction=DOWN, buff=0.2)
        ajKey = TextMobject(
            "$a[j] < key$"
        ).scale(0.7).set_color(GOLD).next_to(TextJ, direction=RIGHT)
        self.play(Transform(self.TextJ, TextJ))
        self.play(Write(ajKey))
        self.play(FadeOut(ajKey))

        self.play(Swap(data[0][8], data[0][11]))

        transtext = TextMobject(
            "1. 将$j$逐个向左移,直至$a[j] < key$,交换$a[i]$与$a[j]$"
        ).scale(0.3).next_to(self.Step1Text, direction=DOWN, buff=0.1).set_color(YELLOW)
        self.play(Transform(text, transtext))
        self.Step2Text = transtext
        self.wait(1)

    def step3(self):
        title = TextMobject(
            "第二步操作"
        ).scale(0.8).set_color(BLUE).to_corner(TOP)
        text = TextMobject(
            "2. 将$i$逐个向右移,直至$a[i] > key$,交换$a[j]$与$a[i]$"
        ).scale(0.6).to_corner(DOWN).set_color(YELLOW)
        self.play(
            Write(text),
            Transform(self.title, title)
        )
        TextI = self.TextI.next_to(data[0][11], direction=DOWN, buff=0.2)
        self.play(
            Transform(self.TextI, TextI)
        )
        aikey = TextMobject(
            "$a[i] < key$"
        ).scale(0.7).set_color(YELLOW).next_to(TextI, direction=LEFT)
        self.play(Write(aikey))
        self.play(FadeOut(aikey))

        TextI = self.TextI.next_to(data[0][9], direction=DOWN, buff=0.2)
        self.play(
            Transform(self.TextI, TextI)
        )
        aikey.next_to(TextI, direction=LEFT)
        self.play(Transform(self.TextI, TextI))
        self.play(Write(aikey))
        self.play(FadeOut(aikey))

        TextI = self.TextI.next_to(data[0][10], direction=DOWN, buff=0.2)
        aiKey = TextMobject(
            "$a[i] > key$"
        ).scale(0.7).set_color(GOLD).next_to(TextI, direction=LEFT)
        self.play(Transform(self.TextI, TextI))
        self.play(Write(aiKey))
        self.play(FadeOut(aiKey))

        self.play(Swap(data[0][8], data[0][10]))

        transtext = TextMobject(
            "2. 将$i$逐个向右移,直至$a[i] > key$,交换$a[j]$与$a[i]$"
        ).scale(0.3).next_to(self.Step2Text, direction=DOWN, buff=0.1).set_color(YELLOW)
        self.play(Transform(text, transtext))
        self.Step3Text = transtext
        self.wait(1)

    def step4(self):
        title = TextMobject(
            "第一轮后续操作"
        ).scale(0.8).set_color(BLUE).to_corner(TOP)
        text = TextMobject(
            "3. 重复$1,2$步,直至$i = j$,确定下$key$位置"
        ).scale(0.6).to_corner(DOWN).set_color(YELLOW)
        self.play(
            Write(text),
            Transform(self.title, title)
        )

        TextJ = self.TextJ.next_to(data[0][10], direction=DOWN, buff=0.2)
        self.play(
            Transform(self.TextJ, TextJ)
        )
        ajkey = TextMobject(
            "$a[j] > key$"
        ).scale(0.7).set_color(YELLOW).next_to(TextJ, direction=RIGHT)
        self.play(Write(ajkey))
        self.play(FadeOut(ajkey))

        TextJ = self.TextJ.next_to(self.TextI, direction=RIGHT, buff=0.1)
        self.play(
            Transform(self.TextJ, TextJ)
        )
        iej = TextMobject(
            "$i = j$"
        ).scale(0.7).set_color(GOLD).next_to(TextJ, direction=RIGHT)
        self.play(Write(iej))
        self.play(FadeOut(iej))

        transkey = data[0][8].set_color(RED)
        self.play(Transform(data[0][8], transkey))

        transtext = TextMobject(
            "3. 重复$1,2$步,直至$i = j$,确定下$key$位置"
        ).scale(0.3).next_to(self.Step3Text, direction=DOWN, buff=0.1).set_color(YELLOW)
        self.play(Transform(text, transtext))
        self.Step4Text = transtext
        self.wait(1)

    def step5(self):
        title = TextMobject(
            "递归处理左右两侧数组"
        ).scale(0.8).set_color(BLUE).to_corner(TOP)
        text = TextMobject(
            "4. 对没有排好序的子数组执行操作$0,1,2,3$,直至排好整个数组"
        ).scale(0.6).to_corner(DOWN).set_color(YELLOW)
        self.play(
            Write(text),
            Transform(self.title, title)
        )

        self.play(FadeOut(self.TextI), FadeOut(self.TextJ))
        TextI = self.TextI.next_to(data[0][11], direction=DOWN, buff=0.2)
        TextJ = self.TextJ.next_to(data[0][9], direction=DOWN, buff=0.2)
        transk = TextMobject("3").set_color(
            GREEN).scale(0.8).move_to(self.textk[4])
        transdata11 = data[0][11].set_color(GREEN)
        self.play(
            Transform(self.textk[4], transk),
            Transform(data[0][11], transdata11),
            Write(TextI),
            Write(TextJ),
            run_time=2
        )

        ajKey = TextMobject(
            "$a[j] < key$"
        ).scale(0.7).set_color(GOLD).next_to(TextJ, direction=RIGHT)
        self.play(Write(ajKey))
        self.play(FadeOut(ajKey), Swap(data[0][11], data[0][9]))

        aikey = TextMobject(
            "$a[i] < key$"
        ).scale(0.7).set_color(YELLOW).next_to(TextI, direction=LEFT)
        self.play(Write(aikey))
        self.play(FadeOut(aikey))
        TextI = self.TextI.next_to(self.TextJ, direction=LEFT, buff=0.1)
        iej = TextMobject(
            "$i = j$"
        ).scale(0.7).set_color(GOLD).next_to(TextI, direction=LEFT)
        self.play(
            Transform(self.TextI, TextI),
            Write(iej)
        )
        transdata9 = data[0][9].set_color(RED)
        transdata11 = data[0][11].set_color(RED)
        self.play(
            Transform(data[0][9], transdata9),
            Transform(data[0][11], transdata11),
            FadeOut(iej),
            FadeOut(self.TextI),
            FadeOut(self.TextJ)
        )
        self.wait(1)

        TextI = self.TextI.next_to(data[0][10], direction=DOWN, buff=0.2)
        TextJ = self.TextJ.next_to(data[0][13], direction=DOWN, buff=0.2)
        transk = TextMobject("7").set_color(
            GREEN).scale(0.8).move_to(self.textk[4])
        transdata10 = data[0][10].set_color(GREEN)
        self.play(
            Transform(self.textk[4], transk),
            Transform(data[0][10], transdata10),
            Write(TextI),
            Write(TextJ)
        )
        ajkey = TextMobject(
            "$a[j] > key$"
        ).scale(0.7).set_color(YELLOW).next_to(TextJ, direction=RIGHT)
        self.play(Write(ajkey))
        self.play(FadeOut(ajkey))
        TextJ = self.TextJ.next_to(data[0][12], direction=DOWN, buff=0.2)
        self.play(
            Transform(self.TextJ, TextJ)
        )
        ajkey = TextMobject(
            "$a[j] > key$"
        ).scale(0.7).set_color(YELLOW).next_to(TextJ, direction=RIGHT)
        self.play(Write(ajkey))
        self.play(FadeOut(ajkey))
        TextJ = self.TextJ.next_to(TextI, direction=RIGHT, buff=0.1)
        iej = TextMobject(
            "$i = j$"
        ).scale(0.7).set_color(GOLD).next_to(TextI, direction=LEFT)
        self.play(
            Transform(self.TextJ, TextJ),
            Write(iej)
        )

        transdata10 = data[0][10].set_color(RED)
        self.play(
            Transform(data[0][10], transdata10),
            FadeOut(iej),
            FadeOut(self.TextI),
            FadeOut(self.TextJ)
        )
        self.wait(1)

        TextI = self.TextI.next_to(data[0][12], direction=DOWN, buff=0.2)
        TextJ = self.TextJ.next_to(data[0][13], direction=DOWN, buff=0.2)
        transk = TextMobject("9").set_color(
            GREEN).scale(0.8).move_to(self.textk[4])
        transdata12 = data[0][12].set_color(GREEN)
        self.play(
            Transform(self.textk[4], transk),
            Transform(data[0][12], transdata12),
            Write(TextI),
            Write(TextJ)
        )
        ajKey = TextMobject(
            "$a[j] < key$"
        ).scale(0.7).set_color(GOLD).next_to(TextJ, direction=RIGHT)
        self.play(Write(ajKey))
        self.play(FadeOut(ajKey), Swap(data[0][12], data[0][13]))

        transdata12 = data[0][12].set_color(RED)
        transdata13 = data[0][13].set_color(RED)
        self.play(
            Transform(data[0][12], transdata12),
            Transform(data[0][13], transdata13),
            FadeOut(self.TextI),
            FadeOut(self.TextJ),
            FadeOut(self.textk)
        )
        self.wait(1)

        transtext = TextMobject(
            "4. 对没有排好序的子数组执行操作$0,1,2,3$,直至排好整个数组"
        ).scale(0.3).next_to(self.Step4Text, direction=DOWN, buff=0.1).set_color(YELLOW)
        self.play(Transform(text, transtext), FadeOut(self.title))
        self.Step5Text = transtext
        self.wait(2)

class QsortCode(Scene):
    def construct(self):
        title = TextMobject("所以我们可以轻松地写出代码").set_color(YELLOW).scale(0.9).to_edge(UP)
        # screen_rect = ScreenRectangle(height = 6)
        # screen_rect.next_to(title, DOWN)

        self.play(Write(title))
        # self.play(ShowCreation(screen_rect))
        self.wait(6)

class QsortTime(Scene):
    def construct(self):
        title = TextMobject("下面来对时间复杂度进行分析").set_color(YELLOW).scale(1.2)
        self.play(Write(title));
        self.wait(1)
        self.remove(title);
        self.best()
        self.worst()
        self.ave()

    def best(self):
        self.title = Title("最好情况").set_color(BLUE)
        self.play(Write(self.title));

        text = TextMobject(
            "最好情况发生在整", "个数组被分成两段长度相等的子数组时,递推式如下:"
        ).scale(0.7).next_to(self.title, DOWN)
        self.play(Write(text))
        tex = TexMobject(
            "T(n) =\\begin{cases} \\Theta(1)& \\text{n=1} \\\\ 2T(\\frac{n}{2})+\\Theta(n)& \\text{n>1} \\end{cases}"
        ).next_to(text, DOWN).set_color(YELLOW)
        self.play(FadeIn(tex));
        self.wait(1)
        text2 = TextMobject(
            "经过数学推导可得:"
        ).next_to(text[0], DOWN, buff=2)
        tex2 = TexMobject(
            "T(n)=\\Theta(n\\log_2 n)"
        ).scale(1.3).next_to(tex, DOWN, buff=1.5).set_color(RED)
        self.play(Write(text2))
        self.play(Write(tex2))
        self.wait(2.5)
        self.remove(text, tex, text2, tex2)

    def worst(self):
        transtitle = Title("最坏情况").set_color(BLUE)
        self.play(Transform(self.title, transtitle));

        text = TextMobject(
            "最坏情况发生在整", "个数组被分成长度为$0$和$n-1$的子数组时,递推式如下:"
        ).scale(0.7).next_to(self.title, DOWN)
        self.play(Write(text))
        tex = TexMobject(
            "T(n) =\\begin{cases} \\Theta(1)& \\text{n=1} \\\\ T(n-1)+\\Theta(n)& \\text{n>1} \\end{cases}"
        ).next_to(text, DOWN).set_color(YELLOW)
        self.play(FadeIn(tex));
        self.wait(1)
        text2 = TextMobject(
            "经过数学推导可得:"
        ).next_to(text[0], DOWN, buff=2)
        tex2 = TexMobject(
            "T(n)=\\Theta(n^2)"
        ).scale(1.3).next_to(tex, DOWN, buff=1.5).set_color(RED)
        self.play(Write(text2))
        self.play(Write(tex2))
        self.wait(2.5)
        self.remove(text, tex, text2, tex2)

    def ave(self):
        transtitle = Title("平均情况").set_color(BLUE)
        self.play(Transform(self.title, transtitle));

        text = TextMobject(
            "实际上", ",除最坏情况外,均会产生深度为$\Theta(\log_2 n)$的递归树,\\\\而每层均是$\Theta(n)$"
        ).scale(0.8).next_to(self.title, DOWN)
        self.play(Write(text))
        text2 = TextMobject(
            "所以:"
        ).next_to(text[0], DOWN, buff=1)
        tex2 = TexMobject(
            "T(n)=\\Theta(n\\log_2 n)"
        ).scale(1.3).next_to(text, DOWN, buff=1.5).set_color(RED)
        self.play(Write(text2))
        self.play(Write(tex2))
        self.wait(2.5)
        self.remove(text, text2, tex2)

class QsortTLE(Scene):
    def construct(self):
        text = TextMobject(
            "但是,这样做对于某些数据会非常卡,导致$TLE$"
        ).scale(1.2)
        text2 = TextMobject(
            "所以我们要进行一些优化"
        ).next_to(text, DOWN).set_color(YELLOW)
        self.play(Write(text))
        self.play(Write(text2))
        self.wait(6)

class QsortOptimization(Scene):
    def construct(self):
        self.opt1()
        self.opt2()
        self.opt3()
        self.opt4()

    def opt1(self):
        self.title = Title("I.\\ 减少交换次数").set_color(BLUE)
        self.play(Write(self.title))
        self.wait(1.25)
        text = TextMobject(
            "在左右分别找到需要交换的元素后,如果$i$和$j$相遇则与基准元素交换,否则将$a[i]$与$a[j]$交换,也可达到目的,同时将交换次数缩短了一半"
        ).scale(0.7).next_to(self.title, DOWN)
        self.play(Write(text))
        self.wait(6)
        self.remove(text)

    def opt2(self):
        transtitle = Title("II.\\ 随机化").set_color(BLUE)
        self.play(Transform(self.title, transtitle))
        self.wait(1.25)
        text = TextMobject(
            "快速排序的最差时间复杂度很高,而平均和最好几乎一样,为了使时间复杂度达到期望值,可以每次","随机", "选一个数作为基准数"
        ).scale(0.7).next_to(self.title, DOWN)
        text[1].set_color(YELLOW)
        self.play(Write(text))
        self.wait(6)
        self.remove(text)

    def opt3(self):
        transtitle = Title("III.\\ 小区间插入排序").set_color(BLUE)
        self.play(Transform(self.title, transtitle))
        self.wait(1.25)
        text = TextMobject(
            "在一个小区间内,使用插入排序比快速排序递归效率高。因此,可以在区间长度", "小于$10$", "后改为", "插入排序"
        ).scale(0.7).next_to(self.title, DOWN)
        text[1].set_color(YELLOW)
        text[3].set_color(YELLOW)
        self.play(Write(text))
        self.wait(6)
        self.remove(text)

    def opt4(self):
        transtitle = Title("IV.\\ 聚拢重复元素").set_color(BLUE)
        self.play(Transform(self.title, transtitle))
        self.wait(1.25)
        text = TextMobject(
            "在$j$向前移动时,每次遇到和基准元素", "相同的元素", ",就将其与前方", "第一个异于基准元素的元素", "交换位置,然后继续移动。如果在$i$之前没有找到任何一个异于基准元素的元素,说明此时$i$与$j$之间已经全部都是与基准元素相同的","重复元素","实现了重复元素的聚拢"
        ).scale(0.7).next_to(self.title, DOWN)
        text[1].set_color(YELLOW)
        text[3].set_color(YELLOW)
        text[5].set_color(YELLOW)
        text2 = TextMobject(
            "由于代码相对复杂,在此不展示,可以前往简介中[4]查看完整代码"
        ).scale(0.5).next_to(text, DOWN, buff=1).set_color(ORANGE)
        self.play(Write(text))
        self.wait(1)
        self.play(FadeInFromDown(text2))
        self.wait(5)
        self.remove(text, text2)
        self.play(FadeOutAndShiftDown(self.title), run_time=0.5)

class CppSTLSort(Scene):
    def construct(self):
        self.stlsort()
        self.timecompare()

    def stlsort(self):
        text = TextMobject(
            "C++语言的STL为我们设计好了一个sort()函数(algorithm头中)\\\\它混合了插入排序与堆排序,将时间复杂度稳定在了","$\Theta(n\log_2 n)$"
        ).scale(0.8)
        text[1].set_color(RED)
        self.play(Write(text))
        self.wait(4)
        self.remove(text)

    def timecompare(self):
        title = Title("时间对比(供参考)").set_color(BLUE)
        comment = TextMobject("数据来自up主Luogu P1177前4个测试点的时间").scale(0.4).next_to(title, DOWN).to_edge(RIGHT)
        self.play(Write(title), Write(comment))
        tab = TexMobject(
            "\\begin{tabular}{ccccccc} \\hline 优化情况& \\#1& \\#2& \\#3& \\#4\\\\ \\hline 无& 3ms& TLE& TLE& TLE\\\\ I.& 3ms& 46ms& TLE& TLE\\\\ I.II.& 3ms& 45ms& 120ms& 1086ms\\\\ I.II.III.& 3ms& 31ms& 117ms& 668ms\\\\ I.II.III.IV.& 3ms& 42ms& 52ms& 28ms\\\\ sort()& 3ms& 39ms& 26ms& 24ms\\\\ \\hline \\end{tabular}"
        ).next_to(title, DOWN, buff=1)
        self.play(Write(tab))
        self.wait(7)
        self.play(FadeOutAndShiftDown(title), FadeOutAndShiftDown(comment), FadeOutAndShiftDown(tab), run_time=0.5)

class VideoEnd(Scene):
    def construct(self):
        title = Title("参考(链接放在视频简介里)").set_color(RED)
        text1 = TextMobject("[1] Introduction to Algorithms(Third Edition)").scale(0.8).next_to(title, DOWN, buff=0.7).to_corner(LEFT)
        text2 = TextMobject("[2] Quicksort\\ -\\ Wikipedia").scale(0.8).next_to(text1, DOWN).to_corner(LEFT)
        text3 = TextMobject("[3] 快速排序算法\\ -\\ 百度百科").scale(0.8).next_to(text2, DOWN).to_corner(LEFT)
        text4 = TextMobject("[4] 快速排序题解\\ -\\ Adam\\_Ding的博客").scale(0.8).next_to(text3, DOWN).to_corner(LEFT)
        text5 = TextMobject("[5] STL sort源码剖析\\ -\\ imAkaka的博客").scale(0.8).next_to(text4, DOWN).to_corner(LEFT)

        self.play(FadeInFromDown(title))
        self.play(Write(text1), Write(text2), Write(text3), Write(text4), Write(text5))
        self.wait(4)
        self.play(
            FadeOutAndShiftDown(title),
            FadeOutAndShiftDown(text1),
            FadeOutAndShiftDown(text2),
            FadeOutAndShiftDown(text3),
            FadeOutAndShiftDown(text4),
            FadeOutAndShiftDown(text5),
            run_time=0.2
        )

        title2 = TextMobject("更多算法可参考我的博客\\\\", "https://tony031218.github.io/")
        title2[1].set_color(ORANGE)
        title2[1].scale(1.3)
        self.play(
            Write(title2[0])
        )
        self.play(
            FadeInFromDown(title2[1])
        )
        self.wait(4)
        self.play(
            FadeOut(title2)
        )
        self.wait(2)

'''
  > Finished Time     : 2019/05/24 16:22:18
  > Video Address      @HanwenZhu 
'''```
FitzMusk commented 5 years ago

However, when I run this simple py. It returnsTraceback (most recent call last): File "D:\manim-master\manimlib\extract_scene.py", line 150, in main scene = SceneClass(**scene_kwargs) File "D:\manim-master\manimlib\scene\scene.py", line 52, in __init__ self.construct() File "test.py", line 7, in construct helloworld = TextMobject("ee", color = RED) File "D:\manim-master\manimlib\mobject\svg\tex_mobject.py", line 146, in __init__ self.break_up_by_substrings() File "D:\manim-master\manimlib\mobject\svg\tex_mobject.py", line 183, in break_up_by_substrings sub_tex_mob.move_to(self.submobjects[last_submob_index], RIGHT) IndexError: list index out of range

py:


class Test(Scene):
    def construct(self):

        ## making object
        helloworld = TextMobject("ee", color = RED)

        rectangle = Rectangle(color=GREEN)
        rectangle.surround(helloworld)

        group1 = VGroup(helloworld, rectangle)

        hellomanim = TextMobject("ss", color=GREEN)
        hellomanim.scale(2.5)
        ## position

        ##Showing object

        self.play(Write(helloworld))
        self.wait(1)
        self.play(FadeOut(rectangle))
        self.wait(1)
        self.play(ApplyMethod(group1.scale, 2.5))
        self.wait(1)
        self.play(Transform(helloworld, hellomanim))
        self.wait(1)

@HanwenZhu

hanwenzhu commented 5 years ago

Strange. This piece of code works for me.

FitzMusk commented 5 years ago

maybe code is not the issue.

hanwenzhu commented 5 years ago

The LaTeX error log looks like an error in your LaTeX. Which scene in QSort.py were you building when this error happened?

FitzMusk commented 5 years ago

almost every scene, for example: QsortCode

FitzMusk commented 5 years ago

and this log is made by Secen "VideoEnd" @HanwenZhu

hanwenzhu commented 5 years ago

I built the scene QsortCode and it works: image

hanwenzhu commented 5 years ago

And the scene VideoEnd also works: image I use MacTeX on macOS, and I noticed that you're using MikTeX on Windows. There might be some difference in these distributions that cause this error.

FitzMusk commented 5 years ago

got it,thanks anyway

hanwenzhu commented 5 years ago

From your simple Test python code, in line 175 of manimlib/mobject/svg/tex_mobject.py, num_submobjects seems to be 0. This means no actual shape is in the SVG built.

Maybe try rendering a simple latex file like

\documentclass[preview]{standalone}

\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{dsfont}
\usepackage{setspace}
\usepackage{tipa}
\usepackage{relsize}
\usepackage{textcomp}
\usepackage{mathrsfs}
\usepackage{calligra}
\usepackage{wasysym}
\usepackage{ragged2e}
\usepackage{physics}
\usepackage{xcolor}
\usepackage{textcomp}
\usepackage{microtype}
%\DisableLigatures{encoding = *, family = * }
\usepackage[UTF8]{ctex}
\linespread{1}

\begin{document}

Some text. Some text.

\end{document}

using XeLaTeX, by saving the LaTeX file to a file.tex and doing

xelatex file.tex

and open file.pdf in that folder. If everything works out, the pdf should contain the text like this: image

hanwenzhu commented 5 years ago

Given your debug code

File "D:\manim-master\manimlib\mobject\svg\tex_mobject.py", line 183, in break_up_by_substrings sub_tex_mob.move_to(self.submobjects[last_submob_index], RIGHT) IndexError: list index out of range

The last_submob_index, which is defined as min(curr_index, len(self.submobjects) - 1) in line 182 of manimlib\mobject\svg\tex_mobject.py, is at minimum -1 (when len(self.submobjects) is 0). For the list index to be out of range, self.submobjects is zero length. This might mean that the rendered shape for TextMobject("ee") is actually blank, which is wierd. Trying the LaTeX code above might help debugging.

FitzMusk commented 5 years ago

when I run xelatex file.tex ,the pdf does containted the text "Some text. Some text.".However, when I try to add some chinese, it can only contain English part text.

some erros that were listed:

! Undefined control sequence.
\xeCJK/family/rm ...e:n \fontspec_gset_family:Nnn
                                                  \g__xeCJK_fontspec_family_...
l.110   }

?

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...

l.110   }
Kolloom commented 5 years ago

https://tex.stackexchange.com/questions/17611/how-does-one-type-chinese-in-latex

if you can't run the example then your installation is borked

hanwenzhu commented 5 years ago

@FitzMusk The Chinese text issue might be due to your distribution, but I don't see why TextMobject("ss", color=GREEN) doesn't work. Can you open the file ./files/Tex/91d4d46d81750fa2.svg (the one from TextMobject("ss")) and read the content inside? I suspect there might be a tag that SVGMobject.get_mobjects_from doesn't recognize and produces a blank object.

However, when I run this simple py. It returnsTraceback (most recent call last): File "D:\manim-master\manimlib\extract_scene.py", line 150, in main scene = SceneClass(**scene_kwargs) File "D:\manim-master\manimlib\scene\scene.py", line 52, in __init__ self.construct() File "test.py", line 7, in construct helloworld = TextMobject("ee", color = RED) File "D:\manim-master\manimlib\mobject\svg\tex_mobject.py", line 146, in __init__ self.break_up_by_substrings() File "D:\manim-master\manimlib\mobject\svg\tex_mobject.py", line 183, in break_up_by_substrings sub_tex_mob.move_to(self.submobjects[last_submob_index], RIGHT) IndexError: list index out of range

py:


class Test(Scene):
    def construct(self):

        ## making object
        helloworld = TextMobject("ee", color = RED)

        rectangle = Rectangle(color=GREEN)
        rectangle.surround(helloworld)

        group1 = VGroup(helloworld, rectangle)

        hellomanim = TextMobject("ss", color=GREEN)
        hellomanim.scale(2.5)
        ## position

        ##Showing object

        self.play(Write(helloworld))
        self.wait(1)
        self.play(FadeOut(rectangle))
        self.wait(1)
        self.play(ApplyMethod(group1.scale, 2.5))
        self.wait(1)
        self.play(Transform(helloworld, hellomanim))
        self.wait(1)

@HanwenZhu

FitzMusk commented 5 years ago

<!-- This file was generated by dvisvgm 2.4 -->
<svg height='4.289468pt' version='1.1' viewBox='167.925835 -4.289468 7.859436 4.289468' width='7.859436pt' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>
<defs>
<path d='M2.072229 -1.932752C2.291407 -1.892902 3.108344 -1.733499 3.108344 -1.016189C3.108344 -0.508095 2.759651 -0.109589 1.982565 -0.109589C1.145704 -0.109589 0.787049 -0.67746 0.597758 -1.524284C0.56787 -1.653798 0.557908 -1.693649 0.458281 -1.693649C0.328767 -1.693649 0.328767 -1.62391 0.328767 -1.444583V-0.129514C0.328767 0.039851 0.328767 0.109589 0.438356 0.109589C0.488169 0.109589 0.498132 0.099626 0.687422 -0.089664C0.707347 -0.109589 0.707347 -0.129514 0.886675 -0.318804C1.325031 0.099626 1.77335 0.109589 1.982565 0.109589C3.128269 0.109589 3.58655 -0.557908 3.58655 -1.275218C3.58655 -1.803238 3.287671 -2.102117 3.16812 -2.221669C2.839352 -2.540473 2.450809 -2.620174 2.032379 -2.699875C1.474471 -2.809465 0.806974 -2.938979 0.806974 -3.516812C0.806974 -3.865504 1.066002 -4.273973 1.92279 -4.273973C3.01868 -4.273973 3.068493 -3.377335 3.088418 -3.068493C3.098381 -2.978829 3.188045 -2.978829 3.20797 -2.978829C3.337484 -2.978829 3.337484 -3.028643 3.337484 -3.217933V-4.224159C3.337484 -4.393524 3.337484 -4.463263 3.227895 -4.463263C3.178082 -4.463263 3.158157 -4.463263 3.028643 -4.343711C2.998755 -4.303861 2.899128 -4.214197 2.859278 -4.184309C2.480697 -4.463263 2.072229 -4.463263 1.92279 -4.463263C0.707347 -4.463263 0.328767 -3.795766 0.328767 -3.237858C0.328767 -2.889166 0.488169 -2.610212 0.757161 -2.391034C1.075965 -2.132005 1.354919 -2.072229 2.072229 -1.932752Z' id='g0-115'/>
</defs>
<g id='page1'>
<use x='167.925835' xlink:href='#g0-115' y='0'/>
<use x='171.855553' xlink:href='#g0-115' y='0'/>
</g>
</svg>``` @HanwenZhu 
FitzMusk commented 5 years ago

I install tex live ,and xeltex file.tex can return a pdf contains chinese finally. But unfortunately , even when TEX_USE_CTEX = False , it returns Exception: Latex error converting to dvi. See log output above or the log file: .\files\Tex\93febc73765951a9.log

FitzMusk commented 5 years ago

https://tex.stackexchange.com/questions/17611/how-does-one-type-chinese-in-latex

if you can't run the example then your installation is borked

so my installation is not the issue QAQ

FitzMusk commented 5 years ago

by somehow I solved this issue, though I don't how.. BUT truly truly thank all u guys!!! @HanwenZhu @Kolloom

SniperM99 commented 4 years ago

by somehow I solved this issue, though I don't how.. BUT truly truly thank all u guys!!! @HanwenZhu @Kolloom

how did you solver this problem?

SniperM99 commented 4 years ago

by somehow I solved this issue, though I don't how.. BUT truly truly thank all u guys!!! @HanwenZhu @Kolloom

how did you solver this problem?

I solver this problem by the following step:

LaTeX提示缺少安装库 : tex/latex/arabi/bblopts.cfg is missing.It is a part of the following package : arabi

wzy2687 commented 4 years ago

我做了2个修改.

  1. TEX_USE_CTEX = True
  2. 我修改了 ctex_template.tex 文件, 把 \usepackage[UTF8]{ctex} 放到第二行. 就可以了.
becatjd commented 4 years ago

我做了2个修改。

  1. TEX_USE_CTEX = True
  2. 我修改了ctex_template.tex文件,把\ usepackage [UTF8] {ctex}放到第二行。就可以了。

您好,我能看一下您的tex文件的全部内容吗,我也遇到了相同的问题

becatjd commented 4 years ago

我做了2个修改.

  1. TEX_USE_CTEX = True
  2. 我修改了 ctex_template.tex 文件, 把 \usepackage[UTF8]{ctex} 放到第二行. 就可以了.

非常感谢您!这正是我需要的方法,manim终于正常工作了!!

yuyi-7 commented 4 years ago

我做了2个修改.

  1. TEX_USE_CTEX = True
  2. 我修改了 ctex_template.tex 文件, 把 \usepackage[UTF8]{ctex} 放到第二行. 就可以了.

Thanks, I had same error and it`s solved by your way!!