Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In LaTeX, how can I place text over an imported graphics object? [closed]

Tags:

image

latex

I have an image in the eps format that I want to include in my document. The image contains only the geometry of the object; it does not contain the necessary text. It has some arrows, and I'd like to add the text in LaTeX so the labels (which include math) look clean.

How can I place an equation at a particular location over an imported figure?

like image 801
Sam Harwell Avatar asked Jan 27 '10 21:01

Sam Harwell


People also ask

How do I put text over a picture in LaTeX?

Including images in your LaTeX document requires adding: \usepackage{graphicx} to the beginning/preamble of your document. \includegraphics{ } command tells LaTeX to insert the image. To upload an image, click the upload button, and upload your image file.

How do I put text over a picture in overleaf?

It's really easy, just add the \caption{Some caption} and inside the braces write the text to be shown. The placement of the caption depends on where you place the command; if it's above the \includegraphics then the caption will be on top of it, if it's below then the caption will also be set below the figure.

How do I make sure an image is after text in LaTeX?

In general text you can force a LaTeX image to stay where it is placed in the code using the [! h] command in the figure environment.

What does HTBP mean in LaTeX?

The [htbp] controls where the table or figure is placed. Tables and figures do not need to go where you put them in the text. LATEX moves them around to prevent large areas of white space from appearing in your paper.


3 Answers

You can use pgfonlayer and tikz. It is a bit complicated, but here is an example I have from a beamer presentation:

 \pgfdeclarelayer{foreground}
 \pgfdeclarelayer{background}
 \pgfsetlayers{background,main,foreground}
 \begin{tikzpicture}
 \begin{pgfonlayer}{foreground}
      \path  (1.0,2.0) node (c) {{\color{blue} Some info...}}
         (1.0,1.5) node (b) {{\color{blue}... which is cool!}};
 \end{pgfonlayer}
 \begin{pgfonlayer}{background}
   \path      (0,0) node (o) {
      \includegraphics[width=\textwidth]{./figures/somefigure.eps}};
 \end{pgfonlayer}
 \end{tikzpicture}
like image 119
Yngve Avatar answered Nov 26 '22 16:11

Yngve


Look at the overpic package by Rolf Niepraschk: http://www.ctan.org/pkg/overpic It combines includegraphics (graphicx package) and a picture environment. It is very easy to use!

like image 40
LaTeX-User Avatar answered Nov 26 '22 15:11

LaTeX-User


The psfrag package enables you to splice arbitrary LaTeX, including math, in place of text appearing in a .eps file. I find it indispensable.

like image 21
Norman Ramsey Avatar answered Nov 26 '22 15:11

Norman Ramsey