Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Getting rid of red boxes / links in Table of Contents

1,327 views
Skip to first unread message

bquinif

unread,
Apr 14, 2006, 12:02:08 PM4/14/06
to
I am writing a thesis right now and am using a style file especially
made for theses at my university.

When I pdf my document, in the table of contents, there are links to
all of the chapter, and the chapter names are enclosed in red boxes.

How can I get rid of the red boxes and/or the clickable links in my
table of contents?

Thanks,

Brian

Diego Torquemada

unread,
Apr 14, 2006, 12:07:04 PM4/14/06
to
have you checked the documentation of the hyperref package?

bquinif

unread,
Apr 14, 2006, 1:00:17 PM4/14/06
to
I just checked out that package. First, maybe I should say that I
don't even want hypertext. Is there a way to get rid of it? I wasn't
using the hyperref package to begin with.

That said, I only found one option in the hyperref package that seemed
like it might help: draft=true, which supposedly gets rid of all
hyperlinnks. However, if I activate that option, when I try to
pdflatex, I get an error saying there is an option clash in hyperref.
Maybe it is clashing with other packages I have...

Also, there are several options I saw in the hyperref documentation
about changing the color of the box I want to get rid of. Does anyone
know how to get rid of it?

Thanks,

Brian

bquinif

unread,
Apr 14, 2006, 1:09:51 PM4/14/06
to
Diego, thanks for your comment. I went through and isolated what
causes there to be the links. It is the "harvard" bibliography
package. I'm in the process of trying to figure out how to fix that,
but if anyone knows the option I should use, I'd appreciate the help.

BQ

Dan Luecking

unread,
Apr 14, 2006, 1:43:32 PM4/14/06
to
On 14 Apr 2006 10:00:17 -0700, "bquinif" <brian....@gmail.com>
wrote:

>I just checked out that package. First, maybe I should say that I
>don't even want hypertext. Is there a way to get rid of it? I wasn't
>using the hyperref package to begin with.
>
>That said, I only found one option in the hyperref package that seemed
>like it might help: draft=true, which supposedly gets rid of all
>hyperlinnks. However, if I activate that option, when I try to
>pdflatex, I get an error saying there is an option clash in hyperref.
>Maybe it is clashing with other packages I have...

An "option clash" means hyperref has been loaded twice with different
options. Therefore, hyperref must be loaded by some package or the
document class. It should be possible to analyze the .log file
to find out which. ("Why" is another matter.)


Dan
To reply by email, change LookInSig to luecking
*** Posted via a free Usenet account from http://www.teranews.com ***

bquinif

unread,
Apr 14, 2006, 2:06:27 PM4/14/06
to
Thanks, Dan. As I mentioned above, I'm pretty sure that it is the
"harvard" package which is causing the boxes to be there. It seems to
have automatically loaded hyperref.

I don't understand why the harvard package, which relates to
bibliography styles, would have anything related to hypertext. I can't
figure out how to turn of the hypertext creation that harvard is
forcing.

Does anyone know how to do that? I looked in the harvard documentation
and didn't find anything about hypertext.

BQ

José Carlos Santos

unread,
Apr 14, 2006, 2:15:19 PM4/14/06
to
On 14-04-2006 19:06, bquinif wrote:

> Thanks, Dan. As I mentioned above, I'm pretty sure that it is the
> "harvard" package which is causing the boxes to be there. It seems to
> have automatically loaded hyperref.
>
> I don't understand why the harvard package, which relates to
> bibliography styles, would have anything related to hypertext. I can't
> figure out how to turn of the hypertext creation that harvard is
> forcing.
>
> Does anyone know how to do that? I looked in the harvard documentation
> and didn't find anything about hypertext.

Besides the suggestion by Dan Luecking of analyzing the .log file, you
might also post here the preamble of your document. That should help us
to find the cause.

And please don't top-post. If you want to know what's that and why you
shouldn't do it, read

