Thus I want to loop over a list of the figures. I have a batch file that automatically list all the files in the current folder, so I can \include or \input that into my document. In other words, I do have the list of names of the figures to be included.
The following works if all my figures are named Name1.pdf, Name2.pdf, etc.
Code: Select all
\documentclass{beamer}%
\usepackage{graphicx}%
\usepackage{pgffor}%
\begin{document}%
\foreach \index in {1, ..., 2}
{%
\includegraphics[width=\textwidth]{Name\index.pdf}\par%
}%
\end{document}
The following is my best effort, but it doesn't work.
Code: Select all
\documentclass{beamer}%
\usepackage{graphicx}%
\usepackage{pgffor}%
\newcommand*{\List}%
{%
Name1.pdf,
Name2.png
}%
\begin{document}%
\foreach \name in \List%
{%
\begin{frame}%
\begin{figure}%
\begin{minipage}[b]{\textwidth}%
\centering%
\includegraphics[width=\textwidth]{\name}%
\end{minipage}%
\end{figure}%
\end{frame}%
}%
\end{document}
Any suggestions?
many thanks.
EDIT: Simplified my question, hopefully it is clearer.