Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [class-options]

Concerning options that can be passed to document classes.

Filter by
Sorted by
Tagged with
3 votes
1 answer
41 views

How to send option to package from class option OR order of option processing with \PassOptionsToPackage?

I’m developing a combination of classes and packages, where the package is used to define a color set (that should be usable in different classes) and has an option color-mode=cmyk|rgb|gray to device ...
Tobi's user avatar
  • 56.8k
1 vote
1 answer
49 views

Unused Balance Option Warnings in ACM Template

When I use \documentclass[sigconf,balance=false]{acmart}, it outputs the warning LaTeX: Unused global option(s): [balance=false]. However, if I remove the term "balance=false", it outputs ...
Han's user avatar
  • 13
0 votes
1 answer
45 views

passing a group of package(class) options in 1 key using l3keys2e in latex class

problem I want to writing a docuementclass, called it foo.cls in the following context. Assume there is a document class called bar.cls, which can accept the following key-value(options): \...
zpding's user avatar
  • 134
1 vote
2 answers
65 views

Unused global option(s) with kvoptions string option

\begin{filecontents}{foo.cls} \NeedsTeXFormat{LaTeX2e} \ProvidesClass{foo} \RequirePackage{kvoptions} \SetupKeyvalOptions{family=myoptions,prefix=myoptions@} \DeclareStringOption[scriptsize]{bibsize}...
Tom de Geus's user avatar
0 votes
1 answer
58 views

Wrap text in \location argument of \personalinfo field of \makecvheader command in altacv.cls

I am writing my CV and I want to add an address using the \location field in the \makecvheader command. My location information is however large and going out of the page. I have a lot of unused space ...
silenstseeker's user avatar
0 votes
1 answer
61 views

Can't pass choices option to package

I am trying to make a custom package to contain all my personal macros and a custom class for my personal style. I wanted to pass a keyword argument notation which can take a value of math or physics ...
Shai Avr's user avatar
  • 909
3 votes
0 answers
87 views

Usage of a university template produces unrelated errors in xcolor package

