# How do I include a \section*{} in a \tableofcontents? [duplicate]

Possible Duplicate:
Centering \section* and adding them to the ToC

I've got something like

\documentclass{article}
\begin{document}
\tableofcontents
\section{First Step}
\section{Second Step}
\end{document}


How do I retain the format of \section*{...} yet still show the section in the table of contents?

-

## marked as duplicate by Werner, topskip, percusse, Paulo Cereda, Martin Scharrer♦Jun 7 '12 at 10:46

Possible duplicate: Centering \section* and adding them to the ToC – Werner Jun 7 '12 at 5:04

Use \addcontentsline to add the section* to the TOC:

## Code:

\documentclass{article}
\begin{document}
\tableofcontents

\section{First Step}
\section{Second Step}
\end{document}

-

The whole point of a \section* is not affecting running headers and table of contents. In this case, this means that "About this Article" and "About this Author" will be be given running headers of "Table of Contents". So the main question here appears to be "Do you know why you are using \section* instead of \section?".

The KomaScript classes offer \addsec commands for creating unnumbered but otherwise identical sectional commands.

-
I think you should remove the last sentence of the first paragraph. – Peter Grill Jun 7 '12 at 5:09
Sure, because people vote me down. But not being a registered user, I can't make use of those points anyway, and the original poster of this question (and readers of it) will eventually run into this problem. Sure it earns points to give people what they ask for, but I don't see the point in encouraging them to shoot themselves in the foot because of some award system. – user9588 Jun 7 '12 at 5:15
I don't know about the "unregistered" issue, but you could post a question on Meta.TeX.SE to get that resolved. Also, I do not see any down votes on this question, and was not suggesting you remove the answer, just that the last sentence as I don't see how that adds value to your answer. – Peter Grill Jun 7 '12 at 5:23
I am unregistered by choice. And rest assured, I did observe the drop in reputation and answer score. And answers, in contrast to comments, can't be removed. You can "edit" them leaving a single character in place, but that's all. The best I could do is to flag it as inappropriate content (or you could) and have a moderator remove it. Go ahead if you think it worth the trouble. – user9588 Jun 7 '12 at 5:33
It seems that there has been a miscommunication. I was only suggesting removing the comment So the main question here appears to be "Do you know what you are doing?" I was not suggesting you delete the answer. There is no problem in answering a question with recommending that they not do something. BTW, there is NO down on this answer that I can see. Not sure how much rep you need to see the up/down votes. – Peter Grill Jun 7 '12 at 5:53