Document Classesharvard vs hyperref

Information and discussion about specific document classes and how to create your own document classes.
bkarpuz
Posts: 124
Joined: Thu Dec 18, 2008 4:53 pm

harvard vs hyperref

Post by bkarpuz »

Dear LC members,

I am using harvard and hyperref packages together but in this case hyperref seems not to work properly.

Here is a minimal work space.

Code: Select all

\documentclass[a4paper,12pt,reqno]{article}

\usepackage{amsthm}
\usepackage{harvard}
\usepackage[pdfstartview=FitV]{hyperref}

\newtheorem{theorem}{Theorem}[section]

\begin{document}

\section{Main results}

\begin{theorem}[Bolzano-Weierstrass theorem]\label{thm1}
Each bounded sequence of reals has a convergent subsequence.
\end{theorem}

Theorem~\ref{thm1} %This works fine

\hyperref[thm1]{Bolzano-Weierstrass theorem} %This fails

\end{document} 
Is it possible to make this work?

Thanks a lot.
bkarpuz
Last edited by bkarpuz on Fri Feb 10, 2012 2:30 pm, edited 1 time in total.

Recommended reading 2024:

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

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

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

harvard vs hyperref

Post by cgnieder »

Your example works fine when I compile it. What version of hyperref do you use? The most recent one is v6.82m.
site moderator & package author
bkarpuz
Posts: 124
Joined: Thu Dec 18, 2008 4:53 pm

harvard vs hyperref

Post by bkarpuz »

cgnieder wrote:Your example works fine when I compile it. What version of hyperref do you use? The most recent one is v6.82m.
Thank you for your help cgnieder. I have tried with MiKTeX Package Manager to update the hyperref package but it didn't let me either reinstalling online. I have downloaded hyperref-6.82m.tds.zip. How can I install it manually from my computer?

Thank you very much.
bkarpuz
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

harvard vs hyperref

Post by cgnieder »

I actually have no experience at all with MiKTeX. Maybe you find answers or can post a new question here?
site moderator & package author
bkarpuz
Posts: 124
Joined: Thu Dec 18, 2008 4:53 pm

harvard vs hyperref

Post by bkarpuz »

Thank you cgnieder.
cgnieder wrote:I actually have no experience at all with MiKTeX. Maybe you find answers or can post a new question here?
I did as it is mentioned in the topic you have suggested.
Stefan_K wrote:Hi Marco,

welcome to the board!

You need to tell MiKTeX about the installed package, even if you already copied it into the MiKTeX tree. Open MiKTeX Options (Settings), available in the Windows start menu, and click the button "Refresh FNDB".

Stefan
Thanks.
bkarpuz

But still the name of the theorem does not have the link to the theorem in my example. Do you really have the red link box surrounding Bolzano-Weierstrass theorem?
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Re: harvard vs hyperref

Post by cgnieder »

I do! I'll attach the pdf I get with your code.
Attachments
test.pdf
(32.29 KiB) Downloaded 290 times
site moderator & package author
bkarpuz
Posts: 124
Joined: Thu Dec 18, 2008 4:53 pm

harvard vs hyperref

Post by bkarpuz »

cgnieder wrote:I do! I'll attach the pdf I get with your code.
It seems to work fine with you.

By the way, does the line pdfstartview=FitV makes any problem with you?
When I updated my hyperref, I could not use this option.

Many thanks for taking your time.
bkarpuz
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Re: harvard vs hyperref

Post by cgnieder »

I had no problems at all except for a warning that the global option "reqno" wasn't used.

I can only guess that you need to update your whole TeX system, since hyperref depends on a number of packages. Quite a number of them have been updated more or less recently somewhere in 2011.
site moderator & package author
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

harvard vs hyperref

Post by Stefan Kottwitz »

bkarpuz wrote:Do you really have the red link box surrounding Bolzano-Weierstrass theorem?
You can easily change that:

Code: Select all

\hypersetup{colorlinks=false, pdfborder={0 0 0}}
Stefan
LaTeX.org admin
bkarpuz
Posts: 124
Joined: Thu Dec 18, 2008 4:53 pm

harvard vs hyperref

Post by bkarpuz »

Stefan_K wrote:
bkarpuz wrote:Do you really have the red link box surrounding Bolzano-Weierstrass theorem?
You can easily change that:

Code: Select all

\hypersetup{colorlinks=false, pdfborder={0 0 0}}
Stefan
Thank you Stefan_K, but what I actually want to have is to have that red box around it, and I still can't make it work.
When I try to compile, I get the following error.
LaTeX wrote:! LaTeX Error: Option clash for package hyperref.
I can compile my text when I disable the option pdfstartview=FitV
but in this case Bolzano-Weierstrass theorem is not hyperlinked.
My result with the following text is attached.

Code: Select all

\documentclass[a4paper,12pt,reqno]{article}

\usepackage{amsthm}
\usepackage{harvard}
\usepackage{hyperref} %[pdfstartview=FitV]

\newtheorem{theorem}{Theorem}[section]

\begin{document}

\section{Main results}

\begin{theorem}[Bolzano-Weierstrass theorem]\label{thm1}
Each bounded sequence of reals has a convergent subsequence.
\end{theorem}

Theorem~\ref{thm1} %This works fine

\hyperref[thm1]{Bolzano-Weierstrass theorem} %This fails

\end{document}
I can also supply the log file if necessary.
Thank you very much.
bkarpuz
Attachments
ws.pdf
(11.47 KiB) Downloaded 374 times
Post Reply