Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.
\DTLsetseparator{,}
\DTLloaddb[noheader,keys={Method, Accuracy, F-Measure(\%), No. of iterations}]{table2}{GDSGD_2.csv}

Hi, I want to include special character in my column header, i am using datatool and DTLloaddb does not seem to work even if escape the special char. (here %)

The document wont compile and it throws lot of errors like Missing: \endcsname inserted.

share|improve this question
add comment

2 Answers

Without a MWE, this is untested, but from the error message you quote I would try replacing \% by \safepercent which you could define by

\begingroup
\lccode`\+`\%\lowercase{\endgroup\def\safepercent{+}}
share|improve this answer
add comment

I tried the one below and it worked for me. I used a dummy header in my csv file.

\DTLloaddb[headers={Method,\shortstack{Accuracy (\%)},\shortstack{F-Score (\%)}, No. of iterations},keys={Method, Accuracy, F-Measure, No. of iterations}]{table3}{tablecsv/GDSGD_3.csv}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.