0

my url's are to long. I want to trim them. I used /url{long url}. I found the /href{long url}{Description}, but the href looks different (no monospace font). How can i adapt the /url style to the /href style? Or is there a better alternative?

Thanks

Andreas

1

The \nolinkurl command typesets an URL without creating a link and with \href you can create the link. Combined, this is

\documentclass{article}
\usepackage{hyperref}

\begin{document}
    % Original version:
    \url{http://www.myverylongurl.org/some/subpage}

    % Shortened URL:
    \href{http://www.myverylongurl.org/some/subpage}{\nolinkurl{http://www.myverylongurl.org/}}
\end{document}

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.