## LaTeX forum ⇒ Document Classes ⇒ Problems in using \hyperref

Information and discussion about specific document classes and how to create your own document classes.
chandangiri
Posts: 20
Joined: Thu Sep 06, 2007 7:31 pm

### Problems in using \hyperref

Hi, I am using hyperref package. To check I have given the label of a figure
\label{fig:report:1} and in the text I referred it as Fig. ~{\ref{fig:report:1}} . After compilation it is not showing the hyperlink in pdf file. Have I missed something?

LaTeXguide.org • LaTeX-Cookbook.net

chandangiri
Posts: 20
Joined: Thu Sep 06, 2007 7:31 pm

### Re: Problems in using \hyperref

Can anybody tell how to make hyperlink in latex. I am currently using LeD editor and comipling with latex. I just make the use as before. But hyperlink is not getting in final pdf. Please Help.

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

### Problems in using \hyperref

Maybe you forgot to place a \caption command? It's difficult to guess without additional information. Try the following example:
\documentclass{article}
\usepackage{hyperref}
\begin{document}

\begin{figure}
\centering
\fbox{Report 1}
\caption{Figure test}
\label{fig:report1}
\end{figure}
As you can see in Fig.~\ref{fig:report1}...

\end{document}

If it doesn't work, please post a minimal working example exhibiting your problem.
1,1,2,3,5,8,13,21,34,55,89,144,233,...

chandangiri
Posts: 20
Joined: Thu Sep 06, 2007 7:31 pm

### Re: Problems in using \hyperref

\documentclass[11pt]{report}
\begin{document}

\begin{figure}[!h]
\centering
\includegraphics[width=2.5in,height=2in]{SOCexample.eps}
\caption{An example of Core-based SOC}
\label{fig:report:1}
\end{figure}
Fig.~{\ref{fig:report:1}} shows a conceptual architecture of an SOC.\\
\end{document}
This is the code I wrote.. but not working

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

### Problems in using \hyperref

If in fact that is your actual code then of course it will not work. Try this:
\documentclass[11pt]{report}
\usepackage{graphicx}

\begin{document}

\begin{figure}[!h]
\centering
\includegraphics[width=2.5in,height=2in]{SOCexample.eps}
\caption{An example of Core-based SOC}
\label{fig:report:1}
\end{figure}

Fig.~{\ref{fig:report:1}} shows a conceptual architecture of an SOC.

\end{document}

If it doesn't work, then
1) Post the errors or warnings (if any) you get after processing the document.
2) Add \listfiles before \documentclass process the document and post the .log file.

Remark: you are using .eps files so you can't process your document using pdflatex directly. (just to make sure that this is not the cause of the problem).
Last edited by gmedina on Tue Nov 27, 2007 7:12 pm, edited 1 time in total.
1,1,2,3,5,8,13,21,34,55,89,144,233,...

chandangiri
Posts: 20
Joined: Thu Sep 06, 2007 7:31 pm

### Re: Problems in using \hyperref

I have used the \usepackage{graphicx} too. And it is not giving any problem. Pictures are displaying perfectly. Only thing is that I am not getting hyperlink corresponding to the figure as I worte. No compilation error is also giving

chandangiri
Posts: 20
Joined: Thu Sep 06, 2007 7:31 pm

### Re: Problems in using \hyperref

I am attaching the log file. Please check.
Attachments
synopsis_paper.log
This is the log file after giving \listfiles before \documentclass

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

### Problems in using \hyperref

Well, your hyperref version is not updated. You are using
hyperref.sty    2007/04/18 v6.76c Hypertext links for LaTeX

and there is a newer version
hyperref.sty    2007/11/05 v6.77c Hypertext links for LaTeX


This could be be causing the problem. One more question: how are you processing your document? I mean, do you have problems with hyperref if you generate a .dvi file, or when you generate a .ps file (using dvips) or when generating a .pdf file (using dvi2pdf, or ps2pdf)?
1,1,2,3,5,8,13,21,34,55,89,144,233,...

chandangiri
Posts: 20
Joined: Thu Sep 06, 2007 7:31 pm

### Re: Problems in using \hyperref

I will try by updating the hyperref.sty. But there is no problem in viewing the .dvi file or .pdf file. I am using the LED latex editor. No problems are giving to generate and view the corresponding file.