I would like to pass option conditionally to memoir from my custom class for this I try to do a MWE
myClass.cls
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{myClass}
\newif\ifthesis@foo
\DeclareOption{foo}{\thesis@footrue}
\DeclareOption{nofoo}{\thesis@foofalse}
\ExecuteOptions{foo} %default is foo
% Based on the memoir class
\ifthesis@foo
\DeclareOption*{\PassOptionsToClass{a4paper,12pt,french,twoside,openright,openbib, final}{memoir}}
\else
\DeclareOption*{\PassOptionsToClass{a5paper,10pt,french,twoside,openright,openbib, final}{memoir}}
\fi
\ProcessOptions\relax
\LoadClass{memoir}
main.tex
\documentclass[foo]{myClass}
\title{MWE}
\begin{document}
\maketitle
\frontmatter
\mainmatter
\end{document}
I would like keep thesis@foo flag to make later conditionally title page.
This MWE produce always a pdf with US Letter as page size (I think it is the default)
Thanks for your help
\PassOptionsToClass
, not\DeclareOption*{\PassOptionsToClass
– David Carlisle Jan 13 '17 at 18:48