Page Layouttextpos does not place text over pictures

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
sk
Posts: 8
Joined: Wed Sep 08, 2010 10:11 am

textpos does not place text over pictures

Post by sk »

Hi,

I was looking for a way to place text over pictures and I have found the package textpos. The problem is that when I tried to place some text over an image, it does not work as expected. Here it is an small example:

Code: Select all

\usepackage[top=2cm, bottom=4cm, left=3cm, right=3cm]{geometry} 
\usepackage[pdftex]{graphicx}
\usepackage[absolute,showboxes]{textpos}

\begin{document}
\begin{titlepage}
\begin{figure}[ht]
\begin{center}
\includegraphics[scale=0.4]{img/logoEolicos.PNG}
\end{center}
\end{figure}

\begin{figure}[!h]
\begin{center}
\includegraphics[scale=0.7]{img/degradado.PNG}
\end{center}
\end{figure}

\begin{textblock}{4}(3,3)
\begin{center}
\Huge{Example}\\
\vspace*{0.4 in}
\large{sk} \\
\vspace*{0.4 in}
\today
\end{center}
\end{textblock}
\end{titlepage}
\clearpage
\end{document}
I also attach the code and the pdf so you can see the behaviour by yourselves.
Attachments
example.zip
(52.77 KiB) Downloaded 163 times
Last edited by sk on Fri Sep 10, 2010 9:07 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

textpos does not place text over pictures

Post by gmedina »

Hi,

use the overlay option for textpos:

Code: Select all

\usepackage[absolute,showboxes,overlay]{textpos}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

textpos does not place text over pictures

Post by localghost »

Just use the overpic package. Via Forum Search you will obtain examples of use.



Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
sk
Posts: 8
Joined: Wed Sep 08, 2010 10:11 am

Re: textpos does not place text over pictures

Post by sk »

Thank you all for the quick answer. The overlay option for textpos worked great, just as I expected. I will try as well the overpic package.
Post Reply