2

Dear stackexchange users,

the document

\documentclass{scrartcl}
\addtokomafont{captionlabel}{\textbf}
\usepackage{subcaption}

\begin{document}

\begin{figure}
    \caption{test}
\end{figure}

\end{document}

does not compile with

pdflatex 2018.6.18
scartcl 3.25
subcaption 1.1-162
caption 3.3-147

I guess the caption definitions don't get along well. Do you guys have any idea how to fix this issue?

The error message looks like the following

! Missing \endcsname inserted.
<to be read again> 
                   \aftergroup 
l.8     \caption{test}

? 
! Extra \endcsname.
<argument> ...t \csname fnum@\@captype \endcsname 
                                                  \endgroup \fi 
l.8     \caption{test}

? 
! Missing \endcsname inserted.
<to be read again> 
                   \aftergroup 
l.8     \caption{test}

? 
! Extra \endcsname.
<argument> ...t \csname fnum@\@captype \endcsname 
                                                  \endgroup \fi 
l.8     \caption{test}

Regards

  • Note in general: Users without expert knowledge should use only the font commands listed in the description of \addtokomafont and \setkomafont. The manual also says: “The use of other commands […] is not supported. Strange behaviour is possible in these cases and does not represent a bug. – Schweinebacke Jul 13 '18 at 7:44
1

Use \addtokomafont{captionlabel}{\bfseries}:

\documentclass{scrartcl}
\addtokomafont{captionlabel}{\bfseries}% <- changed
\usepackage{subcaption}

\begin{document}

\begin{figure}
\caption{test}
\end{figure}

\end{document}

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.