Awkee / pandoc

Automatically exported from code.google.com/p/pandoc
GNU General Public License v2.0
0 stars 0 forks source link

Escaping of spaces in URL leads to problems with LaTeX #271

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Just write a URL with a space like [example](http://example.com/a space), 
convert it to latex with pandoc. 
2. If you used a customized latex preamble (not the -s option of pandoc) ensure 
that you have loaded the hyperref package.

What is the expected output? What do you see instead?
\href{http://example.com}{a space} 
The line above would work if you have written \usepackage[obeyspaces]{url} 
before loading the hyperref package (which can be done with a customized 
preamble).

Alternatively
\href{http://example.com}{a\%20space}
would have worked to.

Instead I get
\href{http://example.com}{a%20space}
Since "%" is the sign for commenting the rest of the line in latex I get an 
error.

What version of the product are you using? On what operating system?
1.5.1.1 on Kubuntu 10.

Original issue reported on code.google.com by jno...@nightlabs.de on 25 Nov 2010 at 3:20

GoogleCodeExporter commented 9 years ago
I'm not sure about 1.5.1.1, but here is the output produced by 1.6.1:

\href{http://example.com/a%20space}{example}

Even though the % is unescaped, pdflatex has no trouble with this, and the 
resulting link functions correctly.  So the href command must have special 
handling for %.

Thus, I don't see any bug yet. 

Original comment by fiddloso...@gmail.com on 27 Nov 2010 at 3:32

GoogleCodeExporter commented 9 years ago
I'm closing this, as I don't see a bug, at least in 1.6.1.
Please speak up if I'm wrong.

Original comment by fiddloso...@gmail.com on 7 Dec 2010 at 4:39