From 5c4adf9270b10e017e43cd33e595dcb11bbf1828 Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Mon, 15 Aug 2016 15:46:17 +0200 Subject: Put note on structured vars in separate paragraph Make it clearer that structured author variables require a custom template. Many thanks to John Muccigrosso (@Jmuccigr) for his help in addressing this issue. This supersedes and closes #2148. --- MANUAL.txt | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/MANUAL.txt b/MANUAL.txt index 2177cf926..2571b7ae0 100644 --- a/MANUAL.txt +++ b/MANUAL.txt @@ -2461,10 +2461,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. @@ -2479,9 +2477,23 @@ equivalent of the Markdown in the `abstract` field:

This is the abstract.

It consists of two paragraphs.

-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)$ -- cgit v1.2.3