diff options
-rw-r--r-- | src/Text/Pandoc/Readers/Org/Meta.hs | 1 | ||||
-rw-r--r-- | tests/Tests/Readers/Org.hs | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/Org/Meta.hs b/src/Text/Pandoc/Readers/Org/Meta.hs index 988a18981..213e417dd 100644 --- a/src/Text/Pandoc/Readers/Org/Meta.hs +++ b/src/Text/Pandoc/Readers/Org/Meta.hs @@ -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) diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs index a3f6f73e4..2af019469 100644 --- a/tests/Tests/Readers/Org.hs +++ b/tests/Tests/Readers/Org.hs @@ -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" |