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 Answer 1

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

3
  • 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? Oct 19, 2014 at 9: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, 2014 at 10:14
  • 1
    @JoeyTribiani You can use \nameref or \pageref. Oct 19, 2014 at 10:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .