On Oct 11, 11:39 am, vasan...@hotmail.com wrote:
> Hi, I am a newbie.
>
> I searched for the topic and found hyperref.sty, but could neither
> understand how to put links nor how lyx works, although I managed to
> open the latex document that was generated from html inside it and
> reading its tutorial.
>
> Here is the problem:
>
> The term "link" is ambiguous. One is a url. Another is \label and \ref
> as in old latex before the modern pdflatex type docs came. My
> knowledge is strictly limited to old latex.
>
> I mean links within the document, like pdf files have where you click
> it and it goes there. Rather than create them in adobe acrobat writer,
> I want to include in my latex source so it compiles them.
>
> I also want to add colored text in my pdf files that is output since
> the original html from which I got the very readable latex had a
> colored heading.
>
> What I request from you is a small skeleton file with command example
> so that I can compile it. Also, please tell me how should I have
> searched in google to get the result if it was earlier discussed.
> Couldnt find it. Third, please explain how could I have added this in
> lyx, just navigation steps because I can self-tutor using lyx a lot if
> I can see one example.
>
> cheers and thanks for help.
>
> Vasantha
I solved the color part by lyx, ie
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{color}
\textcolor{red}{My Colored Text}}
but the clickable text problem is still there and sometimes such a
link is in the heading like inside a section title.
A simple LaTeX example would be:
\documentclass{article}
\usepackage[colorlinks,% Make things colourfull
linkcolor=red,% Internal links are red (which is the default anyway)
urlcolor=black]% URLs are black
{hyperref}
\begin{document}
\section{One\label{one}}
Some text \ref{two}
\pagebreak
\section{Two\label{two}}
Some text \ref{one}
\end{document}
Not a LyX user, so I'm not sure how to proceed there, sorry.
Joseph Wright
Thanks. this was very helpful. I saw it just as I got the clue and was
experimenting with hyperref and found the documentation at
http://www.ctan.org/tex-archive/macros/latex/contrib/hyperref/doc/manual.html
I see that \hyperref[tag]{sometext} is not really needed unless your
text is different than the tag. Otherwise, \ref{tag} can do the job.
HOPE SOMEONE EXPLAINS THIS USING LYX