Menu

#89 Newest \DocumentMetadata overwrites \@startsection

KOMA-Script 4
open
Marei
2025-09-11
2025-08-10
cookie170
No

up-to-date texlive, with the new luatex dev version, this mwe throws warnings:

\DocumentMetadata{lang=de, pdfversion=1.7, pdfstandard=A-2b}
\documentclass{scrartcl}

\usepackage{fontspec, blindtext}

\begin{document}
\blinddocument
\end{document}
% Local Variables:
% TeX-engine: Lua-dev
% End:

Warnings like:

LaTeX2e <2025-11-01> pre-release-1 (develop 2025-8-10 branch)
L3 programming layer <2025-07-20>
...
Class scrartcl Warning: \@startsection' has been changed. (scrartcl) scrartcl needs it's own definition of\@startsection'
(scrartcl) to provide extended features for the optional argument
(scrartcl) of \section' etc. (scrartcl) Generally it defines\@startsection' completely new
(scrartcl) to achieve this. Because of the unexpected definition
(scrartcl) an alternative approach will be used.
(scrartcl) If this fails and if there isn't a new release of
(scrartcl) KOMA-Script that fixes the problem, please
(scrartcl) send a report to the KOMA-Script author.
(scrartcl) Note, that this alternative approach does not
(scrartcl) execute the elements of do-hooks:
(scrartcl) - heading/postinit', (scrartcl) -heading/branch/star',
(scrartcl) - heading/branch/nostar', (scrartcl) and does always userunin=bysign' and
(scrartcl) `afterindent=bysign'.

Class scrartcl Warning: Unexpected definition of \@sect!
(scrartcl) Please send information about this to
(scrartcl) the KOMA-Script maintainer!
(scrartcl) Maybe LaTeX will be broken by the redefinition
(scrartcl) of \@sect on input line 3549.

Class scrartcl Warning: Unexpected definition of \@ssect!
(scrartcl) Please send information about this to
(scrartcl) the KOMA-Script maintainer!
(scrartcl) Maybe LaTeX will be broken by the redefinition
(scrartcl) of \@ssect on input line 3745.

Class scrartcl Warning: Unexpected definition of \@xsect!
(scrartcl) Please send information about this to
(scrartcl) the KOMA-Script maintainer!
(scrartcl) Maybe LaTeX will be broken by the redefinition
(scrartcl) of \@xsect on input line 3826.

Removing the first line solves the issue.

Related

Wiki (Deutsch): Warning_@startsection
Wiki (English): Warning_@startsection

Discussion

  • Markus Kohm

    Markus Kohm - 2025-08-12
    • labels: --> feature request
     
  • Markus Kohm

    Markus Kohm - 2025-08-12

    Thank you for the report. But I cannot promise to change it until the next Milestone. Support for all \DocumentMetadata features is currently delayed and classified as new features.

     
  • Markus Kohm

    Markus Kohm - 2025-08-19
    • labels: feature request --> feature request, tagging
    • assigned_to: Marei
    • Milestone: KOMA-Script 3.46 --> KOMA-Script 4
     
  • Markus Kohm

    Markus Kohm - 2025-08-19

    pdfstandard=A-2b activates tagging and as explained here this is currently not supported with KOMA-Script. Therefore I've changed the Milestone.

     
  • Markus Kohm

    Markus Kohm - 2025-08-19
    • labels: feature request, tagging --> feature request, tagged PDF
     
  • cookie170

    cookie170 - 2025-08-20

    Fortunately the new package pdfmanagement allows using PDF management without tagging, see ltnews42 (well, I haven't found out myself: https://github.com/latex3/pdfresources/issues/101 ):

    \RequirePackage{pdfmanagement} 
    \SetKeys[document/metadata]{lang=de-DE,pdfstandard=A-2b}
    

    So if anybody stumbles across the same issue, there is a solution.

     
  • Markus Kohm

    Markus Kohm - 2025-09-11

    I am currently planning to avoid the warnings in the future by no longer using the macros in question (as titlesec also does, for example). At the same time, as long as KOMA-Script classes do not actively support tagging, a meaningful warning with appropriate advice will be issued when tagging is enabled. I may even refer to the standardsectioning package for those who consider tagging more important than the KOMA-Script features for headings.

    The new warning is already there in [r4223] but not yet finalized.

     

    Related

    Commit: [r4223]

    • Markus Kohm

      Markus Kohm - 2025-09-11

      This is implemented in [r4225], but only the first step.

      Since the changes are quite extensive, there is of course a risk that something may have been damaged in the process. It would therefore be advantageous if I were not the only one testing this.

      Testing with l3build is really not that difficult. Simply download the sources, change to the directory containing the sources (and the file build.lua) and call l3build unpack. To use the unpacked version, you only need to set TEXINPUTS accordingly. Assuming the KOMA-Script sources are located in ~/test/koma-script-code/, you can set TEXINPUTS to .:~/test/koma-script-code/build/unpacked: (the colon at the end is important). In a Linux terminal, you can also simply use, for example,

      TEXINPUTS=.:~/test/koma-script-code/build/unpack: emacs testfile.tex
      

      to edit a test file in emacs and also create the PDF with the KOMA-Script test version from within emacs.

       

      Related

      Commit: [r4225]


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.