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

learn more… | top users | synonyms

5
votes
1answer
42 views

How can I override geometry's scale in the preamble? (E.g. if a class or package has set a default using geometry.)

With some geometry options, it is possible to override a previous setting in the preamble. For example: \documentclass{article} \usepackage{geometry} \geometry{hmarginratio=1:1} ...
1
vote
0answers
20 views

Set global option (and pass it to all packages) in a custom class file

I had a tex-file that basically started as follows \documentclass[ a4paper, hyperref, amsmath, headinclude=true, ngerman, final ]{scrbook} \usepackage{babel} \usepackage{ntheorem} ...
4
votes
2answers
128 views

LaTeX “Variables” - \@varname

I'm currently in the process of writing my first document class file (a personalized resume class), and I want to get a better understanding of what exactly I'm doing. So, right now I'm setting up ...
2
votes
0answers
80 views

Need a little guidance for latex document design

I want to use LaTEX to write a fascicle (a small book part of a bigger set of books). So I need some specialized design. For example a specialized design for headers, specialized edging, rearranged ...
3
votes
1answer
37 views

How to pass a string to a custom documentclass for use in pre-compiled preambles in lualatex?

I've got a heavy class definition and want to modify it for the use with precompiled preambles. Minimal example preamble.tex \documentclass{myClass} \def\preambleloaded{Precompiled preamble ...
2
votes
1answer
52 views

LaTeX command or environment to selectively print one out of several given options

I'm currently wasting my time by trying to create a proof-of-concept class to show that writing our university's curricula with LaTeX instead of MS Word would have some benefits. Since these curricula ...
0
votes
0answers
21 views

Create an template

I've been using the same format and setup of a front page in my homework's e.t.c and I've always wanted to just create an template file. (*.cls) I think? I.e. I don't want to see all my packages in ...
0
votes
0answers
18 views

Where are the common document classes (article, letter, etc.) stored on Ubuntu? [duplicate]

I use TeXworks on Ubuntu 14.04. I've been trying to locate where the default templates (article.tex, letter.tex) are stored, to no avail. I'm looking for their location because, I have a document ...
4
votes
1answer
51 views

Confusion when trying to write a class

I'm writing my own class for a thesis... yes, yet another thesis class! XD This class is based on the standard book class, but I don't want all options of the book class to be available when writing ...
2
votes
2answers
72 views

How can I have bigger fontsize than \fontsize{60}{70}? [duplicate]

I am writing my thesis and the font size of the chapter title is defined in the class of the document. Somehow I cannot make bigger than \fontsize{60}{70}. Even if I write \fontsize{3000}{70} I cannot ...
4
votes
2answers
81 views

Please explain how moderncv.cls defines \maketitle

This is the package https://github.com/mliu7/latex-moderncv I'm trying to learn how to make packages and classes something about this package makes me confused. On line 380 ...
1
vote
0answers
47 views

Write a class with different code for different version

I want to write a report-like class (maybe based on KOMA-Script). My problem is that the layout will be evolving and maybe the features of the package to. I would like to know if there is an easy way ...
4
votes
2answers
38 views

Prevent passing of options when defining a new class

I'm defining a new class. In this class I created an option total. This however breaks the document since apparently this option is passed to the geometry package, even though I'm not specifying this ...
4
votes
3answers
89 views

How to define such a command with an optional argument in my class?

I'm preparing a document class: \NeedsTeXFormat{LaTeX2e} \ProvidesClass{myclass} \LoadClass{book} \RequirePackage[demo]{graphicx} \newcommand{\@mypic}[1]{% ...
4
votes
1answer
175 views

Class file for “Feynman Lectures on Physics”

I have a pile of handouts and lecture notes from a course that I've been teaching every fall for a number of years, and I'm thinking of putting them together in a textbook format (I know that some ...
5
votes
1answer
72 views

Defined a new class verbatim from my preamble, but resulting document does not have identical layout

I've designed a poster layout that will most likely be used again, so I decided to define a new document class using all the settings from my preamble. However, when I compile a document using my ...
2
votes
1answer
98 views

Calling macro fails with error \inaccessible

I am trying to define a macro which I will include in a class definition. For the time being I put the macro definition in the normal document. Compiling the following document fails. ...
3
votes
1answer
93 views

Automatic report generation from bibtex with Perl

I like to benefit from my existing myarticles.bib file to create a different report automatically something like in following picture (I prepared this template with tikz). What is it best way to do ...
0
votes
0answers
67 views

Overlay specifications in beamer

I'm trying to create a beamer document class (.cls) with some configurations that please me. But, I ended in this point where a cannot overlay my \newcommand. This code has to collect a few ...
0
votes
0answers
65 views

How to instal document class type for use in R studio.

I found a template on writeLaTex.com for optica style articles. I downloaded the optica.cls from the optical website so i could follow that format. Just fooling around to learn more and unfortunately ...
8
votes
2answers
99 views

How can I prevent LGR encoding from switching font size?

I am using 12pt fonts with what is essentially the article class. (That is, I'm using a custom class which is parasitic on article.cls.) In order to set an appropriate headheight for fancyhdr using ...
0
votes
3answers
153 views

Redefine \chapter and \chapter* with \cleardoublepage inside .cls-file

\newcommand{\Chapter}[1]{{\let\cleardoublepage\relax\chapter{#1}}} works fine. How can I do the same for the stared (*) version inside a .cls-file? (Could be interesting for others: Is there any ...
5
votes
1answer
72 views

In a package or parasitic class, when is it better to redefine a command and when is it better to define a new one?

When I'm working on a document for which I need special layout, I tend initially to accumulate a very long preamble. At some point, if I need to reuse similar layout regularly, I decide that I really ...
1
vote
1answer
58 views

New list environment not working in class file

Sorry in advance for the length of this one.... The following MWE contains an enumerate environment I defined: \documentclass{memoir} \usepackage{multicol} \usepackage{enumitem} ...
3
votes
1answer
31 views

How to parse a macro using babel replacements in a class file?

I was trying to write a simple class and have the following issue: I need to write some text containg German quotation marks that is staic and thus should be typeset by the class by default. You can ...
2
votes
0answers
39 views

How to display the dates in the \PrintChanges' changes?

An information I'm often missing when I have a look at the "Change History" of a package/classe is the dates of the changes because, IMHO, just the version number is not informative enough: if I could ...
2
votes
1answer
86 views

Is it possible to collect hyperref's \hypersetup argument?

Suppose you want to set, in a .sty or .cls file, some hyperref's options in case the end user loads this package. Because that's only at the begin of the document you know if hyperref has been loaded, ...
0
votes
0answers
81 views

What is the kvoptions-patch's equivalent of \@classoptionslist?

For a class I'm working on, I'd like some (babel's) languages to be automatically loaded. This can be achieved thanks to \@classoptionslist: \begin{filecontents*}{myclass.cls} ...
2
votes
0answers
70 views

Migrating from xkeyval to kvoptions: how to retrieve \define@choicekey? [closed]

I'm in the process of migrating a class I wrote from xkeyval to kvoptions, mainly because I'd like to provide class options whose values could be list of comma separated values: ...
8
votes
1answer
118 views

Why are these options passed to \LoadClass ignored?

Consider the following simple example: % === this is simple.tex === \documentclass[paper=a5,pagesize]{scrbook} \usepackage{lipsum} \begin{document} \lipsum{1-10} \end{document} When processing this ...
9
votes
1answer
256 views

Beginner needing help to create simple documentclass for traditional printed Tibetan manuscripts (Pecha)

I am delighted to see how well XeLaTeX can handle Tibetan script and want to use it for the typesetting engine for my software. The first thing I want to do is to create a simple documentclass, ...
7
votes
2answers
197 views

Where can I find definition of starred version of \chapter command to redefine it

General question I need to redefine how starred version of \chapter command (that is \chapter*) works in book class. I found definition of not-starred version of \chapter command in book class: ...
3
votes
1answer
80 views

Issue with custom styles

I am in the middle of writing a much needed report template and have hit more than a wall and cannot seem to figure out why some of the macros aren't loading. The two main files are massive and I ...
1
vote
1answer
1k views

how to add a document class to texstudio

I want to add a new document class to TexStudio. the document class is named "AEA" and is available in this link(the first .zip file below "Please note:") The code will look like this ...
3
votes
1answer
46 views

How can I force some options and discard others in a custom class?

I'm creating a document class based upon memoir. For this, I allow several class options to be passed to my code. Options that are not recognized will simply be passed to memoir. Now my question is: ...
1
vote
0answers
32 views

Classes for profiles [closed]

I'd like to create some handouts and documents with keywords for my daily presentations in school. As opposed to the tufte layouts theses documents are only one or two pages long. The handout should ...
4
votes
1answer
123 views

Unrecognized key-values

I try to implement a personnal class using key-value options (I am a beginner in that field). For exemple, I would like to specify the language (for babel package) with an option "langue=xxx" with ...
5
votes
1answer
77 views

Passing (just) other options, when using pgfopts

I want to use pgfopts (and therefore pgfkeys) when customizing a class with new options, keeping the old ones, and using some of them. Here is a simplified example with a class "exa" which extends ...
5
votes
2answers
194 views

How to make memoir's \tableofcontents behave like starred \tableofcontents* by default?

I am writing a class based on memoir, which provides \tableofcontents (which lists the ToC within the ToC) and \tableofcontents* (which does not list the ToC within the ToC). I have seen this ...
4
votes
2answers
205 views

What type of .sty or document class will be good for thesis? [closed]

I am writing my thesis but i want to write it with Latex as my University do not have a document class or .sty as i used to see other university. Could any one know the the .sty that has the under ...
12
votes
3answers
409 views

When writing a class/package, how can I run code if/when another package is loaded? [duplicate]

I'm writing a thesis class file and I'd like to delay the running of code to after a specific package is loaded: \AtEndOfOtherPackage{listings}{% \lstset{language=Python}} Is there a command that ...
3
votes
1answer
155 views

Class options declaration error: Undefined control sequence

I'm trying to write a class file with certain options (e.g centered title, vs title on the left). When I compile a *.tex file that calls this class, I get the an undefined control sequence error for ...
4
votes
1answer
83 views

When to use % after a command [duplicate]

I am writing my own class file and when I am browsing through code developed by others I see % sign popping up at the end of command lines while other authors do not use it. Consider the following ...
4
votes
2answers
54 views

Warnings ignored if written in a custom auxiliary file (but not if written in .aux file)

For the class I'm working on, I'd like to display some warnings very early in the .log files. Writing the corresponding \ClassWarning or \ClassWarningNoLine commands in: the .aux file is okay but ...
10
votes
1answer
147 views

How do I use l3docstrip?

I've got a bundle I'd like to properly document (and begin to release) that uses expl3 intimately, and it should be documented similarly to expl3 itself (as seen in texdoc interface3. I did a little ...
5
votes
1answer
70 views

How do I write a book with two 'authors', one on all left pages and one on all right pages?

I've used LaTeX for a while to write math articles, so I have a general idea how to use it, but I've never had to make my own document class, environment, or package. I want to write a short story ...
7
votes
1answer
139 views

Clash between fontspec and l3keys2e with multichoice keys

Consider the minimal example: \begin{filecontents}{test.cls} \NeedsTeXFormat{LaTeX2e}[1994/06/01] \RequirePackage{expl3,l3keys2e} \ProvidesExplClass {test} {2013/12/23} {1.0} {A test class} ...
3
votes
1answer
173 views

Row spacing of multi-line paragraph cell in `tabular` in the `res` document class

I was trying to compose my CV (as a mathematician) in LaTeX, and found the document class res on CTAN that appealed to me aesthetically. The cls file for this document class can be found here: ...
8
votes
1answer
84 views

How to use a string in an auxiliary file to update the header?

A document (typical of many) has a header which displays a timestamp in the form of a text string (“25 December 2013”). The timestamp string originates in a file "update" which is loaded with \input. ...
12
votes
1answer
140 views

Processing document class options with l3keys

How can I parse (that is, access) the entire option list given to the current document class with l3keys? This would obviously need some sort of \keys_define:nn { document-class-?? } { default ...