0

A common method to replace the ideographic fullstop () with fullwidth fullstop () is to change the catcode:

\catcode`\。 = \active
\let。=.

However, this method will break when using CJK package with pdfLaTeX since this package has already made to be a macro. So how to achieve this effect with CJK?

PS: I use UTF8 encoding.

1 Answer 1

1

I have found a similar question but for GBK encoding (in Chinese). Here is the solution:

% For GBK
% Put it after \begin{document}
\let\oldaone^^a1
\def^^a1#1{\ifnum`#1=`^^a3\relax ^^a3^^ae\else \oldaone #1\fi}

I have modified it for UTF8:

% For UTF8
% Put it after \begin{document}
\makeatletter
\let\old@e@iii=^^e3
\def^^e3^^80#1{%
  \ifnum`#1=`^^82\relax
    ^^ef^^bc^^8e%
  \else
    \old@e@iii ^^80#1%
  \fi}
\makeatother

Things like ^^xx are actually how the characters are represented under certain encodings: ^^e3^^80^^82 is "。" and ^^ef^^bc^^8e is "." in UTF8.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .