Concerning options that can be passed to document classes.

learn more… | top users | synonyms

2
votes
1answer
40 views

How to create an array while using latex \DeclareOption

I have a class in which an option is to state a code and the resulting programme of study is represented at various points throughout a document. The option also changes a number of other blocks of ...
10
votes
2answers
305 views

How to detect whether “I'm on arXiv.org”?

I write a class. I'm interested in having a different page headers (and eventually make some other small differences) based on whether the class is used on the site arXiv.org or not. Minimal example ...
1
vote
1answer
17 views

kpfonts makes fleqn and leqno options ignored when passed via \PassOptionsToClass

The following M(n)WE points out that fleqn (and leqno as well) option, passed to the class thanks to \PassOptionsToClass, is taken in account except if kpfonts package is loaded (no problem if the ...
1
vote
1answer
52 views

Fancypagestyle in \DeclareOption

In my class I want to define the page layout first during\DeclareOption and then modify it during a \newenvironment declaration. For that I wanted to use the fancyhdr package. Now my problem is that a)...
2
votes
1answer
94 views

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 (...
2
votes
1answer
89 views

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 ...
1
vote
1answer
64 views

\@ifpackagewith doesn't behave as I expected with global options

When I compile the following code, I expect a "Yes" but I get a "No" instead. Is there something subtle going on or is my method for checking wrong? If so, how can I see which options have been passed ...
23
votes
2answers
1k views

A class with default language settings

I want to write a class which loads babel and other language aware packages and pass to all of them the option ngerman as default. But if another language is used in the options of the \documentclass ...
2
votes
1answer
50 views

How to determine if documents has parts

I'm writing a custom class based on book.cls for our office's publication series, but I've hit a problem in how to set up a conditional. Some of the publications are part->chapter->section while ...
0
votes
1answer
56 views

.cls edit makes at-sign (@) appear in 'list of tables' and 'list of figures' between chapters

I am formatting my thesis and have been using a template for which a custom style file was created. The template had the front matter, such as "list of tables", acknowledgements, etc., listed in the ...
2
votes
2answers
79 views

How to remove the date under the draftmode in AEA document class?

When using the AEA document class in draftmode, there is a date command that appears with the \maketitle. Does anyone know how to eliminate it? When using \date{} as would usually work, the date is ...
5
votes
1answer
80 views

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} \includegraphics{example-image} \end{document} foo.cls:...
0
votes
2answers
482 views

Unused global option(s) [english]

Whenever I compile my TeX file, I get the following warning Unused global option(s) [english] and Underfull \hbox(badness 10000) in paragraph at lines 27-28
3
votes
1answer
45 views

Why do options listed in \LoadClass not affect?

I have listed dvipsnames (or other options) in \LoadClass with the hope I don't need to specify dvipsnames (or other options) in \documentclass. Apparently this does not work as what I expect. It ...
1
vote
1answer
46 views

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....
1
vote
1answer
58 views

Passing options to Beamer from another file

I have broken my Beamer file in two parts: a preamble and the presentation proper (for reusing purposes). My preamble is something like this: % Start of mypreamble.tex % ===========================...
1
vote
1answer
165 views

Overriding the default font size for custom classes

I'm in the middle of writing a document class (let's call it base.cls) which serves as base class for several other classes I'm writing. The base class itself is based on the article class. By default,...
7
votes
1answer
557 views

Stop my class passing options on to article class

