TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Context: I'm building a new package for my university. I need to set a lot of options for the document class, like twoside, a4paper, 12pt, or firstpagenum=chapter.

I would like to set them by default in my package without creating a new class. Is it possible?

share|improve this question
Maybe what you actually need to develop is a class file instead of a package. They're equally easy or difficult, depending on your experience. As Grandmaster Carlisle has indicated, unless you use \RequirePackage on top of \documentclass, passing options to a class from a package will require a new invention. Passing options to class after the class file has been read is not possible - and the class file can’t be read twice. In your class file, you can call \PassOptionsToClass before \LoadClass, or, in place of these two commands, simply call \LoadClassWithOptions. – Ahmed Musa May 26 '12 at 2:25

No the class file has been read by the time you load a package, But it sounds like you should be defining a class file. you can have myclass.cls just handle the options it needs and then \LoadClassWithOptions{article} (or whichever base class you need).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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