Closed maparent closed 11 years ago
Can you send me an example URL that doesn't work?
http://example.com/what%is
works just fine.
Sorry I dropped the ball on this.
This is an example with your URL.
Latex Input: mmd-article-header
Latex Input: mmd-article-begin-doc
This is a test with a footnote[^fn] and [a url](http://example.com/what%is).
[^fn]: This is the footnote with the [same url](http://example.com/what%is).
Here is the resulting .tex file with (github tip) stock multimarkdown -t latex
\input{mmd-article-header}
\input{mmd-article-begin-doc}
This is a test with a footnote\footnote{This is the footnote with the \href{http://example.com/what%is}{same url}\footnote{\href{http://example.com/what\%is}{http:/\slash example.com\slash what\%is}}.} and \href{http://example.com/what%is}{a url}\footnote{\href{http://example.com/what\%is}{http:/\slash example.com\slash what\%is}}.
\end{document}
The first usage of the URL works just fine, as you pointed out; but the one inside the footnote confuses latex. Applying pdflatex to this tex file fails thus:
Runaway argument?
{This is the footnote with the \href {http://example.com/what\end {do\ETC.
! File ended while scanning use of \@footnotetext.
<inserted text>
\par
This problem is solved by my patch. I hope this is clearer.
Can you see if this works properly in MMD-4? I'm still not clear on what you believe the proper output to be. I don't get any failures to parse either way, and none of the links with a "%" in them seem active in PDFs viewed in the "Preview" app.
OK... first I cannot reproduce my bug, i.e. I get exactly the same behaviour as you do. Might be due to updates to pdflatex on both our machines.
To be clearer than I was: my patch changes the output so that both instances of \href{http://example.com/what%is}
became \href{http://example.com/what\%is}
, which used to make a difference to parsing.
I do not remember whether the links used to work, I was more worried about parsing and printing.
I am fine with the bug being closed at this point.
If it comes up again, let me know.
Thanks for the reply.
F-
Multimarkdown quotes the URL in the footnote; if the URL contains a % (among others) we get a % in a href in a footnote, which is known to cause issues: http://tex.stackexchange.com/questions/12855/getting-those-signs-in-the-footnote The easy solution is to add bigfoot, but it does not play nice with babel. The more annoying solution is to escape those characters: %#!^&
Here is simple code to do so: