Questions tagged [class-options]

Concerning options that can be passed to document classes.

Concerning options that can be passed to document classes, such as article, amsart, standalone, and so on. These options can often influence the document font size, page dimensions, and overall layout.

Relevant macros concerning this are

  • \DeclareOption
  • \DeclareOption*
  • \ExecuteOptions
  • \ProcessOptions
  • \ProcessOptions*

and \LoadClassWithOptions and \PassOptionsToClass, all are LaTeX Core built-ins.

200 questions
7
votes
1 answer

Pass an option from a class to another

I try to pass the handout option from my class to beamerclass. This method works. I tried with \PassOptionsToClass but it is not clear for me. \NeedsTeXFormat{LaTeX2e} \ProvidesClass{beamer-nk}[2017/10/16 Beamer version nk,…
Tarass
  • 16,912
7
votes
1 answer

Global option processing

I am struggling to understand how option processing works in classes. As a MWE foo.tex: \documentclass[draft,figures]{foo} \begin{document} …
StrongBad
  • 20,495
5
votes
1 answer

Define own class options relating to counter

I created a class file named class.cls as follows: \NeedsTeXFormat{LaTeX2e} \ProvidesClass{class} \LoadClass{report} \RequirePackage{indentfirst} \DeclareOption{withinchap}{% \newcounter{exercounter}[chapter]% …
Stephen
  • 3,826
5
votes
1 answer

Passing options from parent to child classes

This question is related to a previous one: assume I am defining a new class depending on an existing one with the following…
jarnosc
  • 4,266
4
votes
0 answers

Options to \documentclass not being passed to packages

Page 17 in the The LaTeX Companion suggests all options to \documentclass are passed to packages as class options. However, when I include margin=1in in the documentclass option in an attempt to pass it into the geometry package, it did not work.…
Kun
  • 680
4
votes
1 answer

Strange Behavior when Inheriting Class Options

I'd like to create a new document class which inherits most of its options from the base class article, but which sets the default font option to 11pt instead of 10pt, and also defines its own new options. I'm most of the way there, but I'm having…
TheMac
  • 155
4
votes
1 answer

Name clash when defining a class based on article class

\NeedsTeXFormat{LaTeX2e} \ProvidesClass{funny-class} %% % Pass any options to the underlying class. \DeclareOption*{% \PassOptionsToClass{\CurrentOption}{article} % (could be another class) } % Options for this class. \DeclareOption{fun}{% …
Jérémie
  • 2,991
3
votes
0 answers

Problem with \ProcessOptions?

I recently bought a new laptop and installed latest complete MiKTeX and Texmaker, which is the editor I use on my other laptop. Compiling the same document on my new laptop doesn't give the same output than with my other one. More specifically, in…
NoZ
  • 31
2
votes
2 answers

Can I know the class options in a document (or user-defined package)?

Edit (again). It appears that I'm not very clear. I'm looking for a technique to access the options passed to the class. The MWE below is just an example, 12pt is an example. If there is no general technique, then the specific options that I'd…
dedded
  • 2,236
2
votes
1 answer

using PhDThesisPSnPDF class

May be this is a common qusetion but I haven't found this answer. I'm trying to use PhDThesisPSnPDF class but writing in Italian. My only issue is to change the "Chapter" in the italian lenguages (Capitolo). I have no problems with bib, list of…
2
votes
1 answer

Changing definitions in the class file

I am relatively new to Latex and don't know the deeper commands yet. For my Msc thesis I downloaded a template published by the Faculty, however they have changed some regulations and have yet to update their latex template. Basically, the new…
masfenix
  • 1,429
1
vote
0 answers

Unused Global Option in custom class package

I've seen the pages Unused global option(s): [language=english] and Unused global options in custom class but I'm still getting an unused global options error and I'm not fully understanding why. (I didn't see any other ones so sorry if this is a…
1
vote
1 answer

Too much space between chapter title and content

I'm a LaTeX newbie and my someone on my university has made a custom LaTeX class, and I'm using it to make a dissertation. However, the space between the chapter title and the content is way too much. I tried go looking on the .cls file to change…
1
vote
0 answers

Using a generic way to evaluate global document options

I am looking for a way to easily define and evaluate additional global document options. Right now I am using \documentclass[12pt,ngerman]{scrartcl} as the first line of my documents, I'd like to add more variables, for instance board or…
Uwe Ziegenhagen
  • 13,168
  • 5
  • 53
  • 93
0
votes
1 answer

ProcessOptions within AtBeginDocument does not work but ExecuteOptions does

When I have the following class: \NeedsTeXFormat{LaTeX2e} \ProvidesClass{CustomClass} \LoadClass[11pt]{article} \DeclareOption{option1}{ \texttt{Text 1} \clearpage \texttt{Text 2} \clearpage } \DeclareOption{option2}{ …
Kaskorian
  • 127
1
2