TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When trying to create a list of weblinks using



\item \href{www.washingtonpost.com}
\item \href{www.newyorktimes.com}
\item \href{www.lemonde.fr}
\item \href{www.guardian.co.uk}
\item \href{www.spiegel.de}
\item \href{www.bbc.co.uk/news}


I run into an error stating \pdfendlink cannot be used in vertical mode. What is a better approach to achieve this, or how can I modify mine?

share|improve this question
Use \href{www.washingtonpost.com}{washington post} – Yiannis Lazarides Nov 1 '11 at 7:55
up vote 15 down vote accepted

\href takes two arguments, \href[options]{URL}{text} where the first is a full URL and the second the link text, and formats the text as normal text (see http://www.tug.org/applications/hyperref/manual.html#x1-130004 for details). So you can fix your problem by adding a full URL in the first argument and adding a second argument, i.e. \href{http://www.washingtonpost.com}{www.washingtonpost.com}.

But the easiest way to fix it may be to replace \href with \url which formats the URL in typewriter font (I've added the protocol for completeness):



\item \url{http://www.washingtonpost.com}
\item \url{http://www.newyorktimes.com}
\item \url{http://www.lemonde.fr}
\item \url{http://www.guardian.co.uk}
\item \url{http://www.spiegel.de}
\item \url{http://www.bbc.co.uk/news}

share|improve this answer
Ah, much quicker answer. You might want to add to your answer that \href formats the link as normal text, while \url uses a typewriter font. – Jake Nov 1 '11 at 8:01
@Jake Good point. Fixed. – N.N. Nov 1 '11 at 8:08
@Jake: But one can change the appearence of the \urls via \urlsytle{<option>} – Tobi Nov 1 '11 at 8:18
@Jake: It is possible to setup \href to format the link as typewriter font? – Beni Bogosel Apr 11 '12 at 20:57
@BeniBogosel: I don't think hyperref has a configuration option for this, but you could define a new command like \newcommand{\tthref}[2]{\href{#1}{\texttt{#2}}}, which will take two arguments (like \href): \tthref{<URL>}{<link text>}. – Jake Apr 11 '12 at 21:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.