Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [class-options]

Concerning options that can be passed to document classes.

2
votes
1answer
37 views

String parameter passed to a class vanish the spaces between words

I created a class in which I'd like to pass some parameters in \documentclass[parameters]{}. The parameters I need to pass are pdftitle and pdfsubject to the hyperref package. I succeeded in doing so, ...
0
votes
0answers
46 views

l3keys2e: best practices to pass options from class to package

I moved part of the code in a class to a new package. This package can handle a couple of options defined using l3keys and processed with l3keys2e (one option being multichoice). My problem is that I ...
1
vote
1answer
50 views

KOMAscript gives error when using parenthesis within options

Coming up from my previous question How to use equal sign inside class option with pgfopts I switched the base class from article to scrartcl and ran into a compile error. l.451 \...
3
votes
3answers
71 views

When amsart is used as a base class of another class, the “fleqn” option is ignored

I tried creating my own class based on amsart, like this one: % file: myamsart.cls \ProvidesClass{myamsart} \LoadClass[fleqn]{amsart} However, the option fleqn has no effect: % file: test.tex %\...
1
vote
1answer
83 views

How to create a LaTeX class with default parameters?

I've learnt how to use LaTeX at the user level, but wanted to package the recurring code (resulting mostly from the styling of the cover) in a class file. Therefore, I tried the following simple ...
0
votes
0answers
32 views

Prevent specific `\documentclass` options being sent to packages

Edit 2: I should have said, as @egreg says in the comments, that there is no good reason to do this, as the purpose of the options to \documentclass is precisely of being dispatched to every ...
1
vote
0answers
150 views

Class Springer-SVJour Error: No valid journal specified in option list [closed]

