Hi,
I need to print some labels. Is there some class (or package) that can do that well?
I'm using \makelabels command of the letteracdp class.
It produce just the first 25 labels, then stops. I've tried with 2 or 3 files, but always the same result.
TIA
Renato
General ⇒ Labels from CSV File
Labels from CSV File
LaTeX Resources: http://www.dickimaw-books.com/latexresources.html
Creating a Minimal Example: http://www.dickimaw-books.com/latex/minexample/
Creating a Minimal Example: http://www.dickimaw-books.com/latex/minexample/
Labels from CSV File
emh...
could it be a 'minimal exampe'?
the .csv file
the most important error, is that it doesn' produce more than 25 labels
TIA
Renato

Code: Select all
\documentclass{letteracdp}
\usepackage[italian]{babel}
%\usepackage{envlab}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{datatool}
\usepackage[usenames]{color}
\usepackage [normalem]{ulem}
\usepackage[utf8x]{inputenc}
\usepackage{textcomp}
\usepackage{tabularx}
\DTLloaddb{indirizzi}{/home/kde/Dropbox/edil_150/associazione/documenti/ind_sas.csv}
%
\pagestyle{fancy}
%\fancypagestyle{firstpage}{ % note opening bracket
% \fancyhf{} %<<<<----- clear all fields
%\fancyhead[L]{\includegraphics[width=.2\columnwidth]{edil150}\quad \hrulefill}
%\fancyfoot[c]{\tiny
%\begin{tabularx}{\textwidth}{|X|X|X|}
%\textbf{sede Legale}&\textbf{sede operativa}&\textbf {tel.} 0575 38 28 34 - \textbf{fax } 0575 98 38 78\\
%----------------fine prima riga---------------------
%Via Misericordia, 1/Q &Via Luigi Galvani, 25&www.edil150.it\\
%----------------fine seconda riga --------------------
%52042 C. Fiorentino (AR)&52100 Arezzo&presidente@edil150.it\\
%----------------fine terza riga----------------------
%\includegraphics[width=.1\columnwidth]{federterziario}&\includegraphics[width=.03\columnwidth]{cenai}&c.f. 92067640513\\
%---------------fine quarta riga----------------------
%\end{tabularx}}%
%} % closing bracket
%\fancyhf{}
%\fancyhead[R]{ \includegraphics[width=.2\columnwidth]{edil150}\quad }
%\fancyfoot[C] {\hrulefill}
%\renewcommand{\headrulewidth}{0pt}
%\renewcommand{\footrulewidth}{0pt}
%\renewcommand{\familydefault}{\sfdefault}
%\address{Sign. Topolino,\\
%via Astuti, 34 \\
% Topolinia}non e’ altro che la sintesi delle tre certificazioni di regolarit\'a contributiva rilasciate dalle Casse Edili e dagli Istituti previdenziali e assicuratori.
%\signature{\begin{tabular}[t]{r@{}r@{}}
% Renato Pontefice\\
% \includegraphics[width=.2\columnwidth]{firma}
% \end{tabular}}
\makelabels
\begin{document}
\DTLforeach*{indirizzi}{%
\nome=nome,\cognome=cognome,\via=via,\civico=civico,\cap=cap,\localita=localita,\prov=prov,}{
\begin{letter}{\emph{\textbf{\nome \space }\\\via\space \\\textbf{\cap},\space \localita\space \prov}}
%linea per fare lettere senza intestazione. commentare la predente
%\begin{letter}{\emph{\textbf{\nome \space \cognome}\\ \via\space \civico\\ \cap\space \localita\space \prov}}
%\DTLdisplaydb{indirizzi}
%\DTLdisplaydb{indirizzi}
\end{letter}
}
\end{document}
Code: Select all
nome,via,,cap,localita,prov
nome,via,,cap,localita,prov
nome,via,,cap,localita,prov
nome,via,,cap,localita,prov
nome,via,,cap,localita,prov
nome,via,,cap,localita,prov
nome,via,,cap,localita,prov
nome,via,,cap,localita,prov
nome,via,,cap,localita,prov
nome,via,,cap,localita,prov
nome,via,,cap,localita,prov
nome,via,,cap,localita,prov
nome,via,,cap,localita,prov
nome,via,,cap,localita,prov
nome,via,,cap,localita,prov
nome,via,,cap,localita,prov
nome,via,,cap,localita,prov
nome,via,,cap,localita,prov
nome,via,,cap,localita,prov
nome,via,,cap,localita,prov
nome,via,,cap,localita,prov
nome,via,,cap,localita,prov
nome,via,,cap,localita,prov
nome,via,,cap,localita,prov
nome,via,,cap,localita,prov
nome,via,,cap,localita,prov
nome,via,,cap,localita,prov
nome,via,,cap,localita,prov
nome,via,,cap,localita,prov
nome,via,,cap,localita,prov
nome,via,,cap,localita,prov
TIA
Renato
Labels from CSV File
You have errors in your assignment list:
Don't have a trailing comma (after \prov=prov), and your CSV file doesn't contain the fields cognome and civio, but those don't cause the problem you describe.
The following works fine for me:
(where test.csv is the name I gave to your CSV file.)
Regards
Nicola Talbot
Code: Select all
\DTLforeach*{indirizzi}{%
\nome=nome,\cognome=cognome,\via=via,\civico=civico,\cap=cap,\localita=localita,\prov=prov,}{
The following works fine for me:
Code: Select all
\documentclass{letteracdp}
\usepackage{datatool}
\DTLloaddb{indirizzi}{test.csv}
\address{Sign. Topolino,\\
via Astuti, 34 \\
Topolinia}
\makelabels
\begin{document}
\DTLforeach*{indirizzi}{%
\nome=nome,\via=via,\cap=cap,\localita=localita,\prov=prov}{
\begin{letter}{\emph{\textbf{\nome \space }\\\via\space
\\\textbf{\cap},\space \localita\space \prov}}
\end{letter}
}
\end{document}
Regards
Nicola Talbot
LaTeX Resources: http://www.dickimaw-books.com/latexresources.html
Creating a Minimal Example: http://www.dickimaw-books.com/latex/minexample/
Creating a Minimal Example: http://www.dickimaw-books.com/latex/minexample/