Generalhelp: about hyperlinks

LaTeX specific issues not fitting into one of the other forums of this category.
ekim
Posts: 5
Joined: Fri Apr 24, 2009 8:17 pm

help: about hyperlinks

Post by ekim »

Dear all,

I am still a starter to LaTeX, trying to learn the basics. I am getting the following error, although I am sure that the same log worked in other computers:

"Option clash for package hyperref."

My preambles for hyperref are:

\usepackage[dvips, pdfnewwindow=true]{hyperref}
\hypersetup{
colorlinks,
citecolor=blue, %
filecolor=blue,%
linkcolor=blue,%
urlcolor=blue,%
pdftitle=title,%
pdfauthor=author,%
bookmarks,%
pdftex}
%

Does anyone see where I am making the mistake?

Thanks you very much in advance,
ekim.

edit: preamble and subject.

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: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Re: about hyperlinks

Post by Stefan Kottwitz »

Hi Ekim,

welcome to the board!
You've set options for hyperref by \hypersetup but also by \usepackage. You should not use dvips and pdftex together.

The code piece you've posted could work, for instance with the article class. It could cause an error if it would be used with a class that's already loading hyperref, like beamer. I guess you're using the beamer class. In that case it could be enough to remove the three options to \usepackage{hyperref}.

Stefan
LaTeX.org admin
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

help: about hyperlinks

Post by localghost »

Abandon the options dvips and pdftex. The hyperref package will load the right driver on its own.


Best regards and welcome to the board
Thorsten¹
ekim
Posts: 5
Joined: Fri Apr 24, 2009 8:17 pm

help: about hyperlinks

Post by ekim »

Stefan_K wrote:Hi Ekim,

welcome to the board!
You've set options for hyperref by \hypersetup but also by \usepackage. You should not use dvips and pdftex together.

The code piece you've posted could work, for instance with the article class. It could cause an error if it would be used with a class that's already loading hyperref, like beamer. I guess you're using the beamer class. In that case it could be enough to remove the three options to \usepackage{hyperref}.

Stefan
Thanks a lot for your help! However, I have an odd error message when I do what you say. I've changed my preambles to:

\usepackage{hyperref}
\hypersetup{
colorlinks,
citecolor=blue, %
filecolor=blue,%
linkcolor=blue,%
urlcolor=blue,%
pdftitle=title,%
pdfauthor=author,%
bookmarks,%
}

This seems to work when I try to teXify the document. However, even tough the document is ought to be in the form of slides, it is in the form of an article. When I try to PDF teXify, it gives me the following error:

"
...[56][57]pdfTeX warning (ext4): destination with the same identifier name (name{equation3.111}) has been already used, duplicate ignored
<to be read again>
\relax
1.1178 \begin{equation}
[58][59][60][61]etc.
Overfull \hbox (33.25021pt too wide) in alignment at lines 2346-2353
[][] []
"

The whole preambles goes:
"\documentclass[a4paper,12pt]{article}
\usepackage{graphicx}
\usepackage{harvard}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{subfigure}
\usepackage{rotating}
\usepackage{hyperref}
\hypersetup{
colorlinks,
citecolor=blue, %
filecolor=blue,%
linkcolor=blue,%
urlcolor=blue,%
pdftitle=title,%
pdfauthor=author,%
bookmarks,%
}




\setlength{\textheight}{18 cm}
\setlength{\textwidth}{27 cm}
\setlength{\voffset}{-3.5 cm}
\setlength{\hoffset}{-2.5 cm}
"

This is a document that was created by someone else that I should correct. Is it possible to face this if the author is using another ASCII editor?

Thank you very much for your time, ekim.

edit:error
User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

help: about hyperlinks

Post by Stefan Kottwitz »

Hi Ekim,
ekim wrote:However, even tough the document is ought to be in the form of slides, it is in the form of an article.
in that case consider to use a presentation class like beamer or powerdot instead of article.

Regarding the error - could you show the code lines at this place, probably line before 1178?

Stefan
LaTeX.org admin
User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

help: about hyperlinks

Post by Stefan Kottwitz »

Now I can see you've inserted the complete error message:
ekim wrote: ...[56][57]pdfTeX warning (ext4): destination with the same identifier name (name{equation3.111}) has been already used, duplicate ignored
<to be read again>
It's just a warning regarding hyperlinking. Have a look here in the UK TeX FAQ: PDFTeX destination ... ignored.

Stefan
LaTeX.org admin
ekim
Posts: 5
Joined: Fri Apr 24, 2009 8:17 pm

