Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In my compiled document, which consists of many sub-documents using standalone, I have one sub-document in which the Figure references are undefined - they show up as ??. No MWE I've tried can reproduce this error.

In case anyone wants to have a go at this particular bug, the .log and .aux files are here: https://gist.github.com/keflavich/5421912#file-thesis-log-L2696 (the link is specifically to the line with \newlabel{fig:...} in the thesis.log file).

The problem is that I am including multiple documents in a parent document, and everything goes fine until a certain document is included, after which \newlabel commands are sent to thesis.log instead of thesis.aux, which means that ??s show up instead of figure numbers.

share|improve this question
    
Did you read the .log file? –  Foo Bar Apr 19 '13 at 17:15
    
Yes. I get "Reference fig:... undefined", but later there is a \newlabel{fig:...} entry, which I thought SHOULD mean that the figure label is included. –  keflavich Apr 19 '13 at 17:31
    
Oh... upon closer inspection, only the failing figures show up with \newlabel{fig:} in the log... the rest have that text in the .aux file. What could cause that? –  keflavich Apr 19 '13 at 17:38
2  
When a \newlabel command appears in the .log file rather than the .aux file, it means that the latter has already been closed or is not open when the \label command is scanned. –  egreg Apr 19 '13 at 18:07
    
Thanks @egreg - any idea what could cause that? –  keflavich Apr 19 '13 at 19:31
show 1 more comment

1 Answer

Turns out, this was a stupid problem.

\include{preface.tex} causes this issue.

\input{preface.tex} does not.

Sigh.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.