My ultimate objective is to pdflatex a beamer document in which each slide displays a figure from the current directory, where the names and number of figures is not a priori known. (explanation: the figures are those that do not make it to the final presentation, but might prove useful to have at hand just in case).
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.
But my figures will not have such nice names. And some will be pdf and some will be png. Edit: latex does not accept png, if I understand correctly, but pdflatex certainly does.
The following is my best effort, but it doesn't work.
I also tried {"\name"} instead of {\name}. The code inserts the first figure in the loop (no matter its extension, pdf or png) but not the second figure in the loop.
Any suggestions?
many thanks.
EDIT: Simplified my question, hopefully it is clearer.
Last edited by ptoche on Thu Nov 10, 2011 1:01 pm, edited 1 time in total.
Compiling spits out a series of errors, naturally:
! Undefined control sequence.
->\errmessage LaTeX Error: File `"Name\name
"' not found.
See the LaTeX m...
l.25 ...tido{\name=\List}{2}{\beamerfigure{\name}}
%can multido be tweaked to...
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
So far no-one has shown interest in my question, perhaps it is misplaced. At any rate, let me describe a solution I have concocted based on suggestions here: