Menu

#97 makenote output on wrong page if scrlayer-scrpage is not loaded

KOMA-Script 3.49
closed
2025-10-31
2025-10-31
No

\makenote sometimes places its output earlier than expected if used nearby a cleared page and if the scrlayer-scrpage package is not loaded. The following example demonstrates the issue (uncomment \usepackage{scrlayer-scrpage} to fix the placement of the marginal note).

\documentclass[paper=a4]{scrbook}
% Behavior when scrlayer-scrpage is commented out: makenote is output on page 2 (one page early).
% Behavior when scrlayer-scrpage is NOT commented out: makenote is output at the right location (page 3).
% \usepackage{scrlayer-scrpage}

\usepackage{scrlayer-notecolumn}
\usepackage{lipsum}

\begin{document}
\chapter{Lorem}
\lipsum[1]

\chapter{Ipsum}
\lipsum[1]
\makenote{\lipsum[1][1]}
\lipsum[2]
\end{document}

I am using:

  • texlive 2025,
  • komascript v3.48
  • and scrlayer-notecolumn v0.3.4216,

I could replicate this behavior with:

  • pdflatex 3.141592653-2.6-1.40.28,
  • and lualatex 1.22.0,
  • I did not try xetex compilers.

The described issue does not vanish if using the standard book class.

Note however that the problem can already be found back in the (now historical) 2024 texlive distribution.

I hope the issue is clearly described (any clarifications welcome). Thank you very much for your continued effort in developing these classes.

Below is the log output for completeness,

This is pdfTeX, Version 3.141592653-2.6-1.40.28 (TeX Live 2025) (preloaded format=pdflatex 2025.10.28)  31 OCT 2025 07:24
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**main.tex
(./main.tex
LaTeX2e <2025-06-01> patch level 1
L3 programming layer <2025-10-24>
(/usr/local/texlive/2025/texmf-dist/tex/latex/koma-script/scrbook.cls
Document Class: scrbook 2025/09/09 v3.48 KOMA-Script document class (book)
(/usr/local/texlive/2025/texmf-dist/tex/latex/koma-script/scrkbase.sty
Package: scrkbase 2025/09/09 v3.48 KOMA-Script package (KOMA-Script-dependent b
asics and keyval usage)

(/usr/local/texlive/2025/texmf-dist/tex/latex/koma-script/scrbase.sty
Package: scrbase 2025/09/09 v3.48 KOMA-Script package (KOMA-Script-independent 
basics and keyval usage)

(/usr/local/texlive/2025/texmf-dist/tex/latex/koma-script/scrlfile.sty
Package: scrlfile 2025/09/09 v3.48 KOMA-Script package (file load hooks)

(/usr/local/texlive/2025/texmf-dist/tex/latex/koma-script/scrlfile-hook.sty
Package: scrlfile-hook 2025/09/09 v3.48 KOMA-Script package (using LaTeX hooks)


(/usr/local/texlive/2025/texmf-dist/tex/latex/koma-script/scrlogo.sty
Package: scrlogo 2025/09/09 v3.48 KOMA-Script package (logo)
)))
(/usr/local/texlive/2025/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2022/05/29 v1.15 key=value parser (DPC)
\KV@toks@=\toks17
)
Applying: [2021/05/01] Usage of raw or classic option list on input line 254.
Already applied: [0000/00/00] Usage of raw or classic option list on input line
 370.
))
(/usr/local/texlive/2025/texmf-dist/tex/latex/koma-script/tocbasic.sty
Package: tocbasic 2025/09/09 v3.48 KOMA-Script package (handling toc-files)
\scr@dte@tocline@numberwidth=\skip49
\scr@dte@tocline@numbox=\box53
)
Package tocbasic Info: omitting babel extension for `toc'
(tocbasic)             because of feature `nobabel' available
(tocbasic)             for `toc' on input line 143.
Class scrbook Info: File `scrsize11pt.clo' used instead of
(scrbook)           file `scrsize11.clo' to setup font sizes on input line 2710
.

(/usr/local/texlive/2025/texmf-dist/tex/latex/koma-script/scrsize11pt.clo
File: scrsize11pt.clo 2025/09/09 v3.48 KOMA-Script font size class option (11pt
)
)
(/usr/local/texlive/2025/texmf-dist/tex/latex/koma-script/typearea.sty
Package: typearea 2025/09/09 v3.48 KOMA-Script package (type area)
\ta@bcor=\skip50
\ta@div=\count275
\ta@hblk=\skip51
\ta@vblk=\skip52
\ta@temp=\skip53
\footheight=\skip54
Package typearea Info: These are the values describing the layout:
(typearea)             DIV  = 10
(typearea)             BCOR = 0.0pt
(typearea)             \paperwidth      = 597.50793pt
(typearea)              \textwidth      = 418.25555pt
(typearea)              DIV departure   = -6%
(typearea)              \evensidemargin = 47.2316pt
(typearea)              \oddsidemargin  = -12.5192pt
(typearea)             \paperheight     = 845.04694pt
(typearea)              \textheight     = 595.80026pt
(typearea)              \topmargin      = -25.16531pt
(typearea)              \headheight     = 17.0pt
(typearea)              \headsep        = 20.40001pt
(typearea)              \topskip        = 11.0pt
(typearea)              \footskip       = 47.6pt
(typearea)              \baselineskip   = 13.6pt
(typearea)              on input line 1807.
)
\c@part=\count276
\c@chapter=\count277
\c@section=\count278
\c@subsection=\count279
\c@subsubsection=\count280
\c@paragraph=\count281
\c@subparagraph=\count282
\scr@dte@chapter@maxnumwidth=\skip55
Class scrbook Info: using compatibility default `afterindent=bysign'
(scrbook)           for `\chapter on input line 6076.
\scr@dte@section@maxnumwidth=\skip56
Class scrbook Info: using compatibility default `runin=bysign'
(scrbook)           for `\section on input line 6087.
Class scrbook Info: using compatibility default `afterindent=bysign'
(scrbook)           for `\section on input line 6087.
\scr@dte@part@maxnumwidth=\skip57
Class scrbook Info: using compatibility default `afterindent=true'
(scrbook)           for `\part on input line 6096.
\scr@dte@subsection@maxnumwidth=\skip58
Class scrbook Info: using compatibility default `runin=bysign'
(scrbook)           for `\subsection on input line 6106.
Class scrbook Info: using compatibility default `afterindent=bysign'
(scrbook)           for `\subsection on input line 6106.
\scr@dte@subsubsection@maxnumwidth=\skip59
Class scrbook Info: using compatibility default `runin=bysign'
(scrbook)           for `\subsubsection on input line 6116.
Class scrbook Info: using compatibility default `afterindent=bysign'
(scrbook)           for `\subsubsection on input line 6116.
\scr@dte@paragraph@maxnumwidth=\skip60
Class scrbook Info: using compatibility default `runin=bysign'
(scrbook)           for `\paragraph on input line 6127.
Class scrbook Info: using compatibility default `afterindent=bysign'
(scrbook)           for `\paragraph on input line 6127.
\scr@dte@subparagraph@maxnumwidth=\skip61
Class scrbook Info: using compatibility default `runin=bysign'
(scrbook)           for `\subparagraph on input line 6137.
Class scrbook Info: using compatibility default `afterindent=bysign'
(scrbook)           for `\subparagraph on input line 6137.
\abovecaptionskip=\skip62
\belowcaptionskip=\skip63
\c@pti@nb@sid@b@x=\box54
Package tocbasic Info: omitting babel extension for `lof'
(tocbasic)             because of feature `nobabel' available
(tocbasic)             for `lof' on input line 7350.
\scr@dte@figure@maxnumwidth=\skip64
\c@figure=\count283
Package tocbasic Info: omitting babel extension for `lot'
(tocbasic)             because of feature `nobabel' available
(tocbasic)             for `lot' on input line 7363.
\scr@dte@table@maxnumwidth=\skip65
\c@table=\count284
Class scrbook Info: Redefining `\numberline' on input line 7534.
\bibindent=\dimen148
)
(/usr/local/texlive/2025/texmf-dist/tex/latex/koma-script/scrlayer-notecolumn.s
ty

+----------------------------------------------------------------------
| WARNING (`scrlayer-notecolumn.sty'):
+----------------------------------------------------------------------
| YOU SHOULD NOTE, THAT THIS IS NOT AN OFFICIAL RELEASE!
| THIS VERSION IS INTENDED TO BE USED FOR TESTING ONLY!
| USAGE FOR PURPOSES OTHER THAN INTENDED IS DANGEROUS!
| DON'T EXPECT ANY SUPPORT FOR THIS VERSION!
+----------------------------------------------------------------------

Package: scrlayer-notecolumn 2025/08/29 v0.3.4216 KOMA-Script package (end user
 interface for scrlayer)
(/usr/local/texlive/2025/texmf-dist/tex/latex/koma-script/scrlayer.sty
Package: scrlayer 2025/09/09 v3.48 KOMA-Script package (defining layers and pag
e styles)
Package scrlayer Info: patching LaTeX kernel macro \pagestyle on input line 217
9.
)
\tf@slnc=\write3
\c@slncpage=\count285
\slnc@file=\read2
\c@slnc@clearnote@label=\count286
\c@slnc@syncpoint=\count287
\slnc@marginpar@box=\box55
)
(/usr/local/texlive/2025/texmf-dist/tex/latex/lipsum/lipsum.sty
(/usr/local/texlive/2025/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty
(/usr/local/texlive/2025/texmf-dist/tex/latex/l3kernel/expl3.sty
Package: expl3 2025-10-24 L3 programming layer (loader) 

(/usr/local/texlive/2025/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
File: l3backend-pdftex.def 2025-10-09 L3 backend support: PDF output (pdfTeX)
\l__color_backend_stack_int=\count288
))
Package: l3keys2e 2025-10-09 LaTeX2e option processing using LaTeX3 keys
)
Package: lipsum 2021-09-20 v2.7 150 paragraphs of Lorem Ipsum dummy text
\g__lipsum_par_int=\count289
\l__lipsum_a_int=\count290
\l__lipsum_b_int=\count291
(/usr/local/texlive/2025/texmf-dist/tex/latex/lipsum/lipsum.ltd.tex))
(./main.aux)
\openout1 = `main.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 9.
LaTeX Font Info:    ... okay on input line 9.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 9.
LaTeX Font Info:    ... okay on input line 9.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 9.
LaTeX Font Info:    ... okay on input line 9.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 9.
LaTeX Font Info:    ... okay on input line 9.
LaTeX Font Info:    Checking defaults for TS1/cmr/m/n on input line 9.
LaTeX Font Info:    ... okay on input line 9.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 9.
LaTeX Font Info:    ... okay on input line 9.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 9.
LaTeX Font Info:    ... okay on input line 9.
Package scrbase Info: activating english \partname on input line 9.
Package scrbase Info: activating english \chaptername on input line 9.
Package scrbase Info: activating english \appendixname on input line 9.
Package scrbase Info: activating english \figurename on input line 9.
Package scrbase Info: activating english \tablename on input line 9.
Package scrbase Info: activating english \contentsname on input line 9.
Package scrbase Info: activating english \listfigurename on input line 9.
Package scrbase Info: activating english \listtablename on input line 9.
Package scrbase Info: activating english \bibname on input line 9.
Package scrbase Info: activating english \indexname on input line 9.

chapter 1.


[1



{/usr/local/texlive/2025/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]


Underfull \hbox (badness 1360) has occurred while \output is active
\OT1/cmr/m/n/10.95 sit amet, con-sec-
 []


Underfull \hbox (badness 10000) has occurred while \output is active
\OT1/cmr/m/n/10.95 te-tuer adi-pi-scing
 []

[2


]
chapter 2.


[3] (./main.aux
\openout3 = `main.slnc'.

)
 ***********
LaTeX2e <2025-06-01> patch level 1
L3 programming layer <2025-10-24>
 ***********
 ) 
Here is how much of TeX's memory you used:
 4878 strings out of 467747
 121368 string characters out of 5426947
 764801 words of memory out of 5000000
 33604 multiletter control sequences out of 15000+600000
 628914 words of font info for 44 fonts, out of 8000000 for 9000
 1141 hyphenation exceptions out of 8191
 108i,15n,107p,11207b,447s stack positions out of 10000i,1000n,20000p,200000b,200000s
</usr/local/texlive/2025/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
</usr/local/texlive/2025/texmf-dist/fonts/type1/public/amsfonts/cm/cmssbx10.pfb
>
Output written on main.pdf (3 pages, 30354 bytes).
PDF statistics:
 24 PDF objects out of 1000 (max. 8388607)
 14 compressed objects within 1 object stream
 0 named destinations out of 1000 (max. 500000)
 1 words of extra memory for PDF output out of 10000 (max. 10000000)

Discussion

  • Markus Kohm

    Markus Kohm - 2025-10-31
    • labels: --> nothing to do
    • status: open --> closed
    • assigned_to: Markus Kohm
     
  • Markus Kohm

    Markus Kohm - 2025-10-31

    From the introduction of the scrlayer-notecolumn package in chapter ”Note Columns with scrlayer-notecolumn“ in the English KOMA-Script guide:

    The scrlayer-notecolumn package should solve all these problems. To do so, it relies on the basic functionality of scrlayer. However, using this package has a drawback: you can only output notes on pages that use a page style based on scrlayer. This disadvantage, however,
    can easily be resolved, or even turned into an advantage, with the help of scrlayer-scrpage.

    or in the German KOMA-Script guide:

    Das Paket scrlayer-notecolumn tritt an, all diese Probleme zu lösen. Dazu stützt es sich auf die Grundfunktionalität von scrlayer. Damit geht aber auch ein Nachteil einher: Notizen können nur auf den Seiten ausgegeben werden, die einen auf scrlayer basierenden Seitenstil besitzen. Dieser Nachteil lässt sich mit Hilfe von scrlayer-scrpage jedoch leicht auflösen oder sogar in einen Vorteil verwandeln.

    So if the only page style defined by scrlayer is empty, it is not surprising that the notes cannot be output in the expected places. For optimal functionality, it is essential that all pages use a layer page style defined with scrlayer. This can be done either by defining such page styles yourself (see \DeclarePageStyleByLayers etc.) or quasi-automatically with the help of the scrlayer-scrpage package or, if necessary, with scrlayer-fancyhdr. When using scrlayer-fancyhdr, don't forget the page style plain. With KOMA-Script classes, the simplest and, in my opinion, best solution is to use scrlayer-scrpage.

    BTW: With option cleardoublepage=current your example would even never reach a final compilation state and this is also not a bug but expected.

     

    Last edit: Markus Kohm 2025-10-31
  • Louis Stenger

    Louis Stenger - 2025-10-31

    Thanks for the detailed reply and clarifications, Markus! My erroneous interpretation of the manual was that the loading the scrlayer package was sufficient, but I had not realized that page styles still defaulted to the standard ones. Sorry for the unnecessary ticket!

     
  • Markus Kohm

    Markus Kohm - 2025-10-31

    In [r4232] I've added another warning to scrlayer-scrpage:

    Package scrlayer-scrpage Warning: Detected \makenote at page with non-layer
    (scrlayer-scrpage)                page style.
    (scrlayer-scrpage)                Delayed or too early output of the note is
    (scrlayer-scrpage)                expected and not a bug in such cases. Even
    (scrlayer-scrpage)                flipping notes without terminating states
    (scrlayer-scrpage)                would be possible and not a bug.
    (scrlayer-scrpage)                Redefinition of all used page styles to
    (scrlayer-scrpage)                layer page styles would be recommended at
    (scrlayer-scrpage)                least the page style used for the
    (scrlayer-scrpage)                note on input line 15.
    
     
    👍
    1

    Related

    Commit: [r4232]


Log in to post a comment.