As a Teaching Assistant for a class, I am trying to draw a seating chart for the professor. The seating chart will have a photo of each student, the student's name, and where the student is sitting in the lecture room.
Using labels and anchors in TikZ, I am able to manually create a label for each student, and use that label to anchor the name of the student with the image of the student.
\documentclass[12pt]{article}
\usepackage[margin=0in,paperwidth=17in, paperheight=11in]{geometry}
\usepackage{tikz}
\begin{document}
\begin{center}
\begin{tikzpicture}
\draw[white] (0,0) -- (43.1,0) -- (43.1,27.9) -- (0,27.9) -- (0,0);
\node[anchor=base,inner sep=0] (image1) at (4,4)
{\includegraphics[width=25mm]{empty-face.png}};
\node[text width=30mm,align=center,anchor=north] at (image1.south)
{George Washington};
\node[anchor=base,inner sep=0] (image2) at (8,4)
{\includegraphics[width=25mm]{empty-face.png}};
\node[text width=30mm,align=center,anchor=north] at (image2.south)
{John Adams};
\node[anchor=base,inner sep=0] (image3) at (12,4)
{\includegraphics[width=25mm]{empty-face.png}};
\node[text width=30mm,align=center,anchor=north] at (image3.south)
{Thomas Jefferson};
\end{tikzpicture}
\end{center}
\end{document}

However, since there are 70 students in the class, it seems to be more elegant to define a new command \student to position the face and name of the student. More concretely, I want the following code to work.
\documentclass[12pt]{article}
\usepackage[margin=0in,paperwidth=17in, paperheight=11in]{geometry}
\usepackage{tikz}
% Usage: \student{x coord}{y coord}{name}{picture file}
\newcommand{\student}[4]{
% What should I put in here????
}
\begin{document}
\begin{center}
\begin{tikzpicture}
\draw[white] (0,0) -- (43.1,0) -- (43.1,27.9) -- (0,27.9) -- (0,0);
\student{4}{4}{George Washington}{empty-face.png};
\student{8}{4}{John Adams}{empty-face.png};
\student{12}{4}{Thomas Jefferson}{empty-face.png};
\end{tikzpicture}
\end{center}
\end{document}
My question is: How should I define the \student command? Because I need it to generate a new label each time in order to align the name and picture of each student.
One possible workaround is to let the \student command take 5 arguments, where I manually specify a new label each time. But this seems to be a clumsy and potentially error-inducing approach.




\phantomand\pgfuseimagein TikZ? and you wouldn’t have to manually specify x and y coordinates; just place the pictures/names in a matrix. – Qrrbrbirlbel Feb 17 '13 at 00:39