Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have the following but when I change scale, I have to change all images. Is there a better way so that I can change only one place? I read about command/macro but not sure how to use it in this case.

\documentclass[fleqn]{article}
\usepackage{graphicx}
\begin{document}
\begin{enumerate}
\item
\includegraphics[scale=0.6,valign=t]{images/image13}
\item
\includegraphics[scale=0.6,valign=t]{images/image14}
\item
\includegraphics[scale=0.6,valign=t]{images/image18}
\item
    \includegraphics[scale=0.6,valign=t]{images/image19}
\end{enumerate}
\end{document}
share|improve this question
4  
...one ring to rule them all! –  Werner Mar 10 at 5:35
    
@Werner: you ninja'd me with this association... –  mbork Mar 10 at 5:55
    
That's one of LaTeX's selling points. I don't think automatically scaling images is very easy in Word, for instance. –  Jubobs Mar 10 at 7:34

1 Answer 1

up vote 8 down vote accepted

I suggest defining the scale factor as a macro \imagescale (say). This way, a single change will affect everything:

enter image description here

\documentclass{article}
\usepackage[export]{adjustbox}% http://ctan.org/pkg/adjustbox
\newcommand{\imagescale}{0.2}
\begin{document}
\begin{enumerate}
  \item \includegraphics[scale=\imagescale,valign=t]{example-image}
  \item \includegraphics[scale=\imagescale,valign=t]{example-image}
  \item \includegraphics[scale=\imagescale,valign=t]{example-image}
\end{enumerate}
\end{document}

Note that scale (like angle) can't be set globally.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.