![eso-pic 背景中的 Rotatebox 使用 scrbook 旋轉整個頁面,但在 pdfLaTeX 中則不然](https://rvso.com/image/287003/eso-pic%20%E8%83%8C%E6%99%AF%E4%B8%AD%E7%9A%84%20Rotatebox%20%E4%BD%BF%E7%94%A8%20scrbook%20%E6%97%8B%E8%BD%89%E6%95%B4%E5%80%8B%E9%A0%81%E9%9D%A2%EF%BC%8C%E4%BD%86%E5%9C%A8%20pdfLaTeX%20%E4%B8%AD%E5%89%87%E4%B8%8D%E7%84%B6.png)
我正在使用該套件在我的文件( -class)eso-pic
的背景中建立草稿標誌。scrbook
該標誌在頁面上旋轉了 45°。一切正常。我使用TeXLive
和。Kile
Suse 12.3
因為我需要TikZ
並且pgfplots
在我的文檔中我使用LaTeX
( latex -shell-escape -interaction=nonstopmode '%source'
) -> DVItoPS
( dvips -o '%S.ps' '%S.dvi'
) -> PStoPDF
( ps2pdf '%S.ps' '%S.pdf'
) 來建立 pdf。
現在我必須在每頁的左側另外插入草稿版權聲明。我確實以與原始草稿符號相同的方式製作它。但每個\part{title}
標題頁在 pdf 檢視器中都處於橫向模式。當我使用pdfLaTeX
( )編譯 MWE 時,不會發生這種情況pdflatex -interaction=nonstopmode '%source'
。也不會發生這種情況scrreprt
。
結果LateX
是:
結果pdfLaTeX
是:
使用rotating
-package 發現了類似的行為這個線程。據說 by @Micographicx
包不打算與 dvips 一起使用;它只能由直接產生 pdf 格式的 TeX 引擎/格式使用。這也是這裡的問題嗎?線程中提到的解決方法在我的情況下不起作用。有其他方法可以解決這個問題嗎?
\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}
答案1
感謝@Ulrike Fischer,成功了:ps2pdf -dAutoRotatePages=/None '%S.ps' '%S.pdf'