mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-19 02:22:09 +08:00
LaTeX reader and writer: add support for soft hypens
The `\-` command is parsed as a soft hyphen character; likewise, the character is written as that command when outputting LaTeX.
This commit is contained in:
committed by
John MacFarlane
parent
0b140a9a98
commit
48e59436ec
@@ -281,6 +281,7 @@ charCommands = M.fromList
|
||||
, ("_", lit "_")
|
||||
, ("{", lit "{")
|
||||
, ("}", lit "}")
|
||||
, ("-", lit "\x00ad") -- soft hyphen
|
||||
, ("qed", lit "\a0\x25FB")
|
||||
, ("lq", return (str "‘"))
|
||||
, ("rq", return (str "’"))
|
||||
|
||||
@@ -134,6 +134,7 @@ stringToLaTeX context zs = do
|
||||
']' -> emits "{]}" -- optional arguments
|
||||
'\'' -> emitcseq "\\textquotesingle"
|
||||
'\160' -> emits "~"
|
||||
'\x00AD' -> emits "\\-" -- shy hyphen
|
||||
'\x200B' -> emits "\\hspace{0pt}" -- zero-width space
|
||||
'\x202F' -> emits "\\,"
|
||||
'\x2026' | ligatures -> emitcseq "\\ldots"
|
||||
|
||||
Reference in New Issue
Block a user