3

I get an error which I don't understand. I have the following cls-file called error.cls

\NeedsTeXFormat{LaTeX2e}                                            
\ProvidesClass{error}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}  
\ProcessOptions\relax
% 
\LoadClass{scrartcl} 
\endinput

So e.g. if I start my LaTeX-file with

\documentclass[titlepage=true]{error}

then I should get a separate titlepage. But unfortunately, the compiling process stops calling /usr/local/texlive/2021/.../koma-script/tocbasic.sty

Here my TeX-File I am using:

% ------------------
%\documentclass[titlepage=true]{error} % not working
% Compiling stops with 
% /usr/local/texlive/2021/.../koma-script/tocbasic.sty
% ------------------
\documentclass{error}   
% working with \LoadClass[titlepage=true]{scrartcl} or 
% \LoadClass{scrartcl}in the error.cls file
% ------------------
\begin{document}
%
\subject{-- \LaTeX --} 
\title{--Titel--}
\subtitle{--Untertitel--}
\date{\today} 
\maketitle
\section{Abschnitt}
\subsection{Unterabschnitt}
Text
\end{document}
Ulrich
  • 917

1 Answers1

1

This works:

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{error}
\DeclareOption*{\expandafter\PassOptionsToClass\expandafter{\CurrentOption}{scrartcl}}
\ProcessOptions\relax
%
\LoadClass{scrartcl}
\endinput
egreg
  • 1,121,712