4

I am using the todonotes package's missingfigure command as placeholders for images that I will add to my document in the future. Is there anyway to \ref{} these images? That is, I want to add text like:

`This is shown in Figure \ref{OneOfMyMissingFigures}.`

Is this possible? I didn't see any way to give it a label in the todonotes documentation.

7

The \label must be inside o after \caption in a figure float, so the only missing element must be \includegraphics, temporally replaced with \missingfigure. Example:

\documentclass{article}
\usepackage{graphicx}
\usepackage{todonotes}
\begin{document}

\section{One}
The figure \ref{nicefigure} is nice, but the missing figure \ref{OneOfMyMissingFigures} will be stunning. 
\section{Two}
Some text 

\begin{figure}[h]
\centering
\missingfigure{\Huge Nice this triangle?}
\caption{Some caption}
\label{nicefigure}
\end{figure}

\section{Three}

Some more text
\begin{figure}[h]
\centering
\missingfigure{\Huge I need the image, now!}
\caption{A missing figure}
\label{OneOfMyMissingFigures}
\end{figure}
\end{document}
  • Ah it's that easy! I guess assumed it was already in a figure environment. Thanks. – David Doria Aug 29 '13 at 11:41

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.