parent
ae52918faa
commit
5344dab8eb
3 changed files with 10 additions and 1 deletions
|
@ -22,7 +22,8 @@ The following export keywords are supported:
|
||||||
- EMAIL: author email address; passed as plain-text metadata
|
- EMAIL: author email address; passed as plain-text metadata
|
||||||
field `email`, but not used by any default templates.
|
field `email`, but not used by any default templates.
|
||||||
|
|
||||||
- LANGUAGE: currently unsupported; use `#+LANG:` instead.
|
- LANGUAGE: document language; included as plain-text metadata
|
||||||
|
field `lang`. The value should be a [BCP47 language tag].
|
||||||
|
|
||||||
- SELECT_TAGS: tags which select a tree for export. Currently
|
- SELECT_TAGS: tags which select a tree for export. Currently
|
||||||
*unsupported*.
|
*unsupported*.
|
||||||
|
@ -36,6 +37,8 @@ The following export keywords are supported:
|
||||||
defaults to stdout unless a target has to be given as a command
|
defaults to stdout unless a target has to be given as a command
|
||||||
line option.
|
line option.
|
||||||
|
|
||||||
|
[BCP47 language tag]: https://tools.ietf.org/html/bcp47
|
||||||
|
|
||||||
Format-specific options
|
Format-specific options
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
|
|
|
@ -93,6 +93,8 @@ keywordHandlers = Map.fromList
|
||||||
, "institute" ~~> lineOfInlines `parseThen` collectLines "institute"
|
, "institute" ~~> lineOfInlines `parseThen` collectLines "institute"
|
||||||
-- topic keywords
|
-- topic keywords
|
||||||
, "keywords" ~~> lineOfInlines `parseThen` collectLines "keywords"
|
, "keywords" ~~> lineOfInlines `parseThen` collectLines "keywords"
|
||||||
|
-- document language
|
||||||
|
, "language" ~~> fmap pure anyLine `parseThen` B.setMeta "lang"
|
||||||
-- LaTeX-specific export settings
|
-- LaTeX-specific export settings
|
||||||
, "latex_class" ~~> fmap pure anyLine `parseThen` B.setMeta "documentclass"
|
, "latex_class" ~~> fmap pure anyLine `parseThen` B.setMeta "documentclass"
|
||||||
, "latex_class_options" ~~>
|
, "latex_class_options" ~~>
|
||||||
|
|
|
@ -112,6 +112,10 @@ tests =
|
||||||
"#+institute: ACME Inc." =?>
|
"#+institute: ACME Inc." =?>
|
||||||
Pandoc (setMeta "institute" ("ACME Inc." :: Inlines) nullMeta) mempty
|
Pandoc (setMeta "institute" ("ACME Inc." :: Inlines) nullMeta) mempty
|
||||||
|
|
||||||
|
, "Document language" =:
|
||||||
|
"#+LANGUAGE: de-DE" =?>
|
||||||
|
Pandoc (setMeta "lang" (MetaString "de-DE") nullMeta) mempty
|
||||||
|
|
||||||
, testGroup "LaTeX"
|
, testGroup "LaTeX"
|
||||||
[ "LATEX_HEADER" =:
|
[ "LATEX_HEADER" =:
|
||||||
"#+latex_header: \\usepackage{tikz}" =?>
|
"#+latex_header: \\usepackage{tikz}" =?>
|
||||||
|
|
Loading…
Reference in a new issue