I am having trouble compiling a latex document using an external CSV file with datatool and using the french language from the babel package.
The content of my latex file is:
\documentclass[letterpaper,12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8x]{inputenc}
\usepackage[francais]{babel}
\usepackage{longtable}
\usepackage{datatool}
\begin{document}
\DTLsetseparator{;}
\DTLloaddb{tableBesoins}{babel_datatool_conflict.csv}
\begin{longtable}{| p{0.9in} | p{0.6in} | p{1.6in} | p{1.2in} | p{1.6in} | }
\caption{Besoins\label{tbl:besoins}}\\
Besoin & Priorité & Préoccupations & Solution actuelle & Solution proposée%
\DTLforeach{tableBesoins}{%
\besoin=Besoin,\priority=Priorite,\preoccupation=Preoccupations,%
\currentsolution=Solution actuelle,\newsolution=Solution proposee}{%
\\
\besoin & \priority & \preoccupation & \currentsolution & \newsolution}
\end{longtable}
\end{document}
The content of babel_datatool_conflict.csv file is there:
The error I am getting is:
(/usr/share/texmf-texlive/tex/generic/babel/frenchb.cfg)))
(/usr/share/texmf-texlive/tex/latex/carlisle/scalefnt.sty)
(./babel_datatool_conflict.aux)
(/usr/share/texmf-texlive/tex/latex/ucs/ucsencs.def)
! Use of \@dtl@lopoff doesn't match its definition.
\@dtl@lin@ ->;
"Besoin";"Priorite";"Preoccupations";"Solution actuelle";"Solu...
l.13 ...tableBesoins}{babel_datatool_conflict.csv}
! Missing $ inserted.
<inserted text>
$
l.13 ...tableBesoins}{babel_datatool_conflict.csv}
! Undefined control sequence.
I've uploaded the full error here:
I've tried to change [francais] to [french] or [frenchb], to use [utf8] instead of [utf8x], changed the order of the packages. It just won't compile unless I comment out the usepackage babel line.
;
is made active by babel with thefrench
option. If you set\shorthandoff{;}
, your code should compile.