From 87ab01637e1dc0f583277828bc458567a72e38ce Mon Sep 17 00:00:00 2001
From: John MacFarlane <jgm@berkeley.edu>
Date: Mon, 23 Jun 2014 12:51:10 -0700
Subject: LaTeX writer: Use `\textquotesingle` for `'` in inline code.

Otherwise we get curly quotes in the PDF output.
Closes #1364.
---
 src/Text/Pandoc/Writers/LaTeX.hs | 1 +
 1 file changed, 1 insertion(+)

(limited to 'src')

diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index f2f7438c4..100bf900d 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -220,6 +220,7 @@ stringToLaTeX  ctx (x:xs) = do
        '>' -> "\\textgreater{}" ++ rest
        '[' -> "{[}" ++ rest  -- to avoid interpretation as
        ']' -> "{]}" ++ rest  -- optional arguments
+       '\'' | ctx == CodeString -> "\\textquotesingle{}" ++ rest
        '\160' -> "~" ++ rest
        '\x2026' -> "\\ldots{}" ++ rest
        '\x2018' | ligatures -> "`" ++ rest
-- 
cgit v1.2.3