aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Writers/ConTeXt.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/ConTeXt.hs b/src/Text/Pandoc/Writers/ConTeXt.hs
index 0b754dd21..7b84eb1f5 100644
--- a/src/Text/Pandoc/Writers/ConTeXt.hs
+++ b/src/Text/Pandoc/Writers/ConTeXt.hs
@@ -15,7 +15,7 @@ Conversion of 'Pandoc' format into ConTeXt.
module Text.Pandoc.Writers.ConTeXt ( writeConTeXt ) where
import Prelude
import Control.Monad.State.Strict
-import Data.Char (ord, isDigit)
+import Data.Char (ord, isDigit, toLower)
import Data.List (intercalate, intersperse)
import Data.Maybe (mapMaybe)
import Data.Text (Text)
@@ -93,6 +93,9 @@ pandocToConTeXt options (Pandoc meta blocks) = do
Just (('a':d:ds) :: String)
| all isDigit (d:ds) -> resetField "papersize"
(('A':d:ds) :: String)
+ _ -> id)
+ $ (case toLower <$> lookupMetaString "pdfa" meta of
+ "true" -> resetField "pdfa" ("1b:2005" :: String)
_ -> id) metadata
let context' = defField "context-dir" (toContextDir
$ getField "dir" context) context