Document ClassesDisable hypertext links in hyperref!?

Information and discussion about specific document classes and how to create your own document classes.
wheely_chairs
Posts: 26
Joined: Mon Jun 16, 2008 1:22 pm

Disable hypertext links in hyperref!?

Post by wheely_chairs »

The subcaption package is great and now I have [almost!] everything looking exactly how I want it. The only minor thing I'd love to change now is the list of figures (and list of tables), specifically the indent and spacing between numbers and captions. I tried out the tocloft package as this seems to be what everyone uses but it tripped up when I tried to modify the subfigure typesetting, e.g.:

Code: Select all

\setlength{\cftsubfigmargin}{1.5em}
Which I presume is a problem of compatibility between tocloft and caption/subcaption. Does anyone have any experience with this?

Chris

Recommended reading 2024:

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

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

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Disable hypertext links in hyperref!?

Post by gmedina »

You do not have to use the tocloft package. You can redefine the \l@figure (for figures) and/or \l@subfigure (for subfigures) commands. This can be done in the following way:

Code: Select all

\makeatletter
  \renewcommand*\l@subfigure{\@dottedtocline{2}{3em}{4em}}
\makeatother
The first argument of \@dottedtocline indicates the level (1 for figures, 2 for subfigures); the second argument controls the indention of the (sub)figure number and the third argument indicates the width of the box reserved to type the (sub)figure number.

Analogously you can redefine \@figure.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
wheely_chairs
Posts: 26
Joined: Mon Jun 16, 2008 1:22 pm

Re: Disable hypertext links in hyperref!?

Post by wheely_chairs »

FANTASTIC!!!! Thanks so much gmedina! I spent ages googling for such commands but gave up hope, hence trying tocloft but that is exactly what I wanted! It's very sad, but you've made my day! :D

Chris
wheely_chairs
Posts: 26
Joined: Mon Jun 16, 2008 1:22 pm

Disable hypertext links in hyperref!?

Post by wheely_chairs »

Coincidentally, I did find that for some reason, page 2 of the toc gained the pagestyle "fancy" (I'm using the fancyhdr package). So someone may find it useful to know that I fixed this by adding the following before the calling the toc/lof/lot:

Code: Select all

\addtocontents{toc}{\protect\pagestyle{plain}}
\addtocontents{lof}{\protect\pagestyle{plain}}
\addtocontents{lot}{\protect\pagestyle{plain}}
Obviously you need to typeset twice to see the changes :)

Chris
Post Reply