Org reader: set documentclass meta from LaTeX_class

This commit is contained in:
Albert Krewinkel
2016-08-29 14:10:57 +02:00
parent a257488343
commit 825ce8ca73
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -77,6 +77,7 @@ metaValue key =
"header-includes" -> (key,) <$> accumulatingList key metaInlines
"latex_header" -> (inclKey,) <$>
accumulatingList inclKey (metaExportSnippet "latex")
"latex_class" -> ("documentclass",) <$> metaString
_ -> (key,) <$> metaString
metaInlines :: OrgParser (F MetaValue)
+5
View File
@@ -503,6 +503,11 @@ tests =
meta = setMeta "header-includes" inclList nullMeta
in Pandoc meta mempty
, "LaTeX_class option is translated to documentclass" =:
"#+LATEX_CLASS: article" =?>
let meta = setMeta "documentclass" (MetaString "article") nullMeta
in Pandoc meta mempty
, "later meta definitions take precedence" =:
unlines [ "#+AUTHOR: this will not be used"
, "#+author: Max"