I am trying to submit an article to the EPJ plus but I got the following error: LaTeX Warning: File `leer.eps' already exists on the system. Not generating it from this source. (c:/TeXLive/texmf-...
3
votes
0answers
42 views

Passing options from parent to child classes

This question is related to a previous one: assume I am defining a new class dependend on an existing one with the following code: \ProvidesClass{foo} %\PassOptionsToClass{11pt}{article} \...
3
votes
1answer
100 views

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/...
0
votes
0answers
427 views

What is the source of Class revtex4-1 Warning when compiling a tex file in overleaf?

When working on my paper on overleaf, I notice that the compilation runs with no error and produces the final version of the paper but there is an annoying warning which I don't seem to know its cause ...
2
votes
1answer
233 views

Options in custom class [duplicate]

Consider the following class: \NeedsTeXFormat{LaTeX2e} \ProvidesClass{sampleclass} \LoadClass[ paper=a5, chapterprefix=true ]{scrbook} \DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrbook}} \...
1
vote
0answers
90 views

Pass a list of package-options to a self-written documentclass using l3keys2e

I am writing a documentclass which loads several packages as default. I want to give the user the possibility to pass options to these packages using an documentclass option. Because most packages ...
7
votes
2answers
80 views

How can I recover option values with the current l3keys2e?

Minimal-Compiling-But-Not-Working Example: \begin{filecontents}{\jobname.cls} \ProvidesClass{\jobname} \RequirePackage{l3keys2e} \ExplSyntaxOn \keys_define:nn { job / doc } { doc~name .tl_set:N =...
1
vote
1answer
32 views

How to change a text on Latex class outside of Class?

I use a Latex class for my thesis which contain the following code (XeLATEX compiler): thesis.Cls \ProvidesClass{thesis} \LoadClass{article} \RequirePackage{etoolbox} \newif\if@bscthesis \@...
8
votes
1answer
313 views

\PassOptionsToClass does not work

I am trying to create my own class, inheriting from extarticle. I want to still be able to use the options of this class, so I found a way to do it in most of the docs I read : \DeclareOption*{\...
3
votes
1answer
79 views

Change “twocolumn” option to obtain right to left columns

When using twocolumn option writing on paper start from left side then the right side, my wish is change twocolumn option to start writing on paper from right side \documentclass[twocolumn]{...
1
vote
1answer
272 views

How do I find the meaning of latex documentclass options?

I saw someone using the [final] option for the beamer documentclass and wanted to see what it did. So I searched the package documentation here on CTAN and also found the directory on my computer that ...
1
vote
2answers
144 views

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 ...
1
vote
0answers
82 views

How to choose the right options/key-value package? [closed]

I want to spruce up my department's thesis document class with better / less idiosyncratic class options support. So, I've noticed this community wiki question: A big list of every keyval package ......
0
votes
0answers
197 views

Changing a boolean in a class file from the main latex file

I'm trying to change a boolean value located in a class file (.cls) from the main latex document (.tex). I've tried to set the boolean in the main latex file using \setboolean{showwatermark}{true/...
0
votes
1answer
184 views

Can't specify paper size when loading scrartcl in custom class [duplicate]

By default, my system produces A4 documents. If I want to set the paper size to US Letter, I can pass the letterpaper option to scrartcl: \documentclass[letterpaper]{scrartcl} \begin{document} Hello, ...
1
vote
1answer
122 views

Own commands not accessible in fancypagestyle environment for plain pages with fancyhdr

I'm experiencing a weird bug. If I understand correctly, LaTeX plain pages principle consists in pages following a document mark triggered by maintitle or a chapter/section mention. Each time a main ...
1
vote
1answer
56 views

What is paxcommands?

I've been writing my own class and all the tutorials I've found use the following command to handle font options: \DeclareOption{sansserif}{ \PassOptionsToPackage{\CurrentOption}{paxcommands} } ...
1
vote
1answer
37 views

Can't set a toggle based on class option value

I'm trying to toggle linenumbers when the class option man is passed. So far I've tried the recommended answer from this answer but it doesn't work. LaTeX complains with an Undefined Control Sequence ...
1
vote
1answer
251 views

achemso invalid values for manuscript option

I am using the manuscript option achemso package, as described here (page 3). I would like to use it in the following manner: \documentclass[journal=jprobs,manuscript=note,layout=twocolumn,email=true]...
8
votes
1answer
230 views

Pass RGB colours to custom class

I'm trying to pass a RGB colour code as an option to my custom-class.cls, so I can change the colour of a header bar and the colour of my titles in the main-doc.tex. The default option does work, but ...
0
votes
0answers
37 views

Loading epigrafica.sty in a class file (master class is memoir) shows duplicated definition errors

Related to this thread, I'd like to load epigrafica.sty in my class file. But I've got some errors due to definition redundancy with amsmath.sty. In the class_memoir.class: \LoadClass[oneside,12pt]{...
8
votes
3answers
396 views

Conditionals in LaTeX: try/catch and “not \equal”

I have a problem with some variable checking: I offer the user an option in the interface of a document class. If the option is not provided my code fails. Hence I would like to check if the option ...
3
votes
1answer
108 views

How to override the default options specified in user defined classes?

My scenario is to let the user override the default options specified in myclass.cls. Minimal Working Example \RequirePackage{filecontents} \begin{filecontents*}{myclass.cls} \ProvidesClass{...
3
votes
0answers
97 views

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

Reformatting TexMemo into Spanish

So I dowloaded a memo template from ShareLatex, the TexMemo. Essentially, I want to reformat the entire template into Spanish. Additionally, I want the fields at the top to be written in spanish. For ...
1
vote
0answers
77 views

scrartcl @a1paper with 20pt

want to mirrow a power-point-poster to tex by an own class. First my plan is, to write a working preamble and convert it to a class. My first step: Chose the right font-size. For Din-A1 20pt seems to ...
3
votes
1answer
100 views

How to unset options like setting options with DeclareOption, a kind of UndeclareOption

I created a class which adapts the exam class to the needs of my school and added some stuff to control the class from the outside by a script to be able to create an individual exam for each student ...
3
votes
1answer
308 views

How to pass option conditionally to memoir class?

I would like to pass option conditionally to memoir from my custom class for this I try to do a MWE myClass.cls \NeedsTeXFormat{LaTeX2e} \ProvidesClass{myClass} \newif\ifthesis@foo \DeclareOption{...
1
vote
1answer
384 views

Change enumerate option within newenvironment

I've been trying to create a new environment to have a sort of recipe or list of steps, like Process 1 Step 1 - Do this; Setp 2 - Do that; I'd like it to accept \label command since I'll have to ...
3
votes
1answer
167 views

Why does biblatex not process global options

For some reason biblatex doesn't seem to be reading global options. The following tex file produces a single citation, but not in the authoryear style. If I uncomment the PassOptionsToPackage line, it ...
1
vote
1answer
143 views

trouble with \date{} respecting value passed? [closed]

I've been using a uni template suite (.tex, .cls and .bib) for my thesis, and just noticed today that the date value specified in my main .tex this way: \date{09/14/2016} magically becomes today's ...
2
votes
2answers
112 views

Vector graphic eps works for documentclass article, not for book

When I use this example from here, I can simply include the given figure.eps with the documentclass \documentclass[10pt]{article} The provided *.eps file is displayed properly. As soon as I change ...
4
votes
2answers
209 views

pgfkeys with multiple values for a class option key has incompatibilities with some packages

Like discussed on the chat TexAndFriends, I'm currently adding the ability to define languages in my own class file. Here is my minimal (non working) example. My class file with the packages I'm ...
3
votes
1answer
92 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 ...
1
vote
1answer
85 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
137 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)...
1
vote
1answer
663 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
192 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 ...
1
vote
1answer
60 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
74 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
425 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
453 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: ...
1
vote
3answers
2k 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
415 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 ...