No section numbers, but still have PDF bookmarks with hyperref
You can just suppress the appearance of the section number:
\documentclass[a4paper]{article}
\usepackage{hyperref}
\usepackage{bookmark}
\makeatletter
\renewcommand\@seccntformat[1]{}
\makeatother
\begin{document}
\section{A}
a
\newpage
\section{B}
b
\end{document}
The macro \@seccntformat
is responsible for printing the section number; by redefining it to "do nothing" the number is not printed, but hyperref is able to create the bookmark correctly.
The bookmark package is a good add-on, as it avoids some weaknesses of the original implementation of bookmark creation.
hyperref
provides bookmarking functionality by means of
\pdfbookmark[<level>]{<text>}{<name>}
or
\currentpdfbookmark{<text>}{<name>}
in addition to others (see the hyperref
documentation). Here is a minimal example:
\documentclass{article}
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\usepackage{hyperref}% http://ctan.org/pkg/hyperref
\begin{document}
\section*{First section} \pdfbookmark{First section}{sec:first} \lipsum[1]
\section*{Second section} \pdfbookmark{Second section}{sec:second} \lipsum[2]
\section*{Third section} \pdfbookmark{Third section}{sec:third} \lipsum[3]
\section*{Last section} \pdfbookmark{Last section}{sec:fourth} \lipsum[4]
\end{document}
It would be possible to make this form part of the section command \section
.
If you're only after bookmarks, and not so much concerned with internal document hyper references, use the bookmark
package instead.
It is also possible to turn off heading numbering completely. Since you didn't explicitly say that you only want unnumbered sections, this might be an alternative.
\documentclass[11pt,english]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{blindtext}
\usepackage{hyperref}
\setcounter{secnumdepth}{0}
\begin{document}
\blinddocument
\end{document}
This way you can use the known \section
command. Again, note that this would turn off numbering of all heading levels.