How to use eso-pic to print, right-aligned, at the top-right of the page?
The manual can be found here: http://ctan.math.utah.edu/ctan/tex-archive/macros/latex/contrib/eso-pic/eso-pic.pdf
How to use eso-pic to print, right-aligned, at the top-right of the page?
The manual can be found here: http://ctan.math.utah.edu/ctan/tex-archive/macros/latex/contrib/eso-pic/eso-pic.pdf
A variant code:
\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}
\paperwidth but only at the end, giving the entire argument to \hspace instead of putting it after \hspace.
– Skillmon
Sep 01 '20 at 10:16
The following places the contents like you want them. To move the contents a bit just change the 0pt to your liking.
\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}