latex3 / tagging-project

Issues related to the tagging project
https://latex3.github.io/tagging-project/
LaTeX Project Public License v1.3c
39 stars 15 forks source link

enumitem package incompatible with phase-III #4

Open AlphaJack opened 1 year ago

AlphaJack commented 1 year ago

I am using an up to date build of TeX Live (packages are now frozen to July 2023).

I cannot compile a document that loads enumitem and defines a custom list of specific types if I set testphase=phase-III in \DocumentMetadata{}

I am compiling the following MWE with lualatex --synctex=1 --interaction=nonstopmode --file-line-error enumitem.tex:

\DocumentMetadata{
 % does not always work
 testphase=phase-III,
 % always works
 %testphase=phase-II,
 pdfversion=2.0,
 pdfstandard=A-4
}

\documentclass[a4paper,10pt]{article}
\setlength{\parindent}{0mm}

\usepackage{enumitem}

% does not work with phase-III
% new enumerate with numeric label
\newlist{mylist}{enumerate}{1}
\setlist[mylist,1]{label={\bfseries ML \arabic*.}}

% does not work with phase-III
% new enumerate with static label
%\newlist{mylist}{enumerate}{1}
%\setlist[mylist,1]{label={\bfseries ML A}}

% does not work with phase-III
% new itemize with numeric label
%\newlist{mylist}{itemize}{1}
%\setlist[mylist,1]{label={\bfseries ML \arabic*.}}

% always works, also with phase-III
% new itemize with static label
%\newlist{mylist}{itemize}{1}
%\setlist[mylist,1]{label={\bfseries ML A}}

\begin{document}
Text before
\begin{mylist}
 \item Item A
 \item Item B
\end{mylist}
Text after
\end{document}

Output for phase-III:

This is LuaHBTeX, Version 1.17.0 (TeX Live 2023/Arch Linux) 
 restricted system commands enabled.
(./enumitem.tex
LaTeX2e <2022-11-01> patch level 1
 L3 programming layer <2023-02-22>
(/usr/share/texmf-dist/tex/latex/latex-lab/documentmetadata-support.ltx
(/usr/share/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphas
e.sty (/usr/share/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty)
(/usr/share/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphas
e.ltx (/usr/share/texmf-dist/tex/latex/l3experimental/l3bitset/l3bitset.sty))))
 (/usr/share/texmf-dist/tex/latex/l3backend/l3backend-luatex.def)
(/usr/share/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-lu
atex.def (/usr/share/texmf-dist/tex/latex/pdfmanagement-testphase/l3ref-tmp.sty
))
(/usr/share/texmf-dist/tex/latex-dev/latex-lab/phase-III-latex-lab-testphase.lt
x (/usr/share/texmf-dist/tex/latex/latex-lab/phase-II-latex-lab-testphase.ltx
(/usr/share/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-new-or.sty
(/usr/share/texmf-dist/tex/latex/latex-lab/latex-lab-footnotes.ltx))
(/usr/share/texmf-dist/tex/latex/tagpdf/tagpdf.sty
(/usr/share/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def)
(/usr/share/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty)))
(/usr/share/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-block-taggin
g.sty (/usr/share/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty
(/usr/share/texmf-dist/tex/latex/l3kernel/expl3.sty))
(/usr/share/texmf-dist/tex/latex-dev/latex-lab/latex-lab-kernel-changes.sty
(/usr/share/texmf-dist/tex/generic/pdftex/glyphtounicode.tex)
(/usr/share/texmf-dist/tex/latex-dev/latex-lab/glyphtounicode-cmex.tex)))
(/usr/share/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-sec-tagging.
sty)
(/usr/share/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-toc-tagging.
sty))
(/usr/share/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-firstaid
.sty) (/usr/share/texmf-dist/tex/latex/base/article.cls
Document Class: article 2022/07/02 v1.4n Standard LaTeX document class
(/usr/share/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texmf-dist/tex/latex/enumitem/enumitem.sty)
(/usr/share/texmf-dist/tex/latex/pdfmanagement-testphase/output-patches-tmp-ltx
.sty (/usr/share/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
Patching header in \@outputpage
Patching footer in \@outputpage
) (./enumitem.aux) (/usr/share/texmf-dist/tex/latex/base/ts1cmr.fd)<<sRGB.icc>>

./enumitem.tex:34: Missing \endcsname inserted.
<to be read again> 
\global 
l.34  \item I
           tem A
./enumitem.tex:34: You can't use `\relax' after \the.
<recently read> \c@ 

l.34  \item I
           tem A
./enumitem.tex:34: Missing \endcsname inserted.
<to be read again> 
\protect 
l.34  \item I
           tem A
./enumitem.tex:34: Illegal parameter number in definition of \@currentHref.
<to be read again> 
1
l.34  \item I
           tem A
./enumitem.tex:34: Illegal parameter number in definition of \@currentHref.
<to be read again> 
1
l.34  \item I
           tem A
./enumitem.tex:34: Extra \or.
\enit@saveset ...l \c@enit@cnt \endcsname {#4}\or 
                                                  \expandafter \let \expanda...

l.34  \item I
           tem A
./enumitem.tex:35: Missing \endcsname inserted.
<to be read again> 
\global 
l.35  \item I
           tem B
./enumitem.tex:35: You can't use `\relax' after \the.
<recently read> \c@ 

l.35  \item I
           tem B
./enumitem.tex:35: Missing \endcsname inserted.
<to be read again> 
\protect 
l.35  \item I
           tem B
./enumitem.tex:35: Illegal parameter number in definition of \@currentHref.
<to be read again> 
1
l.35  \item I
           tem B
./enumitem.tex:35: Illegal parameter number in definition of \@currentHref.
<to be read again> 
1
l.35  \item I
           tem B
./enumitem.tex:35: Extra \or.
\enit@saveset ...l \c@enit@cnt \endcsname {#4}\or 
                                                  \expandafter \let \expanda...

l.35  \item I
           tem B
[1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./enumitem.aux))
(\end occurred when \ifcase on line 35 was incomplete)
(\end occurred when \if on line 35 was incomplete)
(\end occurred when \if on line 34 was incomplete)
(\end occurred when \if on line 34 was incomplete)
(see the transcript file for additional information)
 432 words of node memory still in use:
   3 hlist, 1 vlist, 1 rule, 2 glue, 3 kern, 2 glyph, 5 attribute, 51 glue_spec
, 5 attribute_list, 1 write nodes
   avail lists: 1:1,2:164,3:72,4:6,5:91,6:8,7:194,9:52,11:4
</usr/share/texmf-dist/fonts/opentype/public/lm/lmroman10-bold.otf></usr/share/
texmf-dist/fonts/opentype/public/lm/lmroman10-regular.otf>
Output written on enumitem.pdf (1 page, 25045 bytes).
Transcript written on enumitem.log.
u-fischer commented 1 year ago

phase-III loads the new list implementation and that is currently not compatible with enumitem. You will have to wait until we provide a replacement.

FrankMittelbach commented 1 year ago

However, most of the extended syntax provided bybenumitem is already available out of the box with the new implementation provided by phase-III without adding the package, but the declarations to define your own list environments or configure existing ones in "enumitem"-style is not offered.

AlphaJack commented 1 year ago

Do you have any clue on why the fourth case succeeds?

FrankMittelbach commented 1 year ago

@AlphaJack probably because it is not trying to manipulate a counter in contrast to case two, but it is nothing that is worth spending time on in isolation. As Ulrike said: at a later stage we will have to look how the full interface can be offered given that the underlying list implementation has changed and what is necessary for that to be provided. But this has to wait.