From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31085 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: William Lupton Newsgroups: gmane.text.pandoc Subject: Re: filename variable Date: Mon, 25 Jul 2022 09:43:11 +0100 Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000282b0705e49d2dd2" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20187"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCS4HJ6WSAHBBK5P7GLAMGQEKSA4ZRY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Jul 25 10:43:28 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oa1-f64.google.com ([209.85.160.64]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oFtgU-00054m-SK for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 25 Jul 2022 10:43:26 +0200 Original-Received: by mail-oa1-f64.google.com with SMTP id 586e51a60fabf-101be2b197dsf5824219fac.4 for ; Mon, 25 Jul 2022 01:43:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1658738605; cv=pass; d=google.com; s=arc-20160816; b=cUQ3GyxKyADvZ/bDssMVBL4XJjwi/WaEmdv2ICwNC5E4giGr6OZ3Wf2Vm3NXTk1Eui BU55VKhkapYnoUOlGxMmQCBcew5TRzXYcU++SYQwa2QxZZfuvKIv9mZTCu0/+dn3R9Pj 6u5BEKuglKn0vZljcwrbt1gQY6v8iXTV2uCKiY2YWdoUz2VoAE7pqABUESfGxo9H2s1O GIxd9/gIKCuy/57gczidtBukgJsZgIFNPqtX/t3ZAEFdvI98AxRkxQ4H7hDStfnqEccM XXO3xiAWzkp5gxZDwaopDF271qMIsaLRb7L26GM6KBtqQdtuID36ro9zktC/GBylNn3h 7flQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date :from:in-reply-to:references:mime-version:sender:dkim-signature; bh=r9aT1OUE+MLzCuaMc56luTA1OkepSuacLduhrAdlVfM=; b=jMeA5pU9AsIuTZLmb2MVfSFX+Kiz1L5Ag6eE7XGz0UUuoapkUHlJQdokgR9hIJ+TOy 5QmCz2ifsm2y9qdR0NrVa1JPSFlwPNvLkomvcEdP1fp1Jlm4znRmkK7IxnKshb/zNos2 BBeatYF8QK34fkh8+IRJX7GPe1oi/YjCZe3wf/1pB3wNe8Difhi3DUPOZIMa7aOaOsOx 7wNRC2vgfYOmyAKAhIHQhrOR3eED3xo6oGGh1nvDI0BpD7fTwE+mdyk9XacKN4I2hyTk iHVBkqv8+1hA+QQG1/N7QqwfdK6ogW2HG6+MRUsr6IdxR5+/FD325PC/JqNMzzWChQN/ plZA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@broadband-forum-org.20210112.gappssmtp.com header.s=20210112 header.b="pXZxvdM/"; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2607:f8b0:4864:20::112f as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:mime-version:references:in-reply-to:from:date:message-id :subject:to:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=r9aT1OUE+MLzCuaMc56luTA1OkepSuacLduhrAdlVfM=; b=T56Ll6U7ayN+icmNQy6YFEzecrRm6P+LRHsNEIUHWmp5LUgahCV7+aEoFAMHbjbBuG y2Q4Wmaf5cMuzdoXGGKqz2+69Z6IVd73v2OtD4/wYV/KmRsUhtaT39k0kfR9OJG2OGfn k9g26jKHtUFTj5n3nyg2ddCaPpsb8CI/6IUf9SUMVBMcsT2JJYJdJ9+9aKd5gbizXXs1 VXc2PmAcr3OEQzz5OMfk90LNTfvlBHhVTUzDAQqc17wXN5Vp1ebtdFbvru4Qk8f+ESL5 fId9eeKWE5qwaddvQ7VNZgagmJRKmU6kekYa5c3/PUaguRsA+V1zrlhwP5wEAYieYVx/ rStQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:mime-version:references:in-reply-to:from :date:message-id:subject:to:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=r9aT1OUE+MLzCuaMc56luTA1OkepSuacLduhrAdlVfM=; b=GMnUSp2v1vhsjs6q/aUTUikzAQqAgVzKtnk3s7NnUY9sooiLdYuKWdi5UuJTZEX3EQ DEUpY8WQZnvx8RnHjwevQi82n8are2JuzNl9gW1MO1jaS+IeIVzrBXj/TxE+myRodNKj EMyqNATImjTjT5LoQc3qGSsOjSqBrbluwhKgYOaZSe6GK5d1nL2ySVPckTj7Nq8V64cT Jwc4seEUJsEkWbRdgv9zHFIJhsK4rT7u3HISK3CcV4AGsEr2ZainJV9mfSfUcpu5bXCR PPnlRXt594Koyo/PZq124LYJoPuxlXQlmwRfih2+E5ihEQsHMJhiI+8exjEps1PYP/xj jJGA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AJIora9d7Ead6ZLo0MZwDuhX2YyA85CneIHUHns0sl9/go3AwDslHFFY atfoCSO7w+1jU36zikUY36E= X-Google-Smtp-Source: AGRyM1s6trVme/bmNwtEZjyxiClrlKOSF/aP0hUGFoQxU/NwzmQ5XibfQQ92Rt855gCd46evqXQ4NQ== X-Received: by 2002:a9d:76ce:0:b0:61c:2581:639a with SMTP id p14-20020a9d76ce000000b0061c2581639amr4247344otl.286.1658738605722; Mon, 25 Jul 2022 01:43:25 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:5b11:b0:10c:d7f5:f6bc with SMTP id ds17-20020a0568705b1100b0010cd7f5f6bcls1505833oab.5.-pod-prod-gmail; Mon, 25 Jul 2022 01:43:22 -0700 (PDT) X-Received: by 2002:a05:6870:ea87:b0:101:71d1:600a with SMTP id s7-20020a056870ea8700b0010171d1600amr12895441oap.264.1658738602774; Mon, 25 Jul 2022 01:43:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658738602; cv=none; d=google.com; s=arc-20160816; b=GH6PTBVv/jioDFEOFUdDQorGtbO/Ggflf39vUjvAxr3CKNsDHOCK+qKpqlZWxHjDBq vuyyTwoFoXxboE/F265nzXiNoZZ7k5wFvmtY+nOvZHkiOkG8eOHNw7qZiU+eaAM7HHof 5jLaK0Gcy6MnjenFHlcaqXC6s3+Ybc08Ok8E7dNPskvFfy+PBgl9bGQM9zeUXY2kMEyg 09WKphJKgLLBKHvO5/VIjaX9IKIrnNNsB3Ez6i9NrXnOi/sd4V7GOO0i+QNG7WlfVjEN aHpsSYeHsmpiaZnb323xyckyTEC70DWpivHQKl8+3ZxUyBwX7Vbg433NxNRJdKnB+E0e N8VA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=N37AEuo6buKstIVgYbofwVcsO05SGN8jb6oByPHOXmY=; b=ODwRG6uG8Tlwjo+n31W8NIFqZBgUEKnNQcg19ewofxxF0dXEk1Nl3yxO70C5MEtK/f /j2tDS6oyihKjiZ/UA1f91zLW7AxWkVjHxAzGaPx5AAaSaqJ1bwV7tpcN8i2gagj6J8E Fqc/9oTHTAL3JcNfwYD0+jmKCzaZIgsXsu4Wv0mQTpjkszpiA8JbmPcoSA84ik6YvEYD MYVLzUpaDGSaZBSYg6BS6cYaUIPfMxdW7Vz0rlj2zULhzy+jVDCKDIBtb6zGOKEaJc2t e/RNu5We0eZoKDuvyBZxPsImkReUIfk7wMo6qG70RoKPTt/PJ3WTWMNm1vhRvKhEi7gG Oilg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@broadband-forum-org.20210112.gappssmtp.com header.s=20210112 header.b="pXZxvdM/"; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2607:f8b0:4864:20::112f as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org Original-Received: from mail-yw1-x112f.google.com (mail-yw1-x112f.google.com. [2607:f8b0:4864:20::112f]) by gmr-mx.google.com with ESMTPS id d14-20020a4aeb8e000000b0035e8a81e5fcsi517401ooj.2.2022.07.25.01.43.22 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Jul 2022 01:43:22 -0700 (PDT) Received-SPF: pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2607:f8b0:4864:20::112f as permitted sender) client-ip=2607:f8b0:4864:20::112f; Original-Received: by mail-yw1-x112f.google.com with SMTP id 00721157ae682-2ef5380669cso101709927b3.9 for ; Mon, 25 Jul 2022 01:43:22 -0700 (PDT) X-Received: by 2002:a81:5954:0:b0:31e:6094:a98a with SMTP id n81-20020a815954000000b0031e6094a98amr9055821ywb.274.1658738602152; Mon, 25 Jul 2022 01:43:22 -0700 (PDT) In-Reply-To: X-Original-Sender: wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@broadband-forum-org.20210112.gappssmtp.com header.s=20210112 header.b="pXZxvdM/"; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2607:f8b0:4864:20::112f as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:31085 Archived-At: --000000000000282b0705e49d2dd2 Content-Type: text/plain; charset="UTF-8" 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. --000000000000282b0705e49d2dd2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I'm not sure if there's an existing template varia= ble for this (I don't see one) but I think that this lua filter will wo= rk:

function Pandoc(pandoc)
=C2=A0 pandoc.meta.ou= tput_file =3D PANDOC_STATE.output_file
=C2=A0 return pandoc
end=C2=A0=

On Mon, 25 Jul 2022 at 09:11, 'juh' via pandoc-discuss &l= t;pandoc-discuss@googleg= roups.com> 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=3D"$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 &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail 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//8= XSpI776%40odysseus.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://group= s.google.com/d/msgid/pandoc-discuss/CAEe_xxjZ8wNK068AP-gtieFKk%2B5iD1b4BLJ7= iS6WuG8o-667tA%40mail.gmail.com.
--000000000000282b0705e49d2dd2--