aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs2
-rw-r--r--src/Text/Pandoc/Readers/LaTeX/Inline.hs43
2 files changed, 40 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index 04a2ec801..c08fc0922 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -67,6 +67,7 @@ import Text.Pandoc.Readers.LaTeX.SIunitx (siunitxCommands)
import Text.Pandoc.Readers.LaTeX.Inline (acronymCommands, refCommands,
nameCommands, charCommands,
accentCommands,
+ miscCommands,
biblatexInlineCommands,
verbCommands, rawInlineOr,
listingsLanguage)
@@ -331,6 +332,7 @@ unescapeURL = T.concat . go . T.splitOn "\\"
inlineCommands :: PandocMonad m => M.Map Text (LP m Inlines)
inlineCommands = M.unions
[ accentCommands tok
+ , miscCommands
, citationCommands inline
, siunitxCommands tok
, acronymCommands
diff --git a/src/Text/Pandoc/Readers/LaTeX/Inline.hs b/src/Text/Pandoc/Readers/LaTeX/Inline.hs
index 15a1c4828..3021345b1 100644
--- a/src/Text/Pandoc/Readers/LaTeX/Inline.hs
+++ b/src/Text/Pandoc/Readers/LaTeX/Inline.hs
@@ -14,6 +14,7 @@ module Text.Pandoc.Readers.LaTeX.Inline
, verbCommands
, charCommands
, accentCommands
+ , miscCommands
, nameCommands
, biblatexInlineCommands
, refCommands
@@ -183,6 +184,43 @@ verbCommands = M.fromList
, ("Verb", doverb)
]
+miscCommands :: PandocMonad m => M.Map Text (LP m Inlines)
+miscCommands =
+ M.fromList
+ [ ("pounds", lit "£")
+ , ("euro", lit "€")
+ , ("copyright", lit "©")
+ , ("textasciicircum", lit "^")
+ , ("textasciitilde", lit "~")
+ , ("textbaht", lit "฿")
+ , ("textblank", lit "␢")
+ , ("textbigcircle", lit "○")
+ , ("textbrokenbar", lit "¦")
+ , ("textbullet", lit "•")
+ , ("textcentoldstyle", lit "¢")
+ , ("textcopyright", lit "©")
+ , ("textdagger", lit "†")
+ , ("textdegree", lit "°")
+ , ("textdollar", lit "$")
+ , ("textdong", lit "₫")
+ , ("textlira", lit "₤")
+ , ("textmu", lit "μ")
+ , ("textmusicalnote", lit "♪")
+ , ("textonehalf", lit "½")
+ , ("textonequarter", lit "¼")
+ , ("textparagraph", lit "¶")
+ , ("textpertenthousand", lit "‱")
+ , ("textpeso", lit "₱")
+ , ("textquotesingle", lit "'")
+ , ("textregistered", lit "®")
+ , ("textsection", lit "§")
+ , ("textsterling", lit "£")
+ , ("textthreequarters", lit "¾")
+ , ("textthreesuperior", lit "³")
+ , ("texttwosuperior", lit "²")
+ , ("textyen", lit "¥")
+ ]
+
accentCommands :: PandocMonad m => LP m Inlines -> M.Map Text (LP m Inlines)
accentCommands tok =
let accent = accentWith tok
@@ -198,11 +236,6 @@ accentCommands tok =
, ("AE", lit "Æ")
, ("oe", lit "œ")
, ("OE", lit "Œ")
- , ("pounds", lit "£")
- , ("euro", lit "€")
- , ("copyright", lit "©")
- , ("textasciicircum", lit "^")
- , ("textasciitilde", lit "~")
, ("H", accent '\779' Nothing) -- hungarumlaut
, ("`", accent '\768' (Just '`')) -- grave
, ("'", accent '\769' (Just '\'')) -- acute