I receive two errors when using \includegraphics command in pdflatex. I've never seen these particular errors discussed/answered before.

I have the following MWE (this is all I have in the document so far):




\hspace{0.5in}\parbox{6in}{\caption{Box comparing two methods \label{box}}} 


where box is the figure to be included. There are two errors produced. Both of them say the following:

! Undefined control sequence.

recently read \ltx@zapspace

I do not know what these errors mean. I assume they have something to do with \ltx@zapspace. I appreciate any help or clarification of this error or how to correct it.

  • 3
    \ltx@zapspace is defined by the ltxcmds package. You could load that. However, your example compiles for me (with another image). – Stefan Kottwitz Nov 27 '12 at 15:55
  • Thanks Stefan. I have separately included \usepackage(ltxcmds}, but the same errors result. Is there some manual correction that needs to be made here? – kyle Nov 27 '12 at 16:09
  • @StefanKottwitz There is no need to load additional packages, because pdftex.def already contains \RequirePackage[2010/12/07]. This is not accidentally the version that introduces \ltx@zapspace. – Heiko Oberdiek Nov 27 '12 at 16:10

Driver file pdftex.def uses package ltxcmds since version 2011/04/21 v0.06:


Macro \ltx@zapspace is provided by package ltxcmds since this version 2010/12/07 v1.14.

Thus very likely an outdated package is the cause and LaTeX throws a warning, e.g.:

LaTeX Warning: You have requested, on input line 408, version
               `2010/12/07' of package ltxcmds,
               but only version
               `2009/08/05 v1.0 LaTeX kernel commands for general use (HO)'
               is available.

Solution: update at least package ltxcmds, better the whole bundle oberdiek.

  • Heiko, you are correct. I see that message (only with different dates): LaTeX Warning: You have requested, on input line 406, version 2010/12/07' of package ltxcmds, but only version 2010/04/26 v1.7 LaTeX kernel commands for general use (HO)' is available. Can you please clarify how to update either the ltxcmds or oberdiek packages? I'm a novice to latex and not sure how to do this. – kyle Nov 27 '12 at 21:20

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.