Maybe the question can not be exactly understood from the title. So, to automate things a bit, instead of rewriting everything when adding different pictures and tables, code was made to add everything with a help of FOR cycles:
\usepackage{pgffor}
\def\tableinput#1#2#3#4{%
\foreach \indexc in {#1, ..., #2} {%
\subsection{C\indexc -look explanations}
\foreach \indexd in {#3, ..., #4} {%
\subsubsection{C\indexc D\indexd -look explanations}
\rotatebox{90}{
\input{table-July-c\indexc d\indexd.tex}
}
\includegraphics[scale=0.6]{plot-July-c\indexc d\indexd.eps}
}
}
}
Afterwards I get everything included and everything works smooth. What I want is to be able to get the generated tex file (instead of just the PDF/DVI result). I could write C/C#/whatewer program that generates me the text, but since I already have the working stuff, I was wondering is there any possibility to grab the generated text?
I would like to be able to have something like:
\subsection{C0 -look explanations}
\subsubsection{C0 D0 -look explanations}
\rotatebox{90}{
\input{table-July-c0d0.tex}
}
\includegraphics[scale=0.6]{plot-July-c0d0.eps}
\subsubsection{C0 D1 -look explanations}
\rotatebox{90}{
\input{table-July-c0d1.tex}
}
\includegraphics[scale=0.6]{plot-July-c0d1.eps}
\subsection{C1 -look explanations}
\subsubsection{C1 D0 -look explanations}
\rotatebox{90}{
\input{table-July-c1d0.tex}
}
\includegraphics[scale=0.6]{plot-July-c1d0.eps}
\subsubsection{C1 D1 -look explanations}
\rotatebox{90}{
\input{table-July-c1d1.tex}
}
\includegraphics[scale=0.6]{plot-July-c1d1.eps}
Is that possible and if yes, how?
\subsection
\includegraphics
will have been expanded repeatedly at each iteration of the loop.