mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-21 23:15:52 +00:00
Org reader: set documentclass meta from LaTeX_class
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user