Sujet : Re: Link in LaTeX
De : dieterhansbritz (at) *nospam* gmail.com (db)
Groupes : comp.text.texDate : 26. Mar 2024, 09:43:12
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <utu1r0$1n4l7$1@dont-email.me>
References : 1 2
User-Agent : Pan/0.149 (Bellevue; 4c157ba)
On Mon, 25 Mar 2024 17:39:47 +0000, Nicola Talbot wrote:
On 25/03/2024 15:49, db wrote:
I want to present a link to a pdf file in a pdf. In the LaTeX body I
have http://www.dieterbritz.dk/bla.pdf but I want this to be a link. I
tried href, adding the package hyperref, and that hides the link text,
and puts a red frame around each line in the Contents section for some
reason.
A red frame is the default behaviour and each line in the table of
contents is a hyperlink when hyperref is loaded.
I also tried framing the link text with \ url{...} but that didn't
work.
So, how do I display the link text and make it a link that can be
clicked on to get to the pdf?
Try
\documentclass{article}
\usepackage{hyperref}
\hypersetup{colorlinks}% colour the link text % or
\hypersetup{hidelinks}% links the same colour as surrounding text
\begin{document}
\tableofcontents \section{Sample}
\href{http://www.dieterbritz.dk/bla.pdf}{Link to PDF} \end{document}
Regards Nicola Talbot
Great, thanks. Now, how to make the text "Link to PDF"
look like a link, e.g. colour it blue?