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.

Possible Duplicate:
Reference plain text

I want to reference an item in a description, without actually displaying the text of the specific item.

I have a description with labeled items

\begin{description}
    \item[House\label{bld:house} is a building] \hfill \\
    A house is a building...
\end{description}

And I would want to use something like this

House\ref{bld:house} is something I don't own.

So that the output looks like this

House is something I don't own.

But instead I get this

House is a building is something I don't own.

So it references the whole text within the item. How would I just have a reference with my own individual text, like in HTML (Google)?

And for some reason when I click on the reference it only jumps to the nearest section, but not exactly to the item.

share|improve this question

migrated from stackoverflow.com May 8 '12 at 1:55

This question came from our site for professional and enthusiast programmers.

marked as duplicate by Werner, lockstep, egreg, Stefan Kottwitz May 17 '12 at 10:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

add comment

2 Answers 2

I'm not sure if I understand your question correctly, but I think you are using the hyperref package to make hyperlinks in the pdf output? In that case, you can use the \hyperref command to make an HTML-style link to a label. As with HTML you need to specify what text is supposed to be clickable. Does the following code do what you intended? In my pdf viewer, evince, when I click on the word House it correctly jumps to the item in the description list.

\documentclass[11pt]{article}
\usepackage{hyperref}
\begin{document}
\begin{description}
    \item[House\label{bld:house} is a building] \hfill \\
    A house is a building...
\end{description}
\hyperref[bld:house]{House} is something I don't own.
\end{document}
share|improve this answer
add comment

It "works" for me, in the sense that the output I get is:

House is something I don't own.

Since you didn't have hyperref in your example code, I didn't load it. Perhaps what you have is come conflict with hyperref?

share|improve this answer
add comment

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