@@ -1074,6 +1074,22 @@ Some variables are set automatically by pandoc. These vary somewhat
10741074depending on the output format, but include metadata fields as well
10751075as the following:
10761076
1077+`sourcefile`, `outputfile`
1078+: source and destination filenames, as given on the command line.
1079+ `sourcefile` can also be a list if input comes from multiple files, or empty
1080+ if input is from stdin. You can use the following snippet in your template
1081+ to distinguish them:
1082+
1083+ $if(sourcefile)$
1084+ $for(sourcefile)$
1085+ $sourcefile$
1086+ $endfor$
1087+ $else$
1088+ (stdin)
1089+ $endif$
1090+
1091+ Similarly, `outputfile` can be `-` if output goes to the terminal.
1092+
10771093`title`, `author`, `date`
10781094: allow identification of basic aspects of the document. Included
10791095 in PDF metadata through LaTeX and ConTeXt. These can be set