0

I want to typeset this link: https://www.arm.com/company/news#t=allnews&sort=%40articledate%20descending and I get an error because of the % char. I'm wondering if there is a way or a package to do that.

\textcolor{blue}{https://www.arm.com/company/news#t=allnews&sort=%40articledate%20descending}

Thanks in advance.

  • 2
    there is an url package with an url command. – Ulrike Fischer Dec 13 '21 at 09:24
  • I'm already using the hyperref package with the url command, and it doesn't work + the suggested question does not answer mine. – Ammar Taha Dec 13 '21 at 09:31
  • Then please post some code (a minimal (non-)working example) that shows your problem. – Jasper Habicht Dec 13 '21 at 09:53
  • I have figured out a solution through the command (\href), and to skip the % char just put a () before the char in the link and it will open. – Ammar Taha Dec 13 '21 at 10:11
  • Only loading the hyperref package is not enough. You need to tell LaTeX that the next string is a URL, so either use \url{https://www.arm.com/company/news#t=allnews&sort=%40articledate%20descending} or (as link) \href{www.arm.com/company/news#t=allnews&sort=%40articledate%20descending}{the text to be linked} or something similar. – Jasper Habicht Dec 13 '21 at 10:14
  • Thanks, Jasper it worked. The proposed error was because of using the \textcolor command alongside the \url command, so I recommend setting up the href settings in the preamble for colors of links and such. – Ammar Taha Dec 13 '21 at 10:23
  • When using both, \textcolor and \url, you should place the \url macro inside. – Jasper Habicht Dec 13 '21 at 11:15

0 Answers0