Skip to content

babel (french) clash with xcolor : Error: Undefined color  #322

Open
@flomine

Description

@flomine

When included, babel package (with french option) induced an error with xcolor.
For example, considering this working example:

\documentclass[handout]{beamer}
%\usepackage[french]{babel}%<----- When included, this line induces error
\usepackage[dvipsnames]{xcolor}
\usepackage{nicematrix}
\begin{document}

\begin{frame}{A test}
\sffamily
\renewcommand{\arraystretch}{1.4}

\begin{center}
\begin{NiceTabular}
   [
     columns-width=3cm,
     hvlines-except-borders,
     rules={color=white,width=1pt}
   ]
   {ccc}
\CodeBefore
  \rowcolor{NavyBlue}{1}
  \rowcolors{2}{NavyBlue!25}{NavyBlue!15}
\Body
  \RowStyle[color=white]{}
  First column & Second column & Third column \\
  1            & A             & E            \\
  2            & B             & F            \\
  3            & C             & G            \\
  4            & D             & H            \\
\end{NiceTabular}
\end{center}
\end{frame}
\end{document}

If you add this "\usepackage[french]{babel}", then we have the error
Package xcolor Error: Undefined color NavyBlue\penalty @m \hskip .5\fontdimen 2\font \relax '.`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions