# hyperref is not automatically generating bookmarks

I am trying to make automatically generate bookmark in my PDF file, but hyperref is not doing so. Here is my code. Any idea what am I missing.

% nVSDguide.tex
% v4.0 released October 2014

%\documentclass{article}
\documentclass{nVSD2e}

\usepackage[bookmarksopen=true,bookmarks=true]{hyperref}
\usepackage{bookmark}

\begin{document}
\title{How well does?}
\maketitle

\begin{abstract}
The effect is very easy to construct.
\end{abstract}

\section{Introduction}
jack for none.
\section{Procedure}
here it is..
\end{document}

• Is the nVSD2e document class available online somewhere? If so, where? – Mico Oct 22 '17 at 8:49
• Hi Mico, here is the link for the nVSD2e.cls [dropbox.com/s/1bq1kyj5ga9zf3f/nVSD2e.cls?dl=0] – manjurul Oct 22 '17 at 8:53
• Is the mcode package available online? – Mico Oct 22 '17 at 8:57
• Thanks, that works. but if I would like to keep the nVSD2e.cls, do you konw how I should \newcommand or something so that it woks for my case? – manjurul Oct 22 '17 at 8:57
• The nVSD2e class is very, very, very, very strange. Don't use it. – user31729 Oct 22 '17 at 15:05

The nVSD2e class is very weird, defining a lot of strange things, even having an own version of \document, but the culprit is that tocdepth is set to 0 since there is no explicit code like \setcounter{tocdepth}{3} as in article.cls so the default value of 0is applied, meaning that only chapters or parts enter the .toc or bookmarks, but the nVSD2e class does not even provide \chapter or \part macros.

There is no \tableofcontents or \listoffigures etc. command, no \contentsname defined.

The whole class looks like glued together without proper understanding of TeX/LaTeX.

In short: Setting tocdepth to a value higher than 0, i.e. 2 or 3 etc. settles this issue, depending on the desired ToC leveling. (See How to hide/show section levels in the table of contents? for more on this topic.)

\documentclass{nVSD2e}

\setcounter{tocdepth}{2}

\usepackage[bookmarksopen=true,bookmarks=true]{hyperref}
\usepackage{bookmark}

\title{How well does?}

\author{I.S.Hould Not Use This Class}

\begin{document}
\maketitle

\begin{abstract}
The effect is very easy to construct.
\end{abstract}

See \ref{intro}

\section{Introduction} \label{intro}
jack for none.
\section{Procedure}
here it is..
\end{document}


• Thanks a lot, Christian Hupfer :) It has solved my issue. – manjurul Oct 24 '17 at 12:36