Problem with \@makecaption

1,341

I deleted the \usepackage{caption} line in the preamble and it runs without error.

Share:
1,341

Related videos on Youtube

stars83clouds
Author by

stars83clouds

Updated on August 15, 2022

Comments

  • stars83clouds
    stars83clouds about 1 year

    I can compile a .tex file on my own system but when I transfer the folder to an external server and run the same file, I get the following error:

    ! LaTeX Error: \@makecaption undefined.
    

    followed by a litany of hyperref warnings.

    Is this a problem with the caption package that is installed on the external server? What can I do to track the issue?

    My preamble is:

    % mn2esample.tex
    %
    % v2.1 released 22nd May 2002 (G. Hutton)
    %
    % The mnsample.tex file has been amended to highlight
    % the proper use of LaTeX2e code with the class file
    % and using natbib cross-referencing. These changes
    % do not reflect the original paper by A. V. Raveendran.
    % 
    % Previous versions of this sample document were
    % compatible with the LaTeX 2.09 style file mn.sty
    % v1.2 released 5th September 1994 (M. Reed)
    % v1.1 released 18th July 1994
    % v1.0 released 28th January 1994
    
    \documentclass[useAMS,usenatbib]{mn2e}
    
    % If your system does not have the AMS fonts version 2.0 installed, then
    % remove the useAMS option.
    %
    % useAMS allows you to obtain upright Greek characters.
    % e.g. \umu, \upi etc.  See the section on "Upright Greek characters" in
    % this guide for further information.
    %
    % If you are using AMS 2.0 fonts, bold math letters/symbols are available
    % at a larger range of sizes for NFSS release 1 and 2 (using \boldmath or
    % preferably \bmath).
    %
    % The usenatbib command allows the use of Patrick Daly's natbib.sty for
    % cross-referencing.
    %
    % If you wish to typeset the paper in Times font (if you do not have the
    % PostScript Type 1 Computer Modern fonts you will need to do this to get
    % smoother fonts in a PDF file) then uncomment the next line
    % \usepackage{Times}
    
    %%%%% AUTHORS - PLACE YOUR OWN MACROS HERE %%%%%
    
    
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    
    \usepackage{units}
    \usepackage[T1]{fontenc}
    \usepackage{amsmath}
    \usepackage{hyperref}
    \usepackage{units}
    %\usepackage{deluxetable}
    \usepackage[singlelinecheck=false]{caption}
    \usepackage{threeparttable}
    \usepackage{subfigure}
    \usepackage{graphicx}
    \usepackage{amssymb}
    \usepackage{booktabs}
    \usepackage{ulem}
    \newcommand{\ra}[1]{\renewcommand{\arraystretch}{#1}}
    
    • David Carlisle
      David Carlisle over 7 years
      you haven't given enough information to really help, but \@makecaption is defined in article class and several others, perhaps you are using a class that does not define it, how are we to guess?
    • egreg
      egreg over 7 years
      The class you're using is incompatible with caption and subfigure (the latter is obsolete, by the way). Do you really need to use mn2e?
    • stars83clouds
      stars83clouds over 7 years
      The issue is that this tex file runs very well on my own system, but when I try running it on a server, it doesn't compile at all and reports this error. Is it because the server has outdated files. I am aware that subfigure is obsolete.
    • Werner
      Werner over 7 years
      @stars83clouds: See Which package version am I using? That way one can figure out what is up-to-date/not.
    • Admin
      Admin over 7 years
      I'm voting to close this question as off-topic because according to the OPs answer posted below the problem was caused by \usepackage{caption}.
    • Admin
      Admin over 7 years
      According to ctan.org/tex-archive/macros/latex/contrib/mnras the mn2e document class is deprecated. But as already stated, the caption package is incompatible to this document class (or its successor) anyway.
  • Admin
    Admin over 7 years
    This is the author!