Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [documentclass-writing]

{documentclass-writing} is about writing document classes. If your question is about choosing, installing, or using document classes, choose {documentclass} instead.

Filter by
Sorted by
Tagged with
1 vote
1 answer
60 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) ...
user avatar
0 votes
0 answers
34 views

setspace complicates custom class: best workaround?

Background – class with 'transparent' key–value options I have a custom class for thesis-like docs that allows setting fonts, styles, lengths, and rubber lengths with key–value options. It's a work in ...
user avatar
0 votes
0 answers
31 views

Converting an overleaf text into Latex [duplicate]

I have written a paper in Overleaf. I can't convert it into a LaTeX file. Is there any special way to do that. For example the document class is \documentclass[graybox]{svmult} but in LaTeX it has not ...
user avatar
  • 3
0 votes
0 answers
26 views

Best practices for class authors: configurable names / translations

How should I suggest document authors rename elements that my class provides, either because they're not writing in English, or because they need to change a word or two? Here are three tools, each ...
user avatar
1 vote
1 answer
46 views

cleveref conflicts with polyglossia when required in a class

When I run the following MWE (with xelatex): % File myclass.cls \NeedsTeXFormat{LaTeX2e} \ProvidesClass{myclass} \LoadClass[12pt]{article} \RequirePackage{polyglossia} \RequirePackage{cleveref} % ...
user avatar
1 vote
0 answers
26 views

how does the nested \def in \def\inst{\beamer@insttitle}\def\and{\beamer@andtitle}

