Page LayoutHeadings in header incorrect - fancyhdr

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
mormuel
Posts: 1
Joined: Wed Jun 16, 2010 2:37 pm

Headings in header incorrect - fancyhdr

Post by mormuel »

Hallo people,

this is my first entry and I find nice and helpful people. Also I will try to help others in the near future with my knowledge.

My problem is concerning chapter-headings in the right header for the thesis of my studies.

The attached code works fine with me to a certain degree but the chapter headings in the frontmatter, i.e. the summary, preface, list of symbols and nomenclature are not correct.

I already tried with the \markboth{}{} command but did not succees.
In the attached PDF you can see what is wrong with the headers.
Maybe you can help me find the correct commands to get it right!

Thank you in advance for your help and time.

Code: Select all

\documentclass[final,11pt,a4paper,oneside]{report}
\usepackage{url}
\usepackage[T1]{fontenc} % New fonts
\usepackage{graphicx}
\usepackage{color}
\usepackage{subfigure}
\usepackage{ae}
\usepackage{boxedminipage}
\usepackage{tabularx}
\usepackage{fancyhdr}
\usepackage{wrapfig}
\usepackage{setspace}
\usepackage{array}
\usepackage{multicol}
\usepackage{xcolor}
\usepackage{float} % For new float environments (includes option H !)
\usepackage[gen]{eurosym}
\usepackage{pdfpages}
\usepackage{amsmath}
\usepackage[margin=14pt,font=small,labelfont={sf,bf},labelsep=endash]{caption}
\usepackage{mdwlist}             
\usepackage{appendix}
\usepackage[compact,small]{titlesec}
\usepackage{titletoc}
\usepackage[scaled=.92]{helvet}
\usepackage{nomencl}
\usepackage{lscape}
\usepackage[draft]{listofsymbols}
\usepackage[plainpages=false,pdfpagelabels]{hyperref}

%%%%%%%%%%%New font
\renewcommand{\familydefault}{\sfdefault}

%Make Chapter space smaller!
\makeatletter
\def\@makechapterhead#1{%
  {\parindent \z@ \raggedright \normalfont
    \ifnum \c@secnumdepth >\m@ne
        \huge\bfseries \@chapapp\space \thechapter
        \par\nobreak
        \vskip 10\p@
    \fi
    \interlinepenalty\@M
    \Huge \bfseries #1\par\nobreak
    \vskip 20\p@
  }}
\makeatother

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\fancypagestyle{plain}{%start editing plain pagestyle
\fancyfoot[R]{\thepage}
\fancyfoot[C]{}
\lhead{\includegraphics[height=28pt]{image/tudelft.jpg}}
}

