You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Text/Pandoc/Writers/LaTeX.hs dollar signs ($) are escaped by the following line:
'$'->"\\$"++ rest
This is correct for body text, where text like "$100" will be converted to the escaped form: "\$100". However, this is wrong for links that will be inside \url{} functions, because the url package performs the escaping for $ itself. Dollar signs are rare, but still valid inside URLs. Domino servers tend to rely on them in forming many URLs. For example, consider the following markdown:
This will compile with latex without showing any errors, but the final output text will be wrong. The link text will appear like this: https://10.85.1.101/baz/qux.nsf/\protect\T1\textdollarabout?OpenAbout
Proposed Change
Add the not isUrl condition to the dollar character, the same as is done for underscores, hyphens and others. Change line 209 as follows:
Looks good to me. If it's convenient to submit a pull
request with this change, that would be helpful.
+++ dwwalker [Jan 29 15 23:06 ]:
In Text/Pandoc/Writers/LaTeX.hs dollar signs ($) are escaped by the
following line:
'$' -> "$" ++ rest
This is correct for body text, where text like "$100" will be converted
to the escaped form: "$100". However, this is wrong for links that
will be inside \url{} functions, because the url package performs the
escaping for $ itself. Dollar signs are rare, but still valid inside
URLs. Domino servers tend to rely on them in forming many URLs. For
example, consider the following markdown:
In
Text/Pandoc/Writers/LaTeX.hs
dollar signs ($) are escaped by the following line:This is correct for body text, where text like "
$100
" will be converted to the escaped form: "\$100
". However, this is wrong for links that will be inside\url{}
functions, because the url package performs the escaping for$
itself. Dollar signs are rare, but still valid inside URLs. Domino servers tend to rely on them in forming many URLs. For example, consider the following markdown:This will produce the following latex:
\url{https://10.85.1.101/baz/qux.nsf/\$about?OpenAbout}
This will compile with latex without showing any errors, but the final output text will be wrong. The link text will appear like this:
https://10.85.1.101/baz/qux.nsf/\protect\T1\textdollarabout?OpenAbout
Proposed Change
Add the
not isUrl
condition to the dollar character, the same as is done for underscores, hyphens and others. Change line 209 as follows:This change has been tested with pandoc 1.13.3. and produces the desired output for URL links when converting to LaTeX.
The text was updated successfully, but these errors were encountered: