0

How can I remove the numbers of my paragraphs, but still keep the links within my LateX file using hyperref? It's a bit like this question, but then with paragraphs: No section numbers, but still have PDF bookmarks with hyperref

1 Answers1

4

Just set counter secnumdepth accordingly.

If the paragraph titles do not appear in the table of contents (counter tocdepth), then the depth can set to a different value for the bookmarks.

Full example:

\documentclass{article}
\usepackage{hyperref}
\usepackage{bookmark}
\bookmarksetup{
  open,
  numbered,
  depth=5, % otherwise the setting of counter `tocdepth' would be used
}
\setcounter{secnumdepth}{2}

\begin{document}
\section{Section}
\subsection{Subsection}
\paragraph{Paragraph}
\subparagraph{Subparagraph}
\end{document}

Result

Heiko Oberdiek
  • 271,626
  • Thanks for the quick reply. But when I add a label to a paragraph and refer to it with \ref then it refers to the subsection. That's still not what I want. I want to refer it to the paragraph. Do you know how? – Joey Tribiani Oct 19 '14 at 09:43
  • @JoeyTribiani - How do you plan to cross-reference an entity that you've chosen not to number? Not by its number, right? – Mico Oct 19 '14 at 10:14
  • 1
    @JoeyTribiani You can use \nameref or \pageref. – Heiko Oberdiek Oct 19 '14 at 10:26