# [texhax] hyperref

Martin Heller mr_heller at yahoo.dk
Wed Sep 17 14:29:01 CEST 2008

mahi skrev:
> I am MikTeX user, i am creating a pdf using hyperref.sty with dvips
> option, after converting to dvi + ps + pdf when i click that link in pdf
> for(reference, figures etc.......) it is not going to the proper place
> just its going to the particular page, but if i use same package with
> pdftex option the links goes to the particular references or figure, how
> can i fix this bug for dvips option.

hyperref can detect if you compile with pdflatex directly to pdf
or with latex to dvi. In the latter case hyperref assumes you use
dvips + ps2pdf to get the pdf. You don't need to specify dvips by
option.

> I might not be very clear, but basically i want to convert a hyper
> linked pdf using dvi + ps + pdf, and in pdf when i click to the
> reference citation that should go to the particular number of reference
> section not particular page e.g. In text [15] if i click this in pdf it
> should go to the reference [15].

\documentclass[a4paper]{article}
\usepackage{lipsum}
\usepackage{hyperref}
\begin{document}
\ref{sec:foo}
\lipsum[1-20]
\section{Foo}
\label{sec:foo}
\lipsum[1]
\end{document}

The above works with both pdflatex and latex->dvips->ps2pdf on my
MiKTeX system. You must be doing something differently.