ledmac icon indicating copy to clipboard operation
ledmac copied to clipboard

Compatibility with url package

Open sieversMartin opened this issue 8 years ago • 3 comments

The url package allows to use URLs without escaping LaTeX special characters, i.e. \url{https://www.ctan.org?&2#34} is a valid input.

However, when using reledmac, LaTeX complains about an ! Illegal parameter number in definition of \content. due to the # being used. A similar problem arises with % inside \url which is still interpreted as a comment by reledmac.

The output is fine, but the error is of course a bit annoying.

\documentclass{book}
\usepackage{reledmac}
\usepackage{url}

\begin{document}
This is a text\footnoteA{with a \url{https://www.ctan.org?&2#34}} and more text
\end{document}

This issue might be connected with #499

sieversMartin avatar Apr 11 '17 13:04 sieversMartin

I think that will be hard to solve this issue witthou board effect. Low priority for me. Use #.

maieul avatar Apr 11 '17 13:04 maieul

Using that, you'll get \# inside the URL as well, which is wrong. Same for \%

sieversMartin avatar Apr 11 '17 13:04 sieversMartin

Hum. I found a way that could solve this problem, but that may have boarding effect (I don't remember exactly why I write the code which cause this issue, but I know it was a complex case, and I don't want to risk to break something).

The only solution I see is to define your command which will be expanded in your footnote.

\makeatletter \begingroup @makeother# \gdef\myurl{\url{https://www.ctan.org?&2#34}} \endgroup \makeatother

and use \footnoteA{\textit\emph{s}with \emph{\textbf{s}} a \myurl}

maieul avatar Apr 11 '17 14:04 maieul