![eso-pic の背景にある Rotatebox は scrbook ではページ全体を回転しますが、pdfLaTeX では回転しません](https://rvso.com/image/287003/eso-pic%20%E3%81%AE%E8%83%8C%E6%99%AF%E3%81%AB%E3%81%82%E3%82%8B%20Rotatebox%20%E3%81%AF%20scrbook%20%E3%81%A7%E3%81%AF%E3%83%9A%E3%83%BC%E3%82%B8%E5%85%A8%E4%BD%93%E3%82%92%E5%9B%9E%E8%BB%A2%E3%81%97%E3%81%BE%E3%81%99%E3%81%8C%E3%80%81pdfLaTeX%20%E3%81%A7%E3%81%AF%E5%9B%9E%E8%BB%A2%E3%81%97%E3%81%BE%E3%81%9B%E3%82%93.png)
パッケージを使用して、eso-pic
ドキュメント ( -class) の背景にドラフト サインを作成していますscrbook
。サインはページ上で 45° 回転しています。すべて正常に動作します。TeXLive
とKile
を と共に使用しますSuse 12.3
。
ドキュメントにとTikZ
が必要なので、 ( ) -> ( ) -> ( ) を使用して PDF を作成します。pgfplots
LaTeX
latex -shell-escape -interaction=nonstopmode '%source'
DVItoPS
dvips -o '%S.ps' '%S.dvi'
PStoPDF
ps2pdf '%S.ps' '%S.pdf'
今度は、各ページの左側にドラフト著作権通知を追加で挿入する必要があります。 元のドラフト シンボルと同じ方法で作成します。 ただし、各\part{title}
タイトル ページは PDF ビューアーで横長モードになります。 これは、MWE をpdfLaTeX
( pdflatex -interaction=nonstopmode '%source'
) でコンパイルすると発生しません。 の場合も発生しませんscrreprt
。
結果LateX
は次のとおりです。
結果はpdfLaTeX
次のとおりです。
-packageを使用すると、rotating
同様の動作が見られました。このスレッド@Mico によると、graphicx
パッケージは 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'