Um Grafiken nach einem bestellen Prinzip einzufügen, habe ich ein \newcommand erstellt. Dieser sieht folgendermassen aus:
\newcommand{\inputpictureone}{\begin{table}[] \begin{tabular}{|l|} \hline \textbf{\textcolor{green}\pictureonetitle} \cellcolor{brightgreen} \hspace{12cm} \\ \hline \includegraphics[width=0.6\textwidth]{\pictureone} \\ \hline \footnotesize\textbf{\textcolor{gray}\pictureonecaption}\cellcolor{brightgray} \\ \hline \end{tabular} \end{table}}
Es geht mir bei meiner Frage aber nicht um den Code, denn grundsätzlich funktioniert alles. Nun möchte ich ein zweites Bild einfügen, und darum habe ich diesen Befehl nochmal einem \newcommand zugeordnet, in welchem dann einfach die Texte und das Bild anders sind, also sieht das dann etwa so aus:
\newcommand{\inputpicturetwo}{\begin{table}[] \begin{tabular}{|l|} \hline \textbf{\textcolor{green}\pictureonetitle} \cellcolor{brightgreen} \hspace{12cm} \\ \hline \includegraphics[width=0.6\textwidth]{\picturetwo} \\ \hline \footnotesize\textbf{\textcolor{gray}\picturecaptiontwo}\cellcolor{brightgray} \\ \hline \end{tabular} \end{table}}
Auch dies funktioniert wunderbar, nur ist es mühsam, dies für sagen wir 15 Bilder immer zu wiederholen. Gibt es irgendeine Möglichkeit dies etwas variabler zu gestalten?
Zu meinem Code:
Classfile:
% CLASS - FILE \NeedsTeXFormat{LaTeX2e} \ProvidesClass{classfile}[27.11.2015 Vorlage] \LoadClass[10pt,a4paper]{article} \RequirePackage{sectsty} % loads the title package \RequirePackage{fontspec} % loads the title package \RequirePackage{geometry} % loads the geometry package \RequirePackage{marginnote} % loads the margin package \RequirePackage[doublespacing]{setspace} % loads the package to have a 1.5 line spacing \RequirePackage{eso-pic} \RequirePackage{xcolor,colortbl}
Vielen Dank im Voraus[/code]