I write some of my network notes in TeX. I wanted to make a table, and inside it insert an image:
.
I wrote a document:
\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{booktabs}
\usepackage{array}
\begin{document}
\begin{tabular}{m{3cm}m{3cm}m{5cm}}
\toprule
Configuration for ... & Commands & Topology\\
\midrule
PPP: CHAP, PAP & \#sh int se 0/0/0 & \includegraphics[width=4cm, height=4cm]{chappap.png}\\
& & \\
\bottomrule
\end{tabular}
\end{document}
But instead of my network topology image, I see only this: .
I don't know what is wrong, cause my image is 100% in the same dir, as my *.tex file.
EDIT:
Changed my code as @Jubobs suggested, now everything is as I wanted:
\documentclass{article}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{array}
\begin{document}
\begin{tabular}{m{3cm}m{3cm}m{5cm}}
\toprule
Configuration for ... & Commands & Topology\\
\midrule
PPP: CHAP, PAP & \#sh int se 0/0/0 & \includegraphics[width=4cm, height=4cm]{chappap.png}\\
& & \\
\bottomrule
\end{tabular}
\end{document}
Best Answer
That's what happens when the
demo
option is passed to thegraphicx
package (as in your MWE). That option is described in thegraphicx
manual:If you want the actual external picture to be included by
\includegraphics{...}
,demo
option,\includegraphics{...}
is correct.Note that you will get an error from LaTeX, not merely a black rectangle, if the path to your external picture is incorrect.