datatool 和 pgfmath 选项

datatool 和 pgfmath 选项

编译此文件

\documentclass{article}
%\usepackage[math=fp]{datatool}
\usepackage[math=pgfmath]{datatool}

\DTLloaddb{scores}{sample-student-records.csv} % http://www.ctan.org/tex-archive/macros/latex/contrib/datatool/samples

\begin{document}

\DTLmeanforcolumn{scores}{Assignment 1}{\averagescore}%
\averagescore\%.

\end{document}

我明白了

... 

! Missing number, treated as zero.
<to be read again> 
               p
l.11 ...olumn{scores}{Assignment 1}{\averagescore}
                                                  %
! Undefined control sequence.
<argument> ...@tmpcpz 0}\let \@dtl@chopzeroesnext 
                                                  =\@dtl@gobbletonil "
l.11 ...olumn{scores}{Assignment 1}{\averagescore}
                                                  %
! Argument of \@dtl@gobbletonil has an extra }.
<inserted text> 
                \par 
l.11 ...olumn{scores}{Assignment 1}{\averagescore}
                                                  %
Runaway argument?

...

但如果我使用该选项,math=fp一切都很好。

答案1

软件包 datatool 的 v2.12 版本解决了这个问题。

相关内容