# Hide section number for a specific section

I'd like to hide the number of a specific section, but it's subsections should keep the right numbering, as should the labels and numbers that appear in the PDF's bookmarks (I think it's the hyperref package that does the bookmarks).

I was hopeful that the advice contained in the thread hide section numbering but continue adding-up would help, but the results I'm getting are similar to simply using the \section*{} variant.

Any suggestion?

-
Please add a minimum working example of what you have so far. (I.e. prune what you've got down to as small as possible that still illustrates your problem, and add it to the question). The Q&A you reference should work correctly. –  Brent.Longborough Mar 3 '12 at 22:10
Thanks @Brent.Longborough, I sympathize with your suggestion, and I recognize I was a bit lazy, but that simply seemed to much trouble for such a simple thing :) I think I've figured it out now. –  Filipe Correia Mar 10 '12 at 21:54
add comment

## 2 Answers

You can use \stepcounter{section} which will increment the section counter by one, as demonstrated below

\documentclass{article}
\usepackage{lipsum}

\begin{document}

\section{Regular section}
\lipsum[1]

\stepcounter{section}
\section*{Starred section}
\subsection{Subsection}\label{ssec:test}

Here is a reference to subsection \ref{ssec:test}
\end{document}

-
This uses roughly the same solution that I linked to. However, it does indeed solve the numbering issue. It doesn't solve the issue with the pdf bookmarks though... –  Filipe Correia Mar 10 '12 at 21:51
add comment

Building upon @cmhughes' suggestion, I came to a solution that hides the section numbers, but still keeps the PDF bookmarks. The bookmark simply needs to be added manually.

This is the new command that I've defined for creating numberless section:

\newcommand{\nnsection}[1]{\stepcounter{section} \pdfbookmark[1]{\thesection #1}{#1} \section*{#1}}}

-
add comment