Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to move a Chinese punctuation mark to the head of a character. I am using the following macro, which works fine. But if I redefine the \CJKpunctsymbol, it will be a messy. Can any one help me on this?

works fine code - which directly apply to a punctuation:

\hskip -0.9em \vbox to 0.1em {\vskip -1em{\hbox to 0.9em {。}}}

Redefine \CJKpunctsymbol - the \hbox will be very long and can't resize.

\def\vCJKpunctsymbol#1{\hskip -0.9em \vbox to 0.1em {\vskip -1em {\hbox to 0.9em {\CJKsymbol{#1}}}}}
\let\CJKpunctsymbol\vCJKpunctsymbol

The following 2 pictures are examples. I use \fbox to make it clear.

enter image description here enter image description here

share|improve this question
1  
Welcome to TeX.sx. It would be helpful to add a complete compilable example document that includes the code fragments you post. This will make it easier for people to play around with your problem. –  Alan Munn Jan 26 '13 at 16:53
add comment

1 Answer

up vote 3 down vote accepted

For old-style punctuation (句读), I think it can be defined like this:

\catcode`。\active
\def。{\makebox[0pt][l]{\hskip-.25em\raisebox{1ex}{\string。}}}

No xeCJK punctuation features should be used, since the current version of xeCJK does not support vertical typesetting properly.

An example:

\documentclass{article}
\usepackage{xeCJK}

\setCJKmainfont[RawFeature={script=hani:language=CHN:vertical:+valt}]{SimSun}

\catcode`。\active
\def。{\makebox[0pt][l]{\hskip-.25em\raisebox{1ex}{\string。}}}
\catcode`、\active
\def、{\makebox[0pt][l]{\hskip-.25em\raisebox{1ex}{\string、}}}

\begin{document}

\rotatebox{-90}{%
子曰。学而时习之、不亦说乎。}

\end{document}

enter image description here

share|improve this answer
    
\makebox[0pt][l] is the same as \rlap. –  Leo Liu Apr 5 '13 at 10:57
2  
A simpler way to do the same is with newunicodechar: \newunicodechar{。}{\makebox[0pt][l]{\hskip-.25em\raisebox{1ex}{。}}} (you don't even need \string) –  egreg Apr 5 '13 at 11:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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