-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Lemma numbered correctly in appendix when using SIAM style file #14
Comments
Thanks for the report. I don't have a computer with me to test (and it might be hard for me to get one soon), but my guess is that SIAM might not be compatible with autoref that is used by default. You can use other engines to detect if it is a lemma or theorem, depending on the compatibility of SIAM, like cleveref. To use cleveref, just add `commandRef=Cref` in the options, and it will use \Cref{labelofthm} to call it. If you use cleveref, you might want to see its doc to customize the naming of thm etc…
|
Ok, so I confirm that cref is more stable with SIAM and fix one of the two bugs, so load the package with
the second bug comes from
The whole code becomes:
Let me know if it works for you. If not, I will re-open it. |
Thank you, that is a big improvement. There remains an issue with the "qed" symbol (a white square) that is inserted at the end of each proof in the SIAM style. When using your package, the symbol either disappears or appears in odd locations. |
This seems like the fault comes from the weird implementation of
Gives: The problem is that my library removes all new lines, because LaTeX seems to be fundamentally unable to detect/copy them without using verbatim environment, but these have other issues (notably, they can't be used inside other environments). The simpler solution is certainly to redefine the |
Ok, so a simple workaround is to add
One can easily define a new environment
that produces: Hopefully it will solve your issues. I don't know if there is a cleaner way that does not copy/paste the |
I will reopen until I document properly this case. |
Also, regarding the eratic position of the QED symbol, you might be interested by this question https://tex.stackexchange.com/questions/329159/erratic-position-of-qed-symbol-at-the-end-of-proof-environment-using-siam-templa |
Thank you so much! We are 99.99% there. Here is one more glitch with the numbering of lemmas. I added a new section and a lemma under it: \documentclass{siamart220329}
\usepackage[
createShortEnv,
conf={one big link},
%% Use Cref that seems more resilient that autoref in SIAM
commandRef=Cref]{proof-at-the-end}
\makeatletter
\def\thmt@innercounters{section,equation} %% default is equation, we also need to save the section number in the restate
\makeatother
%%% Defines a new environment that automatically adds the space
%%% to fix https://github.com/leo-colisson/proof-at-the-end/issues/14
\NewDocumentEnvironment{proofEE}{O{}+b}{%
\begin{proofE}[#1]
#2
\space
\end{proofE}
}{}
\begin{document}
\section{Important Results}
\begin{lemmaE}[][end, restate]
Life is not easy.
\end{lemmaE}
\begin{proofEE}
Immediate.
\end{proofEE}
\begin{theoremE}[][end, restate]
Life is hard.
\end{theoremE}
\begin{proofEE}
The result is direct.
\end{proofEE}
\section{A New Section}
\begin{lemmaE}[][end, restate]
Life is definitely not easy.
\end{lemmaE}
\begin{proofEE}
Still working on the proof.
\end{proofEE}
\appendix
\section{Proofs}
\printProofs
\end{document} The new lemma has number 2.1. However, in the appendix, we see "Lemma 2.2 ... Proof of Lemma 2.1 ...". |
The solution seems to be: \makeatletter
\def\thmt@innercounters{section,equation,theorem} %% <-- add theorem counter here
\makeatother |
Describe the bug
Lemma is numbered correctly in the appendix when using the SIAM style file.
To Reproduce: Minimal Working Example
Version
Output of
latex --version
:Version of
proof-at-the-end
: 2022/02/07Additional context
The lemma and theorem numbers are correct when compiling the document above. However, if you uncomment the first line and comment out the next five (in order to use the SIAM style file), the reference of the lemma is displayed as "Lemma A.1" instead of "Lemma 1.1", and the proof line says "Proof of Theorem 1.1" instead of "Proof of Lemma 1.1".
In addition, a "QED" symbol (a white square) is supposed to appear automatically upon
\end{proof}
, but it no longer does in theproofE
environment.Here is a link to their style file: https://epubs.siam.org/pb-assets/macros/standard/siamart220329.cls
Do you have any idea where the conflict could be?
Thank you in advance!
The text was updated successfully, but these errors were encountered: