9

I googled to find the answers to the above question. But by "label" I mean labeling the figure, not the label that is used for referencing. Let me explain.

Say I am making a figure for a high school presentation which shows various parts of a PC: the CPU, the monitor, the keyboard, the mouse, etc. I can insert the labels using a software like MS Paint. But inserting equations, letters with subscripts, superscripts is a very difficult using softwares like MS Paint.

For the same purposes I would like to use LaTeX. Is there a way to do that?

Another reason for wanting to use Latex is that Latex will perhaps create text in the form of vectors, i.e. the text will most likely not pixelate when zoomed into.

lockstep
  • 250,273
Shashank Sawant
  • 6,557
  • 11
  • 37
  • 49

1 Answers1

11

Here's an adaptation of Caramdir's excellent answer to Drawing on an image with TikZ :

\documentclass{article}
\usepackage{graphicx}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}[
every pin edge/.style={thick,blue!50},pin distance=15mm,
cir/.style = {align=center,circle,fill=blue!50,minimum size=6pt,inner sep=0pt}
]

\node[anchor=south west,inner sep=0] (image) at (0,0) 
  {\includegraphics[width=0.45\textwidth]{ctanlion}};
\begin{scope}[x={(image.south east)},y={(image.north west)}]
  \node [cir,pin=110:{The \TeX book}] at (0.16,0.45) {};
  \node [cir,pin=60:\parbox{4cm}{CTAN lion \\ by Duane Bibby}] at (0.76,0.65) {};
\end{scope}
\end{tikzpicture}

\end{document}

enter image description here

Gonzalo Medina
  • 505,128