aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Dunning <andunning@gmail.com>2017-09-08 22:17:31 +0100
committerAndrew Dunning <andunning@gmail.com>2017-09-08 22:26:32 +0100
commit621e43e0ec2d0ee81436c01256d994a514d9824c (patch)
tree59afad3a384183053d016ca100ac16005e8be14c /src
parent3421f3eac71709566b9072e095048619cf813ace (diff)
downloadpandoc-621e43e0ec2d0ee81436c01256d994a514d9824c.tar.gz
Write euro symbol directly in LaTeX
The textcomp package allows pdfLaTeX to parse `€` directly, making the \euro command unneeded. Closes #3801.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index 2da087077..282910ee5 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -82,7 +82,6 @@ data WriterState =
, stHighlighting :: Bool -- true if document has highlighted code
, stIncremental :: Bool -- true if beamer lists should be displayed bit by bit
, stInternalLinks :: [String] -- list of internal link targets
- , stUsesEuro :: Bool -- true if euro symbol used
, stBeamer :: Bool -- produce beamer
, stEmptyLine :: Bool -- true if no content on line
}
@@ -111,7 +110,6 @@ startingState options = WriterState {
, stHighlighting = False
, stIncremental = writerIncremental options
, stInternalLinks = []
- , stUsesEuro = False
, stBeamer = False
, stEmptyLine = True }
@@ -233,7 +231,6 @@ pandocToLaTeX options (Pandoc meta blocks) = do
defField "lhs" (stLHS st) $
defField "graphics" (stGraphics st) $
defField "book-class" (stBook st) $
- defField "euro" (stUsesEuro st) $
defField "listings" (writerListings options || stLHS st) $
defField "beamer" beamer $
(if stHighlighting st
@@ -320,11 +317,8 @@ stringToLaTeX ctx (x:xs) = do
rest <- stringToLaTeX ctx xs
let ligatures = isEnabled Ext_smart opts && ctx == TextString
let isUrl = ctx == URLString
- when (x == '€') $
- modify $ \st -> st{ stUsesEuro = True }
return $
case x of
- '€' -> "\\euro{}" ++ rest
'{' -> "\\{" ++ rest
'}' -> "\\}" ++ rest
'`' | ctx == CodeString -> "\\textasciigrave{}" ++ rest