2

I am very new to Latex. I am trying to make my thesis paper in latex as now. I am using the mwart documentclass. I dont know either it is a documentclass specific thing, but the items i have in table of contents are not visible in output pdf as bookmarks... I was wondering how can I make the to? I cant seem to find the solution online. I would appreciate all help!

1
  • 2
    You have to load hyperref (normally as the last package, with some exceptions).
    – Bernard
    Feb 10, 2016 at 21:36

1 Answer 1

3

While I'd definitely say you are better off loading hyperref, I still recommend using the bookmark package (by the same author). One good reason is that bookmark will populate the PDF bookmarks on the first run.

Here's a simple example:

\documentclass{mwart}
\usepackage{lipsum}
\usepackage{xcolor}
%\usepackage{hyperref}
%\hypersetup{
%  colorlinks, allcolors=purple
%}
\usepackage{bookmark}
\bookmarksetup{
  open,
  openlevel=2,
  color=blue,% <-- requires xcolor.sty; colour is not supported by all PDF viewers, however
}


\begin{document}
\tableofcontents
\section{S One}
\subsection{SS One}
\lipsum[1]

\section{S Two}
\subsection{SS Two}

%
\label{myexample}% add a unique bookmark
\bookmark[
  rellevel=0,
%  keeplevel,
  dest=myexample,
  bold=true,
  color=red,
]{LOOK AT THIS}
%
\lipsum[1]

\section{S Three}
\subsection{SS Three}
\lipsum[1]

\end{document}

Both hyperref and bookmark bring a lot to the PDF format

You must log in to answer this question.

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