I'm defining a new command that places two images one next to the other and I want to add an horizontal space between the two images which corresponds to one third of the space that remains blank. The command definition reads:
\newcommand{\twofig}[4]{%
\begin{center}\includegraphics[width=#2\columnwidth]{#1.png}%
\hspace{(1-#2-#4)/3 \columnwidth }%
\includegraphics[width=#4\columnwidth]{#3.png}%
\end{center} }
I'm missing what I should use in order to get this operation solved. I've tried with \dimexpr
but I always got errors. Is it not the right solution? When should I use \dimexpr
and when \numexpr
? The etex manual also was not so helpful for me.
\hfill
on each side and in the middle, it will put 1/3 the available space in each place.\hfill
in the middle.