[XeTeX] XeTeX Digest, Vol 48, Issue 26

Yin Dian yindian at gmail.com
Tue Mar 18 12:22:55 CET 2008


Hello,

On Tue, Mar 18, 2008 at 12:59 AM, David Rangel <dprangelito at gmail.com> wrote:
> Hello,
> Is there a simple example of how to use everyshi or atbegshi
> to typeset vertical right to left Chinese text (the thread:
> http://tug.org/pipermail/xetex/2008-January/008341.html
>
> does not provide an example, and the package at

The code is in the reply, i.e.
http://tug.org/pipermail/xetex/2008-January/008342.html.

A simple example using atbegshi is as follows.

\documentclass{article}
\usepackage{atbegshi}
\AtBeginShipout{%
  \global\setbox\AtBeginShipoutBox\vbox{%
    \special{pdf: put @thispage <</Rotate 90>>}%
    \box\AtBeginShipoutBox
  }%
}%
\usepackage{zhspacing}
%\newfontfamily\zhfont[RawFeature={vertical:}]{SimSun}
\newfontfamily\zhfont[RawFeature={vertical:+vert}]{Adobe Song Std}
\let\zhpunctfont\zhfont
\zhspacing
\begin{document}
测试一下
\end{document}

The 128-page sample document sample-lyj-1.pdf on the project download
page of gezhu is right an example of vertical typesetting of long
Chinese document.

> ctug did not have an example that would serve as a guide
> for this issue).
> On a separate, but related note, the packages gezhu and zhspacing
> give the following error when run on a simple document:
>
> ....
> (/usr/local/texlive/2007/../texmf-local/tex/xelatex/fontspec/fontspec.cfg))kpathsea:
> Running mktextfm SimHei/ICU
> /usr/local/texlive/2007/texmf/web2c/mktexnam: Could not map source
> abbreviation I for ICU.
> /usr/local/texlive/2007/texmf/web2c/mktexnam: Need to update
> /usr/local/texlive/2007/texmf-dist/fonts/map/fontname/special.map?

This is the reason it failed for.

>
> Now, I was able to get the package to work on the example:
> testgezhu-xelatex.tex,
> but only by replacing SimSun by BauiKai in the \zhfont selection. Then I was
> able
> to typeset the document, but only with characters that were NOT vertically
> rotated
>
> Is there not a simpler way to typeset Chinese text vertically using the
> basic XeLaTeX
> compilation without having to use these additional packages and using the
> \setromanfont[Scale=2.5,Vertical=RotatedGlyphs]{LiSong Pro}
> option?
> Thank you for any input,

You can use just atbegshi and fontspec. Example as follows. But you
cannot benefit from the zhspacing package then.

\documentclass{article}
\usepackage{atbegshi}
\AtBeginShipout{%
  \global\setbox\AtBeginShipoutBox\vbox{%
    \special{pdf: put @thispage <</Rotate 90>>}%
    \box\AtBeginShipoutBox
  }%
}%
\usepackage{fontspec}
\XeTeXlinebreaklocale "zh"
\XeTeXlinebreakskip=0pt plus 0.1em
\setmainfont[RawFeature={vertical:+vert}]{Adobe Song Std}
\begin{document}
测试一下
\end{document}


> David
>
> PS if these questions are too basic for this forum, could you suggest where
> I should
> turn for more remedial help on typesetting Chinese text with complex layout?

If you're good at Chinese, you can visit the TeX board of SMTH BBS. I
suggest using a terminal software to telnet bbs.newsmth.net.

>

HTH.

-YIN Dian


More information about the XeTeX mailing list