Debian Codegraph @

texmf-dist/tex/generic/tex4ht/ctexart-hooks.4ht

raw
1 % ctexart-hooks.4ht (2022-06-14-13:41), generated from tex4ht-4ht.tex
2 % Copyright 2022 TeX Users Group
3 %
4 % This work may be distributed and/or modified under the
5 % conditions of the LaTeX Project Public License, either
6 % version 1.3c of this license or (at your option) any
7 % later version. The latest version of this license is in
8 % http://www.latex-project.org/lppl.txt
9 % and version 1.3c or later is part of all distributions
10 % of LaTeX version 2005/12/01 or later.
11 %
12 % This work has the LPPL maintenance status "maintained".
13 %
14 % The Current Maintainer of this work
15 % is the TeX4ht Project <http://tug.org/tex4ht>.
16 %
17 % If you modify this program, changing the
18 % version identification would be appreciated.
19 \immediate\write-1{version 2022-06-14-13:41}
20
21 \ExplSyntaxOn
22
23 % prevent multiple execution of this file
24 \ifdefined\l_save_engine_str\endinput\fi
25 \str_new:N \l_save_engine_str
26 % stop processing if the engine is pdftex, we want to change processing only for LuaTeX
27 \def\l_save_engine_str{pdftex}
28 \str_if_eq:NNTF \c_sys_engine_str\l_save_engine_str{\ExplSyntaxOff\endinput}{}
29
30 % the luatexja package causes fatal error
31 \:dontusepackage{luatexja}
32
33 % fix compilation errors
34 \AddToHook{package/ctexhook/after}{
35 % don't let ctex to insert any files
36 \cs_set:Npn \ctex_file_input:n #1{}
37 % define some macros that are declared in the input files, and which are needed in the class
38 \cs_set:Npn \ctex_add_to_selectfont:n #1{}
39 \dim_new:N \ccwd
40 \skip_new:N \l__ctex_ccglue_skip
41 \cs_set_protected:Npn \ctex_update_em_unit:
42 { \dim_set:Nn \ccwd { \f@size \p@ } }
43 \cs_set_protected:Npn \ctex_update_ccglue: {}
44 }
45
46 \ExplSyntaxOff
47 \endinput
48