# How to have corresponding section/chapter names as headers on each page?

When I use the following in my preamble, I’m just getting a plain straight line as my header and the page number displayed at the bottom center of my page.

\documentclass{book}

\usepackage[paperwidth=5in,paperheight=7in]{geometry}

\usepackage{fancyhdr}

\pagestyle{fancy}

\begin{document}

\begin{center}

\section*{Etsuko's picnic}

\end{center}

TEXT

\end{document}


I thought the default fancyhdr trait was to print the name of the corresponding chapter as the header. But in my case nothing is being printed.

I wanted to have the name of the corresponding chapters as the headers of each page in my book. How can I achieve that?

-
Please edit your question and add a complete example that reproduces the problem. –  Ian Thompson Jun 27 '12 at 14:18
I have given a complete example. However, I just want an answer to the question that I have posed at the end rather than reproducing the problem (assuming that it IS a problem). –  harisibrahimkv Jun 27 '12 at 14:23
You shouldn't use unnumbered (i.e., "starred") \chapter and \section commands if you want their arguments to show up in the header line. Note, furthermore, that on pages with a \chapter command the default style is to omit the header line. –  Mico Jun 27 '12 at 14:26
With your original example I got chapter names in the headers. Your new example doesn't have any chapters in it! Unless other users can reproduce the problem that you describe, it is very difficult to help you. –  Ian Thompson Jun 27 '12 at 14:27
I think I am confusing between sections and chapters here. Basically, I just want to have the headings for each of the articles/stories in my book but they should be unnumbered. Also, I want these headings of the chapters in the headers of the pages that contain the content of that heading. Can I achieve that? –  harisibrahimkv Jun 27 '12 at 14:29

\setcounter{secnumdepth}{0}