Org reader: allow multiple #+SUBTITLE export settings
The values of all lines are read as inlines and collected in the `subtitle` metadata field.
This commit is contained in:
parent
11dc9f84f5
commit
d17b257c89
3 changed files with 12 additions and 1 deletions
|
@ -51,7 +51,7 @@ occur.
|
|||
|
||||
Pandoc follows the LaTeX exporter in that it allows markup in
|
||||
the description. In contrast, the Org-mode HTML exporter treats
|
||||
reads the description as plain text.
|
||||
the description as plain text.
|
||||
|
||||
- LATEX_HEADER: arbitrary lines to add to the document's preamble.
|
||||
Contrary to Org-mode, these lines are not inserted before the
|
||||
|
@ -74,6 +74,9 @@ occur.
|
|||
|
||||
- SUBTITLE: the document's subtitle; fully supported.
|
||||
|
||||
The content of this option is stored as inlines in the
|
||||
`subtitle` metadata field.
|
||||
|
||||
- HTML_HEAD: arbitrary lines to add to the HTML document's head;
|
||||
fully supported.
|
||||
|
||||
|
|
|
@ -79,6 +79,7 @@ exportSettingHandlers = Map.fromList
|
|||
, ("date" , lineOfInlines `parseThen` setField "date")
|
||||
, ("description", lineOfInlines `parseThen` collectLines "description")
|
||||
, ("keywords" , lineOfInlines `parseThen` collectLines "keywords")
|
||||
, ("subtitle" , lineOfInlines `parseThen` collectLines "subtitle")
|
||||
, ("title" , lineOfInlines `parseThen` collectLines "title")
|
||||
-- LaTeX
|
||||
, ("latex_class", fmap pure anyLine `parseThen` setField "documentclass")
|
||||
|
|
|
@ -93,6 +93,13 @@ tests =
|
|||
in Pandoc meta mempty
|
||||
]
|
||||
|
||||
, "Subtitle" =:
|
||||
T.unlines [ "#+SUBTITLE: Your Life in"
|
||||
, "#+SUBTITLE: /Plain/ Text"
|
||||
] =?>
|
||||
let subtitle = "Your Life in" <> softbreak <> emph "Plain" <> " Text"
|
||||
in Pandoc (setMeta "subtitle" (toMetaValue subtitle) nullMeta) mempty
|
||||
|
||||
, "Keywords" =:
|
||||
T.unlines [ "#+KEYWORDS: pandoc, testing,"
|
||||
, "#+KEYWORDS: Org"
|
||||
|
|
Loading…
Reference in a new issue