{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

8
votes
2answers
77 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
2answers
42 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 ...
3
votes
0answers
51 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
45 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
27 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
30 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
45 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
40 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
38 views

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

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
75 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 ...
0
votes
0answers
34 views

How to change the font size in modified class

I have made a new class(called 'newclass') by loading class article using \LoadClass{article} However, the font size is very small (perhaps 10pt). How can I change it to at least 12pt. I have ...
8
votes
1answer
198 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
158 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
62 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
374 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 ...
2
votes
1answer
39 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
29 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
86 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
66 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
113 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
159 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 ...
11
votes
3answers
389 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
105 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
76 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
47 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
113 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
63 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
99 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
0answers
116 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
81 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. ...
11
votes
1answer
105 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 ...
1
vote
0answers
102 views

How to prepare a template for a journal [closed]

I want to prepare a template for the new launch journal in LaTeX. How to prepare template in LaTeX for a journal? Is there any package for it? Please help in this regard. sushil
7
votes
1answer
105 views

How can I separate design from content?

I am new to LaTeX and have completed my first document recently, and it came out to be excellent. However, I am not going to make several more documents which shall be similar. I found that although ...
1
vote
0answers
25 views

standalone: subprambles inverse

When splitting a document with the standalone class and package, the option subpreambles causes the main document to include all the preambles of the sub-files. The other way around is more difficult. ...
2
votes
2answers
270 views

Double dot at the end of sentence

I try to make a class. I wrote \renewcommand\thetable{\thechapter\arabic{table}.} and under the table or in sentence I have e.g. "Table 2.1." but problem is when reference is at the end of ...
3
votes
1answer
78 views

Article class complaining about missing \title

I'm making a custom Latex class which I am basing on the article class. When compiling a document I get ! LaTeX Error: No \title given., even though I use \title in the document. How can I solve this ...
2
votes
0answers
35 views

Document class creation tutorial [duplicate]

Do you know any tutorial for create document class? I create my own documentclass by editing book class but not everything works fine. Thanks for help.
1
vote
0answers
180 views

Can I make documentclass{book} look more like a book? [closed]

I am fairly new to LaTeX and am trying to write a book. Being a newbie I plumped for \documentclass{book} because that seemed like the obvious choice but I can't get it to look like a book. I'm fairly ...
3
votes
0answers
113 views

Class available for law Reports?

Has anyone used LaTeX for writing Expert Witness reports or similar for UK Courts? These have to follow a particular format which would be ideal in Latex but I am a relative newcomer to Latex and ...
2
votes
0answers
47 views

Commands for getting and setting additional elements in a class and document

As I'm writing my first class, I'm wondering the best way to create additional elements that can be used both in the class file and the LaTeX document. For instance, I want the user to set the ...
5
votes
2answers
288 views

How to make a “template” for beamer?

I think that what I would like to do is a class file, however beamer is a latex class, so I'll try the long description: I have written quite a few commands to make a beamer document look the way I ...
3
votes
2answers
866 views

How to adjust the size and placement of chapter heading in report class

How could I adjust the size and placement of chapter heading in my custom class? I am using report class as my base. When I used titlesec package inside my custom class, it threw error ! Package ...
2
votes
1answer
241 views

Custom \maketitle in my custom class not working when I use report class

I am trying to write a new class using the report class. In my custom class I have used a custom \maketitle. But it is not working. But it works, if I use article class as my base. My class file is ...
8
votes
1answer
86 views

How to access \@title from a custom class

I was trying to write a custom LaTeX class where I need to access the value of \@title. I wrote \newcommand{\makeack}{Hello World \@title World} But the value of \@title is not printed when I use ...
-1
votes
1answer
814 views

\newcommand in class - undefined control sequence

I'm trying to write a class based on article.cls and I'm having some trouble with \newcommand. Here go the complete files. Class file \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesClass{NITclsD} ...
5
votes
1answer
131 views

Access \@email in a custom LaTeX class

I am trying to customize an article class for my needs. I want to access \email{} in my class but without any success. This is my \maketitlepage section in cls file, \newcommand{\maketitlepage}{% ...
2
votes
0answers
145 views

Document class with table in the header

I'm trying to write a document class in which the header of the first page has a table. The header of the following pages should have another table. Well, I solved this problem in the .tex file (user ...
3
votes
1answer
241 views

cls file - multiple files

I am writing a .cls file so that I can maintain consistency across many documents. The cls file is soooo long, and I would like to split it up into parts, in a similar fashion that one does when ...
6
votes
1answer
102 views

Commands with Capital letters in their name

A topic that appear over and over is to explain the difference about commands such as \operatorname vs. \DeclareMathOperator. So far I've seen discussions about using one or the other, but no one ...
6
votes
1answer
147 views

Is the LPPL compatible with the corporate design of a university?

I created a .cls file for the letterhead of my university. Can I write something like This class is licensed under LaTeX Project Public License(LPPL) and only university staff is allowed to use ...