summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/LaTeX.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-06-28 15:07:35 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2017-06-28 15:07:35 +0200
commit2902260b636b36134c0157e32291900603e1011d (patch)
tree288bb78df1e2d472c3f5a33149e4df84622058ed /src/Text/Pandoc/Writers/LaTeX.hs
parent7ea49da0021c38579cd7080aec44ab4b1b7b1111 (diff)
Make `papersize: a4` work regardless of the case of `a4`.
It is converted to `a4` in LaTeX and `A4` in ConTeXt.
Diffstat (limited to 'src/Text/Pandoc/Writers/LaTeX.hs')
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index 07ddddcb0..55ecda819 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -256,6 +256,10 @@ pandocToLaTeX options (Pandoc meta blocks) = do
else defField "dir" ("ltr" :: String)) $
defField "section-titles" True $
defField "geometry" geometryFromMargins $
+ (case getField "papersize" metadata of
+ Just ("A4" :: String) -> resetField "papersize"
+ ("a4" :: String)
+ _ -> id) $
metadata
let context' =
-- note: lang is used in some conditionals in the template,