help: about hyperlinks

Post by ekim »

Stefan_K wrote:Now I can see you've inserted the complete error message:
ekim wrote: ...[56][57]pdfTeX warning (ext4): destination with the same identifier name (name{equation3.111}) has been already used, duplicate ignored
<to be read again>
It's just a warning regarding hyperlinking. Have a look here in the UK TeX FAQ: PDFTeX destination ... ignored.

Stefan
I have solved the problem by changing every equation command into an eqnarray* command. It is apparently a drudgery way to solve it, yet, it is solved. Thank you for you help.

i used this link to solve the problem: http://insti.physics.sunysb.edu/~siegel/tex.shtml

ps. another problem is that the PDF is produced using the normal page sizes although the following preamble is used:
"
\documentclass[slides]{article}
\setlength{\textheight}{18 cm}
\setlength{\textwidth}{27 cm}
\setlength{\voffset}{-3.5 cm}
\setlength{\hoffset}{-2.5 cm} "

I know that these commands produce the proper 'horizontal' page setup in authors computer. Can you guess what is wrong?

Thanks a lot, again, ekim.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

help: about hyperlinks

Post by Stefan Kottwitz »

Hi Ekim,

I would use the geometry package instead of setting those lengths manually.

But if you want to do that, you may have to adjust not only the text size but also the paper size, perhaps pdf paper size too. Try this code for instance:

Code: Select all

\setlength{\paperwidth}{29cm}
\setlength{\paperheight}{20cm}
\setlength{\pdfpagewidth}{\paperwidth}
\setlength{\pdfpageheight}{\paperheight}
See perhaps Paper sizes with pdfTeX. Btw. I would not use eqnarray, reasons are explained here: eqnarray vs. align. There should be a better solution, but in order to find the cause of the pdftex/hyperref/equation problem I need to know more of your code. A minimal working example would provide a way to fix it.

Stefan
LaTeX.org admin
ekim
Posts: 5
Joined: Fri Apr 24, 2009 8:17 pm

help: about hyperlinks

Post by ekim »

Stefan_K wrote:Hi Ekim,
There should be a better solution, but in order to find the cause of the pdftex/hyperref/equation problem I need to know more of your code. A minimal working example would provide a way to fix it.

Stefan
Dear Stefan,

This MWE produces the same error. I hope it is actually a "MWI", excuse me if it is not the best one:

\

Code: Select all

documentclass[a4paper,12pt]{article}
\usepackage{graphicx}
\usepackage{harvard}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{subfigure}
\usepackage{rotating}

\usepackage{hyperref}
\hypersetup{%
  colorlinks,%
  citecolor=blue,%
  filecolor=blue,%
  linkcolor=blue,%
  urlcolor=blue,%
  pdftitle=title,%
  pdfauthor=author,%
  bookmarks,%
}

\setlength{\textheight}{18cm}
\setlength{\textwidth}{27cm}
\setlength{\voffset}{-3.5cm}
\setlength{\hoffset}{-2.5cm}

\newtheorem{proposition}{Proposition}
\newtheorem{assumption}{Assumption}
\newtheorem{remark}{Remark}
\newtheorem{definition}{Definition}
\newtheorem{condition}{Condition}
\newtheorem{property}{Property}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
\renewcommand{\labelenumi}{\roman{enumi}.}

\begin{document}
\newpage
\begin{equation}
Cov(x_1,x_2|x_2=k) = 0
\end{equation}
\begin{equation}
\label{e:mcia}
Cov(x_1,\omega|x_2=k) = 0
\end{equation}

\begin{equation}
Cov(x_1,\omega|x_2=k) = 0 =  [E(\omega|x_1=1,x_2=k) - E(\omega|x_1=0, x_2=k)] \nonumber
\end{equation}
\newpage

\begin{equation}
\label{e:pmrf1}
y = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + u
\end{equation}

\begin{equation}
\label{e:pmrfmin}
(\beta_0, \beta_1, \beta_2 )  =  arg\min_{b_0,b_1,b_2}  E \left [ (y - b_0 - b_1 x_1 - b_2 x_2)^2 \right ] \\
\end{equation}

\end{document}
ekim.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Re: help: about hyperlinks

Post by Stefan Kottwitz »

It's similar like behind the link you've posted, the \nonumber is causing the problem. But use equation*, not eqnarray*.

Did adjusting the paper sizes help?

Stefan
LaTeX.org admin
Post Reply