mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-24 15:44:59 +08:00
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:
@@ -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
|
||||
|
||||
+1
-1
Submodule templates updated: d709b6709b...7c4816983e
Reference in New Issue
Block a user