diff options
author | Karl Pettersson <klpn1258@gmail.com> | 2019-07-15 20:55:04 +0200 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-07-15 11:55:04 -0700 |
commit | 5303791bc4a9d5233a60e6bc84f2fb773c9c8e4e (patch) | |
tree | f974f266dfcc6bbe8cea554629638be277bbf380 /src | |
parent | 680d7b515f2467a74c508c3c26281eead9af6e7a (diff) | |
download | pandoc-5303791bc4a9d5233a60e6bc84f2fb773c9c8e4e.tar.gz |
Customizable type of PDF/A for the ConTeXt writer (issue #5608) (#5610)
* Let the user choose type of PDF/A generated with ConTeXt (closes #5608)
* Updated ConTeXt test documents for changes in tagging
* Updated color profile settings in accordance with ConTeXt wiki
* Made ICC profile and output intent for PDF/A customizable
* Read pdfa variable from meta (and updated manual)
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Writers/ConTeXt.hs | 5 |
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 |