I known there is a landscape command to set horizontal pages, but this is not I want. My purpose is to typeset vertical CJK with XeLaTeX. The general approach is using \rotatebox{-90} get a vertical paragraph in a box. It works for a single paragraph in one page; The disadvantage is that it can not deal with more complex situations such as multiple pages. I am wondering if there is a way to rotate the all pages?
Asked
Active
Viewed 1,179 times
1
Martin Scharrer
- 262,582
Ma Ming
- 2,306
2 Answers
2
\documentclass[nofonts]{ctexart}
\newfontlanguage{Chinese}{CHN}
\setCJKmainfont[Script=CJK,Language=Chinese,Vertical=RotatedGlyphs]{SimSun}
% rotate the page
\usepackage{everypage}
\AddEverypageHook{\special{pdf: put @thispage <</Rotate 90>>}}
\begin{document}
帝高陽之苗裔兮,朕皇考曰伯庸。
\end{document}
BTW, you'd better discuss these topics at CTeX forum . It is strange to answer your question here for me.
Leo Liu
- 77,365
-
Thanks for the link, now I know where we can send others with these issues. – Matthew Leingang Apr 20 '11 at 17:33
1
This is possible with the pgfpages package that is part of the pgf bundle. Unfortunately there is a bug in the 2.10 release. There is a simple fix, though, which you can patch in like this:
792a793,801
> % MPL 2011-04-20 08:04:45
> % patch to fix bug in rotation. See
> % http://old.nabble.com/pgfpages-and-rotation-tt26508856.html#a26508856
> % \expandafter\ifx\csname pgfpages@p@\the\pgf@cpn @rotation\endcsname\relax%
> % \pgfscope%
> % \else%
> % \pgflowlevel{\pgftransformrotate{\csname pgfpages@p@\the\pgf@cpn @rotation\endcsname}}%
> % \fi%
> \pgfscope%
794d802
< \pgfscope%
(the only substantial change is that a \pgfscope macro is moved from within an \ifx...\fi to before it.)
Here is a sample to see how it works:
\documentclass{article}
\usepackage{lipsum} % just for dummy text
\usepackage{pgfpages}
\pgfpagesdeclarelayout{down}{}{%
\pgfpagesphysicalpageoptions
{%
logical pages=1,%
physical height=8.5in,
physical width=11in
}
\pgfpageslogicalpageoptions{1}
{%
rotation=-90,
center=\pgfpoint{0.5\pgfphysicalwidth}{0.5\pgfphysicalheight}%
}%
}
\pgfpagesuselayout{down}
\begin{document}
\lipsum
\end{document}
This was all going great until I tried compiling with xelatex, and I got that the physical page size did not change. But we are 90% there.
Matthew Leingang
- 44,937
- 14
- 131
- 195
pdflscapebut I don't think it will work for XeLaTeX. – Martin Scharrer Apr 20 '11 at 11:13