http://www.caliburn.nl/topposting.html

or

http://www.html-faq.com/etiquette/?toppost

Best regards,

Jose Carlos Santos

bquinif

unread,
Apr 14, 2006, 2:25:50 PM4/14/06
to
Jose, thank you for pointing out that I top-post. I did that somehow
by accident.

Here is my preamble:

\documentclass[12pt]{report}
\usepackage{uga}
\usepackage{amsmath}
\usepackage{harvard}
\usepackage[justification=centering]{caption}
\usepackage{lscape}
\bibliographystyle{econometrica}
\usepackage{theorem}
\newtheorem{aspt}{Assumption}[section]
\theoremheaderfont{\scshape}

The uga package uses the style file for my university. I am confident
that the harvard package is what is causing there to be the hyperlinks.
I know this because I started off with the basic example thesis
supplied by the university which did not have any hyperlinks (or red
boxes), and exactly when I added the harvard package to that file, it
started having the links/boxes.

I do not really know much about analyzing my log files.

José Carlos Santos

unread,
Apr 14, 2006, 2:37:25 PM4/14/06
to
On 14-04-2006 19:25, bquinif wrote:

> Here is my preamble:
>
> \documentclass[12pt]{report}
> \usepackage{uga}
> \usepackage{amsmath}
> \usepackage{harvard}
> \usepackage[justification=centering]{caption}
> \usepackage{lscape}
> \bibliographystyle{econometrica}
> \usepackage{theorem}
> \newtheorem{aspt}{Assumption}[section]
> \theoremheaderfont{\scshape}
>
> The uga package uses the style file for my university. I am confident
> that the harvard package is what is causing there to be the hyperlinks.
> I know this because I started off with the basic example thesis
> supplied by the university which did not have any hyperlinks (or red
> boxes), and exactly when I added the harvard package to that file, it
> started having the links/boxes.

It must be something else. If I compile

\documentclass[12pt]{report}
\usepackage{uga}
\usepackage{amsmath}
\usepackage{harvard}
\usepackage[justification=centering]{caption}
\usepackage{lscape}
\bibliographystyle{econometrica}
\usepackage{theorem}
\newtheorem{aspt}{Assumption}[section]
\theoremheaderfont{\scshape}

\begin{document}
\tableofcontents
\chapter{Test}
Something
\end{document}

with PDFLaTeX, I get no hyperlink. What about you?

Can't you create a _minimal_ example which creates them?

> I do not really know much about analyzing my log files.

Why don't you post it here?

Heiko Oberdiek

unread,
Apr 14, 2006, 3:59:30 PM4/14/06
to
José Carlos Santos <jcsa...@fc.up.pt> wrote:

> On 14-04-2006 19:25, bquinif wrote:
>

> > \usepackage{harvard}

> It must be something else. If I compile

harvard loads html.sty if it exists and html.sty loads hyperref
with some obscure logic.

Yours sincerely
Heiko <ober...@uni-freiburg.de>

Steven Endres

unread,
Apr 14, 2006, 4:27:03 PM4/14/06
to
"Heiko Oberdiek" <ober...@uni-freiburg.de> wrote in message
news:e1ouv2$3ts$1...@news.BelWue.DE...

If you simply want to not see the links, try adding this after
\usepackage{harvard}:

\hypersetup{colorlinks,color=black}

This tells hyperref to color the text instead of making a box around it,
then changes the color so you get black text instead of red text.

HTH,
Steven


bquinif

unread,
Apr 14, 2006, 6:23:35 PM4/14/06
to
When I compile that, I do get the hyperlinks and red boxes. However,
if I add

\usepackage{hyperref}
\hypersetup{colorlinks=true,linkcolor=black}

to the mininal example above, the problem is solved.

