Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a list

\begin{enumerate}
\item This is the first post
\item This is the second post
\end{enumerated}

And I want to add hyperlinks to the numberings within a box.

The simplest approach can be using my own numbering (using a counter, or manually)

\boxed{ \href{www.google.com}{1} } This is the first post
\boxed{ \href{www.google.com}{2} } This is the first post

But with this structure, I lost the indentation that "enumerate" presents. How can I preserve the indentation

enter image description here

share|improve this question
    
With an enumerated environment, you can assign \labels to individual items and cross-reference them elsewhere via \ref statements. And, if hyperref is loaded these cross-references will be made into hyperlink targets automatically. –  Mico Aug 18 '13 at 8:08

1 Answer 1

up vote 1 down vote accepted

If I got your problem right, this works for me:

\documentclass{article}

\usepackage{amsmath}
\usepackage{hyperref}

\begin{document}

\begin{enumerate}
\item This is the first post
\item[\boxed{\href{www.google.com}{2}}] This is the second post
\end{enumerate}

\end{document}
share|improve this answer

Your Answer

 
discard

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.