TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

To set the default scaling values for the \includegraphics command, one can use \setkeys{Gin}{(key)=value)} from the graphicx package. For example, say I put down


This will automatically scale all succeeding \includegraphics commands by the above width value. Is there a way to turn off this setting for certain graphics? That is, is there a way to still use \includegraphics without having the width set as the above?

I'm aware that

\includegraphics{pizza.jpg} %this uses setted values
\includegraphics{pizza.jpg} %this uses normal values

works, but I'm wondering if I can do this without having to surround the \setkeys{Gin} command.

share|improve this question
\includegraphics[width=2cm]{pizza.jpg} (or the length you want) should override the default value. Never use \begin{group} and \end{group}. – egreg Mar 15 '13 at 23:06
What I mean is that I want to \includegraphics{pizza.jpg} in its native setting, i.e., with absolutely no scaling values in place. Something like [width=2cm] only overwrites the scaling value with another one. – Dustin Tran Mar 15 '13 at 23:09
up vote 1 down vote accepted

You can use the value stored in \Gin@nat@width, defining a handier interface to it:


\setkeys{Gin}{width=30pt} % exaggerated for the example



enter image description here

share|improve this answer
Sorry, late response! Yes, this works perfectly. By extension, one can do the same for height as well. :) – Dustin Tran Mar 18 '13 at 4:17

Your Answer


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.