- #1
steem84
- 13
- 0
Hello,
I was wondering if it is possible to write functions in Latex to place figures in a constant way during the whole document. What I had in mind is to do it in 'a MATLAB way', for example:
In the document itself, you could call the function and specify the figures and the caption like this:
placefigures{cow.png,duck.png,animals}
and below the whole document, or maybe in another file, the function:
function placefigures{figure1,figure2,caption}
\begin{figure}
\begin{minipage}{0.5\textwidth}
\includegraphics[width=0.95\textwidth]{figures/figure1}
\end{minipage}
%\hspace{0.05\textwidth}
\begin{minipage}{0.5\textwidth}
\includegraphics[width=0.95\textwidth]{figures/figure2}
\end{minipage}
\caption{figcaption}
\end{figure}
In this way it would be possible to change only one number if you would change your figure positioning during the whole document.
Is something like possible?
Regards,
Steven
I was wondering if it is possible to write functions in Latex to place figures in a constant way during the whole document. What I had in mind is to do it in 'a MATLAB way', for example:
In the document itself, you could call the function and specify the figures and the caption like this:
placefigures{cow.png,duck.png,animals}
and below the whole document, or maybe in another file, the function:
function placefigures{figure1,figure2,caption}
\begin{figure}
\begin{minipage}{0.5\textwidth}
\includegraphics[width=0.95\textwidth]{figures/figure1}
\end{minipage}
%\hspace{0.05\textwidth}
\begin{minipage}{0.5\textwidth}
\includegraphics[width=0.95\textwidth]{figures/figure2}
\end{minipage}
\caption{figcaption}
\end{figure}
In this way it would be possible to change only one number if you would change your figure positioning during the whole document.
Is something like possible?
Regards,
Steven