I want to pick up an hyperref with the drawback that it contains %


Is there a way to kick % out?

  • There is no need to kick something out ;-) \url should work. Welcome to TeX.SX!
    – user31729
    Apr 25, 2015 at 20:40

2 Answers 2


The macros \href and \url change the category code of % to get of its comment behavior:


But inside the argument of another macro, this will not work, because then the percent is already read as comment char, before the inner \url or \href is executed. Since the argument is already read, the category changes will come too late. Therefore hyperref also provides \% to get the percent character in the URL, e.g.:


The \url and other commands from the hyperref package take care of its input paths and the characters. So % should be no problem.





  • Sure, it works. Thanx
    – PARCB
    Apr 25, 2015 at 20:45
  • ... I have to say that it keeps reading it as a comment... I tried verbatim but is a mess
    – PARCB
    Apr 25, 2015 at 20:59
  • @LyonBuster: You did not write that it's inside a comment
    – user31729
    Apr 25, 2015 at 21:26
  • is not a comment, it was a large hyperref which have that %
    – PARCB
    Apr 25, 2015 at 21:27
  • also, \% works perfectly
    – PARCB
    Apr 25, 2015 at 21:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .