0

I'm trying to declare a new option poly in my .cls file.

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{classname}
\ClassInfo{JH}{Copyright (c), 2022.}
%
\DeclareOption{poly}{%
\PassOptionsToClass{french,a4paper,twocolumn,DIV=45,twoside=false,numbers=enddot,parskip=half,headinclude=true,footinclude=true,chapterprefix=true,listof=totoc,toc=indentunnumbered}{scrbook}
}
%
\ProcessOptions\relax
\LoadClass{scrbook}
\RequirePackage{lipsum}

In the main .tex file, I have :

\documentclass[poly]{classname}

\begin{document}

\lipsum[1]

\end{document}

But not all options are taken into account : for example, DIV=45 option is OK but landscape is not. How can I fix this ?

4
  • I can't reproduce your issue, for me DIV=45 is picked up.
    – Skillmon
    Commented Dec 13, 2021 at 19:05
  • Sorry, I exchanged my two examples : the landscape option is not picked up.
    – jowe_19
    Commented Dec 13, 2021 at 20:45
  • Those options are not picked up because they are no options supported by scrbook. Instead those options should've been passed on to typearea instead.
    – Skillmon
    Commented Dec 21, 2021 at 14:04
  • Thanks, I'm going to make an answer.
    – jowe_19
    Commented Dec 21, 2021 at 14:44

1 Answer 1

0

With the help of the comments, I have changed the initial cls file like this.

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{classname}
\ClassInfo{JH}{Copyright (c), 2022.}
%
\DeclareOption{poly}{%
\PassOptionsToClass{french,twocolumn,numbers=enddot, parskip=half,chapterprefix=true,listof=totoc,toc=indentunnumbered}{scrbook}%
\PassOptionsToPackage{DIV=45,
                     landscape,
                     a4paper,
                     headinclude=true,
                     footinclude=true,
                     twoside=false,
                     }{typearea}%
    }%
%
\ProcessOptions\relax
\LoadClass{scrbook}
\RequirePackage{lipsum}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .