Stack Exchange Network

Stack Exchange network consists of 174 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.

2
votes
1answer
35 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
45 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
16 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
23 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
29 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
66 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
66 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
44 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
106 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
57 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 ...
0
votes
0answers
20 views

pdf@strcmp doesn't work with class StringOption

I'm writing a package and trying to use conditionals on a string option defined as follows. \RequirePackage{kvoptions} \DeclareStringOption{lang}[english] \ProcessKeyvalOptions* I have ...
2
votes
1answer
80 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
50 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
31 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
50 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
48 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
128 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
77 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
46 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
69 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
157 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
121 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
32 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
237 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
83 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
146 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
87 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
81 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
36 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
110 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
49 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
122 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 ...
6
votes
1answer
245 views

Unused global option(s): [language=english]

This is a follow up question to Options in custom class. It seems that I still did not understand how global options work. Consider the following code: \RequirePackage{filecontents} \begin{...
5
votes
2answers
103 views

Hyperref doesn't highlight cites

When I load hyperref inside my own class definition wrapped in AtEndDocument from the etoolbox package, my cites aren't colored. But all used section references get colored. I could figure out that ...
3
votes
2answers
75 views

How to detect that there are tables in the file? [duplicate]

I am writing a LaTeX template for our university dissertations. A problem I face is the following: An student asked me that his dissertation does not include any tables and he views an empty list ...
1
vote
0answers
88 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 ...
3
votes
1answer
145 views

LaTeX(2e) Programming vs. expl3 (which to learn)

Recently, I've decided it would be a useful and interesting skill to be able to program LaTeX classes, macros etc, and so had a look around about what resources existed (this question was very helpful)...
7
votes
2answers
76 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
41 views

Pass options to beamer from new class

New class file: \NeedsTeXFormat{LaTeX2e} \ProvidesClass{test}[2018/01/09 A test] \DeclareOption*{\PassOptionsToClass{\CurrentOption}{beamer}} \ProcessOptions\relax \LoadClass{beamer} LaTeX file ...
1
vote
1answer
95 views

LoadClass introduces “unused global options”

Consider the following (well-behaving) latex code, where the hidelinks option works as expected: \documentclass[american, hidelinks, 12pt]{report} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}...
0
votes
0answers
58 views

How to apply vertical/horizontal spacing for dense texts in latex?

I am working with my statement purpose for my graduate studies. I found existing solution for the template of SOP. However, I want to apply horizontal and vertical spacing for my essay. So I used the ...
8
votes
1answer
275 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
0answers
101 views

Best way to manage internationalisation of a class?

I'm using LaTeX in my company to write formal reports to customers. This class contain a lot of preset for my company including texts (like different standard intro and some label about the right to ...
1
vote
2answers
104 views

Using tikz within an expl3 package or class (2017 edition)

This question follows the question Using of \usetikzlibrary in an expl3 package fails. While the linked question worked some time ago, its answers seem not to be working anymore. The question: How ...
3
votes
1answer
901 views

Add bibliography to toc with KOMA-Script

I try to write a small class for myself at the moment. So far everything is working as expected except of putting the bibliography title inside the table of content. Normally I use the KOMA option ...
1
vote
1answer
97 views

Use \xpatchbibmacro in ExplClass

I need to print the et al. output from \textcite{} (biblatex Pkg) in italics. As stated in this answer this can be achieved by using \xpatchbibmacro{} from the xpatch package. Having this command ...
5
votes
1answer
73 views

loading Lua helper scripts in documentclass packages

This question is about organising files in a package for CTAN. How can I load lua and tex helper files in the documentclass so that they are found when the package is installed in the TeXLive folders?...
1
vote
1answer
48 views

How to obtain two columns text as in scripts [closed]

I am trying to modify the class sides to write scripts (no particular packages), and I was wondering how to obtain the following output for every character: Donald Duck: Lorem Ipsum Lorem Ipsum Lorem ...