I'm trying to define a custom class rs-book.cls based on a standard class book.cls and would like to change some of the default options. For instance, by default (with no options given), the command \documentclass{book} produces a 10pt, twoside, onecolumn document. Let's say that in my case, with command \documentclass{rs-book}, I would like to produce a 12pt, oneside, twocolumn document by default, but with the ability overwrite these options (as in \documentclass[10pt]{rs-book} would produce a 10pt font document).

The problem is that I can't recreate this behavior as it gets pretty confusing: in the example below the command \documentclass[10pt,twoside,onecolumn]{rs-book} keeps the default 12pt and twocolumn values, but successfully applies the twoside option.




% Read all options to rs-book class and pass them to book class
% Execute the code for each option
% Load book class with fixed options




\title{A modification of book.cls}



1 Answer 1


\def\rs@ptsize{12pt} % default value

  • 1
    Thanks for the answer. One remark though: your solution manually hardcodes fontsizes (not just the default one) in the custom class. Is there any possibility of some sort of 'option inheritance'? For instance, maybe a 13pt option becomes available in the future for the book class. This means that I would have to edit my custom class and add an additional entry for 13pt option.
    – user244630
    Commented Feb 17, 2022 at 8:03

You must log in to answer this question.