I know I can use the package hyperref for urls, but I want is to create a definition that uses this and assigns a color, for example


would write Something in crimson color linked to the url (and assume default urls aren't in crimson)

  • 2
    what about \usepackage[colorlinks=true,urlcolor=magenta]{hyperref} and \href{http://www.myurl.com}{something} ? – ebosi Apr 6 '16 at 7:47

You can use hyperref options, and locally modify it when needed.




    Here is \href{http://www.myurl.com}{my link}.

    Here is \myhref{http://www.myurl.com}{my special link}.

    And here,  \href{http://www.myurl.com}{another normal link}.

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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