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

\catcode`\。 = \active

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.


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

% For GBK
% Put it after \begin{document}
\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}
    \old@e@iii ^^80#1%

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.