0

In fact, I have a problem in the headers. In chapter 1 and 2 there are no problems everything is fine but in the table of contents, list of figures and list of tables there are no headers and in the introduction part it's displayed chapter 0. List of figures which doesn't make sense. Here is the code:

\immediate\write18{makeindex \jobname.nlo -s nomencl.ist -o \jobname.nls}
\documentclass[12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage{lineno}
\usepackage{array}
\newcolumntype{L}{>{$}l<{$}}
\newcolumntype{m}{>{\displaystyle}l}
\usepackage{cclicenses}
\usepackage{makecell}
\usepackage{setspace}
\usepackage{titlesec}
\usepackage{lipsum}
\usepackage{nomencl}
\makenomenclature
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}
\usepackage[justification=centering]{caption}
\usepackage{etoolbox}
\usepackage{titleps}
\newpagestyle{mystyle}{%
\headrule\sethead{\textsc \chaptername\ \thechapter. \textsc \chaptertitle}
{}{}
\setfoot{}{\thepage}{}\footrule}
\pagestyle{mystyle}
\usepackage[a4paper,right=20mm,left=25mm,top=20mm, bottom=20mm]{geometry}
\makeatletter
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}
\titlespacing*{\chapter}{0pt}{0pt}{20pt}
\makeatother
\title {Tile of the report }
\titleformat{\paragraph}
{\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}
\titlespacing*{\paragraph}
{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\begin{document}
\renewcommand\arraystretch{1.3}
\doublespacing
\maketitle
\tableofcontents
\chapter*{Publications}
\chapter*{acknowledegement}
I want...
\chapter*{table list}
\listoffigures
\renewcommand{\nomname}{abbreviation list}
\printnomenclature
\chapter*{Introduction }
\lipsum
\chapter{state of art}
\lipsum
\chapter{theory}
\lipsum
\end{document} 
twimo
  • 171
  • 2
  • 10

1 Answers1

1

Here is an example using package scrlayer-scrpage. Chapter Alpaca is equivalent to your Introduction chapter and just shows the title in the header (it isn't numbered). Numbered chapters have the word Chapter and the respective number in the header, alalong with the title.

If you decide not to have the header on the page a chapter starts, remove the asterisk from ihead.

I would suggest to make the top and bottom margins a bit bigger.

\documentclass[12pt]{report}
\usepackage{lipsum}
\usepackage{unnumberedtotoc}%https://github.com/johannesbottcher/unnumberedtotoc/
\usepackage[automark,
plainheadsepline,
headsepline,
plainfootsepline,
footsepline,
markcase=ignoreupper]{scrlayer-scrpage}
\clearpairofpagestyles
\ihead*{\leftmark}
\cfoot*{\pagemark}
\setkomafont{pageheadfoot}{\scshape}
\usepackage{titlesec}
\usepackage[a4paper,right=20mm,left=25mm,top=20mm, bottom=20mm,%
head=14.5pt,%<- new
]{geometry}
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}
\titlespacing*{\chapter}{0pt}{0pt}{20pt}
\titleformat{\paragraph}
{\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}
\titlespacing*{\paragraph}
{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\begin{document}
\tableofcontents
\addchap{Alpaca}
\lipsum
\lipsum
\chapter{Introduction}
\lipsum
\lipsum
\chapter{state of art}
\lipsum
\chapter{theory}
\lipsum
\end{document} 
Johannes_B
  • 24,235
  • 10
  • 93
  • 248