Graphics, Figures & Tablespicture over text?

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
pnemeth1981
Posts: 5
Joined: Mon Mar 08, 2010 3:06 am

picture over text?

Post by pnemeth1981 »

Dear All,

I am working on my signature page for a thesis. I have a list of professors and blank lines for their signatures. For one of them I must use a scanned picture, it is currently a transparent png. I can insert this picture with \includegraphics{} and it is nice, except one thing: the picture (and signature) is under the line.
Does anyone have an idea how I could switch the two? To send the line in the back and keep the picture on the front?

Code: Select all

\vspace{0.1in}
%\hrule
\begin{figure}[!h]
\centering
\includegraphics[bb=800 450 900 460,width=.3cm]{signature.png}
\end{figure}  
\line(1,0){180}
\end{center} 
thanks,
Peter
Last edited by pnemeth1981 on Fri Apr 09, 2010 6:28 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

picture over text?

Post by frabjous »

Your snippet is pretty much useless without seeing the context it's in.

For example, you've got \end{center} with no matching \begin{center}... how are we supposed to guess how that works?

But there's a lot of weirdness to the snippet, such as why you put it inside a figure environment. Surely this is not going in a list of figures, nor is this a float, so why do that?

The options for the graphics don't make a lot of sense either. A width of 0.3cm? Whose signature is that short? I actually expect the bounding box is what's misplacing the signature, though it's impossible to tell without access to the actual .png file.

But if it were me, I'd probably try something like this:

Code: Select all

\begin{center}
\vspace{0.1in}
\underline{\parbox{180pt}{\centering\includegraphics{signature.png}}}
\end{center}
...and leave out both the figure environment and the \line command altogether.

If I needed to crop or resize the .png I'd probably do it in an external editor, like the GIMP. I suppose you could resize and/or crop with options from inside LaTeX, but I don't usually find that that works out as well.
pnemeth1981
Posts: 5
Joined: Mon Mar 08, 2010 3:06 am

Re: picture over text?

Post by pnemeth1981 »

Frabjous,

Thanks for your reply! I could explain those "bungling", but as they do not make much sense I don't even try. Your solution works, it is clear and neat. However, this way latex underlines the entire picture and not just the signature. Usually some parts of signatures are below the line and most of them are above, depending on the person who signs. It would be nicer to be able to use the \underline as a background for the signature. Right now the line goes over it. Is this possible?


thanks
Peter
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

picture over text?

Post by frabjous »

It's fairly crude, but you could do something like:

Code: Select all


\begin{center}

\underline{\hspace{180pt}}

\vspace*{-2\baselineskip}

\includegraphics{signature.png}

\end{center}

You'll need to tweak the \vspace until the png is positioned where you want it.

Or someone else will probably have a better idea.
pnemeth1981
Posts: 5
Joined: Mon Mar 08, 2010 3:06 am

Re: picture over text?

Post by pnemeth1981 »

Yes, this is it! Problem solved, thanks for your help!

Peter
Post Reply