In general: I need to retrieve values from an array to submit those values as indices to a function.
More specific: I want to create figures, which contain subfigures. These subfigures are loaded from mysubfigures.pdf. The order of the subfigures is saved in a seperate list ggg. I made a minimal example below.
This is the part that doesn't work and where I need your help: page=\ggg(\subfigure)
I want it to be like page=64 when \subfigureis1, page=61 when \subfigureis2, and so on.
(I have looked at some similar questions on stackexchange but I don't understand the answers.)
\documentclass[class=minimal,border=0pt,tikz]{standalone}
\usepackage{tikz}
\usepackage{arrayjob}
\begin{document}
\newarray\ggg
\readarray{ggg}{64&61&41}
\ggg(1)
\foreach \subfig in {1,2,3}
{
%This is Figure \subfig
\includegraphics[page=\ggg(\subfig)]{./mysubfigures.pdf};
}
\end{document}
\foreach \subfigure in {64,61,41}and usepage=\subfigure?\subfigureas a loop "variable" might be dangerous.tikzpictureenv\foreach[count=\i] \pg in {64,61,41} {Subfigure~\i, Page~\pg: \includegraphics[page=\pg]{mysubfigures} }If you elaborate on why you want to use arrays we could give you more help