Text Formatting ⇒ Modifications to custom Class File
Modifications to custom Class File
I need help editing a class file. I have no idea where I have to change the code to get what I want as I am not familiar with the class files syntax. The class file is attached.
I would like to understand how to change the chapter format. The chapter, right now, as you will see, gives me something like (in plain font):
Chapter 1
Theory
I would like to know how to modify it so the font would be bold and a big bigger. Or for example how to make it show like.
Chapter 1: Theory
Any help would be much appreciated.
Thanks!
I would like to understand how to change the chapter format. The chapter, right now, as you will see, gives me something like (in plain font):
Chapter 1
Theory
I would like to know how to modify it so the font would be bold and a big bigger. Or for example how to make it show like.
Chapter 1: Theory
Any help would be much appreciated.
Thanks!
- Attachments
-
- thesis.cls
- (22.77 KiB) Downloaded 377 times
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Re: Modifications to custom Class File
Are you bounded to the standards from the »Thesis and Dissertation Style Guide« of the University of Maryland?
Best regards and welcome to the board
Thorsten
Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Modifications to custom Class File
Hi Thorsten,
Yes, I think I am. I am sure I can make some modifications to the headings. I believe the main standards that I should keep unchanged are things like font size, spacing, margins, etc.
Any hints, please?
Thanks!
-PS
Yes, I think I am. I am sure I can make some modifications to the headings. I believe the main standards that I should keep unchanged are things like font size, spacing, margins, etc.
Any hints, please?
Thanks!
-PS
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Modifications to custom Class File
Do you think or do you know? If you are, you should not use this class. It has been designed according to the standards of 2005. Let's take a look at the beginning of the class.ps001 wrote:[…] Yes, I think I am. […]
Code: Select all
% thesis.cls is based on report.cls (D. Brosius, August 2006) - These
% changes were made to comply with the requirements set forth in the
% University of Maryland, College Park, Thesis and Dissertation Style
% Guide, 2005-2006, Spring 2006 Edition for the submittal of Ph.D. and
% Masters dissertations and theses to the University of Maryland.
Finally, it is not really necessary to use a custom class. Most of the demanded settings can be made by some additional packages. As far as I can see from the style guide, the desired formatting is not very difficult.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Modifications to custom Class File
What I am trying to say is that I would like to know how to change a class file to get the formatting that I wanted, regardless if I have to use this standard or not.
I just dont know how to change a class file and I was hoping someone could teach me/ help me or point to some good references or examples.
But anyway.. I'll contact the person who wrote that class file.
Thanks
I just dont know how to change a class file and I was hoping someone could teach me/ help me or point to some good references or examples.
But anyway.. I'll contact the person who wrote that class file.
Thanks
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Modifications to custom Class File
Working with class file code can be a bit challenging, requiring some deeper LaTeX knowledge. A good starting point for getting that is reading
source2e, the commented LaTeX source code, and the code of the standard classes.
When you would like to use a class with changes, there are for example these four ways:
Stefan

When you would like to use a class with changes, there are for example these four ways:
- Use this class via
\documentclass
, load a package which is spezialized in doing the customiziation you need. Here I would usetitlesec. However, it requires a compatibility of class and package, which is often the case.
- Use this class via
\documentclass
and make desired changes via\renewcommand
or\renewenvironment
. - Make a derived class file with another name, which loads this class.
- Make a copy of the class, give it a different name (important!), also in the source code (
\ProvidesClass
), and make your changes in the new file.
thesis
by the developers but are very different.Stefan
LaTeX.org admin
Re: Modifications to custom Class File
Thank you Stefan, very much!
I'll explore those options and will post again if I make progress.
I'll explore those options and will post again if I make progress.
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Modifications to custom Class File
Some additions:
- The
titlesec manual provides a very good starting point with the examples of standard class headings in the manual appendix. They can easily be taken and modified, such as the section settings for the
\chapter
definition, adding a\centering
, changing the font size or similar. - Redefing can often be made this way:
This means: copy & paste the original code from the class into your document preamble, modify it, change it fromCode: Select all
\documentclass{thesis} ... \makeatletter \renewcommand{\macron@me}{...} % or \def ... \makeatother
\newcommand
to\renewcommand
or keep\def
. If internal macros are used, those with the@
in the name, use\makeatletter
and\makeatother
around to bypass LaTeX's protection of internal macros (see here, why: \makeatletter and \makeatother).
LaTeX.org admin