About
Shop
LaTeX
Software
Books
Gallery
News
Contact
Blog
Settings
Account
Latest news 2024-10-15: New blog post: Tales for Our Times Book Launch.

Exercise 27: Name Labels Using a CSV List (Solution)

This is a solution to the CSV list part of Exercise 27. This document uses the dummy-logo.png sample image.
% arara: pdflatex
\documentclass[a4paper]{article}

% fonts and encodings
%\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage[cutmark]{ticket}
\usepackage[margin=5mm]{geometry}
\usepackage{graphicx}
\usepackage{etoolbox}

\setlength{\unitlength}{1mm}
\ticketNumbers{2}{3}
\ticketSize{98}{90}
\ticketDistance{4}{4}

\renewcommand*{\ticketdefault}{%
 \put (80,82) {\includegraphics[width=12mm]{dummy-logo}}%
 \put (5,85) {\large\bfseries Secret Lab of Experimental Stuff}
 \put (5,75) {\large\scshape University of Somewhere}
 \put (45,30) {\makebox(0,0){\Large\itshape Culinary Experimental Research}}
}

\newcommand*{\myticket}[1]{%
  \ticket
  {
    \put (45,50) {\makebox(0,0) {\Large\bfseries #1}}
  }%
}

\begin{document}

\forcsvlist\myticket{Polly Parrot,%
 Mabel Canary,%
 Z\"oe Zebra,%
 Jos\'e Arara,%
 Dickie Duck,%
 Fred Canary}

\end{document}

Download namelabels1.tex or namelabels1.pdf.

© 2015 Dickimaw Books. "Dickimaw", "Dickimaw Books" and the Dickimaw parrot logo are trademarks. The Dickimaw parrot was painted by Magdalene Pritchett.

Terms of Use Privacy Policy Cookies Site Map FAQs