From: William Lupton <wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: filename variable
Date: Mon, 25 Jul 2022 09:43:11 +0100 [thread overview]
Message-ID: <CAEe_xxjZ8wNK068AP-gtieFKk+5iD1b4BLJ7iS6WuG8o-667tA@mail.gmail.com> (raw)
In-Reply-To: <Yt5QDs//8XSpI776@odysseus>
[-- Attachment #1: Type: text/plain, Size: 1856 bytes --]
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?
>
> <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-/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.
[-- Attachment #2: Type: text/html, Size: 3155 bytes --]
next prev parent reply other threads:[~2022-07-25 8:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-25 8:10 'juh' via pandoc-discuss
2022-07-25 8:43 ` William Lupton [this message]
[not found] ` <CAEe_xxjZ8wNK068AP-gtieFKk+5iD1b4BLJ7iS6WuG8o-667tA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-07-25 12:33 ` 'Jan Ulrich Hasecke' via pandoc-discuss
[not found] ` <e0252aa7-3e87-6381-a1a9-4f67acf7fbce-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
2022-07-25 12:55 ` William Lupton
[not found] ` <CAEe_xxjdkVBoGTUXRPUgnGXEYAf0JZbAabEWjr=wNGq6joD4wg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-07-25 12:57 ` William Lupton
[not found] ` <CAEe_xxgM8dPsst5ceKWDfhb0BrR4gNVHC+=ZFTatRHtqrfiG3Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-07-25 15:05 ` 'Jan Ulrich Hasecke' via pandoc-discuss
2022-07-25 15:56 ` John MacFarlane
[not found] ` <BC4CAE33-E18F-405C-A6E5-C13D04542B3C-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2022-07-25 16:43 ` William Lupton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAEe_xxjZ8wNK068AP-gtieFKk+5iD1b4BLJ7iS6WuG8o-667tA@mail.gmail.com \
--to=wlupton-qst+ys/numyeuisrzh9sikb+6bgklq7r@public.gmane.org \
--cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).