I was curious if there was a way to force the compile to fail if a ref was not already defined. I do not want the ref to actually output anything into the document, but rather just check the existence condition. For example, I want to be able to do something like:
\begin{definition} \label{def C} \requires{def A} \requires{def B}
A \underline{C} is an A and a B such that... etc etc etc.
\end{definition}
and I do not want the \requires{def A} to actually produce output but just enforce that there was somewhere above a \label{def A}. Ideally, you could use this for theorems and definitions. This way I can just add any dependencies in my theorems/definitions and not have to worry about whether or not I already defined everything above, the compiler will tell me. Does cleveref provide this? If not, how hard would it be to add it? I looked very briefly at the source code but I am not too familiar with the language so it would take me a while.
\PackageError{<package name>}{<Error message>}{<help text (simply keep empty)>}– Martin Scharrer♦ Oct 19 '11 at 16:34LaTeX Warning: There were undefined references.– Werner Oct 19 '11 at 16:35