Closed mw88-personal closed 2 years ago
Thanks a lot for the report. I confirm the bug, I'll investigate now.
Ok so it seems that the problem is coming from the line:
\AtEndPreamble{%
\RequirePackage{hyperref}
}%
so a quick workaround is to copy the .sty
file in your project and to remove this line and to manually load hyperref if needed. Meanwhile I'll look for the proper way to do that in komascript.
-- EDIT -- Argh forget what I just said, I think the problem comes from the way I patch chapters… I'll come back soonish hopefully.
So to disable the error, one can do:
\usepackage[disablePatchSection]{proof-at-the-end}
but then the section will be poorly numbered if you use the text link section
. One workaround is to manually add \pratendAddLabel
after the chapters like in:
\documentclass{scrreport}
\usepackage[disablePatchSection]{proof-at-the-end}
\begin{document}
Test
\chapter{Testchap}\pratendAddLabel
asdf
\end{document}
But I'll try to find how to properly patch chapters in komascript.
Thanks for working on it. I can confirm the workaround https://github.com/leo-colisson/proof-at-the-end/issues/11#issuecomment-1225482214 does indeed work.
However, I need to ship this with my own class and sell this package to my collegues, so I would prefer a more durable and standard solution, so this can be only temporary for me.
The lastest version should fix this issue. You can try it by copy/pasting the .sty
file in your project, and test it, e.g., using:
\documentclass{scrreport} %% Works with both memoir and scrreport
\usepackage{lipsum}
\usepackage{thmtools}
\usepackage{amsthm}
\usepackage[commandRef=cref,createShortEnv,conf={text link section}]{proof-at-the-end}
\newtheorem{thm}{Theorem}[section]
\usepackage{hyperref}
\usepackage{cleveref}
\crefname{thm}{Theorem}{Theorems}
\begin{document}
\lipsum[1]
\chapter{Here is my title}
\lipsum[1]
\section{Here is my section}\label{mysection}
\begin{thmE}[][end]\label{mytheorem}
Here is my important theorem
\end{thmE}
\begin{proofE}
Here is the proof
\end{proofE}
\chapter{Proofs}\label{coucou}
\printProofs
\end{document}
Thank you, that seems to work. Now I only have to wait till this fix is in the TeXlive repositories.
It has been accepted, it should appear within 24 hours.
Describe the bug When used in conjunction with any komascript class, e.g.
scrbook
,scrreport
, the loading of packageproof-at-the-end
breaks the\chapter
macro. If I load a different class, e.g.book
, it works fine, though. Can you confirm this is a bug, and suggest a solution, as I really would like to useproof-at-the-end
in my notes, and can not deviate fromscrbook
.To Reproduce: Minimal Working Example
produces error output:
Version Output of
latex --version
:Version of
proof-at-the-end
: 2022/02/07