summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ctex/engine/ctex-cjk-engine.def
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/ctex/engine/ctex-cjk-engine.def')
-rw-r--r--Master/texmf-dist/tex/latex/ctex/engine/ctex-cjk-engine.def14
1 files changed, 8 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/latex/ctex/engine/ctex-cjk-engine.def b/Master/texmf-dist/tex/latex/ctex/engine/ctex-cjk-engine.def
index 05634b7663b..d0ed28a8996 100644
--- a/Master/texmf-dist/tex/latex/ctex/engine/ctex-cjk-engine.def
+++ b/Master/texmf-dist/tex/latex/ctex/engine/ctex-cjk-engine.def
@@ -29,12 +29,14 @@
\def\CTEX@endCJK{\clearpage\end{CJK*}}
\fi
-\let\CTEX@begindocumenthook\@begindocumenthook
-\let\CTEX@enddocumenthook\@enddocumenthook
-\def\AtBeginDocument{\g@addto@macro\CTEX@begindocumenthook}
-\def\AtEndDocument{\g@addto@macro\CTEX@enddocumenthook}
-\def\@begindocumenthook{\CTEX@begindocumenthook\CTEX@beginCJK}
-\def\@enddocumenthook{\CTEX@endCJK\CTEX@enddocumenthook}
+\def\@begindocumenthook{%
+ \CTEX@save@begindocumenthook%
+ \CTEX@begindocumenthook%
+ \CTEX@beginCJK}
+\def\@enddocumenthook{%
+ \CTEX@endCJK
+ \CTEX@enddocumenthook%
+ \CTEX@save@enddocumenthook}
\input{ctex-cjk-common.def}