Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Every time I call \section{**Section Name**}, a number appears to the left of the name of the section.

How do I hide this number?

share|improve this question
8  
Use \section*{My section} –  Harish Kumar Sep 16 '12 at 17:32
3  
Or \setcounter{secnumdepth}{0}. –  Heiko Oberdiek Sep 16 '12 at 18:40
5  
This is a very reasonable, but pretty elementary question. I recommend studying The Not so short guide to LaTeX; in particular, pg 41 describes section* :) –  cmhughes Sep 16 '12 at 18:52
    
Thank you! I'll peruse that. –  David Faux Sep 16 '12 at 21:01

1 Answer 1

up vote 10 down vote accepted

You may use

\section*{My section}

to get un-numbered sections. For details refer to The Not So Short Guide to LaTeX. (Page 41 describes \section*) (Thanks to @cmhughes for the link)

As per Heiko's suggestion, you can also use

\setcounter{secnumdepth}{0}

A MWE:

\documentclass[]{article}
\usepackage{lipsum}
\begin{document}
\section*{My section}
\lipsum[1]
\setcounter{secnumdepth}{0}
\section{Another section}
\lipsum[2]
\end{document}

In the KOMA-Script classes there’s an additional possibility with (among others) \addsec. Quote scrguien.pdf (English documentation):

In addition to the commands of the standard classes, KOMA-Script offers the new commands \addsec and \addchap. They are similar to the standard commands \chapter and \section, except that they are unnumbered. They thus produce both a running heading and an entry in the table of contents.

share|improve this answer
    
@Speravir: Thanks for the edit. –  Harish Kumar Sep 17 '12 at 0:10
    
hm. But setting \setcounter{secnumdepth}{0} doesn't allow for \ref to work :-( But I do want to refer the sections by numbers, because the PDF structure still gives you that information. So I somehow need a way to just hide the number but without breaking \ref. –  Frederick Nord Feb 12 '13 at 15:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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