From 8a8d4a8abc4e24de814d4c610c8160033462694c Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 7 Mar 2012 10:09:17 -0800 Subject: Set mainlang variable in context writer. This parallels behavior of latex writer. Mainlang is the last of a comma-separated list of languages in lang. --- src/Text/Pandoc/Writers/ConTeXt.hs | 2 ++ templates | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Text/Pandoc/Writers/ConTeXt.hs b/src/Text/Pandoc/Writers/ConTeXt.hs index dfdf7a140..b612b9904 100644 --- a/src/Text/Pandoc/Writers/ConTeXt.hs +++ b/src/Text/Pandoc/Writers/ConTeXt.hs @@ -77,6 +77,8 @@ pandocToConTeXt options (Pandoc (Meta title authors date) blocks) = do , ("title", titletext) , ("date", datetext) ] ++ [ ("number-sections", "yes") | writerNumberSections options ] ++ + [ ("mainlang", maybe "" (reverse . takeWhile (/=',') . reverse) + (lookup "lang" $ writerVariables options)) ] ++ [ ("author", a) | a <- authorstext ] return $ if writerStandalone options then renderTemplate context $ writerTemplate options diff --git a/templates b/templates index d709b6709..7c4816983 160000 --- a/templates +++ b/templates @@ -1 +1 @@ -Subproject commit d709b6709b7ca2eef8100f5ed4779a5028f3f14f +Subproject commit 7c4816983e652dddbd15adcfffa13823adec944e -- cgit v1.2.3