Document ClassesEditing scrreprt

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
magical marshmallow
Posts: 30
Joined: Mon Jan 21, 2013 11:37 am

Editing scrreprt

Post by magical marshmallow »

Hey,

I am writing my thesis using the scrreprt document class, but I don't like the default chapter set up. So I want to define my own document class, essentiall the same as the scrreprt classe, but with a front chapter page.

The example I'd like to use is that in the image attached.

Can anyone point me to the relevant section in the scrrept .cls file that I should edit?

Furthermore, I have copied and renamed scrreprt.cls, but when I do this and use the new class, some text in the header becomes block capitals - No idea why, text of the files is identical

Cheers
Attachments
latex_example-600.png
latex_example-600.png (11 KiB) Viewed 9626 times
Last edited by cgnieder on Fri Jan 24, 2014 5:44 pm, edited 1 time in total.
Reason: scaled image down to a reasonable size so it can be viewed on smaller screens, too

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Editing scrreprt

Post by cgnieder »

magical marshmallow wrote:Can anyone point me to the relevant section in the scrrept .cls file that I should edit?
You shouldn't edit the scrrprt.cls file at all but either use KOMA-Script's interface macros such as the chapter komafont and the macros \chapterformat, \chapterheadstartvskip and \chapterheadendvskip which are all descrobed in the KOMA-Script manual scrguien.

If you don't like those macros you can also use the titlesec package to format the headings (The package disables KOMA-Scripts options related with headings which is why some people don't recommend it.)

Regards
site moderator & package author
magical marshmallow
Posts: 30
Joined: Mon Jan 21, 2013 11:37 am

Editing scrreprt

Post by magical marshmallow »

Hi Clemens,

I've had a go at using the titlesec package and I've come up with
\titleformat{\chapter}[display]{\normalfont\large\bfseries\filleft}{\Huge\thechapter}{15pt}{\Huge}

However, the number is still not what I would like, do you know how I might make it larger than the \Huge[\LaTeX] font size, so as to mirror that of the picture above?
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Editing scrreprt

Post by cgnieder »

You can use \scalebox (provided by the graphicx package) to scale things to arbitrary height:

Code: Select all

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\begin{document}
foo {\huge foo} \scalebox{3}{foo}
\end{document}
Maybe this helps.

Regards
site moderator & package author
magical marshmallow
Posts: 30
Joined: Mon Jan 21, 2013 11:37 am

Re: Editing scrreprt

Post by magical marshmallow »

Perftect - Thank you!
Post Reply