From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/3400 Path: news.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: HTML templates: output filename Date: Tue, 3 Apr 2012 10:09:07 -0700 Message-ID: <20120403170907.GC13636@protagoras.phil.berkeley.edu> References: <22989130.1742.1333458702295.JavaMail.geo-discussion-forums@yno37> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1333473103 7119 80.91.229.3 (3 Apr 2012 17:11:43 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 3 Apr 2012 17:11:43 +0000 (UTC) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncCO38oIeaEBC73uz7BBoE1ANHMw-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Apr 03 19:11:42 2012 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-pz0-f58.google.com ([209.85.210.58]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SF7Ge-0000F7-Ld for gtp-pandoc-discuss@m.gmane.org; Tue, 03 Apr 2012 19:11:40 +0200 Original-Received: by dald39 with SMTP id d39sf2880059dal.3 for ; Tue, 03 Apr 2012 10:11:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:date:from:to:subject:message-id:references :mime-version:in-reply-to:x-pgp-key:user-agent:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type:content-disposition; bh=kzA2Kzci2DGNT3P+FLhF5/gDonXRDbLizmrfA9yRm3s=; b=Xj4lDdjQq0U7UdfrK7mgQ/G4PocVtYeUdbRTLHS4TT5+2YmEKqfmjIhGnnJyLj8oYn UAw6K/jRe9GnXGcpoft4CmbibvkXpY7w/k7aVuCQENfwQHMzUpjCRXwLgdT9cOXMKHGY HjRZEbW5xvrG/whtzoLgpQ5LtHCOal3xs7JLM= Original-Received: by 10.68.217.66 with SMTP id ow2mr1875777pbc.5.1333473083110; Tue, 03 Apr 2012 10:11:23 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.68.134.39 with SMTP id ph7ls18287634pbb.4.gmail; Tue, 03 Apr 2012 10:11:22 -0700 (PDT) Original-Received: by 10.68.230.68 with SMTP id sw4mr4013265pbc.7.1333473082562; Tue, 03 Apr 2012 10:11:22 -0700 (PDT) Original-Received: by 10.68.230.68 with SMTP id sw4mr4013263pbc.7.1333473082552; Tue, 03 Apr 2012 10:11:22 -0700 (PDT) Original-Received: from cm05fe.IST.Berkeley.EDU (cm05fe.IST.Berkeley.EDU. [169.229.218.146]) by gmr-mx.google.com with ESMTPS id e6si21413740pbt.1.2012.04.03.10.11.22 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 03 Apr 2012 10:11:22 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 169.229.218.146 as permitted sender) client-ip=169.229.218.146; Original-Received: from protagoras.phil.berkeley.edu ([128.32.137.142]) by cm05fe.ist.berkeley.edu with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (auth plain:jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org) (envelope-from ) id 1SF7GL-000697-IT for pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; Tue, 03 Apr 2012 10:11:22 -0700 Original-Received: by protagoras.phil.berkeley.edu (Postfix, from userid 1000) id E65C023126; Tue, 3 Apr 2012 10:09:07 -0700 (PDT) In-Reply-To: <22989130.1742.1333458702295.JavaMail.geo-discussion-forums@yno37> X-PGP-Key: http://johnmacfarlane.net/jgm.asc User-Agent: Mutt/1.5.20 (2009-06-14) X-Original-Sender: fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 169.229.218.146 as permitted sender) smtp.mail=jgm-TVLZxgkOlNX2fBVCVOL8/A@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: Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-Subscribe: , List-Unsubscribe: , Content-Disposition: inline Xref: news.gmane.org gmane.text.pandoc:3400 Archived-At: +++ zeugs [Apr 03 12 06:11 ]: > Hello, > I'm currently preparing a static website where I would like to link to > different output formats of a pandoc file, e.g. PDF and epub, so people > can read the text offline or print it. > I have created an HTML template with placeholders for links to these > files, but cannot find any template variables I could use in this case. > The closest I could find is $title$, but I wouln't want to align title > and filename. Is there a way in pandoc to get the input filename (like > "$sourcefile$") and put it into the generated HTML file? You can always make your own custom template with a $sourcefile$ variable, and set it manually using the '-V' or '--variable' flag from the command line. In principle pandoc could set such a variable automatically, but sometimes multiple source files are specified on the command line, and sometimes input is taken from stdin, so one would have to figure out what to do in such cases.