I have to do several figures like this:
\begin{figure}[h!]
\centering
\includegraphics[trim = 9.55cm 1.8cm 10.25cm 4.05cm, clip,width=1\textwidth]{./../ficherosComunes/images/capturaapp/01-actividadprincipal.png}
\caption{Captura de pantalla de ActividadPrincipal.java}
\end{figure}
\begin{figure}[h!]
\centering
\includegraphics[trim = 9.55cm 1.8cm 10.25cm 4.05cm, clip,width=1\textwidth]{./../ficherosComunes/images/capturaapp/02-listadoficheros.png}
\caption{Captura de pantalla de ActividadFicheros.java.}
\end{figure}
\begin{figure}[h!]
\centering
\includegraphics[trim = 9.55cm 1.8cm 10.25cm 4.05cm, clip,width=1\textwidth]{./../ficherosComunes/images/capturaapp/03-listadoficherodetalles.png}
\caption{Captura de pantalla de ActividadFicheroDetalles.java.}
\end{figure}
As it can be seen there's all times repeated trim = 9.55cm 1.8cm 10.25cm 4.05cm, clip,width=1\textwidth Would it be possible to write it in a variable? I have tried to define a \newcommand{\texttrim}{trim = 9.55cm 1.8cm 10.25cm 4.05cm, clip,width=1\textwidth} but it doesn't work if I put it as an option. I have also tried to define lengths (to have at least the trimming lengts defined) but they don't work either.
\graphicspath{{./../ficherosComunes/images/capturaapp/}}to add your image folder to the search scope and then use\includegraphics{01-actividadprincipal}. Furthermore you can omit the suffix.pngsincegraphicxfinds the right extension automatically. – Tobi Aug 12 '13 at 22:13