1

I have a fresh installation of TeX Live 2022 and I am trying to write documents in Chinese. But the compilation failed on the following minimal test document:

\documentclass{article}
\usepackage[UTF8]{ctex}

\begin{document}
    \begin{itemize}
        \item 你好
        \item Hello
    \end{itemize}
\end{document}

I have searched the first error message Undefined control sequence. { \ctex_disable_package:n {#1} } online but did not find anything useful.

I am not sure if I missed something basic here. Any input is appreciated!

The entire .log is provided below for more information (I have to trim some of the contents to make sure this post is within 30000 character limit):

This is XeTeX, Version 3.141592653-2.6-0.999994 (TeX Live 2022) (preloaded format=xelatex 2022.5.25)  26 MAY 2022 01:04
entering extended mode
 \write18 enabled.
 %&-line parsing enabled.
**test.tex
(./test.tex
LaTeX2e <2021-11-15> patch level 1
L3 programming layer <2022-05-04>
(/usr/local/texlive/2022/texmf-dist/tex/latex/base/article.cls
Document Class: article 2021/10/04 v1.4n Standard LaTeX document class
(/usr/local/texlive/2022/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2021/10/04 v1.4n Standard LaTeX file (size option)
)
\c@part=\count181
\c@section=\count182
\c@subsection=\count183
\c@subsubsection=\count184
\c@paragraph=\count185
\c@subparagraph=\count186
\c@figure=\count187
\c@table=\count188
\abovecaptionskip=\skip47
\belowcaptionskip=\skip48
\bibindent=\dimen138
)
(/home/yang/texmf/tex/latex/ctex/ctex.sty
(/usr/local/texlive/2022/texmf-dist/tex/latex/l3kernel/expl3.sty
Package: expl3 2022-05-04 L3 programming layer (loader) 

(/usr/local/texlive/2022/texmf-dist/tex/latex/l3backend/l3backend-xetex.def
File: l3backend-xetex.def 2022-04-20 L3 backend support: XeTeX
\g__graphics_track_int=\count189
\l__pdf_internal_box=\box50
\g__pdf_backend_object_int=\count190
\g__pdf_backend_annotation_int=\count191
\g__pdf_backend_link_int=\count192
))
Package: ctex 2018/01/28 v2.4.12 Chinese adapter in LaTeX (CTEX)

(/usr/local/texlive/2022/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
Package: xparse 2022-01-12 L3 Experimental document command parser
)
(/usr/local/texlive/2022/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty
Package: l3keys2e 2022-01-12 LaTeX2e option processing using LaTeX3 keys
) (/home/yang/texmf/tex/latex/ctex/ctexhook.sty
Package: ctexhook 2018/01/28 v2.4.12 Document and package hooks (CTEX)
)
(/home/yang/texmf/tex/latex/ctex/ctexpatch.sty
Package: ctexpatch 2018/01/28 v2.4.12 Patching commands (CTEX)
)
(/usr/local/texlive/2022/texmf-dist/tex/latex/base/fix-cm.sty
Package: fix-cm 2020/11/24 v1.1t fixes to LaTeX

(/usr/local/texlive/2022/texmf-dist/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.
))
(/usr/local/texlive/2022/texmf-dist/tex/latex/everysel/everysel.sty
Package: everysel 2021/01/20 v2.1 EverySelectfont Package (MS)
)
\l__ctex_tmp_int=\count193
\l__ctex_tmp_box=\box51
\l__ctex_tmp_dim=\dimen139
\g__ctex_font_size_flag=\count194

(/home/yang/texmf/tex/latex/ctex/config/ctexopts.cfg
File: ctexopts.cfg 2018/01/28 v2.4.12 Option configuration file (CTEX)
)
(/home/yang/texmf/tex/latex/ctex/engine/ctex-engine-xetex.def
File: ctex-engine-xetex.def 2018/01/28 v2.4.12 XeLaTeX adapter (CTEX)

(/usr/local/texlive/2022/texmf-dist/tex/xelatex/xecjk/xeCJK.sty
Package: xeCJK 2021/12/12 v3.8.8 Typesetting CJK scripts with XeLaTeX

! Undefined control sequence.
\__clist_map_1:w #1->\ctex_disable_package:n 
                                             {#1}
l.73   { \ctex_disable_package:n {#1} }
                                       
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.


! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.73   { \ctex_disable_package:n {#1} }
                                       
You're in trouble here.  Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.

! Undefined control sequence.
\__clist_map_1:w #1->\ctex_disable_package:n 
                                             {#1}
l.73   { \ctex_disable_package:n {#1} }
                                       
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
\__clist_map_1:w #1->\ctex_disable_package:n 
                                             {#1}
l.73   { \ctex_disable_package:n {#1} }
                                       
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
\__clist_map_1:w #1->\ctex_disable_package:n 
                                             {#1}
l.73   { \ctex_disable_package:n {#1} }
                                       
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
\__clist_map_1:w #1->\ctex_disable_package:n 
                                             {#1}
l.73   { \ctex_disable_package:n {#1} }
                                       
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.74 \ctex_if_format_at_least:nTF
                                  { 2020/10/01 }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.75   { \ctex_replace_package:nn
                                  { CJKfntef } { xeCJKfntef } }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.76   { \ctex_disable_package:n
                                 { CJKfntef } }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.


(/usr/local/texlive/2022/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.st
y
Package: xtemplate 2022-01-12 L3 Experimental prototype document functions
\l__xtemplate_tmp_dim=\dimen140
\l__xtemplate_tmp_int=\count195
\l__xtemplate_tmp_muskip=\muskip16
\l__xtemplate_tmp_skip=\skip49
)
\l__xeCJK_tmp_int=\count196
\l__xeCJK_tmp_box=\box52
\l__xeCJK_tmp_dim=\dimen141
\l__xeCJK_tmp_skip=\skip50
\g__xeCJK_space_factor_int=\count197
\l__xeCJK_begin_int=\count198
\l__xeCJK_end_int=\count199
\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=\skip51
\g__xeCJK_node_int=\count266
\c__xeCJK_CJK_node_dim=\dimen142
\c__xeCJK_CJK-space_node_dim=\dimen143
\c__xeCJK_default_node_dim=\dimen144
\c__xeCJK_default-space_node_dim=\dimen145
\c__xeCJK_CJK-widow_node_dim=\dimen146
\c__xeCJK_normalspace_node_dim=\dimen147
\l__xeCJK_ccglue_skip=\skip52
\l__xeCJK_ecglue_skip=\skip53
\l__xeCJK_punct_kern_skip=\skip54
\l__xeCJK_last_penalty_int=\count267
\l__xeCJK_last_bound_dim=\dimen148
\l__xeCJK_last_kern_dim=\dimen149
\l__xeCJK_widow_penalty_int=\count268

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

\l__xeCJK_fixed_punct_width_dim=\dimen150
\l__xeCJK_mixed_punct_width_dim=\dimen151
\l__xeCJK_middle_punct_width_dim=\dimen152
\l__xeCJK_fixed_margin_width_dim=\dimen153
\l__xeCJK_mixed_margin_width_dim=\dimen154
\l__xeCJK_middle_margin_width_dim=\dimen155
\l__xeCJK_bound_punct_width_dim=\dimen156
\l__xeCJK_bound_margin_width_dim=\dimen157
\l__xeCJK_margin_minimum_dim=\dimen158
\l__xeCJK_kerning_total_width_dim=\dimen159
\l__xeCJK_same_align_margin_dim=\dimen160
\l__xeCJK_different_align_margin_dim=\dimen161
\l__xeCJK_kerning_margin_width_dim=\dimen162
\l__xeCJK_kerning_margin_minimum_dim=\dimen163
\l__xeCJK_bound_dim=\dimen164
\l__xeCJK_reverse_bound_dim=\dimen165
\l__xeCJK_margin_dim=\dimen166
\l__xeCJK_minimum_bound_dim=\dimen167
\l__xeCJK_kerning_margin_dim=\dimen168
\g__xeCJK_family_int=\count269
\l__xeCJK_fam_int=\count270
\g__xeCJK_fam_allocation_int=\count271
\l__xeCJK_verb_case_int=\count272
\l__xeCJK_verb_exspace_skip=\skip55
 (/usr/local/texlive/2022/texmf-dist/tex/latex/fontspec/fontspec.sty
Overfull \hbox (30.07999pt too wide) in paragraph at lines 73--21
[]\TU/lmr/m/n/10 CJKulemCJKvertCJKpunctCJKutf8CJK2020/10/01CJKfntefxeCJKfntefCJ
Kfntef
 []


Underfull \hbox (badness 10000) in paragraph at lines 73--21

 []

Package: fontspec 2022/01/15 v2.8a Font selection for XeLaTeX and LuaLaTeX
(/usr/local/texlive/2022/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
Package: fontspec-xetex 2022/01/15 v2.8a Font selection for XeLaTeX and LuaLaTe
X
\l__fontspec_script_int=\count273
\l__fontspec_language_int=\count274
\l__fontspec_strnum_int=\count275
\l__fontspec_tmp_int=\count276
\l__fontspec_tmpa_int=\count277
\l__fontspec_tmpb_int=\count278
\l__fontspec_tmpc_int=\count279
\l__fontspec_em_int=\count280
\l__fontspec_emdef_int=\count281
\l__fontspec_strong_int=\count282
\l__fontspec_strongdef_int=\count283
\l__fontspec_tmpa_dim=\dimen169
\l__fontspec_tmpb_dim=\dimen170
\l__fontspec_tmpc_dim=\dimen171

(/usr/local/texlive/2022/texmf-dist/tex/latex/base/fontenc.sty
Package: fontenc 2021/04/29 v2.0v Standard LaTeX package
)
(/usr/local/texlive/2022/texmf-dist/tex/latex/fontspec/fontspec.cfg)))
! Undefined control sequence.
l.4997 \ctex_at_begin_package:nn
                                 { CJKnumb }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.


! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.4997 \ctex_at_begin_package:nn { C
                                    JKnumb }
You're in trouble here.  Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.

(/usr/local/texlive/2022/texmf-dist/tex/xelatex/xecjk/xeCJK.cfg
File: xeCJK.cfg 2021/12/12 v3.8.8 Configuration file for xeCJK package
))
(/usr/local/texlive/2022/texmf-dist/tex/xelatex/xecjk/xeCJKfntef.sty
Package: xeCJKfntef 2021/12/12 v3.8.8 xeCJK font effect

(/usr/local/texlive/2022/texmf-dist/tex/generic/ulem/ulem.sty
\UL@box=\box53
\UL@hyphenbox=\box54
\UL@skip=\skip56
\UL@hook=\toks16
\UL@height=\dimen172
\UL@pe=\count284
\UL@pixel=\dimen173
\ULC@box=\box55
Package: ulem 2019/11/18
\ULdepth=\dimen174
)
\l__xeCJK_space_skip=\skip57
\c__xeCJK_ulem-begin_node_dim=\dimen175
\l__xeCJK_hidden_box=\box56
\l__xeCJK_fntef_box=\box57
\l__xeCJK_under_symbol_box=\box58
\c__xeCJK_filll_skip=\skip58
)
\ccwd=\dimen176
\l__ctex_ccglue_skip=\skip59
)
! Incomplete \iffalse; all text was ignored after line 132.
<inserted text> 
                \fi 
l.376 ...file_input:n { \c__ctex_engine_file_str }
                                                  
The file ended while I was skipping conditional text.
This kind of error happens when you say `\if...' and forget
the matching `\fi'. I've inserted a `\fi'; this might work.

! Undefined control sequence.
l.377 \NewDocumentCommand \ctexset
                                   { } { \keys_set:nn { ctex } }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.378 \NewDocumentCommand \CTEXsetup
                                     { +o > { \TrimSpaces } m }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.380 ...tex } { deprecated-command } { \CTEXsetup
                                                   }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.381       { \ctexset
                      ~ {~ #2~ =~ {~ #1~ }~ }~ is~ set. }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Illegal parameter number in definition of \l__exp_internal_tl.
<to be read again> 
                   2
l.381       { \ctexset~ {~ #2
                             ~ =~ {~ #1~ }~ }~ is~ set. }
You meant to type ## instead of #, right?
Or maybe a } was forgotten somewhere earlier, and things
are all screwed up? I'm going to assume that you meant ##.

! Illegal parameter number in definition of \l__exp_internal_tl.
<to be read again> 
                   1
l.381       { \ctexset~ {~ #2~ =~ {~ #1
                                       ~ }~ }~ is~ set. }
You meant to type ## instead of #, right?
Or maybe a } was forgotten somewhere earlier, and things
are all screwed up? I'm going to assume that you meant ##.

! Illegal parameter number in definition of \l__exp_internal_tl.
<to be read again> 
                   2
l.382 ... {#1} { \keys_set:nn { ctex / #2 } {#1} }
                                                  
You meant to type ## instead of #, right?
Or maybe a } was forgotten somewhere earlier, and things
are all screwed up? I'm going to assume that you meant ##.

! Illegal parameter number in definition of \l__exp_internal_tl.
<to be read again> 
                   1
l.382 ... {#1} { \keys_set:nn { ctex / #2 } {#1} }
                                                  
You meant to type ## instead of #, right?
Or maybe a } was forgotten somewhere earlier, and things
are all screwed up? I'm going to assume that you meant ##.

! Undefined control sequence.
l.384 \NewDocumentCommand \CTEXoptions
                                       { +o }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.386 ...x } { deprecated-command } { \CTEXoptions
                                                   }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.387       { \ctexset
                      ~ {~ #1~ }~ is~ set. }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Illegal parameter number in definition of \l__exp_internal_tl.
<to be read again> 
                   1
l.387       { \ctexset~ {~ #1
                             ~ }~ is~ set. }
You meant to type ## instead of #, right?
Or maybe a } was forgotten somewhere earlier, and things
are all screwed up? I'm going to assume that you meant ##.

! Illegal parameter number in definition of \l__exp_internal_tl.
<to be read again> 
                   1
l.388 ...alueF {#1} { \keys_set:nn { ctex } {#1} }
                                                  
You meant to type ## instead of #, right?
Or maybe a } was forgotten somewhere earlier, and things
are all screwed up? I'm going to assume that you meant ##.

! Undefined control sequence.
l.397         \ctex_select_size:
                                
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
\ctex_default_pt:n ... \dim_use:N \etex_dimexpr:D 
                                                  #1pt\scan_stop: \q_stop 
l.403 ...fault_ccwd:Nn \l__ctex_autoindent_tl {#1}
                                                  
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! You can't use `macro parameter character #' after \the.
<argument> ##
             1
l.403 ...fault_ccwd:Nn \l__ctex_autoindent_tl {#1}
                                                  
I'm forgetting what you said and using zero instead.

! Argument of \__ctex_default_pt:w has an extra }.
<inserted text> 
                \par 
l.405       }
             
I've run across a `}' that doesn't seem to match anything.
For example, `\def\a#1{...}' and `\a}' would produce
this error. If you simply proceed now, the `\par' that
I've just inserted will cause me to report a runaway
argument that might be the root of the problem. But if
your `}' was spurious, just type `2' and it will go away.

Runaway argument?
01pt\scan_stop: \q_stop =\__dim_eval:w \ctex_default_pt:n {##1 mm}\__dim_eval_e
nd: \ETC.
! Paragraph ended before \__ctex_default_pt:w was complete.
<to be read again> 
                   \par 
l.405       }
             
I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.

! Missing number, treated as zero.
<to be read again> 
                   \scan_stop: 
l.405       }
             
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)

! Illegal unit of measure (pt inserted).
<to be read again> 
                   \scan_stop: 
l.405       }
             
Dimensions can be in units of em, ex, in, pt, pc,
cm, mm, dd, cc, bp, or sp; but yours is a new one!
I'll assume that you meant to say pt, for printer's points.
To recover gracefully from this error, it's best to
delete the erroneous units; e.g., type `2' to delete
two letters. (See Chapter 27 of The TeXbook.)

! Missing = inserted for \ifdim.
<to be read again> 
                   \tex_par:D 
l.405       }
             
I was expecting to see `<', `=', or `>'. Didn't.

! Missing number, treated as zero.
<to be read again> 
                   \tex_par:D 
l.405       }
             
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)

! Illegal unit of measure (pt inserted).
<to be read again> 
                   \tex_par:D 
l.405       }
             
Dimensions can be in units of em, ex, in, pt, pc,
cm, mm, dd, cc, bp, or sp; but yours is a new one!
I'll assume that you meant to say pt, for printer's points.
To recover gracefully from this error, it's best to
delete the erroneous units; e.g., type `2' to delete
two letters. (See Chapter 27 of The TeXbook.)

! Undefined control sequence.
l.407 \NewDocumentCommand \CTEXsetfont
                                       { } { \ctex_select_size: }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.407 ...and \CTEXsetfont { } { \ctex_select_size:
                                                   }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.408 ...ew_protected_nopar:Npn \ctex_select_size:
                                                  
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
<argument> \ctex_update_size: 
                              
l.409 ...te { \ctex_update_size: } { \selectfont }
                                                   }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.410 ...ew_protected_nopar:Npn \ctex_update_size:
                                                  
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
<argument> \ctex_update_stretch: 
                                 \ctex_update_parindent: 
l.417       { \ctex_update_ziju: }
                                  
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
<argument> ...te_stretch: \ctex_update_parindent: 
                                                  
l.417       { \ctex_update_ziju: }
                                  
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.419 \tl_const:Nx \c__ctex_zero_tl
                                    { \fp_use:N \c_zero_fp }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.420 \tl_new:N \l__ctex_ziju_tl
                                
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.421 \tl_set_eq:NN \l__ctex_ziju_tl
                                     \c__ctex_zero_tl
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.421 ...t_eq:NN \l__ctex_ziju_tl \c__ctex_zero_tl
                                                  
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
\ctex_default_pt:n ... \dim_use:N \etex_dimexpr:D 
                                                  #1pt\scan_stop: \q_stop 
l.428 ...ult_ccwd:Nn \l__ctex_line_stretch_tl {#1}
                                                  
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! You can't use `macro parameter character #' after \the.
<argument> ##
             1
l.428 ...ult_ccwd:Nn \l__ctex_line_stretch_tl {#1}
                                                  
I'm forgetting what you said and using zero instead.

! Argument of \__ctex_default_pt:w has an extra }.
<inserted text> 
                \par 
.....

1 Answer 1

4

You have a rather old version of ctex installed under /home/yang/texmf/tex/latex/ctex. This version overwrites the much newer version installed with TeX Live 2022 but it is not compatible with the newer environment.

You have to remove this manually installed version in order to revert to the newer version from TeX Live.

1
  • Thanks for your help! After rm -rf /home/yang/texmf/tex/latex/ctex, I got it to work!
    – Mr.Robot
    May 26 at 13:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.