%Headers and page numbering
%\fancypagestyle{fancy}{
%\fancyhf{}
%\renewcommand{\headrulewidth}{.5pt}
%\renewcommand{\footrulewidth}{0.5pt}
%\renewcommand{\chaptermark}[1]{\markboth{\textbf{\thechapter.\ #1}}{}}
%\lhead{\includegraphics[height=28pt]{image/tudelft.jpg}}
%\rhead{\leftmark}
%\rfoot{\thepage}
%\lfoot{\textit{DSE-Group 7 - V1.1}}
%}

 
%%%%%%%%%%%%%%%%%%%%TOC%%%%%%%%%%%%%%%%%%%%%%
\titlecontents{chapter}[0.7cm]
{\vspace{-0.45cm}}
{\sffamily\bfseries\large\contentslabel{0.7cm}}
{\sffamily\bfseries\large\hspace{-0.7cm}}
{\sffamily\bfseries\large\hfill\contentspage}
\titlecontents{section}[2cm]
{\vspace{-.45cm}}
{\sffamily\contentslabel{1.3cm}}
{}
{\titlerule*[1mm]{.}\sffamily\contentspage}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%Make latex like floars
\renewcommand\floatpagefraction{.9}
\renewcommand\topfraction{.9}
\renewcommand\bottomfraction{.9}
\renewcommand\textfraction{.1}  

%make margins small
\addtolength{\oddsidemargin}{-.7in}
\addtolength{\evensidemargin}{-0in}
\addtolength{\textwidth}{1.2in}
\setlength{\headsep}{0.5cm}
\setlength{\partopsep}{0pt}

\titlespacing{\section}{0pt}{*0}{*0}
\titlespacing{\subsection}{0pt}{*0}{*0}
\titlespacing{\subsubsection}{0pt}{*0}{*0}

%PDF Error messages
\pdfminorversion=6

%Nomenclature
\let\abk\nomenclature
% Punkte zw. Abkürzung und Erklärung
\setlength{\nomlabelwidth}{.20\hsize}
\renewcommand{\nomlabel}[1]{#1 \dotfill}
% Zeilenabstände verkleinern
\setlength{\nomitemsep}{-\parsep}

%List of Symbols
\renewcommand{\symheadingname}{LIST OF SYMBOLS }

%set topmargin
\setlength{\topmargin}{-0.3in}
\setlength{\textheight}{9in}
\setlength\headheight{32.36pt}
\setlength{\parskip}{0.12in}

\makenomenclature
\setcounter{tocdepth}{1}

\begin{document}
\input{chapters/TITELBILD}
\pagenumbering{roman}
   
      \input{chapters/titlepage1}       
\pagestyle{plain}
		\input{chapters/Changelog}
      \input{chapters/ch_preface}  
   	\input{chapters/summary} 

\tableofcontents
\clearpage   
    \input{chapters/listofsymbols}
    \listofsymbols
    \printnomenclature
    
\clearpage
\pagenumbering{arabic}


%\begin{twocolumn}
			
			\input{chapters/CHIntroduction}
			\clearpage
			\input{chapters/ProjectApproach}
			\clearpage
			\input{chapters/ProblemApproach}
			\clearpage
			\input{chapters/Concepts}
			\clearpage
			\input{chapters/CHPhase1}
			\clearpage
			\input{chapters/Aerodynamicdesign}
			\clearpage
			\input{chapters/Propulsion}
			\clearpage
			\input{chapters/IntermediateDesignSummary}
			\clearpage
			\input{chapters/Stabilityandcontrol}
			\clearpage
			\input{chapters/StructuresAndMaterials}
			\clearpage
			\input{chapters/AirshipOnBoardSystems}\clearpage
			\input{chapters/CHPhase3_Production}\clearpage
			\input{chapters/CHPhase3_WeightEstimation}\clearpage
%			\input{chapters/CHPhase2}
%			\input{chapters/CHPhase3}
			\input{chapters/CHIteration}\clearpage
			\input{chapters/CHPhase4}\clearpage
			\input{chapters/finalconceptspecifications}\clearpage
			\input{chapters/DesignEvaluation}\clearpage
			\input{chapters/Future}\clearpage
			\input{chapters/Conclusion}
			\clearpage
			\input{chapters/Recommendations}
			\clearpage
%\end{twocolumn}
			
%			\nocite{*}
%\clearpage
%\chapter*{Bibliography}
\addcontentsline{toc}{chapter}{Bibliography}
%			\input{chapters/bibliography}
%\nocite{*}
\begin{spacing}{0.9}
\bibliographystyle{plain}
\bibliography{chapters/bibi}
\end{spacing}
\clearpage
%\newpage
%\addcontentsline{}{chapter}{Appenices}

\addappheadtotoc
\begin{appendix}      
\addcontentsline{toc}{chapter}{A~~~~Engineering Drawings}
	       \input{chapters/appA}
			 \setcounter{chapter}{1}
			 \input{chapters/appB}
			 \input{chapters/appC}
			 \input{chapters/appD}
			 \input{chapters/appE}
\addcontentsline{toc}{chapter}{F~~~~Gantt Chart}
			 \input{chapters/appF}
			 \setcounter{chapter}{6}
			 \input{chapters/appG}
			
%			 \addcontentsline{toc}{chapter}{D Gantt Chart}
\end{appendix}

\end{document}
Attachments
DSE - Final Report.pdf
See here for incorrect header headings
(88.66 KiB) Downloaded 235 times
Minimalbeispiel.txt
Minimal working example
(5.51 KiB) Downloaded 204 times

Recommended reading 2024:

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

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

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Headings in header incorrect - fancyhdr

Post by frabjous »

Please read the avoidable mistakes post, and then try your question again.
Post Reply