git.iko.soy/typeable/pandoc
on master help sign in
Merge pull request #3071 from tarleb/structured-author-doc

Put note on structured vars in separate paragraph

commit02e4b7da89cbf51c6de5f9ae842f76b4bd74669a authorJohn MacFarlane <jgm@berkeley.edu> dateTue 20 Sep 2016, 11:31 (10 years ago) parent9c1467e5c4adf9
1 file changed+19−7
MANUAL.txt+19−7
MANUAL.txt+19−7
@@ -2462,10 +2462,8 @@ when the field contains blank lines:
24622462 ---
24632463 title: 'This is the title: it contains a colon'
24642464 author:
2465− - name: Author One
2466− affiliation: University of Somewhere
2467− - name: Author Two
2468− affiliation: University of Nowhere
2465+ - Author One
2466+ - Author Two
24692467 tags: [nothing, nothingness]
24702468 abstract: |
24712469 This is the abstract.
@@ -2480,9 +2478,23 @@ equivalent of the Markdown in the `abstract` field:
24802478 <p>This is the abstract.</p>
24812479 <p>It consists of two paragraphs.</p>
24822480
2483−Note: The `author` variable in the default templates expects a simple list or
2484−string. To use the structured authors in the example, you would need a
2485−custom template. For example:
2481+Variables can contain arbitrary YAML structures, but the template must match
2482+this structure. The `author` variable in the default templates expects a
2483+simple list or string, but can be changed to support more complicated
2484+structures. The following combination, for example, would add an affiliation
2485+to the author if one is given:
2486+
2487+ ---
2488+ title: The document title
2489+ author:
2490+ - name: Author One
2491+ affiliation: University of Somewhere
2492+ - name: Author Two
2493+ affiliation: University of Nowhere
2494+ ...
2495+
2496+To use the structured authors in the example above, you would need a custom
2497+template:
24862498
24872499 $for(author)$
24882500 $if(author.name)$