I have a class file which declares some options. One of them is called draft. This places a watermark on all pages that says DRAFT. \DeclareOption{draft}{ \RequirePackage{draftwatermark} \...
3
votes
1answer
45 views

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 ...
2
votes
1answer
33 views

Why is the “geometry” package passed an unwanted argument?

I am working on a class and cannot figure out why geometry is passed my argument "twocolumn", even though I did not use \RequirePackageWithOptions but only \RequirePackage. Can someone explain to me ...
1
vote
1answer
30 views

Choosing an image based on option sent to class

To be more consistent in the personal/internal documents I write, I'd like to modify my class to allow me to pass an option that will automatically select an image to put in the footer on the first ...
0
votes
0answers
99 views

\RequirePackage{tikz} in dissertation .cls file

I'm trying to edit the standard .cls file provided by my university towards dissertations to include TikZ pictures. I tried adding \RequirePackage{tikz} in the class file and separately, adding \...
4
votes
1answer
69 views

class file option: switch endnote to footnote

I'm working on a class file where notes are endnotes by default but can be converted to footnotes through a class option (this is because some prominent journals in my field require that submissions ...
3
votes
1answer
107 views

Understanding ptsize options in article.cls

When the 10pt, 11pt and 12pt class options are used with the standard LaTeX classes everything works as expected. Except, if I put two of them in the class' options I would expect the last given to "...
1
vote
1answer
265 views

How to pass title (or other parameter) to class file

I know LaTeX just to the point of making simple documents and modifying simple characteristics of a document's layout. Now I'm creating a class for a kind of document in order not to have to copy a ...
1
vote
1answer
47 views

Generic title command used to insert a pdf or text specified as key value

I'm trying to get my own generic title command I can use either to include a pdf file as a title page, is that file exists, or include a text subdivided in keys using the xkeyval package. My question ...
2
votes
1answer
114 views

How can I show listings even when the class option 'draft' is set?

The question Is it possible to configure the listings package to show the content in the lstlisting environment even if the global option draft is set? Context When working on a larger document, ...
2
votes
0answers
230 views

Set global option (and pass it to all packages) in a custom class file

I had a tex-file that basically started as follows \documentclass[ a4paper, hyperref, amsmath, headinclude=true, ngerman, final ]{scrbook} \usepackage{babel} \usepackage{ntheorem} \usepackage{...
2
votes
1answer
275 views

Where do I put option values for customizing documents with KOMA Script classes?

I started to read the documentation on the KOMA Script classes because they seem to have many tools that are more flexible to use than the standard classes, But I don't understand where to put all the ...
4
votes
1answer
66 views

Confusion when trying to write a class

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 ...
4
votes
3answers
158 views

What is the [american] option under Extbook?

I noticed that my upgraded Lyx installation adds the following line to the book class using the extsizes package: \documentclass[a4paper,oneside,american]{extbook} I looked at the package ...
2
votes
1answer
122 views

What does runningheads do in the documentclass?

Although I'm a TeX/LaTeX neophyte, I've taken on a rather ambitious project of updating Differential Calculus with SAGE. As I go along I'm using the existing tex document to teach myself what each ...
5
votes
1answer
680 views

PassOptionsToClass vs global options

I'm currently using \PassOptionsToClass, as suggested in Conditional Compiling and \documentclass to compile a document in several languages. However, if I use language-options in \PassOptionsToClass, ...
7
votes
1answer
141 views

Remember an class option with newcommand and CurrentOption

I'm trying to make a class but it needs to remember its arguments I'm using the file \documentclass[x]{test} \begin{document} \end{document} With the class \NeedsTeXFormat{LaTeX2e} \...
2
votes
1answer
193 views

How can I pass babel options through class options?

I built a class upon the article class. This class load a package where the \maketitle command is define. If I do not load babel inside the class, the title of the document is always in english (the ...
0
votes
0answers
64 views

How to set options in a .cls file [duplicate]

Suppose I'm writing a foo class which at some point calls LoadClassWithOptions{book} I would like to be able to pass either oneside or twoside to the book class based on various other ...
0
votes
0answers
202 views

Passing language parameter to \RequirePackage through \documentclass

I've written my own CV class and set it up so all packages are required in the .cls file and the .tex file only uses \documentclass. I would like to keep it this way but still be able to select ...
2
votes
0answers
53 views

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 ...
3
votes
1answer
65 views

How to change the behavior of a package via the class options?

I'm writing a document class based on the book class. In this class I have some code as below: \RequirePackage[total={10cm,18cm},paperwidth=16cm, paperheight=23cm]{geometry} \RequirePackage[cross,...
15
votes
4answers
5k views

Setting class options after \documentclass

Context: I'm working on my thesis, and the formatting requirements are pretty godawful. In addition to the version I submit to the grad school, I would like to also create a properly formatted version ...
0
votes
0answers
144 views

What is the kvoptions-patch's equivalent of \@classoptionslist?

For a class I'm working on, I'd like some (babel's) languages to be automatically loaded. This can be achieved thanks to \@classoptionslist: \begin{filecontents*}{myclass.cls} \NeedsTeXFormat{LaTeX2e}...
2
votes
0answers
130 views

Migrating from xkeyval to kvoptions: how to retrieve \define@choicekey? [closed]

I'm in the process of migrating a class I wrote from xkeyval to kvoptions, mainly because I'd like to provide class options whose values could be list of comma separated values: \documentclass[...
8
votes
1answer
219 views

Why are these options passed to \LoadClass ignored?

Consider the following simple example: % === this is simple.tex === \documentclass[paper=a5,pagesize]{scrbook} \usepackage{lipsum} \begin{document} \lipsum{1-10} \end{document} When processing this ...
3
votes
1answer
60 views

How can I force some options and discard others in a custom class?

I'm creating a document class based upon memoir. For this, I allow several class options to be passed to my code. Options that are not recognized will simply be passed to memoir. Now my question is: ...
4
votes
1answer
155 views

How to make a package to ignore parameters it doesn't know when loading in a class?

I'm defining a class that extends article that loads a package inside (automultiplechoice). I'm trying to configure the package and the class using the parameters of the \documentclass command. When ...
3
votes
1answer
497 views

Class options declaration error: Undefined control sequence

I'm trying to write a class file with certain options (e.g centered title, vs title on the left). When I compile a *.tex file that calls this class, I get the an undefined control sequence error for \@...
12
votes
1answer
207 views

Processing document class options with l3keys

How can I parse (that is, access) the entire option list given to the current document class with l3keys? This would obviously need some sort of \keys_define:nn { document-class-?? } { default ....
147
votes
3answers
202k views

What point (pt) font size are \Large etc.?

In the preamble I have: \documentclass[a4paper,11pt]{article} \usepackage{fontspec} \setmainfont{Arial} What can be inferred about the real font pt size for the following? \tiny, \scriptsize, \...
7
votes
1answer
394 views

LaTeX3 from Package Options to Class Options

Howdy please consider the following expample: \RequirePackage{ expl3 , xparse , l3keys2e , xfrac } \ProvidesExplPackage {somewhat} {2012/04/29} {1} {descrr} \cs_new_nopar:Npn\...
1
vote
0answers
28 views

standalone: subprambles inverse

When splitting a document with the standalone class and package, the option subpreambles causes the main document to include all the preambles of the sub-files. The other way around is more difficult. ...