It's easy to generate a Table of contents inside a LaTeX document using "\tableofcontents", but when opened in Preview on Mac (Preview is an app to view PDF), The left side doesn't show any table of contents. Here is an example of what I want:
Do you know any package or setting step that can generate this kind of table of contents? Thanks.

\usepackage{hyperref}– David Carlisle Nov 16 '16 at 21:30