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 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?

share|improve this question
    
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
    
@Ulrike: Thanks for pointing this out. –  Martin Scharrer Apr 20 '11 at 11:40

2 Answers 2

up vote 2 down vote accepted
\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.

share|improve this answer
    
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:

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.

share|improve this answer

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.