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 [documentclass-writing]

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

1
vote
1answer
12 views

Redefining style after the current command or page

I am trying to write for the first time my own class. I am redefining the \maketitle, and I would like two things: the font size to be changed after it (namely to around 14pt, the only way I found is ...
0
votes
0answers
39 views

How to create your own class for a very specific usage?

I have created my resume in Latex and honestly, I like it a lot. I was thinking of making a template and publish it somewhere so that people can use it. But it's rather complicated and it would be ...
0
votes
1answer
22 views

Random compile-time document style

I am trying to create a document class with random style attributes, determined at compilation time. Random attributes would ideally include: Margins Line spacing Font selection For my particular ...
0
votes
0answers
62 views

Choosing a base class

I started writing my own book class and I'm not sure wheter I should use book or scrbook as my base class. (I'm going to load one of these classes, I'm not going to start writing one from scratch or ...
0
votes
0answers
34 views

Using variables in custom class

I am working on a custom document class for my faculty. When creating the frontpage I want to have some custom variables. Such as title, author, supervisors etc. I was able to do it in a single ...
0
votes
0answers
18 views

How to document LaTeX custom packages and document classes? [duplicate]

While I can use something like Doxygen to document a C library (functions, constants and structures defined/written by me), I couldn't find something equivalent in LaTeX to document \newcommand(s) \...
0
votes
1answer
22 views

Change header from class file depending on whether or not a variable is declared in the document

I am trying to edit my class file to either have a header or not depending on whether or not a variable (\cv{}) is set in the document. I have scoured the internet for answers and based my initial ...
3
votes
2answers
217 views

Command for nulifying spaces (String.trim()) in latex

I want to declare a variable in class that takes in the font name from the preamble of the TeX file. Something like \docFont{<Variable>}. Is there a command that could nullify the space key in ...
0
votes
1answer
36 views

How to add new macros like \author{} without editing latex.ltx [duplicate]

I want to write a new class based on the article class for student home-works that needs a modified title page. Is it possible to create new macros like \title{} and \author{} that can be used in the ...
0
votes
0answers
47 views

Commands vs keys/values for setting up a document: what an own document class should provide?

This question somehow extends the question "Package option vs setup command". I'm currently writing a class dedicated to students reports for both academic projects and internships. This class ...
0
votes
0answers
9 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 \...
2
votes
1answer
40 views

Exclamation mark around variable

What does the exclamation marks (!) around the \@subheader command do in the following? \renewcommand\maketitle{ ... \if!\@subheader!\else\noindent{\trfont{\@subheader}}\fi ... } Can someone please ...
1
vote
1answer
45 views

htlatex failing with custom documentclass: Error LaTeX Error: File `email' not found

I have created a custom class for a personal curriculum. It can be found at https://github.com/igormorgado/elegantcv It compiles nicely with pdlatex, XeTeX and LuaLaTeX, but trying to build with ...
2
votes
1answer
55 views

Incompatibility between kvoptions and babel

I'm using kvoptions in my document class and it's worked nicely so far, but after a major rewrite I started getting strange errors that I was able to trace back to the babel package. MWE: %% myclass....
0
votes
0answers
18 views

How to use authblk's \@author outside \maketitle (or other way to get easy-to-use author lists in document class)

The Problem: I am running into issues trying to use the author list created by authblk and stored in \@author outside of the \maketitle command, and cannot figure out what is happening -- detail below....
1
vote
1answer
79 views

Urdu Words can't be written in overleaf

I am writing Urdu words in the Overleaf but it does not appear in the text. May someone please help me? I have tried wits Arabic, but it does not work. For example, in Urdu, I am writing " the ...
1
vote
1answer
56 views

Top-right margin displaying “Contents” instead of section title

I have a class MyReportClass where I define what has to be displayed in the margins of all pages of my document. In particular I would like the current section to appear in the top-right margin of ...
2
votes
1answer
38 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, ...
1
vote
1answer
155 views

Error “\RequirePackage or \LoadClass in Options Section” in document class

I tried to make a document class out of a LaTeX document (that was generated from the default Pandoc LaTeX template, just FYI). The document compiled perfectly with XeLaTeX but I can't get the ...
0
votes
0answers
17 views

Specifying horizontal spacing for section title from the margin instead of after numbering

I am modifying the available class file for my requirement using renewcommand in the preamble. \renewcommand\section{\@startsection {section}{1}{0mm}%spacing before numbering ...
2
votes
1answer
24 views

Is it possible to write a class file that loops over the documentbody?

What I would like to achieve is a repeat.cls such that I could write a .tex file \documentclass{repeat} \begin{document} foobar \end{document} and then the document would contain 'foobar' a certain ...
1
vote
1answer
43 views

Writing custom.module file for LyX

MWE: This is for a custom.module file that should be accessed using the top-left drop down menu in LyX: #\DeclareLyXModule{custom} #DescriptionBegin #Legal Format #DescriptionEnd #Author: Jalep ...
0
votes
1answer
89 views

List of Figures & Tables - how to move caption label into caption itself

I'm using the article document class (as a base) and the caption package. I essentially need to change my LoF format from the default List of Figures 1 Multiline caption multiline caption multiline ...
1
vote
1answer
25 views

\pause does not work in a customized document class (using beamer) [closed]

I've written my own class file from beamer to avoid repeating all the preamble I'm used to use. Nothing complicated. I'm facing a (simple) issue : the \pause command does not work. Here is a MWE ...
3
votes
3answers
74 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 %\...
3
votes
0answers
52 views

Document Class (or Alternative Solution) for Documenting Programming Code

Different from writing a report or thesis involving code, I have the goal of producing a transcription of a C++ solution involving many projects with many .h and .cpp files. Furthermore, this document ...
2
votes
1answer
116 views

Defined command only works in preamble

I'm writing a class, and when using it I want to use small caps with a font that doesn't have small caps defined (I know – not as good as the real thing). I found this answer Fake small caps with ...
1
vote
1answer
115 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 ...
2
votes
1answer
140 views

how does '\maketitle' work?

I would like to know how the \maketitle command works since I am creating my own class and I want to use my own commands. For example, I already create certain commands like \a, \b and \c and I want ...
1
vote
1answer
69 views

Can somebody tell me where I am going wrong here?

I am trying to write a CV. I have no previous experience of using latex. This is my .cls file that I have written: \NeedsTeXFormat{LaTeX2e} \ProvidesClass{Arpon_cv}[2018/09/28 Arpon's custom CV ...
0
votes
1answer
116 views

Changing Section heading in latex template

I would like to change the section and subsection heading in my latex template. The current heading is in bold, but it also has to be indented and numbered. I do not know how to change it in the class ...
0
votes
0answers
34 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
1answer
65 views

Error with \RequirePackage in a class file

I am trying to use the command \RequirePackage[spanish,es-tabla]{babel} in my own class (i.e, my .cls file) but the following error occurs: Command \labelenumi already defined. A temporary ...
1
vote
1answer
50 views

Can you help me fix broken latex class file?

So I am nearing the end of my PhD and need to start writing my dissertation. My university (University of Connecticut) has certain guidelines for the format of the document but does not have an ...
2
votes
2answers
192 views

Support Arabic in LaTeX .cls file

Can you please add some lines to the following .cls file to support Arabic language? \ProvidesClass{bandar-cv}[2012/04/30 CV class] \NeedsTeXFormat{LaTeX2e} \DeclareOption{print}{\def\@cv@print{}} \...
2
votes
1answer
141 views

Setting geometry as an option in my own class

I am writing a class. I want to set geometry with geometry package, but I get an error ! Package geometry Error: \paperwidth (0.0pt) too short. My class: \NeedsTeXFormat{LaTeX2e} \ProvidesClass{...
0
votes
0answers
48 views

Insert TOC at start of document

I'm trying to insert the ToC and later on the other lists (lot, lof,...) directly after \begin{document} using the hook \AtBeginDocument. This is working as long as hyperref is not loaded with \...
0
votes
1answer
93 views

Automtically change page style at first chapter

I'm looking for a way to change the page style with the first occurrence of a chapter using KOMA-Class scrreprt. It would be ideal if the change happens automatically without user interaction so I can ...
2
votes
1answer
285 views

titlesec \titleformat returns undefined control sequence

I've created a very simple class file as follows: \NeedsTeXFormat{LaTeX2e} \ProvidesClass{cv} \LoadClass{article} \RequirePackage{titlesec} \titleformat{\section}{\Large}{}{0pt}{} When compiling ...
3
votes
1answer
159 views

use beamer auctex'hooks with class file derived from beamer

I have written my own beamer-derived .cls file to avoid copying and pasting my usual preamble. A MWE would be \NeedsTeXFormat{LaTeX2e}[1995/12/01]% \ProvidesClass{own_beamer}[2018/06/19 my own slides ...
0
votes
1answer
34 views

tabularx and new environments

so I am writing my own LaTex class so that I can use it to automatically generate invoices with information provided from the user. As such, I have encountered an issue with tabularx and new ...
1
vote
2answers
252 views

Where do we find a LaTeX style/class development expert for hire?

We would like to hire the services of an expert (individual or company) in LaTeX style/class development to modernize the template used in a scientific conference's proceedings. We are currently ...
0
votes
1answer
86 views

Using later-defined commands in an own document class

I am writing a LaTeX class that provides general layout and design features. Elements like the color scheme should be user-defined in the main document. However, the class is loaded before their ...
1
vote
1answer
394 views

Create new \subsubsubsection in custom class file

I've copied the default article.cls file and made some very minor alterations mainly to the \listoftables and \listoffigures titles, which is not connected to my question. I'd like to add 1 extra ...
1
vote
1answer
135 views

Create custom template

I am trying to create my own report template. The idea is that users have only to enter variables and focus on the contents. I tried to create an altered titlepage but get an error, my testreport.cls: ...
-1
votes
1answer
88 views

Designing template

This is an important question for me and any help would be great. I want to design my regular assignments/submissions in LaTeX. I previously typed them in MS-Word which gave me enough options to ...
0
votes
0answers
37 views

Compile error (Illegal unit) only with TeXlive 2015 [duplicate]

I've written my own class (some kind of student research project). https://github.com/faltfe/iodhbwm As far as I tested it with TeXlive 2017 and MiKTeX (up-to-date) it is working fine. Now a ...
2
votes
1answer
142 views

How to vertically stretch single row within table for table to fill rest of page?

Need help with a cls class file. I need a table to stretch from its natural starting position (in this case after an image) to the bottom of the page. All rows apart from the "Abstract" row should ...
1
vote
0answers
61 views

How to pass options to package required by class loaded with \LoadClass?

I am writing a .cls file, where I have a \LoadClass{FooClass} command. Now FooClass loads a package, say BarPackage to which I need to pass the option SomeOption. I have tried the following: \...
4
votes
1answer
127 views

Need advice for design decision: class or style

When implementing LaTeX support for company documents, a decision must be made prior to the initial release: is the support implemented as class or as style? While there is a heap of information about ...