latex3 / tagging-project

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

babel-french is incompatible with new list code #694

Open u-fischer opened 2 months ago

u-fischer commented 2 months ago

Originally posted by @domix75 in https://github.com/latex3/tagging-project/issues/414#issuecomment-2322968759

I have another issue with the French babel: itemize raises an error here is the source

\DocumentMetadata{
 pdfversion=2.0,
 pdfstandard=ua-2,
 %lang=fr-FR,
 testphase=
   {
    phase-III, %lists,footnotes,sectioning,
               %toc,marginpar,bibliography,floats,
               %graphics ...
    math,
    table, %tabular, tabularx, longtable
    title  %maketitle
   }
 }

% Preamble
\documentclass[12pt, a4paper, twoside]{report}
\usepackage[french]{babel}
\usepackage[T1]{fontenc}

\renewcommand{\familydefault}{\sfdefault} %% Font sans serif par défaut (plus lisible)

\begin{document}

    Une salade de fruits:

\begin{itemize}
    \item Pomme
    \item Kiwi
    \item Fraise
    \item Ananas
\end{itemize}

\end{document}

compiling with lualatex-dev, texlive (just updated)

! LaTeX Error: Lonely \item--perhaps a missing list environment.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.29     \item P
              omme
? 

(and the same for the 3 other \item)

is there something I do wrong ? cheers d

u-fischer commented 2 months ago

babel-french redefine lists environments in a way that is not compatible with the new tagging aware list code.

Until babel-french has been adapted you should suppress the redefinitions. You can fake the layout more or less like this (side remark: do not use T1 with lualatex):

\DocumentMetadata{
 pdfversion=2.0,
 pdfstandard=ua-2,
 lang=fr-FR,
 testphase=
   {
    phase-III, %lists,footnotes,sectioning,
               %toc,marginpar,bibliography,floats,
               %graphics ...
    table, %tabular, tabularx, longtable
    title  %maketitle
   }
 }

% Preamble
\documentclass[12pt, a4paper, twoside]{report}
\usepackage[french]{babel}
% \usepackage[T1]{fontenc} %do not use that with lualatex!!
\frenchsetup{StandardLists=true}
\renewcommand\labelitemi{\textemdash}
\begin{document}
    Une salade de fruits:

\begin{itemize}[item-skip=0pt,topsep=0pt,par-skip=0pt]
    \item Pomme
    \item Kiwi
    \item Fraise
    \item Ananas
\end{itemize}

\end{document}
domix75 commented 2 months ago

Thanks a lot !

John02139 commented 2 weeks ago

I believe that this issue is fixed in the 2024-11-02 release, see https://github.com/latex3/tagging-project/issues/414#issuecomment-2452981413.

Since I did not open this one, I'll leave it to others to close.

u-fischer commented 2 weeks ago

@John02139 no this is still open. babel french has not been adapted to the new list code.