Search found 2 matches

by knaldgas
Sat Mar 20, 2010 5:08 pm
Forum: General
Topic: How to check for existence of a cross-reference?
Replies: 2
Views: 2134

Re: How to check for existence of a cross-reference?

Great, that will work for me!
Thank you very much :D
by knaldgas
Sat Mar 20, 2010 3:32 pm
Forum: General
Topic: How to check for existence of a cross-reference?
Replies: 2
Views: 2134

How to check for existence of a cross-reference?

I'm trying to achieve something along these lines:


\newcommand{\checkref}[1]{%
Label #1 is \ifthenelse{\defined{#1}}{defined}{not defined}%
}

\label{mylabel}
\checkref{mylabel}\\
\checkref{undefinedlabel}

Which should give (without warnings):
---
Label mylabel is defined
Label undefinedlabel ...