Envlab 和 datatool:错误:缺少数字

Envlab 和 datatool:错误:缺少数字

通过 LaTeX 运行以下命令会出现“缺少数字”错误:

\documentclass[12pt]{letter}
\usepackage[c5envelope,noprintreturnaddress,capaddress]{envlab}
\usepackage[latin1]{inputenc}
\usepackage{datatool}
\makelabels
\begin{document}
\startlabels
\DTLloaddb{recipients}{recipients.csv}
\DTLforeach*{recipients}{\firstname=Vorname,%
 \surname=Nachname,%
 \address1=Adresszeile1,%
 \address2=Adresszeile2,%
 \city=Ort,%
 \postcode=PLZ}{%
\mlabel{Dummy}{%
 \firstname \surname\\
 \address1\\
 \address2\\
 \city \postcode}}
\end{document}

这是我的收件人.csv 文件:

Vorname,Nachname,Adresszeile1,Adresszeile2,PLZ,Ort
Wolfang,Ingeborg,Im Wiengert,Baumgartnerstrasse 11,8800,Biel

你知道我做错什么了吗?

答案1

你定义了两次\address宏,并且不是\address1\address2。宏名称中只能出现字母

\DTLforeach*{recipients}{\firstname=Vorname,%
 \surname=Nachname,%
 \addressA=Adresszeile1,%
 \addressB=Adresszeile2,%
 \city=Ort,%
 \postcode=PLZ}{%
\mlabel{Dummy}{%
 \firstname \surname\\
 \addressA\\
 \addressB\\
 \city \postcode}}

相关内容