There is an issue while using the datatool package (to import from CSV) along with the babel (french) package and the command \DTLsetseparator.
If not using the babel package, the problem disappear but all text is in english.
If not using the \DTLsetseparator it works, but we can't use comma in the .CSV file.
Below is my latex source code, input CSV, and error output :
Code: Select all
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{datatool}
\usepackage[utf8x]{inputenc}
%\usepackage[francais]{babel} % this package also causes problem
\usepackage[frenchb]{babel}
\begin{document}
\DTLsetseparator{;} % this is where the trouble comes from
\DTLloaddb{data}{datatools3.csv}
\begin{tabular}{llrrr}
\bfseries Besoin &
\bfseries Priorité &
\bfseries Préoccupations &
\bfseries Solution actuelle &
\bfseries Solution proposée
\DTLforeach{data}{\besoin=Besoin, \priority=Priorite, \preoccupation=Preoccupations,
\currentsolution=Solution actuelle, \newsolution=Solution proposee}{
\\
\besoin & \priority & \preoccupation & \currentsolution & \newsolution
}
\end{tabular}
\end{document}
Code: Select all
Besoin;Priorite;Preoccupations;Solution actuelle;Solution proposee
John;"Smith, Jr";102689;68;68
Jane;Brown;102647;75;68
Andy;Brown;103569;42;68
Zoe;Adams;105987;52;68
Roger;Brady;106872;58;68
Clare;Verdon;104356;45;68
Code: Select all
(/usr/share/texmf/tex/generic/babel/frenchb.cfg))) (./datatool3.aux)
(/usr/share/texmf/tex/latex/lm/t1lmr.fd)
(/usr/share/texmf/tex/latex/ucs/ucsencs.def)
! Use of \@dtl@lopoff doesn't match its definition.
\@dtl@lin@ ->;
Besoin;Priorite;Preoccupations;Solution actuelle;Solution prop...
l.11 \DTLloaddb{data}{datatools3.csv}
! Missing $ inserted.
<inserted text>
$
l.11 \DTLloaddb{data}{datatools3.csv}
! Undefined control sequence.
\iterate ...f \@dtl@lin@ \to \@dtl@lin@ \@dtl@key
\advance \dtl@entrycr by 1...
l.11 \DTLloaddb{data}{datatools3.csv}
! Undefined control sequence.
\iterate ...er \@dtl@toks \expandafter {\@dtl@key
}\@ifundefined {@dtl@inky@...
l.11 \DTLloaddb{data}{datatools3.csv}
! Use of \@dtl@lopoff doesn't match its definition.
\@dtl@lin@ ->;
Besoin;Priorite;Preoccupations;Solution actuelle;Solution prop...
l.11 \DTLloaddb{data}{datatools3.csv}
! Undefined control sequence.
\iterate ...f \@dtl@lin@ \to \@dtl@lin@ \@dtl@key
\advance \dtl@entrycr by 1...
l.11 \DTLloaddb{data}{datatools3.csv}
! Undefined control sequence.
\iterate ...er \@dtl@toks \expandafter {\@dtl@key
}\@ifundefined {@dtl@inky@...
l.11 \DTLloaddb{data}{datatools3.csv}
...