I am trying to understand the following code: \def\author{\@dblarg\beamer@author} \long\def\beamer@author[#1]#2{% \def\insertauthor{\def\inst{\beamer@insttitle}\def\and{\beamer@andtitle}#2}% } ...
user avatar
2 votes
1 answer
28 views

How to enforce a first-page style in a documentclass?

I've written a documentclass in which I've defined a \fancypagestyle from fancyhdr for the first page. But the user of my documentclass needs to call \thispagestyle{firstpagestyle} in order for this ...
user avatar
  • 115
1 vote
1 answer
43 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
2 votes
2 answers
70 views

What license (if any) should I choose for this document class?

About 10 years ago, I inherited a not-officially-licensed document class for Ph.D, plus a sample skeletal thesis. theses in my alma mater's CS department. I've been maintaining and improving it on ...
user avatar
  • 11.3k
2 votes
1 answer
67 views

How can I get the effect of indexonlyfirst for a single glossary?

Consider the following document: \documentclass{article} \usepackage{glossaries-extra} \newglossary[nlg]{notation}{not}{ntn}{Notation} \makeglossaries \newglossaryentry{symb:c}{type=notation,name=$c$, ...
user avatar
  • 11.3k
1 vote
1 answer
62 views

Manipulating csv lists and nested csv lists with expkv using custom class file

This is a followup question to Class with keyval option consisting of lists of keyval pairs. In an answer to that question, Skillmon showed how to write a class that would provide a command, \people, ...
user avatar
0 votes
0 answers
145 views

latex article cls

I'm developing a template for an article in Latex using specific class. I have a problem showing 4 errors when compiling. Attached the predefined class together with the tex source file. I appreciate ...
user avatar
0 votes
0 answers
52 views

University dissertation package/cls table captions broken by subcaption and subfigure. How to fix?

I'm trying to write my dissertation, and I've run into an issue where the subcaption and subfig packages break the caption formatting for tables. For an example, the table number label shows up as, &...
user avatar
  • 1
0 votes
1 answer
76 views

Trouble with \hfill not going to the end of the page

I am new at creating a class file to maintain a specific format for my resume. I included all the code from the template I am using to prevent any compiling issues. I am trying to line up my dates at ...
user avatar
  • 1
0 votes
1 answer
71 views

IF statement in .cls file. How to control it from .tex file?

Minimum working code is attached herewith. If I change 1 to 0 in \newcommand{\numsections}{1}, I get heading without number, and to get numbered heading, I have to go to .cls file. I don't want the ...
user avatar
2 votes
1 answer
48 views

Correct way to/best practice for using a custom class for my university?

I've written a really nice, pretty comprehensive class for my particular department's particular way of doing things. I've also got biblatex citation and bibliography styles. Once I have them a bit ...
user avatar
0 votes
1 answer
37 views

Understand commands of a class file

I haven't much experience with TeX/LaTex and I am trying to write a CV based on this repository. Specifically, I am trying to understand how a LaTeX class file is written, and reproduce to a certain ...
user avatar
7 votes
3 answers
208 views

Are there any LaTeX commands (including in packages) where the argument will be in math/text mode based on context?

As I work on the parser for finl, I'm contemplating how I'm dealing with command parameters and wondering if my current setup is sufficient. Right now, a parameter has a type which would either be ...
user avatar
  • 12.9k
0 votes
0 answers
27 views

Should I write down a module or a .cls file?

I have delved recently into the world of LyX modules and layouts. From what I understand, layouts instruct LyX to style the document while the user works on it, and modules allow the user both to ...
user avatar
  • 298
2 votes
1 answer
148 views

Children book/picture book template

I got inspired by the book "Newtonian Physics for Babies" and other books by Chris Ferrie. So I wanted to gift a children book to someone in my family. The book will be a first encounter ...
user avatar
  • 895
3 votes
0 answers
51 views

Can I use a package (passing it options) in a class definition which can also be used (with \usepackage, more options) in a document?

I'm writing a document class for my faculty. Most users will be relatively casual, non-expert with LaTeX and I want to cause them minimal fuss and work when using the class. In service of this, I ...
user avatar
0 votes
1 answer
45 views

Conditionally add author to header

I've a documentclass myclass that's based on KOMA-script's scrartcl class. MWE: myclass.cls \NeedsTeXFormat{LaTeX2e} % The document class name \ProvidesClass{myclass} % https://tex.stackexchange.com/...
user avatar
  • 27
1 vote
5 answers
183 views

Making a note using LaTeX and finding the formatting of a specific book

I really want to make my own notes in a friendly format, obviously using LaTeX. But, since I have a little knowledge about LaTeX and its functions, I go through some books, articles, online notes ...
user avatar
  • 11
6 votes
1 answer
107 views

Does multiple \AtBeginDocument calls execute code in the appearing order

Let's say I have these two simple files myclass.cls : \LoadClass{article} \AtBeginDocument{\typeout{IN CLASS}} myfile.tex \AtBeginDocument{\typeout{BEFORE CLASS}} \documentclass{myclass} \...
user avatar
0 votes
1 answer
48 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 ...
user avatar
  • 5,269
2 votes
1 answer
101 views

\PassOptionsToClass{\CurrentOption} not working

I get an error which I don't understand. I have the following cls-file called error.cls \NeedsTeXFormat{LaTeX2e} \ProvidesClass{error} \DeclareOption*{\...
user avatar
  • 607
1 vote
0 answers
54 views

Best practice for dealing with bidi's redefinitions for class authors

As is well-documented elsewhere, bidi.sty does a lot of redeclarations and assumes that the author is using one of a small set of document classes. For use of packages, one can fiddle with the order ...
user avatar
  • 12.9k
3 votes
0 answers
68 views

Class/package: design vs code

LaTeX3 team often reminds us: "Classes really should be about formatting/style/etc., not functionality. The latter should be added by packages, which ideally would be independent of the classes ...
user avatar
1 vote
1 answer
14 views

Using amsart indirectly as a base class of another class changes the way the date is printed

I created a custom document class based on amsart. When I used it instead of amsart, to my great surprise this changed the way the date is printed in the footnote of the first page: instead of Date: ...
user avatar
  • 1,709
1 vote
1 answer
52 views

Document class that places a figure on a specific page

I'm trying to write a document class with a twocolumn layout such that when a document is written using that class, a certain figure, e.g. a logo, is always inserted on a specific page - say, page 10. ...
user avatar
  • 253
1 vote
1 answer
47 views

How can I specify page numbering for \chapter headers to be in the top right corner?

I wrote my own Dissertation .cls file and I'm not sure how to make my chapter page numbers located in the top right-hand corner. I believe the base class is report and not article. I was using an ...
user avatar
3 votes
0 answers
54 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 ...
user avatar
  • 615
2 votes
0 answers
25 views

How can I change margin and block size in a class definition based on Memoir? [closed]

Given the following example: test.cls: \NeedsTeXFormat{LaTeX2e} \ProvidesClass{test} \LoadClass[article,oneside]{memoir} \setstocksize{3in}{3in} \settrimmedsize{3in}{3in} %\setlrmarginsandblock{5pt}{...
user avatar
  • 11k
1 vote
0 answers
48 views

How does the user set geometry in a class that loads fancyhdr?

In my class, I defined the header style with fancyhdr. This causes trouble when the user wishes to modify the geometry settings, since geometry configuration should happen before fancyhdr. Below is an ...
user avatar
  • 5,269
0 votes
0 answers
17 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}{ \...
user avatar
  • 11k
1 vote
0 answers
146 views

Any reference and tutorial on writing .cls file class? [closed]

I was trying to re-edit the report.cls file to adapt to our institution thesis presentation format. I was stuck at declaring and executing options,also with error flag on xcolor file execution. Having ...
user avatar
0 votes
0 answers
96 views

Switching my existing class from LaTeX2e to expl3 syntax

It has been my dream to rewrite my existing class with the expl3 syntax, as (I believe that) the code would be much clearer and would be easier to maintain by then. One year ago, while searching on ...
user avatar
  • 5,269
1 vote
0 answers
41 views

Writing a class + template with default sections

I'm right now writing a class for technical manuals to be used inside my company. This class holds e.g. the company logo and defines some macros for e.g. specific Corporate Identity styling of code ...
user avatar
  • 278
1 vote
1 answer
99 views

Increasing the font size makes the font smaller instead

I screen capped my workspace in overleaf below: The font size was initially at 12 pts as is in the command \documentclass[titlepage,12 pt]{article}. When I tried increasing the font size to 14 by ...
user avatar
  • 151
0 votes
1 answer
335 views

Change font in my document-class [closed]

I created a new documentclass that is based on the \documentclass{article} . I would like to use the font Barlow that I just downloaded. I use the package fontspec and the compiler XeLaTeX. When I ...
user avatar
1 vote
1 answer
42 views

Spacing in a lined document

I have the following document: \documentclass[12pt,a4paper,fleqn]{article} \usepackage[utf8]{inputenc} \usepackage{tikz,amsmath} \usepackage{amsfonts} \usepackage[left=2cm,right=1.7cm,top=2cm,bottom=...
user avatar
0 votes
0 answers
69 views

Undefined control seqeunece.\ documentclass

may u help me with this error When I write this simple command in texstudio?when I type \ documnet class the error will apppear but when I typ doc.. and then the software propose default the phrase \...
user avatar
  • 1
1 vote
0 answers
47 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 ...
user avatar
  • 2,678
1 vote
1 answer
186 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. ...
user avatar
  • 2,678
1 vote
2 answers
97 views

How to set footnotes in ‘small’ size

Footnotes are set is \footnotesize. For some conference paper style, essentially \footnotesize is redefined to be \small. The choice to set footnotes in ‘small’ size is fine. The fact that in the way ...
user avatar
  • 5,682
0 votes
1 answer
33 views

define different font depending on the compiler [duplicate]

I am writing a class file and want to use fontspec and unicode-math if the compiler is luatex or xetex. If the compiler is pdftex I would like to define default fonts like cmr and phv instead. I am ...
user avatar
  • 11
1 vote
4 answers
195 views

Writing own LaTeX templates with relative paths, difference between include, input, class

I'm working on a Windows environment with Miktex. Most my documents are created with XeLaTeX but I think my problem is not compiler-specific. I would like to create a template with all my package ...
user avatar
  • 278
1 vote
0 answers
135 views

Is it possible to modify the article class file?

I would like to write a new class file, preferably from scratch (if that is not way too time consuming). I do not want it to take too long to compile an empty document. The one I have written now uses ...
user avatar
  • 11
4 votes
2 answers
166 views

Robust command not expanding as \input argument

I could really use some help - I've been using LaTeX casually for several years, but have rarely had to dive into the details or problems, and I can't figure this out. Problem I am working with a .cls ...
user avatar
  • 143
0 votes
0 answers
60 views

How to achieve local class options?

I am writing a custom class and want to use some option keywords (such as draft) that are also shared by some packages that I need to import, which leads to unintended results. This is because, by ...
user avatar

1
2 3 4 5
9