Different websites suggest using one of those two packages.
What are differences between them? Which is better?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.Sign up to join this community
Most modern people use
graphicxis an extension of
graphics. Moreover, while
graphicssticks to the original TeX conventions concerning arguments,
graphicxallows optional arguments according to the more transparent
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
\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
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
This two packages belong together and AFAIK are only separated because of backwards compatibility to older code.
graphicx package (x for eXtended) is based on the
graphics package and provides much more functionality. There is no reason to use
All options of
\includegraphics are only provided by
You may want to have a look here for a better understanding between the two graphics.
Hope this helps.