## LaTeX forum ⇒ Theses, Books, Title pages ⇒ Chapter Header

Classicthesis, Bachelor and Master thesis, PhD, Doctoral degree
Johannes_B
Site Moderator
Posts: 4163
Joined: Thu Nov 01, 2012 4:08 pm

No Stefan, this won't work. The template does not use a KOMA-script class.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Tags:

Stefan Kottwitz
Posts: 9568
Joined: Mon Mar 10, 2008 9:44 pm
In the code snippet of the previous post I saw it starting with scrlayer-scrpage, no class, that was an indication for me.

If not, it's an indication that a KOMA-Script based template would really be recommendable.

Not checked if it works with scrbase and scrhack, that was loaded more far above.

Stefan

Johannes_B
Site Moderator
Posts: 4163
Joined: Thu Nov 01, 2012 4:08 pm
The class never changed, it stayed with book. But some packages of the KOMA-bundle have been included, some commands have been added that resemble KOMA-commands (but do far less of the compicated stuff).

Edit: I should note that \abovechapterskip is defined since versioin 2.4 of the template, dating november 2016.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

vinaykumarn
Posts: 15
Joined: Wed Oct 19, 2016 6:30 am
Respected sir,

First of all I would like to thank both of you for your kind and sincere suggestion. But, I have updated the .cls file only after changing the name of the class file to "MastersDoctoralThesis_UoM."

Regarding, the last request of removing un-necessary space above contents, list of tables, list of figures and chapter is not yet solved. Please find the small piece of code below and help me out in this regard.

\renewcommand{\abovechapterspace}{\vspace{0pt}}
\usepackage{titlesec}
\titleformat{\chapter}[display]
%{\normalfont\huge\bfseries\raggedleft}{%
%\chaptertitlename\ \thechapter\\[3.5ex]\titlerule}
{\normalfont\huge\bfseries\raggedleft}{\chaptertitlename\ \thechapter \\ \hrulefill}
{24pt}{\Huge}

Johannes_B
Site Moderator
Posts: 4163
Joined: Thu Nov 01, 2012 4:08 pm
This still is not a minimal working example, but nevermind. How should have anyone guessed, that you are using package titlesec? What you are looking for is
\titlespacing*{\chapter}{0cm}{-\topskip}{2\baselineskip}[0pt]

With an unmodified and up to date version of the template, this can be done with just three (or four) lines of code.

Which brings me back a few months.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

vinaykumarn
Posts: 15
Joined: Wed Oct 19, 2016 6:30 am
Respected Sir,

Thank you sir, the single line code worked fine.

\documentclass[12pt, % The default document font size, options: 10pt, 11pt, 12ptoneside, % Two side (alternating margins) for binding by default, uncomment to switch to one sideenglish, % ngerman for Germanonehalfspacing, % Single line spacing, alternatives: onehalfspacing or doublespacing%draft, % Uncomment to enable draft mode (no pictures, no links, overfull hboxes indicated)nolistspacing, % If the document is onehalfspacing or doublespacing, uncomment this to set spacing in lists to single%liststotoc, % Uncomment to add the list of figures/tables/etc to the table of contents%toctotoc, % Uncomment to add the main table of contents to the table of contentsparskip, % Uncomment to add space between paragraphs%nohyperref, % Uncomment to not load the hyperref package%headsepline, % Uncomment to get a line under the header] \usepackage{titlesec}\titleformat{\chapter}[display]%{\normalfont\huge\bfseries\raggedleft}{%   %\chaptertitlename\ \thechapter\\[3.5ex]\titlerule} {\normalfont\huge\bfseries\raggedleft}{\chaptertitlename\ \thechapter \\ \hrulefill}  {24pt}{\Huge} \titlespacing*{\chapter}{0cm}{-2\topskip}{2\baselineskip}[0pt] % TO REMOVE TOP SPACE AND BASELINE SPACE OF CHAPTER, TABLE OF CONTENTS, FIGURES, AND TABLES %----------------------------------------------------------------------------------------%	LIST OF CONTENTS/FIGURES/TABLES PAGES%---------------------------------------------------------------------------------------- \tableofcontents % Prints the main table of contents \listoffigures % Prints the list of figures \listoftables % Prints the list of tables  \end{document}
Last edited by Stefan Kottwitz on Wed Jun 21, 2017 12:31 pm, edited 1 time in total.
Reason: code marked

Johannes_B
Site Moderator
Posts: 4163
Joined: Thu Nov 01, 2012 4:08 pm
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Stefan Kottwitz
Posts: 9568
Joined: Mon Mar 10, 2008 9:44 pm
Here is an example:
