I wasn't sure how to search for this as I'm not sure what's it's called. Apologies if this is a duplicate though.
Sometimes when I open a PDF, the sidebar will list the table of contents and I'll be able to jump to a section or subsection by click on it's title in the pdf viewer's sidebar. Example:
Other times, when I open up a long pdf, all I see in the sidebar are just the pages, listed in order, but with no other sort of organization. Non-example:

How do I construct my paper so that it works like the first example?
hyperrefpackage is the usual way of getting such things in latex, it has several commands for controlling this (bookmarks) but also by default the standard\(sub)sectioncommands will add entries to the hierarchical bookmark pane. – David Carlisle Mar 31 '13 at 00:02hyperref(orbookmark) to create the bookmarks. – Gonzalo Medina Mar 31 '13 at 00:13