Sorry, I missed that! For some reason I only searched for output-file.

On Mon, 25 Jul 2022 at 16:57, John MacFarlane <fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
The outputfile variable is set automatically and you can use it in your template.

However, you can't substitute the extension in the template itself; for that you need a filter.


> On Jul 25, 2022, at 1:10 AM, 'juh' via pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> wrote:
>
> Hi all,
>
> this is a very silly question but I don't find the answer in the
> documentation.
>
> Is there a filename variable that can be accessed in the templates?
>
> I have two output files: html and pdf.
>
> Can I do something like this in the output html?
>
> <a href="$filename$.pdf">Download as PDF</a>
>
> I know that I can set a metadata variable in the yaml part of the input
> file, but I would like to avoid manual setting.
>
> juh
>
> --
> Autoren-Homepage: ......... http://literatur.hasecke.com
> Satiren & Essays: ......... http://www.sudelbuch.de
> Privater Blog: ............ http://www.hasecke.eu
> Netzliteratur-Projekt: .... http://www.generationenprojekt.de
>
>
> --
> You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/Yt5QDs//8XSpI776%40odysseus.

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/BC4CAE33-E18F-405C-A6E5-C13D04542B3C%40gmail.com.

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxg6FL3rtguoR0bpvW%2BtpxoCm7JufFqJtdEoUYHqiEDhHw%40mail.gmail.com.