I am trying to compile latex code that imports CSV into a longtable (ltxtable). The code has been compiled successfully in windows while it makes error in Mac OS X.
\documentclass{article}
\usepackage{datatool}
\usepackage{filecontents}
\usepackage{ltxtable}
\begin{document}
%% Read CSV conents
\DTLloaddb[noheader,keys={abbr,desc}]{abbreviations}{abbreviations.csv}
\DTLsort{abbr}{abbreviations}%
%% Write CSV into LaTex file (ltxtable)
\begin{filecontents}{abbreviations.tex}
\begin{longtable}{>{\bfseries}l X}
\DTLforeach{abbreviations}{%
\abbr=abbr,\desc=desc}{%
\\
\abbr& \desc%
}
\end{longtable}
\end{filecontents}
%% Include the LaTex file (ltxtable)
\LTXtable{\textwidth}{abbreviations.tex}
\end{document}
Error:
Runaway argument?
\@nil \let \@dtl@line =\@dtl@trmstr \ifx \@dtl@line \@longempty \else \ETC.
! File ended while scanning use of \@dtl@trim.
The CSV file has two columns like:
%% Abbreviations List
FHSS,Frequency Hopping Spread Spectrum
CRLB,"Cram\'{e}r-Rao Lower Bound"
datatoolor some other relevant package. You can test this by putting\listfilesin the preamble and comparing the end of the.logfor each computer (the command prints the versions of each loaded package). Barring that, unless you get lucky, someone is going to ask for a complete, but minimal example file that demonstrates the problem. Search for 'MWE' if you aren't sure what I'm referring to. – jon Sep 26 '12 at 19:51