Questions tagged [document-classes]
{document-classes} is for questions relating to the document class of the TeX file. This sets up various document-wide formatting elements.
1,181 questions
0
votes
1
answer
108
views
Is there a good way to define common code between LaTeX projects?
I have multiple courses, each containing similar LaTeX code. There are tests built on exam,
slides built on beamer. I often include a file with the common files if there are multiple files for example:...
1
vote
0
answers
53
views
Which package to use for a book of problems with solutions [closed]
I'm writing a booklet of math problems for my students. The problems are organized into several chapters and sections; some problems should have names, while others are simply numbered. In the ...
0
votes
1
answer
33
views
Reproducing amsart page layout with article class
I'd like to reproduce the exact page layout of the amsart document class using the article class. Does anybody have a simple solution for achieving this? I could not find any previous answer directly ...
1
vote
1
answer
43
views
Optional command for exercise enviroment in amsart
I’m not very familiar with the amsart class. I have a .tex file with a complete preamble provided by a university professor.
In the following MWE, I have taken a part of it. Specifically, I would like ...
5
votes
2
answers
180
views
Why does \AtBeginDocument have a different effect from within a class file than from without?
Consider the following MWE, where I use a custom class test which loads the libertinus fonts and sets up selecting StylisticSet=2 in order to obtain a more harmonious italic J, as proposed in this ...
0
votes
0
answers
42
views
A counter to replace chapters not supported in amsart
Related to question without an answer Defining chapter in LaTeX under amsart, I know that amsart class haven't a \chapter command.
To write a chapter I use the enviroment center, like the example ...
0
votes
0
answers
74
views
Does changing to journal specified class clash with nepture?
Suppose you are submitting an article to a journal, which recommends its users to use a specific document class. So, you changed the article to the specified document class.
Can it happen that a latex ...
1
vote
0
answers
29
views
\footnotesize not defined in minimal document class [duplicate]
I'm trying to use the \footnotesize in a document which is of class minimal, and I get an Undefined control sequence..
Here is a MWE
\documentclass{standalone}
\begin{document}
foo\\
\...
1
vote
1
answer
74
views
Empty sheet after declaration [closed]
I am currently writing a thesis with Latex. According to the university's guidelines, a declaration of independence must be inserted between the bibliography and the appendix. I am using the package “...
3
votes
1
answer
88
views
Is that mandatory requirement to put \RequirePackage after \LoadClass?
Description
In .tex, we should use \documentclass and \usepackage in order.
However, in .cls, it seemed not mandatory.
Consider the following examples:
\LoadClass after \RequirePackage:
\begin{...
0
votes
0
answers
57
views
How to fix the \hfill command in the memoir document class?
I was surprised to observe that the \hfill command apparently does not work (at least not inside a \begin{matrix}...\end{matrix} construction) when using the memoir latex document class. Why is this, ...
0
votes
2
answers
110
views
Is it possible to test if a document class is loaded, and if not, load one, otherwise use the one already loaded?
I have a shared preamble file that provide uniform configuration for my documents. But it has no document class of its own. That way, I can determine the class for each document. But that means it ...
3
votes
1
answer
93
views
Custom document class always pick the default logo even if I change to other logos
I want to create a custom class with an option to change logo. But the default logo is always selected even if I change to other logos.
\ProvidesClass{myclass}[2024/12/01 v 1.00 class for fun]
\def\@...
5
votes
2
answers
210
views
How to change the numeration of sections from "0.x" to "1", "2", etc.?
So I've looked through some similar (but not the same) questions, I've look through the template I was given but I don't understand how do I change the numeration of the sections from "0.x" ...
4
votes
3
answers
1k
views
Old math books fonts
I am currently working on a book/articles. I really (really!) enjoy the styling of the Nagoya Math Journal from the late 80s-90s. Here's an example : https://www.cambridge.org/core/services/aop-...
0
votes
0
answers
64
views
Custom compiler errors/warnings
I own a LaTeX project with many contributors that don't necessarily use LaTeX every day so they often make "little mistakes" as writing ... instead of \dots in mathmode or using nonadaptive ...
0
votes
0
answers
223
views
Set the class files directory for Latex
How, when I run the pdflatex or lualatex or similar command, can I tell Latex where to look for class files?
Let's say I have a directory structure like this:
root
|--- [my program, etc.]
|--- latex-...
4
votes
2
answers
384
views
Argument of \let has an extra }
I simply want to highlight the title of a subsection with below:
\subsection{\hl{Computation Time}} \label{sec:comp_time}
I added "\usepackage{soul}" at the beginning of the latex file.
But ...
0
votes
2
answers
111
views
How to set \baselineskip in a class file?
I want to change the length of \baselineskip for my latex documents. This is my test document:
\documentclass{testlayout}
\begin{document}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. ...
3
votes
1
answer
161
views
What's wrong with nicematrix and socg-lipics-v2021.cls?
Sorry for asking for help to understand a custom conference class file. The class file is a wrapper available here around the LIPIcs class file. When compiling a basic document such as
\documentclass{...
0
votes
0
answers
73
views
ToC for a journal volume
I am trying to make a small conference-paper volume for a local conference, and I am having some issues with Table of Contents part. I want to make it automatic, but can't figure out the syntax, ...
2
votes
1
answer
73
views
singlecol-new: General warning triggered in Overleaf
having downloaded current version of the singlecol-new.cls, which is needed for some of the InderScience journals, I get general warning in Overleaf TexLive 2024:
L3 programming layer <2024-03-14&...
0
votes
0
answers
20
views
Can someone identify the next font/document settings? [duplicate]
I'm currently writing a paper and searching for the appropriate document settings(font, line spacing, margins etc.). I saw the next paper, and this is exactly what I've been searching for.
This is a ...
3
votes
0
answers
183
views
Is there a .cls file of the layout of the Latex Companion 3rd edition?
The layout of the Latex Companion 3rd edition is really elegant.
I understand (Production Notes, end of the document) that an assembly of 140 packages was used.
Sorry for my naive question, but are ...
5
votes
1
answer
251
views
new versions of fancyhdr break caesar_book class
When I compile caesar_example.tex, the page numbers do not appear. They only show up if I use an older version of fancyhdr (e.g., this one).
I am using TeX Live 2022 on Debian.
Is this issue related ...
0
votes
0
answers
90
views
using LMS class file
The document class of London Mathematical Society lms isn't available at CTAN and so it can't be part of any TeX distribution. I downloaded the template from this website https://ctan.mirror.garr.it/...
0
votes
1
answer
80
views
\nocite{*} causes Undefined control sequence at \printbibliography
Using \nocite{*} leads to a Undefined control sequence at \printbibliography. If I define a specific source, such as \nocite{axford-1961}, it compiles without issue.
Compiler: XeLaTeX
I thought it ...
7
votes
1
answer
257
views
Why does \appendix reset the counter of the level below the main sectioning level?
In book.cls \appendix is defined as:
\newcommand\appendix{\par
\setcounter{chapter}{0}%
\setcounter{section}{0}%
\gdef\@chapapp{\appendixname}%
\gdef\thechapter{\@Alph\c@chapter}}
While in ...
0
votes
0
answers
178
views
Convert .bib to .docx in command line (as does: https://www.bibtex.com/c/bibtex-to-ama-converter/)
I frequently use the excellent following website to convert my bibliography from .bib to .docx for coauthors working with me on scientific stuff who don't use latex:
https://www.bibtex.com/c/bibtex-to-...
0
votes
0
answers
116
views
How can I use Springer "svmult" latex template in local with Visual Studio Code?
I'm trying to use this template from Overleaf
text
I executed this on Overleaf it worked well.
However, since I upload a lot of images, I prefer to run the Latex code locally.
But even the template ...
0
votes
1
answer
403
views
fontspec and custom class triggers The font size \normalsize is not defined
I'm trying to create class based on beamer to make presentations as simple as possible while following the graphic manual we have.
I need to use fontspec and I'm using luaLaTeX package to load OTF ...
0
votes
0
answers
79
views
Where to put new TeX classes in Slackware Linux?
I've just downloaded some interesting TeX classes from CTAN website, but I'm not sure where to put these classes in order to make them recognized by my TeX software. I'm using Slackware 15.0.
1
vote
1
answer
272
views
Setting up LaTeX for lecture notes. Which class is the most useful?
I have considered the classes report and book. I need to add the dates for each lecture(chapter). Is that possible for these specific classes?
1
vote
0
answers
86
views
How to tell latex where to find the .cls file? [duplicate]
So I have this folder structure:
root
|- main.tex
|- myfolder
|- abc.cls
When I want to compile main.tex:
\documentclass[a4paper,twoside,10pt]{abc}
\begin{document}
Hello world
\end{document}
it ...
1
vote
1
answer
109
views
Font size conflict between document class and tikzpicture
Here are my files reduces for the MWE :
file 1 :
\documentclass[a4paper,12pt]{article}
\usepackage{tikz}
\begin{document}
\input{Chaine_Fonctionnelle}
\end{document}
file 2 :
\documentclass[...
0
votes
0
answers
30
views
Documentclass Report: Undefined Control Sequence [duplicate]
What mistake am I making? Am I missing something?
\documentclass[a4paper,oneside,12pt]{report}
\begin{document}
Test
\end{document}
EDIT:
The compiler is having trouble understanding a command you ...
1
vote
0
answers
150
views
How to have multiple departments within the same university be in a single line for the affiliations in Springer latex template?
I want to have multiple departments within the same university be on the same line (no line breaks). The line should break with different universities.
Currently, this is how it looks like: (here X &...
0
votes
0
answers
40
views
how i can make the numer of subsection in right side
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{latexsym}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage[english, russian]{babel}
\usepackage{nopageno}
\...
0
votes
1
answer
91
views
Figure Alt text dialogue box will appear when mouse over the figures
I want to add alternative text (Alt-text) to have a dialogue box appear when hovering over the figures. Additionally, I need to ensure PDF accessibility tagging is implemented in this PDF. My MWE is ...
0
votes
1
answer
250
views
Tufte Class and Margins
I have recently gotten acquanited with the tufte document class and I love its style very much; the only thing that bothers is the side margin use, even though I understand that it is exactly what the ...
0
votes
1
answer
104
views
Inconsistent symbols in slides documentclass
Problem description
I like how the slides document-class typesets most of the maths, which I crop and use in a WYSIWYG slide editor.
First, I'm not sure how to set the font to 10pt, so that the new ...
1
vote
1
answer
99
views
Problem placing information at the bottom of the first page
I am working on the development of template and I would like to have something similar like this:
I'm working in twocolumn document and I tried to replicate it in \fancyfoot[L]{} (only for the first ...
0
votes
1
answer
298
views
Command \ch and \arctg already defined
Two errors:
document.tex: error: 2: Command \ch already defined. \begin{document}
document.tex: error: 2: Command \arctg already defined. \begin{document}
for that simple piece of code:
\documentclass[...
0
votes
0
answers
113
views
How can I adjust caption formatting without the caption package
I'm trying to build a custom class that matches my organization's template. I managed to get the formatting for table/figure captions to match using the caption package, but the caption package does ...
2
votes
1
answer
1k
views
Conflict between Springer document class and \cline [duplicate]
So, I am trying to write down a table in the "sn-jnl" document class from Springer: when I do it it "article" instead I get exactly what I want:
\documentclass{article}
\usepackage{...
2
votes
0
answers
99
views
Create TEX file without document environment [closed]
Is it possible to create document classes for forms (e.g. "donation confirmation"), so that in the TEX file, one has to only include the document class and the commands provided by it, but ...
0
votes
1
answer
216
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 ...
1
vote
1
answer
125
views
Difficulty with `tableofcontents` and page-numbering
I'm writing my math thesis with Texmaker, but somehow my LaTeX codes fail to produce the PDF layout required by my school. Ideally, I'm hoping to achieve the following result:
Please notice that this ...
0
votes
0
answers
46
views
sysbio class conflicts with font size macros in tikz pictures
The sysbio official class file has caused many problems. I find it conflict with font size macros in tikz pictures, e.g. the following MWE produces an error:
\documentclass{sysbio}
\usepackage{tikz}
\...
1
vote
1
answer
37
views
Problem refering to appendix using the sysbio class
With the MWE:
\documentclass{sysbio}
\usepackage{hyperref}
\begin{document}
\section{Introduction}
Some thing in \ref{app::a}
Some thing in \autoref{app::a}
\appendix
\section{some appendix}
\label{...