I want to display a section on the sidebar of the .pdf. Unfortunately, it seems that it does not appear when I am using \section*{section_name}. But it appears when I use \section{section_name}

How to display the section heading on the side bar using \section*{section_name}?

  • \section* does not enter the ToC and as such does not enter the PDF outline. Please provide a compilable document. It should be possible with the \currentpdfbookmark macro, however. Of course you don't mean section_name literally, do you?
    – user31729
    Aug 5, 2017 at 19:48
  • Thank you for your reply. No section_name is just a dummy. But suppose I want to use \section{name} but wish to hide the section number. Will it then work? Aug 5, 2017 at 19:56
  • Yes, but hiding the number is the crusher ;-)
    – user31729
    Aug 5, 2017 at 19:57

1 Answer 1


If there's only one \section* like - content to be entered to the bookmark (or PDF outline), the easiest way is to strip the number by a quick \setcounter{secnumdepth}{0} and later restore it to the old value. This way, the \section{Foo} is not numbered, but enters the ToC still and has an bookmark entry.

I assumed the article class here, which has a secnumdepth value of 3 by default.




\section{Other section}


enter image description here


You must log in to answer this question.

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