GeneralLatex index referencing to the target page

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
fmezacr
Posts: 1
Joined: Tue May 23, 2017 10:24 pm

Latex index referencing to the target page

Post by fmezacr »

I'm using a .cls file to generate the index for a document, here is the code I'm using:

Code: Select all

\newcommand{\contents}{
\newpage
\renewcommand{\contentsname}{Index}
\addcontentsline{toc}{chapter}{\numberline{}Index}
\tableofcontents}
The problem is that the generated index is not referencing to the target page, in other words when I press any line in the index, for instance:

Introduction....................................................................................4

I'm not able to jump to page 4.

Any idea about how to reference to the target page in the index correctly?

PD. Please note that since I'm not using a single document baseline but a template using the .cls file to build the structure, I'm not able to use the conventional way i.e \usepackage{hyperref} \tableofcontents etc

Thanks!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Latex index referencing to the target page

Post by Stefan Kottwitz »

Welcome to the forum!

You could use \RequirePackage{hyperref} in the .cls file.

Stefan
LaTeX.org admin
User avatar
JoshKimmich
Posts: 1
Joined: Mon Jul 03, 2017 9:25 am

Latex index referencing to the target page

Post by JoshKimmich »

The image doesn't appear. Adding in the units makes no difference... not in my case.
Ready to take the cork off and try your luck? You can find UK online slots and play for free with no deposit at 777extraslot. This is the best place if you're looking for a no deposit bonus. We provide a few websites that offer such rare type of bonus.
Post Reply