1

Since today I am getting an error message when I use the caption package.

This is a minimal working example:

\documentclass[12pt,a4paper]{report}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\centering
\includegraphics[scale=0.5]{figure.jpg}
\caption{caption }
\end{figure}
\end{document}

I get the following error messages:

! LaTeX Error: Command \@makecaption already defined. 
Or name \end... illegal, see p.192 of the manual.
See the LaTeX manual or LaTeX Companion for explanation.

! LaTeX Error: Command \@makecaption already defined.
Or name `\end... illegal`, see p.192 of the manual.
See the LaTeX manual or LaTeX Companion for explanation.

! Undefined control sequence.
\caption@beginex ...tion@begin {#1}\caption@iflof
{\def \caption@tempa {#2}}...
l.12 \caption{this is caption}

I am using MikTex 2.9 for windows and I was using the 2012 version of the caption package. I then uploaded to a newer version but it didn't solve the problem.

The file list:

 *File List*
  report.cls    2007/10/19 v1.4h Standard LaTeX document class
  size12.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
inputenc.sty    2008/03/30 v1.1d Input encoding file
  latin1.def    2008/03/30 v1.1d Input encoding file
 amsmath.sty    2000/07/18 v2.13 AMS math features
 amstext.sty    2000/06/29 v2.01
  amsgen.sty    1999/11/30 v2.0
  amsbsy.sty    1999/11/29 v1.2d
  amsopn.sty    1999/12/14 v2.01 operator names
amsfonts.sty    2009/06/22 v3.00 Basic AMSFonts support
 amssymb.sty    2009/06/22 v3.00
 caption.sty    2006/01/12 v3.0i Customising captions (AR)
caption3.sty    2012/01/12 v1.4b caption3 kernel (AR)
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg    2007/01/18 v1.5 graphics configuration of teTeX/TeXLive
  pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)
 ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
supp-pdf.mkii
 ***********
6
  • This 'works for me', so I suspect a version issue. Can you try adding \listfiles to your input, keep going past the errors and edit the resulting *File list* from the log into the question.
    – Joseph Wright
    Apr 6, 2013 at 14:28
  • Thanks for replying, I updated my post with the file list. Apr 6, 2013 at 14:38
  • 3
    Works for me without problem in an up-to-date miktex 2.9. And my caption version is newer. If you have multiuser installation: Make sure that you did run the update manager in admin and user mode. Also make sure that you are not using some older versions stored in your document folder or a local texmf tree. Apr 6, 2013 at 14:39
  • 3
    You are using old package versions; for example, in my system (TeX Live2012) I have caption.sty 2013/02/03 v3.3-65 Customizing captions (AR) caption3.sty 2013/02/03 v1.5-62 caption3 kernel (AR) Apr 6, 2013 at 14:39
  • 5
    caption.sty and caption3.sty must fit into one another, therefore both are always offered as a bundle. But you have an own blend of the caption package bundle on your computer, one part (caption.sty) from 2006, but the other part (caption3.sty) from 2012. This is doomed to fail.
    – user2574
    Apr 6, 2013 at 14:55

0

Browse other questions tagged .