I downloaded a class file and starts with the below code, would you be able to tell me what it does please? And would any of the commands become redundant whether XeLaTex/LuaLaTeX is used?
I have added comments to what I think certain lines may be doing but not too sure really, any additional info. would be great thanks!
\ProvidesClass{My Class} % Name of the class
[YYYY/MM/DD v1.0 LaTeX document class] % Additional info about the class
\def\baseclass{article} % Defining the command \baseclass as article
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\baseclass}} % Pass all unknown options to the \baseclass (article class)
\def\@checkoptions#1#2{
\edef\@curroptions{\@ptionlist{\@currname.\@currext}}
\@tempswafalse
\@tfor\@this:=#2\do{
\@expandtwoargs\in@{,\@this,}{,\@curroptions,}
\ifin@ \@tempswatrue \@break@tfor \fi}
\let\@this\@empty
\if@tempswa \else \PassOptionsToClass{#1}{\baseclass}\fi
}
\@checkoptions{11pt}{{10pt}{11pt}{12pt}}
\PassOptionsToClass{a4paper}{\baseclass} % Passing a4paper to the baseclass (article class)
\ProcessOptions\relax % Process the defined options above, and stop looking
\LoadClass{\baseclass} % Load the defined baseclass
\pdfstringdefDisableCommands{\let\\space}
\@checkoptions? It's just checking whether the class has been loaded with some size option, and loads 10pt otherwise. The used engine is absolutely irrelevant here. – campa Jan 27 '23 at 15:49\def\@checkoptions#1#2{}is checking that a font size has been chosen, then choosing 10 pt with\@checkoptions{11pt}{{10pt}{11pt}{12pt}}if a size isn't chosen? – SockPile Jan 27 '23 at 16:00\pdfstringdefDisableCommands{\let\\\space}– SockPile Jan 27 '23 at 18:50