# [Tex/LaTex] Vertical Chinese text with XeTeX

cjkxetex

How can I place vertical Chinese text for some of the text in a document?

I know only some discussion for Chinese. There are some discussions and tools for vertical Japanese, but I know little about it.

I'm sorry that vertical typesetting options are still not available in xeCJK. It is indeed in the TODO list, but not urgent at all.

For vertical typesetting, some techniques are needed:

• Rotate the glyphs. It can be obtained by setting the font with special options.
• Rotate the whole paragraph or whole page. Use \rotatebox from graphics bundle, or use special commands of XeTeX like pdflscape package do.
• Use correct vertical punctuations. It is a special OpenType font feature.
• Offset the glyphs a little. Like CJKvert package do. We can hack xeCJK to do this.
• Some extra tools like gezhu package. (not shown in the example below)

A full example:

\documentclass{article}

\usepackage{graphicx} % for \rotatebox

\usepackage{xeCJK}
\newfontlanguage{Chinese}{CHN}
\setCJKmainfont{SimSun}
\setCJKfamilyfont{songvert}[Script=CJK,Language=Chinese,Vertical=RotatedGlyphs]{SimSun}

\newcommand*\CJKmovesymbol[1]{\raise.35em\hbox{#1}}
\newcommand*\CJKmove{\punctstyle{plain}% do not modify the spacing between punctuations
\let\CJKsymbol\CJKmovesymbol
\let\CJKpunctsymbol\CJKsymbol}

\begin{document}

\begin{center}
\rotatebox{-90}{\fbox{\begin{minipage}{10em}
\CJKfamily{songvert}\CJKmove
『朝发轫于苍梧兮，\\

\end{minipage}}}
\end{center}

\end{document}