summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ctex/engine/ctex-cjk-common.def
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/ctex/engine/ctex-cjk-common.def')
-rw-r--r--Master/texmf-dist/tex/latex/ctex/engine/ctex-cjk-common.def17
1 files changed, 12 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/latex/ctex/engine/ctex-cjk-common.def b/Master/texmf-dist/tex/latex/ctex/engine/ctex-cjk-common.def
index 3f76fe44d4a..ad641c45ecf 100644
--- a/Master/texmf-dist/tex/latex/ctex/engine/ctex-cjk-common.def
+++ b/Master/texmf-dist/tex/latex/ctex/engine/ctex-cjk-common.def
@@ -14,13 +14,20 @@
\CTEX@save@set@fontsize{#1}{#2}{#3}%
\CTEXsetfont}
\newcommand*\ziju[1]{% 字距
- \settowidth\@tempdima{\CTEX@spaceChar}%
- \renewcommand{\CJKglue}{\hskip #1\@tempdima\@plus.08\baselineskip\relax}%
- \CTEXsetfont} % is it a good definition?
+ \begingroup
+ \settowidth\@tempdima{\CTEX@spaceChar}%
+ \expandafter\endgroup%
+ \expandafter\renewcommand%
+ \expandafter\CJKglue%
+ \expandafter{\expandafter\hskip\the\dimexpr#1\@tempdima\relax\@plus.08\baselineskip\relax}%
+ \CTEXsetfont} % is it a good definition?
\newdimen\ccwd % 字宽
\newcommand*\CTEXsetfont{%
- \settowidth\ccwd{\CTEX@spaceChar\CJKglue}%
- \ifdim\parindent=0pt\else\parindent2\ccwd\fi}
+ \begingroup
+ \settowidth\ccwd{\CTEX@spaceChar\CJKglue}%
+ \expandafter\endgroup\expandafter\ccwd\the\ccwd\relax
+ \unless\ifdim\parindent=\z@\parindent2\ccwd\fi}
+\def\CTEX@spaceChar{\hskip \f@size \p@\relax}
\ifCTEX@fntef
\def\CTEXunderdot{\CJKunderdot}
\def\CTEXunderline{\CJKunderline}