1 \NeedsTeXFormat{LaTeX2e}
2 \ProvidesPackage{myclass}[]
4 %% Just use the original class and pass the options
5 \LoadClassWithOptions{scrreprt}
6 % report, book, memoir, scrreprt or scrbook ?
8 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9 % Based on ideas from https://bugs.debian.org/684772
12 % Useless with unnumbered sections (e.g. use of \setcounter{secnumdepth}{0})
15 \newcommand\makeletterof[1]{%
16 \ifthenelse{\equal{#1}{1}}{EN}{%
17 \ifthenelse{\equal{#1}{2}}{TO}{%
18 \ifthenelse{\equal{#1}{3}}{TRE}{%
19 \ifthenelse{\equal{#1}{4}}{FIRE}{%
20 \ifthenelse{\equal{#1}{5}}{FEM}{%
21 \ifthenelse{\equal{#1}{6}}{SEKS}{%
22 \ifthenelse{\equal{#1}{7}}{SJU}{%
23 \ifthenelse{\equal{#1}{8}}{ÅTTE}{%
24 \ifthenelse{\equal{#1}{9}}{NI}{%
25 \ifthenelse{\equal{#1}{10}}{TI}{%
26 \ifthenelse{\equal{#1}{11}}{ELLEVE}{%
27 \ifthenelse{\equal{#1}{12}}{TOLV}{%
30 %% Redefines the headings
31 \titleformat{\chapter}[block]
32 {\filcenter\huge}{\filcenter\MakeUppercase{\chaptertitlename} \makeletterof{\thechapter}}{20pt}{\Huge}
34 \titleformat{\section}
35 {\filcenter\Large\bfseries}{\thesection}{1em}{}
37 \titleformat{\subsection}
38 {\filcenter\large\bfseries}{\thesubsection}{1em}{}
39 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%