I'm trying to use the subcaption package with an old Elsevier template, but I get the following error
(caption) standard defaults will be used.
See the caption package documentation for explanation.
)
/usr/local/texlive/2020/texmf-dist/tex/latex/caption/subcaption.sty:71: Illegal parameter number in definition of @tempa.
<to be read again>
1
l.71 ...achCaptionType{\DeclareCaptionSubType{#1}}
The code is very simple at this stage as it doesn't have any packages:
\documentclass[book,numbers]{elsbook-A07b}
\usepackage{caption}
\usepackage{subcaption}
I have absolutely no idea what's causing the error as I've worked with the subcaption package for years without problem. I can't really include an MWE since that would include the whole template. I also know I shouldn't mess with the subcaption.sty file. I am wondering whether there's anything I can try to get rid of this error?
captionwith Elsevier classes: this is the meaning of the warning that's partially visible at the top. The people at Elsevier don't want that users fiddle with their preferred style. This said, you can usesubfigfor subfloats, loading it with\usepackage[caption=false]{subfig}. Check its documentation for the syntax. – egreg Oct 09 '20 at 10:43captionpackage I get the same error, I guess perhaps becausesubcaptionloadscaptioncorrect? What would you use instead ofsubcaption? I know it's supposed to be the best package for subfigures. – aaragon Oct 09 '20 at 10:45subcaptionis indeed based oncaption, so loading only the former is the same as loading both. Neither should be used with that class. On the other hand, nobody can test for possible workarounds, because the class is not avaliable. – egreg Oct 09 '20 at 10:46elsbook-A07b.cls. Any my code is as small as I wrote at this point (just adding the package). – aaragon Oct 09 '20 at 10:49subfigpackage is not good. Apparently the package doesn't work withhyperrefsee here. What is your take on that? – aaragon Oct 09 '20 at 11:01subcaptionpackage, too. – Oct 09 '20 at 13:10