Questions tagged [class-options]

Concerning options that can be passed to document classes.

Filter by
Sorted by
Tagged with
0
votes
1answer
29 views

pgfopts .unknown does not handle key-value pairs?

I would like my custom class to forward unknown keys to the base class, or in this case, a package. The following works (to make the example smaller, this forwards only one key; expanding it to a ...
0
votes
1answer
58 views

Pass beamer class options to beamer theme

How do I pass the document class options to a beamer theme? I am writing a beamer theme. I would like to use the beamer class option aspectratio to have individual layout settings for the 43 and 169 ...
0
votes
0answers
25 views

Can a document class be installed locally inside a file?

I have 2 documents each in a different document class. Can I somehow add one file to the other preserving the formatting? Is there a way to locally install inside one of the documents the .cls and ...
11
votes
1answer
562 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*{\...
0
votes
1answer
33 views

Problem with passsing options through customized class interface \myclsset using pgfkeys

My intention is to create a class with a interface setup command \myclsset \documentclass{myclass} \myclsset{key1=val1, key2=val2, ..} % key-value list \begin{document} ... \end{document} where \...
1
vote
0answers
30 views

Class wrapper: Why “unused global option(s)” warning

I am trying to write a wrapper around some documentclasses as a small test. Everything works so far, but why do I get an LaTeX Warning: Unused global option(s): [math=true,tikz=true,base=normal,type=...
0
votes
0answers
39 views

Allow kvoptions with spaces in String

I try to write my own package + class. The package is supposed to offer some option like so: options -> class -> package -> custom command For this I use the kvoptions-package, and my files ...
0
votes
1answer
32 views

How to generate an outline for a document?

I am writing a debate case class in latex and I have environments set up so the user can easily declare a contention and subpoint. For example, if the user had: Contention 1: My solution is better ...
2
votes
1answer
36 views

Default font sizes do not work with new paper size option

I wonder why the default font sizes won't work in the following modified class file. \RequirePackage{filecontents} \begin{filecontents}{example.cls} \ProvidesClass{example} \NeedsTeXFormat{LaTeX2e}[...
13
votes
3answers
1k views

How to set class options that can have multiple values?

Title says it all, but here's an example: the KOMA-Script classes provide the option toc which can have multiple values that don't interfere with each other, like values that enable the Bibliography ...
1
vote
0answers
27 views

How to pass options from beamertheme to beamer class?

How to pass options from custom beamertheme to beamer class (and already loaded packages)? slides.tex: \documentclass[ %xcolor=table, % this option should be set in the theme! 17pt, % you can ...
1
vote
1answer
187 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)...
0
votes
1answer
148 views

Editing res.cls to increase the left column width

I'm a beginner to Tex. I was using an Overleaf template to create a CV. [Link: https://www.overleaf.com/project/5cdbf1b52aab4345446ebf8c ]. I want to know how I can increase the left column width so ...
0
votes
2answers
80 views

How scale a mathrel to match current context's font size?

Revised question: I'm using TikZ to re-design \rightarrow for the Lucida Bright fonts, to better match tikzcd arrows. How do I scale that mathrel for script- and scriptscript-styles (as well as have ...
1
vote
1answer
54 views

Conditionally set bibliography title

I am writing a class and would like to offer the option of changing the bibliography title as a class option. If no title was given I would like to just use the default one. Unfortunately I can't seem ...
3
votes
1answer
25 views

Specifying font size with LoadClassWithOptions causes error

When I specify font size with LoadClassWithOptions, the main document gives error: File `.cls' not found. The custom class file is in the same folder as the main file. What I am doing wrong? ...
0
votes
2answers
33 views

What class file should I be looking for, for 2 column preprint physics style?

I need something that gives me the following functionality: 2 column journal style natbib or other automatic parsing of .bib file with hyperlinks numbered bibliography items and citations, i.e. ...
2
votes
1answer
58 views

Differences between \documentclass[spanish]{article} and \usepackage[spanish]{babel}

This is my second post in latex-SE. Here is a very (I think) basic question, but I could'nt find a precise answer yet: What exactly does the command \documentclass[spanish]{article} and what sets it ...
0
votes
2answers
52 views

How to detect whether the option citecounter was enabled on biblatex?

I think this is the definition of the citecounter option on the biblatex package: \DeclareBibliographyOption[boolean]{citecounter}[true]{% \ifcsdef{blx@opt@citecounter@#1} {\csuse{blx@opt@...
1
vote
1answer
46 views

How to detect whether \PassOptionsToPackage was already called?

If I call: \PassOptionsToPackage{backend=biber,style=numeric,backref=false}{biblatex} % And later someone else call again \PassOptionsToPackage{style=abnt,backend=biber}{biblatex} What will happen? ...
1
vote
0answers
272 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-...
2
votes
1answer
55 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
90 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 ...
3
votes
3answers
88 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
61 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 \...
1
vote
1answer
232 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 ...
20
votes
4answers
10k 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 ...
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
5
votes
2answers
701 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, ...
4
votes
0answers
65 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
421 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
631 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
394 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
116 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
109 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
38 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 \@...
252
votes
3answers
412k 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, \...
3
votes
1answer
159 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]{...
0
votes
1answer
321 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, ...
9
votes
2answers
1k views

KOMA classes and \LoadClass

I want to create a document class based on a KOMA-Script class. If myclass.cls contains the following \ProvidesClass{myclass}[2011/08/31] \LoadClass[paper=a5]{scrartcl} then compiling a document ...
1
vote
1answer
612 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
203 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
96 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
331 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/...
1
vote
1answer
177 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
61 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
45 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 ...
8
votes
1answer
303 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 ...
1
vote
1answer
368 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
3answers
563 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 ...