LaTeX writer: Don't escape underscore in labels.

Previously they were escaped as ux5f.

Closes #2921.
This commit is contained in:
John MacFarlane 2016-05-17 09:18:52 -07:00
parent ad669e486e
commit 7be30a40f1

View file

@ -310,7 +310,7 @@ toLabel z = go `fmap` stringToLaTeX URLString z
where go [] = ""
go (x:xs)
| (isLetter x || isDigit x) && isAscii x = x:go xs
| elem x ("-+=:;." :: String) = x:go xs
| elem x ("_-+=:;." :: String) = x:go xs
| otherwise = "ux" ++ printf "%x" (ord x) ++ go xs
-- | Puts contents into LaTeX command.