### Who is online

In total there are 5 users online :: 0 registered, 0 hidden and 5 guests (based on users active over the past 5 minutes)
Most users ever online was 1327 on Tue Nov 05, 2013 7:11 pm

Users browsing this forum: No registered users and 5 guests

## caption, elsarticle | Unsupported Document Class

captionelsarticleAdd tags Information and discussion about specific document classes and how to create your own document classes.

### caption, elsarticle | Unsupported Document Class

Hello all together,

in my thesis paper I inserted the following packages in order to change at German language which worked great (WinEdt7):
Code: Select all  •  Open in writeLaTeX
\usepackage{ngerman}
\usepackage[utf8]{inputenc
}

Now I changed the packages because I had troubles with quotation marks. They are as followed:
Code: Select all  •  Open in writeLaTeX
\usepackage[ngerman]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[babel,german=guillemets]{csquotes
}

It didn't worked well, so I changed back to the first package, that now doesn't work anymore. By compiling the following error message is shown:

Code: Select all  •  Open in writeLaTeX
Package caption Warning: Unsupported document class (or package) detected,
(caption)                usage of the caption package is not recommended.
See the caption package documentation for explanation.

))
(C:\Users\Ronald\AppData\Roaming\MiKTeX\2.9\tex\latex\koma-script\scrpage2.sty)
Writing nomenclature file Masterthesis.nlo
(C:\UNI\Masterthesis.aux
! Undefined control sequence.
\select@language ... \@empty }\languageshorthands
{none}\babel@beginsave \cs...
l.4 \select@language{ngerman}

What can I do? I didn´t changed anythinng else, so I have no idea why is doesn´t work as it did before? When I create a new file and insert these packages
Code: Select all  •  Open in writeLaTeX
\usepackage{ngerman}
\usepackage[utf8]{inputenc
}

they work fine. So the packages exist. The first codes of my thesis are as followed:
Code: Select all  •  Open in writeLaTeX
\documentclass[12pt]{elsarticle}

\usepackage{ngerman}
\usepackage[utf8]{inputenc
}

%\usepackage[ngerman]{babel}
%\usepackage[latin1]{inputenc}
%\usepackage[T1]{fontenc}
%\usepackage[babel,german=guillemets]{csquotes}

\usepackage{amsmath,amssymb,amsfonts,amsthm}    % Typical maths resource packages
\usepackage{graphicx}                           % Packages to allow inclusion of graphics
\usepackage{float}
%\usepackage{hyperref}                           % For creating hyperlinks in cross references
%\usepackage[authoryear]{natbib}                % literature reference style
\usepackage{caption3}
\usepackage{nomencl}
\usepackage{pdfpages}
\usepackage{listings}
\usepackage[noend]{algorithmic}
\usepackage{algorithm}
\usepackage{booktabs}
\usepackage{amsmath}
\usepackage{paralist}
\usepackage{picins}
\usepackage{multirow}
\usepackage{makeidx}
\usepackage{wrapfig}
\usepackage{subfig}
\DeclareMathOperator*{\argmax}{arg\,max
}

I hope that I mentioned all necessary. I am very thankful for any help.
Last edited by localghost on Thu Jul 19th, 2012, edited 1 time in total.
Reason: Source code has to be tagged as such to keep a post clear and legible (see Board Rules).
Ronald

Posts: 2
Joined: Thu Jul 19th, 2012

### Re: caption, elsarticle | Unsupported Document Class

The warning by the caption package can be neglected because the elsarticle class relies on the »article« class. And the latter one is supported by the package. It just gives a warning because it detects a class which is not officially supported. All things will work.

Your problem is at another place. The ngerman package is obsolete. Hence the babel package along with its ngerman language option is the way to go. The error can be caused due to the migration from ngerman to babel. Just try another compiler run.

If the problem persists, delete the *.aux file in the working directory and try again. If the problem still persists, prepare a minimal example to give an adequate problem description. At the moment all approaches are only guesses and random shots, which is not very helpful.

And by the way, \usepackage{caption} (without the appended 3) is quite sufficient to load the package.

Best regards and welcome to the board
Thorsten
LaTeX Community Moderator

¹ System: openSUSE 13.1 (Linux 3.11.10), TeX Live 2013 (vanilla), TeXworks 0.5 (r1351)
² Posting stopped indefinitely due to offenses

localghost
Site Moderator

Posts: 9219
Joined: Fri Feb 2nd, 2007
Location: Braunschweig, Germany

### Re: caption, elsarticle | Unsupported Document Class

First of all thanks a lot for you fast answer. I believe as you that the problem occurred with the change to babel which I cannot undo. The babel package doesn#t work either. Then it has problems with the title page and its vowel mutations (that was the reason I inserted ngerman). As you advised I tried other compilers but it doesn't work neither. Also I deleted the *.aux file but I didn't help.

If I use the babel lines it doesn't work because of the Latin and the T1
Code: Select all  •  Open in writeLaTeX
%\usepackage[ngerman]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[babel,german=guillemets]{csquotes
}

