summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ctex/engine
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-06-19 17:47:26 +0000
committerKarl Berry <karl@freefriends.org>2014-06-19 17:47:26 +0000
commite815d4236bb93715bb9a6f65344801fd162b7804 (patch)
treef24faa4ebd6de41ea1654f87e092ce60bbdb51f0 /Master/texmf-dist/tex/latex/ctex/engine
parent478ffbd5d9576be24a344bb31a35e3b027800960 (diff)
ctex (9jun14)
git-svn-id: svn://tug.org/texlive/trunk@34313 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ctex/engine')
-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}