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.
This commit is contained in:
John MacFarlane
2012-03-07 10:09:17 -08:00
parent 0cadc5f757
commit 8a8d4a8abc
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -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