LyXCross-References aren't working properly

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
kleifest
Posts: 5
Joined: Tue Mar 20, 2012 9:28 pm

Cross-References aren't working properly

Post by kleifest »

I'm writing a rather lengthy document in Lyx (in the AMS article class) and have been trying to cross-reference labeled definitions, propositions, etc. I want the reference to show up in the text with a capitalized name and number, such as "...according to Definition 6..."

I added the following to the preamble:

\newref{claim}{name=Claim~}
\newref{defn}{name=Definition~}
\newref{prop}{name=Proposition~}
\newref{thm}{name=Theorem~}
\newref{lem}{name=Lemma~}


and use formatted cross-references when I insert a reference.

It does exactly what I want for some of the items, but sometimes the references will show up with question marks where the number should be, such as "...according to Proposition ??..."

Does anyone know why this is happening or how I can fix it?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Post Reply