LaTeX writer: escape # in href URLs. Closes #359.
This commit is contained in:
parent
5b3c0a1081
commit
513af8dd1b
1 changed files with 2 additions and 6 deletions
|
@ -171,12 +171,8 @@ elementToLaTeX opts (Sec level _ id' title' elements) = do
|
|||
-- escape things as needed for LaTeX
|
||||
stringToLaTeX :: Bool -> String -> String
|
||||
stringToLaTeX isUrl = escapeStringUsing latexEscapes
|
||||
where latexEscapes = backslashEscapes "{}$%&_" ++
|
||||
if isUrl
|
||||
then []
|
||||
else [ ('~', "\\ensuremath{\\sim}")
|
||||
, ('#', "\\#")
|
||||
] ++
|
||||
where latexEscapes = backslashEscapes "{}$%&_#" ++
|
||||
[ ('~', "\\ensuremath{\\sim}") | not isUrl ] ++
|
||||
[ ('^', "\\^{}")
|
||||
, ('\\', "\\textbackslash{}")
|
||||
, ('€', "\\euro{}")
|
||||
|
|
Loading…
Add table
Reference in a new issue