5

One major limitation of the url package is that "the argument must not contain unbalanced braces.".

However I have the problem that sometimes URLs I have to include in my document do not satisfy this rule like the following example:

http://example.org/abc?param=}

Because of the balanced braces rule you can not use:

\url{http://example.org/abc?param=}}

Neither can you escape the curly brace \url{http://example.org/abc?param=\}}.

How can this URL be used in an LaTeX document?

I need to have it clickable and I need the line-breaking behavior for long URLs.

Robert
  • 652

1 Answers1

8
\documentclass{article}
\usepackage{url}
\begin{document}

\edef\URL{http://example.org/abc?param=\string}}
\expandafter\url\expandafter{\URL}

\end{document}

enter image description here