views:

86

answers:

1

Trying to use \ref{} or \autoref{} to a label in an appendix, but it just shows up as empty with \ref{} and 'Section' with no number/letter for \autoref{}.

I'm not sure if I'm misreading examples out there, or if I have a package conflict...

% MainFile.tex Details of obfuscation of evil are provided in \autoref{app:One}.

\appendix

\section{Obfuscating Evil via Optimized Confusion Matrix} \label{app:One}

Recall that the ....

Shows up in pdflatex output as "are provided in Section ."

A: 

Try recompiling the document. If the label is after the reference, you need to compile twice to get it to work.

If that doesn't work, this page might help. In short, \usepackage{appendix} and possibly \begin{appendix} etc. might fix it. If it's just a matter of the reference showing up, I can't see how this would help actually, but it might. Without a minimum working example it's hard to give much more advice.

You might also have more luck asking your question here.

Seamus
Ah yes, the trick that fixes 90% of latex issues. Would never have thought to try this now.\end<sarcasm>(the point is its an appendix reference, otherwise yes recompile would work for main body)
peter karasev
Appendices don't really work all that differently, I don't see how its being a reference to an appendix should affect it. Minimal (not) working example might be helpful. Also, here's a tip: being unnecessarily sarcastic to people who are trying to help you _for free_ is not good etiquette.
Seamus
Added more detail to my answer, but thinking about it now, it's probably something conflicting with hyperref, rather than anything specific to do with appendices. [It's almost always _something_ conflicting with hyperref, it's very picky about when it is called: it should be the last `\usepackage` called, apart from the ones that rely on hyperref, I think. I don't use hyperref, can someone who knows this stuff confirm that before I put it in my answer?
Seamus
Yeah sorry about that I was in level-3 caffine mode with a deadline. Almost certainly a conflict with hypperref is right, but actually its a moot point because many submission pages don't let you upload the PDF with 'embedded labels' because 'there could be viruses!'. Its nice to have the references pop up in red and be click-able though. I conclude that if the provider of the template is out of date enough to ban click-able PDFs, then there's an irreconcilable conflict with their template and hyperref...
peter karasev