3

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?

5
  • Based on Example images in LaTeX?.
  • The MWE package provides example pictures.
  • Another possibility is the demo option of the graphicx package which includes a black square.
  • I prefer ways that use the 'normal' \includegraphics command since it means less change when you include the actual content later. On the other hand, the \missingfigure command 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}

enter image description here


\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}

enter image description here

  • 2
    Don't use [H], please! – egreg Jun 4 '17 at 16:41
  • @egreg Haha -- I will not argue with you! – Dr. Manuel Kuehner Jun 4 '17 at 16:44
4

A couple of other ways.

enter image description here

\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}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.