diff options
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.def | 69 |
1 files changed, 69 insertions, 0 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 new file mode 100644 index 00000000000..ab3ebad6e3a --- /dev/null +++ b/Master/texmf-dist/tex/latex/ctex/engine/ctex-cjk-engine.def @@ -0,0 +1,69 @@ +% ctex-cjk-engine.def: for LaTeX engine with CJK +% vim:ft=tex + +\ifCTEX@GBK + \RequirePackage{CJK}[2003/03/28] +\else + \RequirePackage{CJKutf8}[2003/03/28] +\fi +\RequirePackage{CJKnumb}[2003/03/28] + +\ifCTEX@punct + \RequirePackage{CJKpunct}[2009/05/06] +\fi + +\AtEndOfPackage{\CJK@makeActive} + +\ifCTEX@space + \ifCTEX@GBK + \def\CTEX@beginCJK{\begin{CJK}{GBK}{rm}} + \else + \def\CTEX@beginCJK{\begin{CJK}{UTF8}{rm}} + \fi + \def\CTEX@endCJK{\clearpage\end{CJK}} +\else + \ifCTEX@GBK + \def\CTEX@beginCJK{\begin{CJK*}{GBK}{rm}\CJKtilde} + \else + \def\CTEX@beginCJK{\begin{CJK*}{UTF8}{rm}\CJKtilde} + \fi + \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} + +\input{ctex-cjk-common.def} + +\providecommand*\CTEX@rm@family{} +\providecommand*\CTEX@sf@family{} +\providecommand*\CTEX@tt@family{} + +\ifCTEX@nofonts + \renewcommand*\CTEX@rm@family{gbsn} + \renewcommand*\CTEX@sf@family{gbsn} + \renewcommand*\CTEX@tt@family{gbsn} +\else + \ifCTEX@cjkfonts + \input{ctex-cjk-cjkfonts.def} + \else\ifCTEX@winfonts + \input{ctex-cjk-winfonts.def} + \else\ifCTEX@adobefonts + \input{ctex-cjk-adobefonts.def} + \fi\fi\fi +\fi + +\let\CTEX@save@rmfamily\rmfamily +\renewcommand*\rmfamily{\CTEX@save@rmfamily\CJKfamily{\CTEX@rm@family}} +\let\CTEX@save@sffamily\sffamily +\renewcommand*\sffamily{\CTEX@save@sffamily\CJKfamily{\CTEX@sf@family}} +\let\CTEX@save@ttfamily\ttfamily +\renewcommand*\ttfamily{\CTEX@save@ttfamily\CJKfamily{\CTEX@tt@family}} +\let\CTEX@save@normalfont\normalfont +\renewcommand*\normalfont{\CTEX@save@normalfont\CJKfamily{\CTEX@rm@family}} + +\endinput |