我得到了如下所示的代码。但header-background.png
每隔一张卡就会出现一次。不是所有的卡。有什么想法吗?它由 Xelatex 编译
\documentclass[11pt,a4paper]{memoir}
\usepackage[utf8]{inputenc}
\usepackage{geometry}
\geometry{
a4paper,
total={55mm,90mm},
left=0mm,
top=0mm,
}
% \usepackage[top=1in, bottom=0in, left=0in, right=0in]{geometry}
\pagestyle{empty}
\setstocksize{55mm}{90mm}
\setpagecc{55mm}{90mm}{*}
\usepackage{fontspec}
\setmainfont{[montserrat.bold.ttf]}
\usepackage[absolute]{textpos}
\usepackage{datatool}
% \usepackage{pstricks}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{float}
\setlength{\unitlength}{1mm}
\setlength{\TPHorizModule}{\unitlength}
\setlength{\TPVertModule}{\unitlength}
\DTLloaddb{namelist}{data.csv}
\begin{document}
\DTLforeach{namelist}{%
%% Map each column header in your .csv file to a command
\Name=Name,
\Club=Club%
}{
\noindent
\begin{figure}[!]
\noindent
\begin{picture}(90,15)
\put(0,0){\includegraphics[height=15mm, width=90mm]{header-background.png}}
\put(5, 7){\color{white}\Club}
\end{picture}
\end{figure}
\begin{textblock}{60}(20,30)
\textbf{\Name}
\end{textblock}
\clearpage
}
\end{document}
答案1
解决方案....
papersize={55mm,90mm},
缺少几何定义