scrwfile + scrlayer-notecolumn + \tableofcontents not compatible?
KOMA-Script is a bundle of versatile LaTeX classes and packages
Brought to you by:
kohm
Hello,
I'm using the packages scrwfile
(for multiple tocs after each chapter), scrlyaer-notecolumn
(for putting text into the margin column) and of course \tableofcontents
. But somehow this doesn't work anymore since I made a new update of my packages (29.05.2021, MiKTeX, TeXStudio, pdflatex). All notes with e.g. \makenote[marginpar]{...}
won't be printed, why? I made an example (which doesn't work):
\documentclass{scrreprt}%
\usepackage{scrlayer-scrpage}%
\usepackage{scrlayer-notecolumn}%
\usepackage{scrwfile}% 1) When I load this AND use \tableofcontents, then \makenote doesn't work anymore (doesn't print anything into the margin column).
\begin{document}
\tableofcontents% 2)
Hello\makenote[marginpar]{I am here.} World.
\end{document}
It would be nice if anybody knows why this happens. Thanks in advance. :D
Michael Labenbacher
michael @ labenbacher . at
In the Attachment main.tex it's correct the example, but of course in the example above the brackets have been deleted......., I meant something like \makenote[marginpar] {I am here}
Last edit: Michael Labenbacher 2021-05-29
I got a solution here: https://tex.stackexchange.com/questions/599120/why-does-scrlayer-notecolumn-not-work-when-i-use-tableofcontents-and-scrwfile/599124#599124
She added the line:
\DeclareHookRule{enddocument/afteraux}{scrwfile}{before}{scrlayer-notecolumn}
That worked (although I don't know why :P).
Last edit: Michael Labenbacher 2021-05-29
Diff:
As usual Ulrike's solution works and indeed
scrwfile
could add a rule for this. Becausescrwfile
patches the LaTeX kernel the manual should also be changed to recommend to load it even before\documentclass
.And maybe the paragraph:
should be changed to be less subtly and more a definite recommendation to use LuaLaTeX instead of
scrwfile
, to eliminate “! No room for a new \write
” errors.Thank you for your report.
Fixed in [r3598]
Related
Commit: [r3598]
loading scrwfile before \documentclass errors in latex-dev as
\@raw@classoptionslist
isn't defined (I will check if we should set it too relax, like\@classoptionslist
, but this error with scrwfile too).Last edit: U_Fischer 2021-05-30
Thanks.
does work with [r3599].
The main problem was
tocbasic
. Buttocbasic
is only needed for\TOCclone
. And because\TOCclone
does make sense only in the document preamble, this have been fixed by moving\RequirePackage{tocbasic}
into\TOCclone
. This could also solve problems in usingscrwfile
with classes or other packages which are incompatible withtocbasic
.Related
Commit: [r3599]
Furthermore can anybody try this and see if it also produces two entries '1' into the margin column:
Ulrike (https://tex.stackexchange.com/) meant that it is an old bug and not related to changes in the hooks in latex because she checked it in texlive 2019 and 2018. Is this intended or a bug? Nonetheless thanks Markus for reminding me that I should just use lualatex, works perfectly (without scrwfile) there. :D
This is a completely different issue and should be reported on its own.
However I've fixed it in [r3600] and [r3601].
Related
Commit: [r3600]
Commit: [r3601]
Last edit: Markus Kohm 2021-05-30