Bug 157787
Summary: | "undefined reference" but the reference is defined | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | John Smith <johnsmith7219> | ||||||
Component: | tetex | Assignee: | Jindrich Novy <jnovy> | ||||||
Status: | CLOSED UPSTREAM | QA Contact: | David Lawrence <dkl> | ||||||
Severity: | low | Docs Contact: | |||||||
Priority: | low | ||||||||
Version: | rawhide | CC: | pknirsch | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2005-05-19 16:06:39 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
John Smith
2005-05-15 15:55:18 UTC
Created attachment 114395 [details]
foo.tex
The problem is that LaTeX actually doesn't know how to refer to the label I see from the source you attached. \label has to be used only within some block that have some reference number, \section, \chapter, \begin{table} etc. Note that you defined your \label at the top level that has no reference number so LaTeX has no clue how to name the reference. It behaves as it should that it refuses to create a reference. Created attachment 114415 [details]
source file with a chapter
I have just added the line \chapter{Here's a chapter} before the label definition. The bug still happens. You need to pass the source through LaTeX twice in order to get correct references. It's also quite unusual that you refer to a chapter from a section header. Please refer to it from somewhere inside a section body, i.e. \section{And now for something completely different} This is a reference to chapter \ref{foobar}. and you'll see no warnings about invalid references. I know latex has to be run twice. What I claim is that even if it is run twice, it finds an undefined reference, which is a bug. Indeed I could work around the bug by not referring to the label inside the section body. But I do want to do this and it *is* valid LaTeX. I have been doing it for years and I still want to do it now. If you remove all (or most of) the lines of foo \bigskip foo, then suddenly latex does not complain any more, which clearly is inconsistent. When I report a bug I'm not asking for advice as to how to work around it. Please have a serious look at this issue. Thanks in advance. Ok, maybe some regression was introduced by LaTeX within teTeX-3.0. The warning message seems to be a minor inconsistency. Because pdfLaTeX doesn't refuse to generate a valid pdf, changing severity/priority to low. The best solution here is to report the problem upstream. I don't have a deep knowledge of LaTeX code and can't spend hours finding a fix for warning message, sorry. Could you please report this problem upstream? The upstream developers have a good insight into LaTeX code and respond quickly. Furthermore a fix for this issue will affect all the distributions, not only Fedora, when a it's applied upstream. Please read first: http://www.latex-project.org/bugs.html and then file the bug in: http://www.latex-project.org/bugs-upload.html Could you then add here a reference to the bug you reported so that I can track it to have a patch to fix this applied? Done: babel/3786 It turns out to be a known bug in babel for which "a fix may be difficult if not impossible in the current implementation". Thanks for filing the bug in upstream and posting here a reference to it. Did you have any other fruitful feedback from the upstream developers that the fix for this is hopeless for the current implementation? I haven't had other feedback than what can be read in their bug database, i.e. what I mentioned already and the following workaround: \section{And now for something completely different: \MakeLowerCase{\ref{foobar}}} Of course it does not work anymore if the label contains an uppercase letter. I suggest another workaround: put two labels instead of just one, like this: \label{foobar} \label{FOOBAR} |