TeX - LaTeX Asked on February 26, 2021
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
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}
Correct answer by Skillmon on February 26, 2021
A variant code:
documentclass{article}
usepackage{graphicx}
usepackage{eso-pic}
usepackage{lipsum}
begin{document}
AddToShipoutPictureBG{AtPageUpperLeft{hspace*{paperwidthllap{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}
Answered by Bernard on February 26, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP