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?

  • Do you know want all pages, i.e. the complete document in landscape as the title says, or only several pages? For pdfLaTeX I would suggest pdflscape but I don't think it will work for XeLaTeX. – Martin Scharrer Apr 20 '11 at 11:13
  • @Martin Scharrer I am going to rotate all the pages with rotated text. – Ma Ming Apr 20 '11 at 11:16
  • Is there a way to rotate pages with unrotated text? – Martin Scharrer Apr 20 '11 at 11:18
  • 1
    @Martin pdflscape works fine xelatex. – Ulrike Fischer Apr 20 '11 at 11:38

% rotate the page
\AddEverypageHook{\special{pdf: put @thispage <</Rotate 90>>}}


BTW, you'd better discuss these topics at CTeX forum . It is strange to answer your question here for me.

  • Thanks for the link, now I know where we can send others with these issues. – Matthew Leingang Apr 20 '11 at 17:33

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:

> % 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%
<           \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:

\usepackage{lipsum} % just for dummy text

    logical pages=1,%
    physical height=8.5in,
    physical width=11in


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.

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.