1

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

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.