refstyle and amsmath
Kees Zeelenberg
kzstatis at gmail.com
Mon Jan 29 14:00:40 UTC 2024
Some time ago there was a discussion on the list about refstyle in
combination with amsmath, leading to error messages from refstyle. It
appears refstyle is now loaded after amsmath, but this now leads to messages
like "LaTeX Warning: Reference `ab' on page 1 undefined on input line 39"
from the enclosed LyX file 'testref.lyx'. It seems that this is related to
the LaTeX line "\AtBeginDocument{\providecommand\eqref[1]{\ref{eq:#1}}}",
which is added by LyX in 'testref.tex'. This line does not have any effect,
so that e.g. \eqref{ab} is interpreted as \ref{ab} instead of \ref{eq:ab}.
Replacing this line with
\AtBeginDocument{\DeclareRobustCommand{\eqref}[1]{\textup{\tagform@{\ref{eq:
#1}}}}} (as in amsmath), the LaTeX file 'testref_robust.tex' compiles
without problems.
Kees
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20240129/fbe805b6/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testref.lyx
Type: application/lyx
Size: 2557 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20240129/fbe805b6/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testref.tex
Type: application/octet-stream
Size: 883 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20240129/fbe805b6/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testref.pdf
Type: application/pdf
Size: 25390 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20240129/fbe805b6/attachment-0002.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testref_robust.pdf
Type: application/pdf
Size: 35947 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20240129/fbe805b6/attachment-0003.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testref_robust.tex
Type: application/octet-stream
Size: 977 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20240129/fbe805b6/attachment-0003.obj>
More information about the lyx-users
mailing list