I am using pdftex and the hyperref package. I have a number of automatically generated \hyperlink{<label>}{<text>}, which point to other automatically generated \hypertarget{<label>}{<text>}.
But since the two are generated independently, I don't know a priori whether a given label exists or not. The default behaviour when hyperlinking to an inexistent target is to put a "Go to page 1" link, which is completely useless for the user.
Is it possible to change that default behaviour to either
put no link when the link would be broken, or
point the link to itself?
l3doc, soydocis very relevant. I remember issues with the catcode of@being other when reading the.auxfile. How do you make sure that\def\defined@...actually defines\defined@...and not\defineddelimited by@...? Are you using a\csnameconstruction? – Bruno Le Floch Feb 26 '11 at 00:24@is other while reading the.auxfile , which is what you want in this situation. I'm using\global\@namedef{href@desc@<macro>}{}and\global\@namedef{href@impl@<macro>}{}for the description and implementation. – Martin Scharrer Feb 26 '11 at 00:36\@namedefshould be tokenized as\@, followed byn,a, etc.? – Bruno Le Floch Feb 26 '11 at 00:41@in the.auxfile is letter, not other. LaTeX itself uses macro with@there, like\@writefile. See lines 1366-68 and 3900 oflatex.ltx, there the.auxfile is read and both times\makeatletteris used. – Martin Scharrer Feb 26 '11 at 00:44@, rather for the macro name. Thanks for the pointer tolatex.ltx. – Bruno Le Floch Feb 26 '11 at 00:56