When I have the following class:
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{CustomClass}
\LoadClass[11pt]{article}
\DeclareOption{option1}{
\texttt{Text 1}
\clearpage
\texttt{Text 2}
\clearpage
}
\DeclareOption{option2}{
\texttt{Text 3}
\clearpage
\texttt{Text 4}
\clearpage
}
\AtBeginDocument{
\ProcessOptions
}
\endinput
And I use it in the following way:
\documentclass[option1]{CustomClass}
\begin{document}
\end{document}
No Pdf is generated. But when I use ExecuteOptions{option1|option2} is work but its static. So my option I specify when specifying the document class does not work.
Why is this happening?
\AtBeginDocumentin both of the\DeclareOptionnot outside them, just have\ProcessOptionsoutside – David Carlisle Oct 07 '22 at 20:36