Theses, Books, Title pagesChapter Header

Classicthesis, Bachelor and Master thesis, PhD, Doctoral degree
vinaykumarn
Posts: 15
Joined: Wed Oct 19, 2016 6:30 am

Chapter Header

Post by vinaykumarn »

Hai,

How to remove the chapter caption (i.e., Chapter 1) in the header of each chapter. For your reference, the sample code and screen have been given.

\RequirePackage[markcase=used]{scrlayer-scrpage}
\providepairofpagestyles{thesisSimple}{%
\clearpairofpagestyles%
\automark[chapter]{chapter}
\ihead{\headmark\raggedleft \hspace{1cm}}% Inner header % UPDATED BY VKN: REGARDING RIGHT ALIGNMENT OF CAPTION
\ohead[\pagemark]{\pagemark}% Outer header
Attachments
Query.png
Query.png (109.98 KiB) Viewed 13414 times

Recommended reading 2024:

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

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

User avatar
Stefan Kottwitz
Site Admin
Posts: 10323
Joined: Mon Mar 10, 2008 9:44 pm

Chapter Header

Post by Stefan Kottwitz »

This code doesn't work, \providepairofpagestyles{thesisSimple}{% has no closing brace following it.

Since you don't show any code, we don't even know the document class, we cannot test and fix. Perhaps provide a Infominimal working example, that's usually a guarantee for a solution.

Stefan
LaTeX.org admin
vinaykumarn
Posts: 15
Joined: Wed Oct 19, 2016 6:30 am

Chapter Header

Post by vinaykumarn »

Sir,
Please find the below minimal working code:

Code: Select all

Code, edit and compile here:
\NeedsTeXFormat{LaTeX2e}[1996/12/01]
\newcommand{\classname}{MastersDoctoralThesis_UoM}
\ProvidesClass{\classname}[2015/11/08 v1.2 LaTeXTemplates.com]
\providecommand{\baseclass}{book}
\RequirePackage{etoolbox}
\RequirePackage{xparse}
\newbool{nolistspace}
\newbool{listtoc}
\newbool{toctoc}
\newbool{parskip}
\newbool{hyperrefsupport}
\booltrue{hyperrefsupport}
\newbool{headsepline}
\DeclareOption{nohyperref}{\boolfalse{hyperrefsupport}}
\DeclareOption{nolistspacing}{\booltrue{nolistspace}}
\DeclareOption{liststotoc}{\booltrue{listtoc}}
\DeclareOption{toctotoc}{\booltrue{toctoc}}
\DeclareOption{parskip}{\booltrue{parskip}}
\DeclareOption{headsepline}{\booltrue{headsepline}}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\baseclass}}
\ProcessOptions\relax
\LoadClass{\baseclass}
%----------------------------------------------------------------------------------------
% CLASS OPTIONS
%----------------------------------------------------------------------------------------
\ifbool{parskip}{\RequirePackage{parskip}} % If the parskip option is passed to the class, require the parskip package
\patchcmd{\@makechapterhead}{\vspace*{50\p@}}{\abovechapterspace}{}{}
\patchcmd{\@makeschapterhead}{\vspace*{50\p@}}{\abovechapterspace}{}{}
\newcommand{\abovechapterspace}{\vspace*{50pt}}
\ifbool{listtoc}{% If the liststotoc option has been passed to the class, add the lists to the table of contents
\patchcmd{\listoftables}{\@starttoc{lot}}{%
\addchaptertocentry{\listtablename}\@starttoc{lot}}{}{}%
\patchcmd{\listoffigures}{\@starttoc{lof}}{%
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Last edited by Stefan Kottwitz on Sun Jun 11, 2017 1:39 pm, edited 1 time in total.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Chapter Header

Post by Johannes_B »

Usually, that would be done using just \renewcommand{\chaptermarkformat}{} in the preamble.

Anyway, i didn't look into your modification of the template, since only the original template as found on latextemplates.com are supported. Also, only the recent version and one version back are supported.

Current version of the class file is 1.5.


Also, why do you change the class file if it is not needed. As far as i can tell, all changes could have been made in the preamble of the document, like it is supposed to be. Changing a class file for inexperienced users is highly discouraged.

Edit: We already covered that months back. But i honestly made a mistake by confusing inner and outer margin based on the screenshot.
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

Chapter Header

Post by vinaykumarn »

Hai sir,

Your suggestion is still not working. I have put your codes in the preamble of chapter.tex but it is not working...?

Thanking in advance.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Chapter Header

Post by Johannes_B »

You did not provide a minimal workung example in the past and you didn't provide one now. How are we supposed to know why it doesn't work for you?

A minimal example is essential to help you.
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

Chapter Header

Post by vinaykumarn »

Thank you sir. Problem is solved...
vinaykumarn
Posts: 15
Joined: Wed Oct 19, 2016 6:30 am

Chapter Header

Post by vinaykumarn »

Sir,
How to remove the huge space before the following sections
1. Chapter heading of each chapter
2. Contents
3. List of Figures
4. List of Tables
5. Abbreviations
Please do the needful. Find the minimal code below for your reference.

Thanking you


Code: Select all

Code, edit and compile here:
%----------------------------------------------------------------------------------------
% HEADERS AND FOOTERS
%----------------------------------------------------------------------------------------
\RequirePackage[markcase=used]{scrlayer-scrpage}
\providepairofpagestyles{thesisSimple}{%
\clearpairofpagestyles%
\automark[chapter]{chapter}
\ihead{\headmark\raggedleft \hspace{1cm}}
\ohead[\pagemark]{\pagemark}% Outer header
}
\ifoot{}% Inner footer
\ofoot{}% Outer footer
\pagestyle{thesisSimple}
\providepairofpagestyles[thesisSimple]{thesis}{%
\automark*[section]{}%
}
\providepairofpagestyles[thesisSimple]{review}{%
\ofoot[\ttitle/\authorname]{\ttitle/\authorname}
\ifoot[\today]{\today}
}
\pagestyle{thesis}
\ifbool{headsepline}{\KOMAoption{headsepline}{true}}{}
\PreventPackageFromLoading[\ClassError{\classname}{Package `fancyhdr' is
incompatible\MessageBreak with this class}{The pagesyles are defined
using package `scrlayer-scrpage', please consult the\MessageBreak
KOMA-script documentation for details.}]{fancyhdr}
\newcommand{\blank@p@gestyle}{empty}
\newcommand{\blankpagestyle}[1]{\def\blank@p@gestyle{#1}}
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
\hbox{}
\thispagestyle{\blank@p@gestyle}
\newpage
\if@twocolumn\hbox{}\newpage\fi\fi\fi}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Last edited by Stefan Kottwitz on Sun Jun 11, 2017 1:27 pm, edited 1 time in total.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Chapter Header

Post by Johannes_B »

Please stop posting (and hence distributing) completely unrelated stuff from a class file.

Without a minimal working example, the following works for the default template: \renewcommand{\abovechapterskip}{\vspace{0pt}}

Since you don't seem to understand what a minimal working example is, find a useful link here: How to create a minimal working example?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10323
Joined: Mon Mar 10, 2008 9:44 pm

Chapter Header

Post by Stefan Kottwitz »

With a pretty new TeX installation and KOMA-Script

\RedeclareSectionCommand[beforeskip=0pt]{chapter}

With an older one:

\renewcommand{\chapterheadstartvskip}{\vspace{0pt}}

You can insert something for the distance instead of 0pt.

As Johannes said, a Infominimal working example is quite important and often a guarantee for a solution. I understand, that it may be difficult in case of your template or document structure. Anyway take a look at the Infominimal working example link and Johannes' link above, to better understand. Or this one. It can really help next time. ;)

Stefan
LaTeX.org admin
Post Reply