However, in my actual document, when I try that solution, there are
errors relating to my tables. I took a basic table (which works
otherwise and was generated by R and put it in the minimal example
above, I get the errors, as well. The errors say "too many }'s".

bquinif

unread,
Apr 14, 2006, 6:25:33 PM4/14/06
to
Is there anyway I can get harvard to stop loading hyperref?

José Carlos Santos

unread,
Apr 14, 2006, 7:02:40 PM4/14/06
to
Heiko Oberdiek wrote:

>>> \usepackage{harvard}
>
>> It must be something else. If I compile
>
> harvard loads html.sty if it exists and html.sty loads hyperref
> with some obscure logic.

OK. The machine on which I created the test file from my previous post
does not have the html.sty package (unlike the machine that I am using
now).

bquinif

unread,
Apr 14, 2006, 9:02:40 PM4/14/06
to
Would a solution be to remove the html.sty package from my machine? If
so, how do I do so? I'm using MikTeX on Windows.

José Carlos Santos

unread,
Apr 15, 2006, 4:12:06 AM4/15/06
to
bquinif wrote:

> Would a solution be to remove the html.sty package from my machine?

Indeed, but I don't think that that's a good idea. It seems that the
best solution is the one suggested by Steven Endres: to add

\hypersetup{colorlinks,color=black}

after \usepackage{harvard}

> If so, how do I do so? I'm using MikTeX on Windows.

I suspect that MikTeX is installed at C:\Program Files. Then the file
html.sty is located at

C:\Program Files\MiKTeX\texmf\tex\latex\latex2html

But don't delete it.

bquinif

unread,
Apr 15, 2006, 2:50:16 PM4/15/06
to
Ok, but as I said above:

bquinif

unread,
Apr 17, 2006, 2:20:43 AM4/17/06
to
Does anyone have any idea of what could be going wrong? When I add the
hyperref package, nothing bad happens, but when I add the colorlinks
option, I get lots of errors ("too many }" is one) once LaTeX gets to
my tables. The tables were generated by R, and always work great, but
somehow adding the colorlinks option makes everything fall apart.

I would be really greatful if anyone could tell me how to get rid of
these red hyperlinks. I'm sorry that the minimal sample approach
hasn't worked for solving my problem.

BQ

bquinif

unread,
Apr 17, 2006, 2:21:07 AM4/17/06
to

Dan Luecking

unread,
Apr 17, 2006, 2:36:44 PM4/17/06
to
On Sat, 15 Apr 2006 09:12:06 +0100, José Carlos Santos
<jcsa...@fc.up.pt> wrote:

>bquinif wrote:
>
>> Would a solution be to remove the html.sty package from my machine?
>
>Indeed, but I don't think that that's a good idea. It seems that the
>best solution is the one suggested by Steven Endres: to add
>
>\hypersetup{colorlinks,color=black}
>
>after \usepackage{harvard}

It doesn't seem to me to be the best idea (or even a good idea) to
let hyperref be loaded (with all the possible incompatibilities
that entails) when one doesn't need its extra capabilities. Harvard
should provide an option to load not load html.sty. It appears that
harvard only loads html to get the command \harvardurl to create a
link. Instead of requiring html, it could just just check if it is
loaded and base the definition on that.

One can trick html.sty into not loading by doing

\let\htmlstyloaded=\relax
\usepackage{harvard}

then one might have to provide an alternate definition of \harvardurl:

\renewcommand{\harvardurl}[1]{\textbf{URL:} \textit{#1}}

I don't know what consequences there might be if harvard (and other
packages) have the (mistaken) inpression that html.sty is loaded.

>
>C:\Program Files\MiKTeX\texmf\tex\latex\latex2html
>
>But don't delete it.

One could rename it. If you never use latex2html it shouldn't hurt,
and if you do, you could copy it into the working directory and
restore its name.

bquinif

unread,
Apr 17, 2006, 3:30:21 PM4/17/06
to
Dan,

Thank you very much.

It looks like just putting in

\let\htmlstyloaded=\relax
\usepackage{harvard}

solved my problem!

BQ

0 new messages