![Envlab 和 datatool:错误:缺少数字](https://linux22.com/image/245067/Envlab%20%E5%92%8C%20datatool%EF%BC%9A%E9%94%99%E8%AF%AF%EF%BC%9A%E7%BC%BA%E5%B0%91%E6%95%B0%E5%AD%97.png)
通过 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}}