[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1076675: Broken french locale/babel setting (Undefined control sequence / Missing \begin{document})



Package: texlive-latex-base
Version: 2024.20240706-1
Severity: important
Affects: linuxcnc dblatex

I ran into this problem with LinuxCNC, which uses dblatex via a2x to
generate LaTex for PDF creation.  I believe I tracked down the problem
to the texlive-latex-base package.  The problem is that LaTex fail with
French input / locale / babel setting.

This started failing recently, which might match the 2024-07-11 upload.

I reduced the problem to this docbook XML file:

  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd";>
  <?asciidoc-toc?>
  <?asciidoc-numbered?>

  <book lang="fr">
  <chapter id="_introduction_indexterm_primary_introduction_primary_indexterm">
  <title>Introduction</title>
  <simpara>(La version de langue anglaise fait foi)</simpara>
  </chapter>
  </book>

Giving this to dblatex give the following output:

  Build the book set list...
  Warning: program compiled against libxml 212 using older 209
  Build the listings...
  Warning: program compiled against libxml 212 using older 209
  Warning: program compiled against libxml 212 using older 209
  XSLT stylesheets DocBook - LaTeX 2e (0.3.12)
  ===================================================
  Build test.pdf
  pdflatex failed
  test.tex:37: Undefined control sequence \FBCompactItemize@setup.
  test.tex:37: leading text: \setupbabel{fr}
  test.tex:37: Missing \begin{document}.
  test.tex:37: leading text: \setupbabel{fr}
  Unexpected error occured
  Error: pdflatex compilation failed

This happen when using lang="fr", but not when using lang="nb" or
lang="sv".

The generated tex file (extracted using dblatex -d) look like this:

  \makeatletter
  \def\input@path{{/home/pere/src/linuxcnc/docs/src/fr//}}
  \makeatother
  % -----------------------------------------  
  % Autogenerated LaTeX file from XML DocBook  
  % -----------------------------------------  
  %%<params>
  %% document.language fr
  %%</params>
  \documentclass{report}
  \usepackage{ifthen}
  \newboolean{DBKIsBook}
  \setboolean{DBKIsBook}{true}
  \IfFileExists{ifxetex.sty}{%
      \usepackage{ifxetex}%
    }{%
      \newif\ifxetex
      \xetexfalse
    }
    \ifxetex
  \usepackage{fontspec}
  \usepackage{xltxtra}
  \defaultfontfeatures{Mapping=tex-text}
  \setmainfont{DejaVu Serif}
  \setsansfont{DejaVu Sans}
  \setmonofont{DejaVu Sans Mono}
  \else
  \usepackage[T1]{fontenc}
  \usepackage[latin1]{inputenc}
  \fi
  \usepackage{fancybox}
  \usepackage{makeidx}
  \usepackage[french]{babel}
  \usepackage{cmap}
  \usepackage[hyperlink]{docbook}
  \setuplocale{fr}
  \setupbabel{fr}
  \renewcommand{\DBKreleaseinfo}{}
  \setcounter{tocdepth}{5}
  \setcounter{secnumdepth}{5}
  \title{}
  \author{}
  \hypersetup{%
  pdfcreator={DBLaTeX-0.3.12},%
  pdftitle={},%
  pdfauthor={}}
  % ------------------
  % Collaborators
  % ------------------
  \renewcommand{\DBKindexation}{
  \begin{DBKindtable}
  \DBKinditem{\writtenby}{}
  \end{DBKindtable}
  }
  \makeindex
  \makeglossary
  \begin{document}
  \lstsetup
  \frontmatter
  \maketitle
  \tableofcontents
  \mainmatter
  
  % ------- 
  % Chapter 
  % ------- 
  
  \chapter{Introduction}
  \label{_introduction_indexterm_primary_introduction_primary_indexterm}\hyperlabel{_introduction_indexterm_primary_introduction_primary_indexterm}%
  
  (La version de langue anglaise fait foi)
  
  \end{document}

When I run pdflatex on this, I get the familiar errors from latex:

  % echo | pdflatex test.tex
  [...]
  Enhancements to Picture Environment. Version 1.2 - Released June 1, 1986
  ))) (/usr/share/texmf/tex/latex/dblatex/style/dbk_annot.sty))
  ! Undefined control sequence.
  <argument> \FBCompactItemize@setup 
                                     {false}
  l.37 \setupbabel{fr}
                      
  ? 
  ! LaTeX Error: Missing \begin{document}.
  
  See the LaTeX manual or LaTeX Companion for explanation.
  Type  H <return>  for immediate help.
   ...                                              
                                                    
  l.37 \setupbabel{fr}
                      
  ? 
  ! Emergency stop.
   ...                                              
                                                    
  l.37 \setupbabel{fr}
                      
  !  ==> Fatal error occurred, no output PDF file produced!
  Transcript written on test.log.
  %

Using strace I suspect the file
/usr/share/texlive/texmf-dist/tex/generic/babel/locale/fr/babel-fr.ini
is involved, and as this belong to texlive-latex-base I thought it best
to report it as a bug against this package.

Setting severity to important as this affect other packages, without
making them completely useless.

-- 
Happy hacking
Petter Reinholdtsen


Reply to: