Text Formattingcross references not hyperlinking

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
snif123
Posts: 11
Joined: Sat Apr 16, 2011 7:19 pm

cross references not hyperlinking

Post by snif123 »

Hi all,
I have been beating my head over this for a while.
I am writing a [report] in pdflatex, can't compile for all others bibtex,pdftex etc. I have crossreferenced the figures and graphs OK but I want that when I click on reference "Figure 4.5", it scrolls me to the figure referenced. How can I do this?
thanks

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10334
Joined: Mon Mar 10, 2008 9:44 pm

cross references not hyperlinking

Post by Stefan Kottwitz »

Hi,

load the hyperref package:

Code: Select all

\usepackage{hyperref}
It provides many options. If you follow the link, you will find the manual.

Stefan
LaTeX.org admin
snif123
Posts: 11
Joined: Sat Apr 16, 2011 7:19 pm

Re: cross references not hyperlinking

Post by snif123 »

Hi,
Thanks a lot,works!
One slight problem though is that it puts a red square around each of the references, how can I get rid of this? Do I have to use pdftex?I am using pdflatex
User avatar
Stefan Kottwitz
Site Admin
Posts: 10334
Joined: Mon Mar 10, 2008 9:44 pm

cross references not hyperlinking

Post by Stefan Kottwitz »

For example:

Code: Select all

\hypersetup{
    colorlinks=false,
    pdfborder={0 0 0},
}
after loading hyperref, or load it that way:

Code: Select all

\usepackage[colorlinks=false,pdfborder={0 0 0}]{hyperref}
Stefan
LaTeX.org admin
snif123
Posts: 11
Joined: Sat Apr 16, 2011 7:19 pm

Re: cross references not hyperlinking

Post by snif123 »

Thank you very much!
Everything is perfect!
User avatar
Stefan Kottwitz
Site Admin
Posts: 10334
Joined: Mon Mar 10, 2008 9:44 pm

cross references not hyperlinking

Post by Stefan Kottwitz »

A remark to your question:
snif123 wrote:Hi,
Do I have to use pdftex?I am using pdflatex
and you also mentioned BibTeX. There are
  • TeX engines, such as TeX, e-TeX, pdfTeX, XeTeX, LuaTeX, they provide the basic functionality and handle different input or output formats and fundamental features. This can mean input encoding (such as Unicode capability), output format (dvi, pdf) and advanced features (such as scripting).
  • TeX format files, extending TeX for example by LaTeX macros, which results in LaTeX, pdfLaTeX, XeLaTeX, LuaLaTeX. If you use LaTeX classes, packages and macros, you need to use one of them. Still the engine could be chosen, depending on your needs.
  • external programs, such as BibTeX and makeindex.
Some editors allow tho choose the engine, format and program for compiling without explicitely showing the difference.
snif123 wrote:Everything is perfect!
I'm glad to read that! As the topic is solved, it can be marked as solved. I did this for you now.

Stefan
LaTeX.org admin
Post Reply