aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-09-20 11:31:49 +0200
committerGitHub <noreply@github.com>2016-09-20 11:31:49 +0200
commit02e4b7da89cbf51c6de5f9ae842f76b4bd74669a (patch)
treee700628ae94fa885f7914f6e1d26b5b55a2e1903
parent9c1467e848bd7d9d45e0813716c3a4aef1964503 (diff)
parent5c4adf9270b10e017e43cd33e595dcb11bbf1828 (diff)
downloadpandoc-02e4b7da89cbf51c6de5f9ae842f76b4bd74669a.tar.gz
Merge pull request #3071 from tarleb/structured-author-doc
Put note on structured vars in separate paragraph
-rw-r--r--MANUAL.txt26
1 files changed, 19 insertions, 7 deletions
diff --git a/MANUAL.txt b/MANUAL.txt
index 96d136d19..749845416 100644
--- a/MANUAL.txt
+++ b/MANUAL.txt
@@ -2462,10 +2462,8 @@ when the field contains blank lines:
---
title: 'This is the title: it contains a colon'
author:
- - name: Author One
- affiliation: University of Somewhere
- - name: Author Two
- affiliation: University of Nowhere
+ - Author One
+ - Author Two
tags: [nothing, nothingness]
abstract: |
This is the abstract.
@@ -2480,9 +2478,23 @@ equivalent of the Markdown in the `abstract` field:
<p>This is the abstract.</p>
<p>It consists of two paragraphs.</p>
-Note: The `author` variable in the default templates expects a simple list or
-string. To use the structured authors in the example, you would need a
-custom template. For example:
+Variables can contain arbitrary YAML structures, but the template must match
+this structure. The `author` variable in the default templates expects a
+simple list or string, but can be changed to support more complicated
+structures. The following combination, for example, would add an affiliation
+to the author if one is given:
+
+ ---
+ title: The document title
+ author:
+ - name: Author One
+ affiliation: University of Somewhere
+ - name: Author Two
+ affiliation: University of Nowhere
+ ...
+
+To use the structured authors in the example above, you would need a custom
+template:
$for(author)$
$if(author.name)$