1
\newpage

\pagestyle{fancy}

\renewcommand{\chaptermark}[1]{\markboth{#1}{}}

\fancyhf{}%clearheaders

\fancyhead[R]{

\itshape

\leftmark}

\fancyfoot[C]{168}

\fancypagestyle{plain}{

\renewcommand{\headrulewidth}{0pt}

\fancyhf{}

\fancyfoot[C]{\168}
}

\setlength{\headheight}{14.5pt}

\setlength{\headheight}{14.5pt}

I want a header like this picture enter image description here

6
  • 1
    Have you looked into the package documentation?
    – Johannes_B
    May 18, 2018 at 11:47
  • I tried yes but with not the results i wanted May 18, 2018 at 12:26
  • 1
    What document class are you using? Book does this automatically (part of the \chapter definition), more or less. May 18, 2018 at 14:56
  • What book?Sorry,but i am really new to latex May 18, 2018 at 17:40
  • 2
    You should start by reading an introduction.
    – Johannes_B
    May 19, 2018 at 5:04

1 Answer 1

1

You should be more specific to what class or packages you can/can't use, and please provide a MWE next time.

If you use the book class you don't have to add any extra package for that effect.

enter image description here

\documentclass[a4paper]{book}
\usepackage{lipsum}

\begin{document}
\setcounter{page}{237}
\chapter{Introduction}\label{ch:intro}
\newpage

\lipsum[3]
\end{document}

If, however, for any reason you can't use book class or you must use a specific class. Then use fancyhdr:

enter image description here

\documentclass[a4paper]{report}
\usepackage{lipsum}
\usepackage{fancyhdr}
\pagestyle{headings}
\begin{document}
\setcounter{page}{237}
\chapter{Introduction}\label{ch:intro}
\newpage

\lipsum[3]
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.