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'm currently developing a doclet which translates javadoc to LaTeX.

I'm compiling the LaTeX document using pdflatex with a sty file I have from my school it generates a PDF document with links (red box) for all references this means that a I don't need the chapter.section representation
I'm generating a label for example

\label{com.domain.package.Class}

when I reference it I get something like 5.1.

How can I change it ?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

It depends on what you exactly want. The nameref package (comes with hyperref) provides \nameref which gives the reference name instead of the number, e.g. the section title not the section number. There is also \autoref (hyperref package) which gives e.g. "Section 5.1".

For arbitrary link texts I would recommend to use \hypertarget and \hyperlink (both from hyperref) instead of \label and \ref.

There is also the zref package (written by the hyperref author) which gives you a lot of advanced cross-referencing options. See also the TeX FAQ Referring to things by their name.

share|improve this answer
    
Thanks \hyperref[label]{text} solved the problem –  sherif Apr 9 '11 at 20:23

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.