From 5ba6c0911cb44c3a095bc3cedc51e4afa79c6b30 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Thu, 31 Dec 2009 01:15:33 +0000 Subject: Added $for$ to template system. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1720 788f1e2b-df1e-0410-8736-df70ead52e1b --- man/man1/pandoc.1.md | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'man/man1/pandoc.1.md') diff --git a/man/man1/pandoc.1.md b/man/man1/pandoc.1.md index eb8aa3fdc..dad9eb9d3 100644 --- a/man/man1/pandoc.1.md +++ b/man/man1/pandoc.1.md @@ -253,6 +253,8 @@ the string `$title$` in will be replaced by the document title. +To write a literal `$` in a template, use `$$`. + Some variables are set automatically by pandoc. These vary somewhat depending on the output format, but include: @@ -266,12 +268,10 @@ depending on the output format, but include: : body of document `title` : title of document, as specified in title block -`authors` -: authors of document, as specified in title block +`author` +: author of document, as specified in title block `date` : date of document, as specified in title block -`css` -: links to CSS files, as specified using `-c/--css` Variables may be set at the command line using the `-V/--variable` option. This allows users to include custom variables in their @@ -290,7 +290,17 @@ value; otherwise it will include `Y`. `X` and `Y` are placeholders for any valid template text, and may include interpolated variables or other conditionals. The `$else$` section may be omitted. -To write a literal `$` in a template, use `$$`. +When variables can have multiple values (for example, `author` in +a multi-author document), you can use the `$for$` keyword: + + $for(author)$ + + $endfor$ + +You can optionally specify a separator to be used between +consecutive items: + + $for(author)$$author$$sep$, $endfor$ # SEE ALSO -- cgit v1.2.3