I want to add an empty figure in a document with added captions .. etc, so that I can add the figures later. Is there a direct way to do this? For example insert a white box with a big X across it or something?
Asked
Active
Viewed 421 times
2 Answers
5
- Based on Example images in LaTeX?.
- The MWE package provides example pictures.
- Another possibility is the
demooption of thegraphicxpackage which includes a black square. - I prefer ways that use the 'normal'
\includegraphicscommand since it means less change when you include the actual content later. On the other hand, the\missingfigurecommand in the other answer shows very clear that something has to be done (which is good depending on the use case).
\documentclass{article}
\usepackage{graphicx}
\usepackage{float}
\begin{document}
Text before.
\begin{figure}[H]
\centering
\includegraphics[width=50mm,height=20mm]{example-image-a}
\caption{Caption}
\end{figure}
Text after.
\end{document}
\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{float}
\begin{document}
Text before.
\begin{figure}[H]
\centering
\includegraphics[width=150mm,height=20mm]{}
\caption{Caption}
\end{figure}
Text after.
\end{document}
Dr. Manuel Kuehner
- 22,451
4
A couple of other ways.
\documentclass{article}
\usepackage{graphicx}
\usepackage{todonotes}
\begin{document}
\begin{figure}
\centering
% \missingfigure is from todonotes
\missingfigure[figwidth=\linewidth,figcolor=white]{Some text if needed}
\caption{Bla}
\end{figure}
\begin{figure}
\centering
\framebox[7cm]{\scalebox{15}{X}}
\caption{Bla}
\end{figure}
\end{document}
Torbjørn T.
- 206,688



[H], please! – egreg Jun 04 '17 at 16:41