So I changed the lines to the follow ones:
Code: Select all  •  Open in writeLaTeX
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[babel,german=guillemets]{csquotes
}

And now it works:-) Still one question: Can I create a backup of the whole project and not only save the sheets? So that I can go back to an earlier point (and undo an babel-package-installation for example;-) ), that a mistake as today cannot occur any more?
Thanks a lot for your help.
Best wishes
Ronald

Posts: 2
Joined: Thu Jul 19th, 2012

### Re: caption, elsarticle | Unsupported Document Class

Ronald wrote:[…] The babel package doesn't work either. Then it has problems with the title page and its vowel mutations (that was the reason I inserted ngerman). As you advised I tried other compilers but it doesn't work neither. Also I deleted the *.aux file but I didn't help. […]

This description is not helpful. As I requested earlier you should prepare a minimal example. Otherwise the discussion remains academic and I wasted my time because concrete help is not possible.

And I didn't advise to use another compiler, but to run the compiler again.
LaTeX Community Moderator

¹ System: openSUSE 13.1 (Linux 3.11.10), TeX Live 2013 (vanilla), TeXworks 0.5 (r1351)
² Posting stopped indefinitely due to offenses

localghost
Site Moderator

Posts: 9219
Joined: Fri Feb 2nd, 2007
Location: Braunschweig, Germany

### Re: caption, elsarticle | Unsupported Document Class

localghost wrote:The warning by the caption package can be neglected because the elsarticle class relies on the »article« class. And the latter one is supported by the package. It just gives a warning because it detects a class which is not officially supported. All things will work.

This is not true, the caption package does not check against the document class name but known definitions of \caption, \@caption, and \@makecaption instead. So in fact the elsarticle document class is incompatible to the caption package.

Code: Select all  •  Open in writeLaTeX
\usepackage[caption=false]{subfig}

sommerfee

Posts: 493
Joined: Mon Apr 9th, 2007

### Re: caption, elsarticle | Unsupported Document Class

sommerfee wrote:This is not true, the caption package does not check against the document class name but known definitions of \caption, \@caption, and \@makecaption instead. So in fact the elsarticle document class is incompatible to the caption package. […]

OK. Nobody knows that better than you. But on the other side I can use caption with elsarticle and until now don't have any problems. I didn't check the class code so didn't know about the (re)definitions of the macros you mentioned. Is it a concurrence that I don't face any flaws?
LaTeX Community Moderator

¹ System: openSUSE 13.1 (Linux 3.11.10), TeX Live 2013 (vanilla), TeXworks 0.5 (r1351)
² Posting stopped indefinitely due to offenses

localghost
Site Moderator

Posts: 9219
Joined: Fri Feb 2nd, 2007
Location: Braunschweig, Germany

### Re: caption, elsarticle | Unsupported Document Class

localghost wrote:But on the other side I can use caption with elsarticle and until now don't have any problems. I didn't check the class code so didn't know about the (re)definitions of the macros you mentioned. Is it a concurrence that I don't face any flaws?

I'm terribly sorry, I have mistaken the Elsevier document classes with the Springer ones, so just forget what I have said about the Elsevier classes.

I just took a look and the elsarticle document class defines \@makecaption in a way the caption package isn't aware off. But it's the same definition as in article, but with an additional \footnotesize inside. So in this case one can ignore the warning message from the caption package.

(I just put a small note inside my TODO list to add the elsarticle definition to my caption package, but please don't expect a new version very soon...)

sommerfee

Posts: 493
Joined: Mon Apr 9th, 2007

### Re: caption, elsarticle | Unsupported Document Class

sommerfee wrote: I'm terribly sorry, I have mistaken the Elsevier document classes with the Springer ones, so just forget what I have said about the Elsevier classes. […]

Nevermind.
sommerfee wrote:[…] I just took a look and the elsarticle document class defines \@makecaption in a way the caption package isn't aware off. But it's the same definition as in article, but with an additional \footnotesize inside. So in this case one can ignore the warning message from the caption package. […]

I only knew that elsarticle loads »article« but wasn't aware of any modifications to captions.
sommerfee wrote: […] (I just put a small note inside my TODO list to add the elsarticle definition to my caption package, but please don't expect a new version very soon...)

No need to hurry. For the present it works yet again.
LaTeX Community Moderator

¹ System: openSUSE 13.1 (Linux 3.11.10), TeX Live 2013 (vanilla), TeXworks 0.5 (r1351)
² Posting stopped indefinitely due to offenses

localghost
Site Moderator

Posts: 9219
Joined: Fri Feb 2nd, 2007
Location: Braunschweig, Germany

### Re: caption, elsarticle | Unsupported Document Class

sommerfee wrote:(I just put a small note inside my TODO list to add the elsarticle definition to my caption package, but please don't expect a new version very soon...)

Finally I found some time to release a new version (3.3) of the caption package which does include support for the elsarticle document class. (Please note that it's documented in the CHANGELOG only, I will revise the documentation as soon as I will find some time for that...)

sommerfee

Posts: 493
Joined: Mon Apr 9th, 2007

### Topic Tags

captionelsarticle