I want to create labels with barcodes.
The individual barcodes should be a sequence of numbers which identify objects. After some trial and error, the GS1
package seemed to work for me.
Since I have a sequence of numbers, it seems natural to use a for loop. The problem which arises is that the generated barcodes are all 0-valued.
Maybe the problem is that \EANBarcode
expects a string instead of an integer. I don't know how LaTeX handles variable types and how to convert the number 1 to the string "1" and if this is relevant here.
\documentclass[a4paper]{article}
\usepackage{labels}
\usepackage{GS1}
\usepackage{forloop}
\LabelCols=4
\LabelRows=11
\GSSetup{module_height=15mm}
\begin{document}
\newcounter{loop}
\forloop{loop}{1}{\value{loop} < 45}{
\addresslabel{
\EANBarcode{\arabic{loop}}
}
}
\end{document}