diff options
| author | John MacFarlane <[email protected]> | 2024-12-19 10:17:58 -0800 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2024-12-19 10:20:22 -0800 |
| commit | df0d3fb78cd5d0457c791bbd3b132dd284bfe49c (patch) | |
| tree | a97b288cc265b9601181ae61479534522dc79f6a /MANUAL.txt | |
| parent | d0b652491a10a7b64e1939108005429cfbeb0e3b (diff) | |
Change `--template` to allow use of extensionless templates.
The intent is to allow bash process substitution: e.g.,
`--template <(echo "foo")`.
Previously pandoc *always* added an extension based on the
output format, which caused problems with the absolute filenames
used by bash process substitution (e.g. `/dev/fd/11`).
Now, if the template has no extension, pandoc will first
try to find it without the extension, and then add the
extension if it can't be found.
So, in general, extensionless templates can now be used.
But this has been implemented in a way that should not cause
problems for existing uses, unless you are using a template
`NAME.FORMAT` but happen to have an extensionless file `NAME` in
the template search path.
Closes #5270.
Diffstat (limited to 'MANUAL.txt')
| -rw-r--r-- | MANUAL.txt | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/MANUAL.txt b/MANUAL.txt index 14ea6e216..c6770da04 100644 --- a/MANUAL.txt +++ b/MANUAL.txt @@ -761,14 +761,16 @@ header when requesting a document from a URL: `--template=`*FILE*|*URL* : Use the specified file as a custom template for the generated document. - Implies `--standalone`. See [Templates], below, for a description - of template syntax. If no extension is specified, an extension - corresponding to the writer will be added, so that `--template=special` - looks for `special.html` for HTML output. If the template is not - found, pandoc will search for it in the `templates` subdirectory of - the user data directory (see `--data-dir`). If this option is not used, - a default template appropriate for the output format will be used (see - `-D/--print-default-template`). + Implies `--standalone`. See [Templates], below, for a + description of template syntax. If the template is not found, + pandoc will search for it in the `templates` subdirectory of + the user data directory (see `--data-dir`). If no extension + is specified and an extensionless template is not found, + pandoc will look for a template with an extension + corresponding to the writer, so that `--template=special` + looks for `special.html` for HTML output. If this option is + not used, a default template appropriate for the output + format will be used (see `-D/--print-default-template`). `-V` *KEY*[`=`*VAL*], `--variable=`*KEY*[`:`*VAL*] |
