
eso-pic
ページの右上に右揃えで印刷するにはどうすればいいですか?
マニュアルはここにあります: http://ctan.math.utah.edu/ctan/tex-archive/macros/latex/contrib/eso-pic/eso-pic.pdf
答え1
以下のように、コンテンツを好きなように配置します。コンテンツを少し移動するには、0pt
好みに合わせて を変更します。
\documentclass[]{article}
\usepackage{eso-pic}
\AddToShipoutPictureBG
{%
\put(\LenToUnit{\paperwidth-0pt},\LenToUnit{\paperheight-0pt})
{%
\llap % make it overlap to the left from this point
{%
\raisebox{-\height} % move it down a bit to make it top-aligned
{\parbox{5cm}{\blindduck}}% contents
}%
}%
}
\usepackage{duckuments} % dummy text
\begin{document}
\mbox{}% produces one empty page
\end{document}
答え2
バリアントコード:
\documentclass{article}
\usepackage{graphicx}
\usepackage{eso-pic}
\usepackage{lipsum}
\begin{document}
\AddToShipoutPictureBG{\AtPageUpperLeft{\hspace*{\paperwidth\llap{\raisebox{-\height}{\includegraphics{pepe-le-pew2}}}}}}
\lipsum[1]
\begin{figure}[!h]
\centering
\includegraphics{pepe-le-pew2}
\caption{Pepe le Pew in action}
\end{figure}
\end{document}