tocbasis generate error if caption was loaded before
KOMA-Script is a bundle of versatile LaTeX classes and packages
Brought to you by:
kohm
The package tocbasic generates the error
tocbasic.sty:1377: LaTeX Error: Unknown message 'caption-code-by-class-deactivated' for module
(LaTeX) 'tocbasic'.
if the package caption is loaded before.
Example:
\documentclass{article}
\usepackage{caption}
\usepackage{tocbasic}
\begin{document}
test
\end{document}
The error is raised because, in tocbasic.sty the hook
\hook_gput_code:nnn { package / caption3 / before } { tocbasic }
{
\cs_set:Npn \caption@documentclass { standard }
\msg_info:nn { tocbasic } { caption-code-by-class-deactivated }
}
is set line 1373 before the message caption-code-by-class-deactivated is defined, line 1378.
The fix is simply to move the definition of the caption-code-by-class-deactivated before the hook setting.
Related TeX.SE question: I get the error message 'caption-code-by-class-deactivated.
Duplicate of [#103].
Related
Issues:
#103