Page LayoutHeader is empty

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
Matam
Posts: 29
Joined: Thu Jun 07, 2018 12:12 pm

Header is empty

Post by Matam »

Header in Acknowledgement and Abstract pages is empty. Please help me correct it. Please, see the
Below is the code.
\documentclass[11pt, a4paper, oneside]{thesis}
\usepackage[body={7.0in, 9.5in},top=1.2in, left=1.69in, right=1.0in, includefoot]{geometry}
\bibliographystyle{IEEEtran}
\hyphenation{op-tical net-works semi-conduc-tor}
\usepackage{wrapfig}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{multirow}
\setcounter{secnumdepth}{3}
\usepackage{pdfpages}
\usepackage[nottoc,notlof,notlot]{tocbibind} 
%\renewcommand\bibname{References}
\usepackage{cite}
%\usepackage{natbib}
\usepackage{float}
\usepackage{color}
\usepackage{algorithm,algpseudocode}
\usepackage[graphicx]{realboxes}
\usepackage{varwidth}
\renewcommand{\baselinestretch}{1.3}
\usepackage{titlesec} % Modifica títulos


\titleformat{\chapter}[hang]
{\LARGE\normalfont\bfseries}
{\thechapter}{1em}{}
\titleformat{name=\chapter,numberless}[hang]
  {\normalfont\LARGE\bfseries\filcenter}{}{1ex}{}{}
\titleformat{\section}[hang]{\normalfont\bfseries}{\thesection}{0.5em}{}


\titleformat{\chapter}[display]
{\normalfont\Huge\bfseries}{Chapter\ \thechapter}{10pt}{\Huge}


\titleformat{\subsection}[hang]{\normalfont\bfseries}{\thesubsection}{0.5em}{}
\titleformat{\subsubsection}[hang]{\normalfont\bfseries}{\thesubsubsection}{0.5em}{}

\titlespacing{\chapter}{0pt}{0pt}{40pt}
\titlespacing{\section}{0pt}{\baselineskip}{0.625\baselineskip}
\titlespacing{\subsection}{0pt}{\baselineskip}{0.6\baselineskip}
\titlespacing{\subsubsection}{0pt}{\baselineskip}{\baselineskip}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
            \node[shape=circle,draw,inner sep=0.5pt] (char) {#1};}}
\usetikzlibrary{calc}
\usetikzlibrary{calc,matrix}
\usepackage[skip=2pt,font=scriptsize]{caption}
\usepackage{subcaption}
\usepackage{array}
\usepackage{mdwmath}
\usepackage{mdwtab}
\usepackage{multirow}
\usepackage{siunitx}
\usepackage{soul}
\usepackage{cancel}
\usepackage{amssymb}% http://ctan.org/pkg/amssymb
\usepackage{pifont}% http://ctan.org/pkg/pifont
\newcommand{\cmark}{\ding{41}}%
\newcommand{\xmark}{\ding{55}}
%\usetikzlibrary{calc,matrix}
\usepackage{color,soul}
\usepackage{enumerate}
\usepackage{IEEEtrantools}
\usepackage{bbding}
%\bibliographystyle{ieeebib}
\usepackage{rotating}
\usepackage{listings}
\usepackage{lineno}
\usepackage{lscape}
\usepackage{adjustbox}
%\modulolinenumbers[1]
\lstdefinestyle{mystyle}{
    breakatwhitespace=false,         
    breaklines=true,                 
    captionpos=b,                    
    keepspaces=true,                 
    numbers=left,                    
    numbersep=20pt,                  
    showspaces=false,                
    showstringspaces=false,
    showtabs=false,                  
    tabsize=2
}
\lstset{style=mystyle}
% % Nomenclature commands
\usepackage[intoc]{nomencl}
\makenomenclature

\usepackage[toc,nopostdot,nonumberlist,acronym,section]{glossaries}
\newrobustcmd{\bffirst}[1]{{\let\mfirstucMakeUppercase\textbf\capitalisewords{#1}}}

\newacronymstyle{bf-long-short}{\GlsUseAcrEntryDispStyle{long-short}}{\GlsUseAcrStyleDefs{long-short}\renewcommand*{\GenericAcronymFields}{description={\bffirst{\the\glslongtok}}}}
\setacronymstyle{bf-long-short}

\newglossary[ch1]{chstyle}{ch2}{ch3}{List of Greek Symbols}
\makeglossaries
\glsdisablehyper

\newglossarystyle{csyle}{%
	\glossarystyle{list}%
	\renewcommand*{\glossaryentryfield}[5]{%
		\item[\glsentryitem{##1}\glstarget{##1}{##2}]%
		\hspace{2.5cm}##3\glspostdescription\dotfill ##5}%
}
%\renewcommand{\chaptername}[2]{\chaptername{#1} \thechapter{#2}}

% % 


\include{glossary-nomen-entries}
\begin{document}
...
..

\clearpage


\newpage
\pagenumbering{roman}
\addcontentsline{toc}{chapter}{Acknowledgement}
\chapter*{\centering Acknowledgment}
............

\pagebreak
\clearpage
\addcontentsline{toc}{chapter}{Abstract}
\chapter*{\centering Abstract}
.................
Attachments
abstrHeader.png
abstrHeader.png (82.18 KiB) Viewed 4810 times
acknowHeader.png
acknowHeader.png (116.54 KiB) Viewed 4810 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Header is empty

Post by Stefan Kottwitz »

Chapter starting pages have a different page style by default, since it doesn't make much sense to repeat the huge chapter title in the header as header line (if it's put there). You used \chapter for acknowledgement and abstract.

You could switch at such places this way:

Code: Select all

\chapter*{Acknowledgment}
\thispagestyle{headings}
Stefan
LaTeX.org admin
rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

Header is empty

Post by rais »

I think the OP rather needs \markboth here...yet again.

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

Header is empty

Post by Stefan Kottwitz »

Hi Rainer,

I guess \markboth doesn't help because the page style is plain there by default, so it wouldn't show a head mark even if it has been set.

By changing the page style the header would show the page number. But indeed, if a header "Abstract" shall be put above the actual heading "Abstract" :-o an additional \markboth{Abstract}{Abstract} could do that.

Now while writing I see the OP means the second page (I never thought an abstract would take several pages) - in that case that \markboth is needed, yes.

Stefan
LaTeX.org admin
Matam
Posts: 29
Joined: Thu Jun 07, 2018 12:12 pm

Header is empty

Post by Matam »

It worked. Excellent. I think \markboth did had an impact to change it. Thanks Rainer.
Thanks a ton stefan. Please find the attached screen shots.

The code i entered is given below:
.
.
\clearpage
\newpage
\cleardoublepage
\pagenumbering{roman}
\addcontentsline{toc}{chapter}{Acknowledgement}
\thispagestyle{headings}
\markboth{Acknowledgment}{Acknowledgment}
\chapter*{\centering Acknowledgment}
..
..
Attachments
ABSTRACT_DONE.png
ABSTRACT_DONE.png (75.01 KiB) Viewed 4773 times
ACKNOWLEDGEMENT_DONE.png
ACKNOWLEDGEMENT_DONE.png (73.73 KiB) Viewed 4773 times
Post Reply