I'm writing my own class for a thesis... yes, yet another thesis class! XD

This class is based on the standard book class, but I don't want all options of the book class to be available when writing a thesis. How could I achieve that?

My confusion comes with the use of LoadClass with \PassOptionsToClass{\CurrentOptions} versus LoadClassWithOptions, I read their use in clsguide but I'm still off.

If someone can baby feed me the difference, and point me to some examples I'd be grateful.


You can use something like

  \ClassWarning{mythesisclass}{Unknown option `\CurrentOption' ignored}%

before processing the options and loading the class. The warning is optional, but it's nice to let the user know that something is not being passed through in the usual way.

What this does is ignore all options that are not explicitly declared, so any options that you do want to be passed on must be defined with \DeclareOption.

Here's an example snippet from a class of mine:

  \ClassWarning{mugsthesis}{Unknown option `\CurrentOption' ignored}%
\ExecuteOptions{12pt,final} % defaults
\LoadClass[letterpaper,oneside]{memoir} % options here are fixed; no changes allowed
  • @paul-gesser Your explanation was really helpful. Finally I'm cleaning my code XD because I did a lousy jobs the first time. – Dox Mar 11 '15 at 21:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.