3

I am using LaTeX for preparing by project. I am using \documentclass{report}

As I am in need of first chapter Introduction' with no chapter number i have used

\newcommand{\mychapter}[2]{
        \setcounter{chapter}{#1}
        \setcounter{section}{0}
        \chapter*{#2}
        \addcontentsline{toc}{chapter}{#2}
    } 

in preamble.

As i am in need of list of figures before the introduction after \begin{document} i have added following comments

\listoffigures

\mychapter{0}{Introduction}
In Chapter 1, we give the basic ideas and facts.....

and in the out put the Header of the chapter introduction is List of figures. (See Figure). May any one help to recover from this issue.

'enter image description here

lockstep
  • 250,273
Seena V
  • 193

1 Answers1

2

You can use a better definition for \mychapter:

\documentclass{report}

\usepackage{kantlipsum} % for mock text

\pagestyle{headings} % to get headers

\newcounter{savedsecnumdepth}

\newcommand{\mychapter}[1]{%
  \setcounter{savedsecnumdepth}{\value{secnumdepth}}%
  \setcounter{secnumdepth}{-1000}%
  \chapter{#1}%
  \setcounter{secnumdepth}{\value{savedsecnumdepth}}%
  \refstepcounter{chapter}%
}

\setcounter{chapter}{-1}% first should be Chapter 0
\begin{document}

\tableofcontents

\mychapter{Introduction}

\section{Ghijk}

\kant[1-30]

\end{document}

enter image description here

egreg
  • 1,121,712