1

I am using the eso-pic package to create a draft sign in the background of my document (scrbook-class). The sign is rotated 45° on the page. Everything works fine. I use TeXLive and Kile with Suse 12.3.

Since I need TikZ and pgfplots in my document I use LaTeX (latex -shell-escape -interaction=nonstopmode '%source') -> DVItoPS (dvips -o '%S.ps' '%S.dvi') -> PStoPDF (ps2pdf '%S.ps' '%S.pdf') to create the pdf.

Now I have to additionally insert a draft-copyright notice on the left hand side of every page. I do produce it the same way I did with the original draft-symbol. But each \part{title} titlepage is put in landscape mode in the pdf-viewer. This does not happen when I compile my MWE with pdfLaTeX (pdflatex -interaction=nonstopmode '%source'). It also doesn't happen with scrreprt.

The LateX-result is: LaTeX result:

The pdfLaTeX result is:

pdfLaTeX-result:

Using the rotating-package a similar behaviour was found in this thread. It was said that by @Mico graphicx package is not intended to be used together with dvips; it should only be used by a TeX engine/format that produces pdf format directly. Is this the problem here also? The workaround mentioned in the thread does not work in my case. Is there any other way to fix this?

\documentclass[openany]{scrbook}

\usepackage{graphicx}
\usepackage{lipsum}
\usepackage{type1cm,eso-pic}
\usepackage{xcolor}

\makeatletter
\AddToShipoutPicture{%
\setlength{\@tempdimb}{.5\paperwidth}%
\setlength{\@tempdimc}{.5\paperheight}%
\setlength{\unitlength}{1pt}%
\put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){%
% Draft
%\makebox(0,0){\rotatebox{45}{\textcolor[gray]{0.75}% <- it doesn't happen here
%{\fontsize{3cm}{3cm}\selectfont{Draft}}}}%
% Copyright
\makebox(-500,-0){\rotatebox{90}{\textcolor[gray]{0.75}% <- it does here
{\fontsize{0.7cm}{0.7cm}\selectfont{Draft \textcopyright Copyright \the\year{} - Copyright owner}}}}
}%
}
\makeatother

\begin{document}

\part{Part 1}

\chapter{Chapter 1}

\section{Section 1}

\lipsum[1-2]

\section{Section 2}

\lipsum[1-2]

\chapter{Chapter 2}

\lipsum[1-4]

\part{Part 2}

\chapter{Chapter 1}

\lipsum[1-6]

\chapter{Chapter 2}

\lipsum[1-6]

\end{document}
  • 2
    ps2pdf/ghostscript tries to be clever and autorotates the page. tex.stackexchange.com/a/126874/2388. And you don't need to use the latex+dvips-way for tikz and pgfplots. pdflatex will work fine with them. – Ulrike Fischer Mar 26 '14 at 13:17
  • For sake of completeness: ps2pdf -dAutoRotatePages=/None '%S.ps' '%S.pdf' – raedma Mar 26 '14 at 13:38
0

Thanks to @Ulrike Fischer this did the trick: ps2pdf -dAutoRotatePages=/None '%S.ps' '%S.pdf'

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.