Text Formatting<a href> equivalent in TeX?

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
csmgroup
Posts: 25
Joined: Sat Jul 17, 2010 6:58 pm

<a href> equivalent in TeX?

Post by csmgroup »

I use \url{} for linking whatever necessary, and it's pretty useful. The problem is that if the link is long, it's pretty ugly.

Is there any equivalent of <a href="goody">A</a> in LaTeX? I mean, even though I show 'A' in pdf file, the user can click it to visit "goody".
Last edited by csmgroup on Tue Jul 20, 2010 1:44 am, edited 1 time in total.

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

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

<a href> equivalent in TeX?

Post by gmedina »

Hi,

try the \href command from the hyperref package. A little example:

Code: Select all

\documentclass{article}
\usepackage[breaklinks=true]{hyperref}

\begin{document}

\href{http://www.latex-community.org/}{L-C}

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

<a href> equivalent in TeX?

Post by localghost »

An according command is described in Section 4 (Additional user macros, p. 12ff) of the hyperref manual.


Thorsten
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: <a href> equivalent in TeX?

Post by frabjous »

The hyperref package provides the command \href{URL}{text}.

EDIT: Ouch. Double ninja-ed.
csmgroup
Posts: 25
Joined: Sat Jul 17, 2010 6:58 pm

Re: <a href> equivalent in TeX?

Post by csmgroup »

\href{}{} works fine with me. Thanks a lot.
Post Reply