Different websites suggest using one of those two packages.


What are differences between them? Which is better?

  • 4
    There used to be a preference for the "s" package for package writers, but it's a thing of the past. The "x" package is more powerful. – egreg Jul 14 '11 at 19:57
  • 8
    graphicx also loads by default graphics – user2478 Jul 14 '11 at 20:04

Most modern people use graphicx!

graphicx is an extension of graphics. Moreover, while graphics sticks to the original TeX conventions concerning arguments, graphicx allows optional arguments according to the more transparent key=value scheme.

| improve this answer | |

One of the major aims of LaTeX is to provide a layer of consistent syntax over the somewhat varying syntax provided by TeX primitives (and in the case of graphics inclusion by the various TeX engines and dvi dvrivers). For LaTeX2e there was a desire to make a driver independent graphics inclusion mechanism as part of the standard release (and described in the LaTeX book). None of the standard LaTeX commands (and at that time very few packages) used a key=value syntax so we wanted an interface with standard LaTeX command syntax.

However the most popular LaTeX2.09 contributed package for image inclusion at that time was epsfig which did have a key=value syntax, as did pstricks. It was clear that I couldn't replicate all the functionality of epsfig with \includegraphics without having an unwieldy collection of positional optional arguments, so I split the functionality putting the keyval version in graphicx described in the "Companion" books and the base functionality in graphics described in the "LaTeX Book". At the same time I developed the keyval parser into the separate keyval package to make it easy for other packages to use a similar syntax.

Move on a couple of decades and of course now several packages use key=value syntax, either using the original keyval parser or variants from xkeyval or pgfkeys or wherever so effectively that syntax convention is an accepted part of LaTeX syntax as understood by users and concerns over the use of it in a standard package may perhaps been seen as a temporary blip. But it's easier with hindsight, it wasn't so clear at the time that that was the way things would go...

Just use the x version:-)

| improve this answer | |

This two packages belong together and AFAIK are only separated because of backwards compatibility to older code. The graphicx package (x for eXtended) is based on the graphics package and provides much more functionality. There is no reason to use graphics alone. All options of \includegraphics are only provided by graphicx.

| improve this answer | |

You may want to have a look here for a better understanding between the two graphics.

Hope this helps.

| improve this answer | |
  • 4
    The information on that page is mostly wrong, unfortunately. It implies that one package is for pdftex and the other for tex. – David Carlisle Feb 28 '15 at 17:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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