I'm new to this forum and I have a question regarding a template. Here's the basic code: \documentclass[a4paper, DIV=13, 12pt, BCOR=10mm, twoside, parskip=half, automark ]{OTHRartcl} \title{This is a ...
flgei's user avatar
  • 53
10 votes
3 answers
562 views

Avoid spurious warnings in a parasitic class with key-value options (LaTeX3 \DeclareKeys)

This is a modified version of "Unused global options(s)" when using arguments in options of class. The question is how to create a parasitic class (i.e. one which loads another) which ...
cfr's user avatar
  • 208k
1 vote
0 answers
121 views

Unknown option leads to error with babel and geometry

Consider the following example: \documentclass[logo height = 2\baselineskip]{article} \usepackage[french]{babel} \usepackage{geometry} \begin{document} Text in case of empty. \end{document} I am ...
Jinwen's user avatar
  • 8,618
0 votes
1 answer
100 views

How to define a beamer option with theme?

I am trying to create my own beamer theme that should be loaded with beamer's compress option by default. I tried using the following declaration, which I saw on a few different answers and themes: \...
schoekling's user avatar
  • 3,152
3 votes
1 answer
74 views

Options not passing through class file with \LoadClass command

The following code works fine and gives expected output. \documentclass[fontsize=14pt,twoside,a4paper]{book} \usepackage[T1]{fontenc} \usepackage[none]{hyphenat} \usepackage{scrextend} \usepackage{...
user61681's user avatar
  • 1,769
5 votes
1 answer
130 views

"Unused global options(s)" when using arguments in options of class

I have been using a custom class file for some time now, which requires several options with arguments; e.g. my documents often begin with something like \documentclass[name=John\ Smith]{mathwork}. ...
Andy Wang's user avatar
0 votes
0 answers
26 views

Page orientation option doesn't work with new class

This is the new class I have created preloading article class \LoadClassWithOptions{article} \NeedsTeXFormat{LaTeX2e} \ProvidesClass{chain}[4/4/2022] %Packages \RequirePackage{tabularx} \...
Karel Capek's user avatar
0 votes
0 answers
68 views

How can I to pass options (or Load) class to a new package? Is it possible?

I'm planning to build a new package, which I call abntstyle, that can implement Brazilian norms of writing academic works. There is already a class called abnTeX2 that does this. This class is ...
lucenalex's user avatar
  • 331
0 votes
1 answer
193 views

How to \ExecuteOptions that are handled by \DeclareOption*?

I'm writing a class file based on the report class, for which I want the default font size to be 12 pt rather than 10 pt. I tried specifying a default font size using the \ExecuteOptions{} command, ...
Frink's user avatar
  • 47
2 votes
1 answer
198 views

When to use \PassOptionsTo* and when \LoadClass/\RequirePackage?

I've created a few packages/classes for my own purposes and learned (from, e.g., there) that \PassOptionsTo*[opt] is similar/equivalent to \LoadClass[opt], \RequirePackage[opt], or \usepackage[opt], ...
mfg's user avatar
  • 539
0 votes
1 answer
70 views

Loop in a specific list to define class options

I have a class beamer-rl to create beamer presentation for RTL languages (like persian) and I need a way to include RTL language as a class option like this \documentclass[persian]{beamer-rl} So class ...
Salim Bou's user avatar
  • 17.1k
1 vote
0 answers
93 views

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 ...
Aram Papazian's user avatar
2 votes
0 answers
61 views

Options passed to babel with article class and not with beamer

In this example using article class options arabic-ma and provide=* are passed to babel, but when changing to beamer class options are not passed to babel. Is there an explanation? \documentclass[...
Salim Bou's user avatar
  • 17.1k
0 votes
0 answers
104 views

How to process base document class options in the derived class?

I want to process options passed to the base class in my derived class. Specifically, I'd like to enforce margin sizes for the article class with geometry package. Moreover, I would like to forbid ...
Robert Manson-Sawko's user avatar
0 votes
2 answers
95 views

Pass LaTeX variable from DocumentClass file to class

DocumentClass MWE... \documentclass{testclass} \begin{document} \outputdirpath{../auxil} \begin{minted}{php} <?php $x = 1; if($x=1){ echo "x=1"; ...
Mike A's user avatar
  • 31
0 votes
1 answer
36 views

Excluding one of the chapter from starting with an odd numbered page in thesis

My university provided me with a LaTeX template for my thesis. In the class file of it, there is a part of the code that makes all the chapters start from an odd-numbered page. However, I need to ...
Emr's user avatar
  • 3
1 vote
2 answers
79 views

Mixing traditional class options and pgfoptions?

I am trying to mix pgfopts with more classical options to make a custom class. The idea is that classical options would be here to provide predefined behavior, while pgfopts options would be here to ...
Vincent's user avatar
  • 5,327
0 votes
1 answer
35 views

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} \...
Kaskorian's user avatar
  • 137
0 votes
1 answer
20 views

Strange behavior of a macro in \LoadClass options

Consider the class file mwe.cls containing \NeedsTeXFormat{LaTeX2e} \ProvidesClass{mwe}[2022/09/26] \def\myGreatMacro{twoside=false} \LoadClass[a4paper,\myGreatMacro]{scrreprt}%% warning about ununsed ...
user avatar
1 vote
1 answer
70 views

Preserve space in \@classoptionslist

I noticed that \@classoptionslist removes whitespace of the options. Is it possible to prreserve this whitespace? %\documentclass[12pt]{scrartcl} %\begin{filecontents*}{myclass.cls} % \ProvidesClass{...
likethevegetable's user avatar
1 vote
0 answers
31 views

Metaclasses via global options

Vision I am making a small, custom LaTeX class for my organization. I want this class to support a couple different kinds of documents: articles, and reports. I want to actually inherit from the ...
Joe's user avatar
  • 11
0 votes
0 answers
39 views

Interaction between global and local options

I'm trying to achieve a specific behavior between global and local options within my own class. The example below does not work as intended. Other attempts also failed. \begin{filecontents*}[overwrite]...
rolfn's user avatar
  • 949
0 votes
1 answer
104 views

Disable a package/classoption when the draft mode is on

I have a custom .cls file which passes the parameters of the \documentclass to a4paper. In this .cls file, I have (from the top), \NeedsTeXFormat{LaTeX2e}[1996/12/01] \ProvidesClass{Thesis} ...
Tom's user avatar
  • 123
1 vote
1 answer
179 views

Unused global option with multi-staged options in koma-script

We use koma-script for a wide range of different documents, e.g. reports and short legal documents. I would like to make our documents more consistent. My idea was to create a package (myBase.sty) ...
Asycoptica's user avatar
0 votes
1 answer
181 views

Best way to build a custom class

I am customizing a class based on beamer. In your opinion, what is the best way to define options? \NeedsTeXFormat{LaTeX2e} \ProvidesClass{myclass}[2019/03/25 myclass] \DeclareOption*{\...
Luca Benatti's user avatar
1 vote
1 answer
195 views

How to change default options of a document class?

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 \...
user avatar
5 votes
1 answer
99 views

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{...
Stephen's user avatar
  • 4,684
0 votes
0 answers
26 views

Passing `table' option to bespoke class, not recognised by `xcolor`

I'm working on a document that uses a university-specific class file. For the purposes of this question, I've reduced the class file to one called test.cls, which contains the following: \...
rbrignall's user avatar
  • 1,574
1 vote
1 answer
90 views

Class with keyval option consisting of lists of keyval pairs

I'm trying to figure out how to write a class that would allow for a key-value option where the key is called people, which would take a list of grouped key-value pairs (e.g., name, title, and role) ...
Adam Liter's user avatar
  • 12.7k
3 votes
2 answers
4k views

How to set fontsize of 14pt in article class [duplicate]

I would like to set the fontsize of 14pt in the article class. But, using What point (pt) font size are \Large etc.?, I obtain: Questions: I am assuming that the output means that the closest font ...
Peter Grill's user avatar
0 votes
1 answer
85 views

Customized class options doesn't work

I'm trying to declare a new option poly in my .cls file. \NeedsTeXFormat{LaTeX2e} \ProvidesClass{classname} \ClassInfo{JH}{Copyright (c), 2022.} % \DeclareOption{poly}{% \PassOptionsToClass{french,...
jowe_19's user avatar
  • 1,013
2 votes
1 answer
434 views

Openbib Class Option

I have been reading and reviewing class files as well as starting to read the Leslie Lamport's book on LaTeX. One thing I have noticed in multiple places (including the book) is an openbib option ...
Nukesub's user avatar
  • 617
0 votes
2 answers
357 views

How change paper size in ElegantBook class?

I would like to get paper size A6 (105mm x 148mm). I have used paper=a6paper in document class option, but it is not working. Any suggest is appreciated in advance. MWE: \documentclass[10pt,fancy,...
BSFU's user avatar
  • 87
0 votes
2 answers
541 views

How to Declare Font Size Class Option

I am creating a class with options, and desire to be able to \DeclareOption with the font size... For example it would be nice to be able to write in the .tex file documentclass[12pt]{myclass} And in ...
jelt's user avatar
  • 11
1 vote
1 answer
157 views

Is it possible to prevent class options from being passed to some packages?

I have an option named indent in my document class. However, some of the packages loaded also have this option, and since the option is written in \documentclass[...]{myclass} as a global option, it ...
Jinwen's user avatar
  • 8,618
1 vote
1 answer
91 views

Twocolumn mod option in a class doesn't work any more

I'm using a class containing \NeedsTeXFormat{LaTeX2e} \ProvidesClass{class_test} \LoadClassWithOptions{scrbook} \ClassInfo{class_test}{Copyright (c), 2021.} %-------------- \usepackage{lipsum} In the ...
jowe_19's user avatar
  • 1,013
3 votes
0 answers
157 views

How to override a base class's default options in a derived class

Apologies if this is answered somewhere else; I've seen several questions with similar titles but I can't seem to determine how the answers would apply to my case. What I would like to do is define a ...
Jigsaw's user avatar
  • 935
0 votes
0 answers
19 views

How to change to helvetice font in class based on class option? [duplicate]

I want to based on a class option change to using Helvetica as font, the simplest way I found to do this would be to load the helvet package. But if I do that like: \DeclareOption{foo}{ \...
jonalv's user avatar
  • 11.5k
2 votes
1 answer
133 views

Trouble getting A4 output from custom class

I am trying to get an A4 output from a document with a custom class (https://www.latextemplates.com/template/stylish-article). I tried \documentclass[a4paper,fleqn,11pt]{SelfArx} in the document file ...
planespotter5000's user avatar
1 vote
0 answers
78 views

How many of \documentclass exist? [duplicate]

Sorry for my trivial question but I am curious to know how many \documentclass exist. I use generally, article, standalone, book, report, beamer, but I see in many question also other \documentclass ...
Sebastiano's user avatar
  • 56.7k
1 vote
0 answers
156 views

Use babel's `main` key in global options

In one of my templates, I need to load babel in the .cls file, as some functionalities in the .cls file depend on babel. I would, however, like to keep the flexibility for the user to set whatever ...
Sam's user avatar
  • 3,008
4 votes
1 answer
4k views

Undefined control sequence. \set@color ...\@pdfcolorstack push{\current@color}\aftergroup \reset@color

I know, there is this question but my knowledge regarding .cls files when it comes to latex, is too little. I tried to do as the solution there says there but I don't use begincmd so I don't know how ...
topkek's user avatar
  • 69
2 votes
1 answer
1k views

Options not working if custom class is in subfolder

I have created my own LaTeX template and use a custom class for this purpose. I developed the template on a Windows machine using TeX Live 2020 and recently compiled a copy of the project on my Mac. ...
Sam's user avatar
  • 3,008
3 votes
0 answers
367 views

Problem with \ProcessOptions? [closed]

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 ...
NoZ's user avatar
  • 31

1
2 3 4 5