I'm not sure if there's an existing template variable for this (I don't see one) but I think that this lua filter will work: function Pandoc(pandoc) pandoc.meta.output_file = PANDOC_STATE.output_file return pandoc end On Mon, 25 Jul 2022 at 09:11, '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? > > Download as PDF > > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxjZ8wNK068AP-gtieFKk%2B5iD1b4BLJ7iS6WuG8o-667tA%40mail.gmail.com.