Sujet : Re: Link in LaTeX
De : lists (at) *nospam* dickimaw-books.com (Nicola Talbot)
Groupes : comp.text.texDate : 25. Mar 2024, 19:39:47
Autres entêtes
Organisation : Dickimaw Books
Message-ID : <utsct3$17k1p$1@dont-email.me>
References : 1
User-Agent : Mozilla Thunderbird
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
-- Dickimaw BooksHome: https://www.dickimaw-books.com/Creating a LaTeX Minimal Example: https://www.dickimaw-books.com/latex/minexample/LaTeX Resources: https://www.dickimaw-books.com/latexresources.html