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:



\begin{longtable}{| p{0.9in} | p{0.6in} | p{1.6in} | p{1.2in} | p{1.6in} | }
   Besoin & Priorité & Préoccupations & Solution actuelle & Solution proposée%
   \currentsolution=Solution actuelle,\newsolution=Solution proposee}{%
   \besoin & \priority & \preoccupation & \currentsolution & \newsolution}


The content of babel_datatool_conflict.csv file is there:


The error I am getting is:

! 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.

  • 1
    The ; is made active by babel with the french option. If you set \shorthandoff{;}, your code should compile.
    – Jake
    Commented Dec 20, 2012 at 7:27
  • Wow, problem solved! That's a quick answer!
    – David
    Commented Dec 20, 2012 at 7:30
  • What are those shorthand codes exactly?
    – David
    Commented Dec 20, 2012 at 7:31

1 Answer 1


When using the babel package with the french option, semicolons (and colons, exclamation marks and question marks) are made active so the spacing around these punctuation symbols can be corrected for the French style of putting space before and after the symbol:

"Normal" spacing:

French spacing:

If you use the semicolon as the field separator in your data file, you'll have to make semicolons inactive temporarily by saying \shorthandoff{;} before your \DTLloaddb command, and afterwards make them active again using \shorthandon{;}.

  • 2
    Btw, when you recieve a review for a scientific article, you always recognize that a French person wrote it, by having the spaces everywhere ;)
    – yo'
    Commented Dec 20, 2012 at 8:20
  • Perfect answer.
    – David
    Commented Dec 20, 2012 at 9:18
  • tohecz : interesting comment ;-)
    – David
    Commented Dec 20, 2012 at 9:18
  • I wonder why bracketing the offending part with \begin{otherlanguage}{english} and \end{otherlanguage} doesn't work (english given as a babel option). Shouldn't it have the same effect?
    – AlexG
    Commented Dec 21, 2012 at 8:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .