General ⇒ write text into a graphic
write text into a graphic
begin{figure}[h!]
\centering
\put(10,50){$F_N$}
\includegraphics[width=1.00\textwidth]{images/RubbingTIP.jpg}
\caption{Dynamic Forces which are involved while Crocking}
\label{fig:Dynamic Forces which are involved while Crocking}
...how can i add words into this graphic to explain it a bit???
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Re: write text into a graphic
write text into a graphic
Code: Select all
\documentclass[a4paper]{article}
\usepackage{graphicx}
\usepackage{pict2e}
\begin{document}
\begin{figure}[!h]
\centering
\setlength{\unitlength}{0.1\textwidth}
\begin{picture}(10,9)
\put(0,0){\includegraphics[width=\textwidth]{lion_orig.png}}
\put(0.5,8.5){books}
\put(0.8,8.45){\vector(1,-1){1.3}}
\put(0.1,0.1){\framebox(2,1){The \TeX book}}
\put(7.5,8){\dashbox{0.2}(2.5,1){The CTAN lion}}
\end{picture}
\caption{The CTAN lion is an artwork by Duane Bibby.}
\label{fig:lion}
\end{figure}
\end{document}
By the way, in the optional argument of figure, put ! before h, not after. Likewise, the argument of \label should be a short text. It is just a "label" to identify the figure, so you can cite it using \ref. Don't repeat the caption!
write text into a graphic
That's probably the easiest way to do it but the downside is that in-text font will ususally not match that on the graphic and that image editing software rarely (never?) has support for math.spiegboy wrote:just edit the picture with photoshop, imagj, acdsee, anysoftware you are familiar with, coz all of them have the basic function to add text into the pictures.
\put command should be used inside of the picture environment:0.8.15 wrote:begin{figure}[h!]
\centering
\put(10,50){$F_N$}
\includegraphics[width=1.00\textwidth]{images/RubbingTIP.jpg}
\caption{Dynamic Forces which are involved while Crocking}
\label{fig:Dynamic Forces which are involved while Crocking}
[...]
Code: Select all
\begin{figure}[h!]
\centering
\begin{picture}(100,60)% width and height of the picture
\put(0,0){\includegraphics[width=1.00\textwidth]{images/RubbingTIP.jpg}}
\put(10,50){$F_N$}
\end{picture}
\caption{Dynamic Forces which are involved while Crocking}
\label{fig:RubbingTIP}
\end{figure}
Another solution is to use TikZ and put your graphic into a node:
Code: Select all
\documentclass[a4paper]{article}
\usepackage{graphicx}
\usepackage{tikz}
\begin{document}
\begin{figure}[h!]
\centering
\begin{tikzpicture}
\node[above right] (img) at (0,0) {\includegraphics[width=1.00\textwidth]{images/RubbingTIP.jpg}};
\node at (10pt,50pt) {$F_N$};
\end{tikzpicture}
\caption{Dynamic Forces which are involved while Crocking}
\label{fig:RubbingTIP}
\end{figure}
\end{document}
Cheers,
Tomek
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
write text into a graphic
The overpic package offers a solution for overlaying a picture with text or other LaTeX structures. In principal this is a similar approach as the suggestions from Juanjo and T3. working also with the picture environment and the graphicx package. Take a look at the documentation to learn more.0.8.15 wrote:how can i write text into a graphic. i tryed it like [...] how can i add words into this graphic to explain it a bit???
Best regards and welcome to the board
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: write text into a graphic

..........................................................................
\usepackage[percent]{overpic}
...
\begin{overpic}%[width=10cm,grid,tics=10]
{Bild}
\put(20,30){Text}
\end{overpic}