From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29006 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: errors trying to add new variables to template Date: Wed, 11 Aug 2021 18:23:37 -0700 Message-ID: References: <7b1f7006-853f-4cfe-8ecd-d8bf7de153f9n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7420"; mail-complaints-to="usenet@ciao.gmane.io" To: Hugh Esco , pandoc-discuss Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBLXQ2GEAMGQE57IDTSY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Aug 12 03:24:02 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-vk1-f189.google.com ([209.85.221.189]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mDzRw-0001eb-Vm for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 12 Aug 2021 03:24:00 +0200 Original-Received: by mail-vk1-f189.google.com with SMTP id k2-20020a1fa1020000b02902842f3ea686sf1040292vke.3 for ; Wed, 11 Aug 2021 18:24:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1628731440; cv=pass; d=google.com; s=arc-20160816; b=LUtWHMX2J6qW0hSZ4smC8WVN+y2gKNT2/ewEeg1B29ZqxWMp/zOWdjSRe4+8OoZI8l gSMze6tDD5z7fpDWmwiDzPe2JmZpsyJqoUoDoiVEAmgQ3/gGJ+7UkQBun0Ug9d6CCYt8 qWUaRtzi5ywuHNFQ6TEpaazqqHfKfOnUh68g1ChRauXvr6jiCb9i261oMbk//RLbvsVp IfRD+xv3zCdpMtwmGQXW/joV/B7guIGqGOVJEuMAlcHLuUn5PLYgiFhreMYhAZYWlv6a j4zmkFNanhk4iupZ5hTZ32BCQMvWfH6MiAql9buL7Hs6LktEk/IrrIRJnP/iwrMwPddC x0Kw== 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:content-transfer-encoding :mime-version:message-id:date:references:in-reply-to:subject:to:from :sender:dkim-signature; bh=XCsPmmxnr1lZcBvjbIjcjX/6p7RSLaTpz84U+rO8RLk=; b=q2/pPCj9/EMgT/MMO1AQHdJPK4oPcemsDUxNLpj4KUMszwEwof+zZwfJhNwVFoIOL4 fFXBADQWpOkDPH2zuJXjKz7AmiD6Dd1V8dmnIuA+4hXt/zo1oLanry+8oHN6eLQd5wc7 T/Rl03wCf4JozyB9EkiEBQmWduvsvHlS7+tBg9IrDxIJckaEUSJ8Lxi0xYju9gvH1Uo1 CIUu5lsBC+bgX1njmfq4Bda1BGVVBff5OwfYc9ZPeV6k2e81tUU1o5xMYUOSBaoQtjBS SoshbN9r8DvgV3K/h85gKsMtff704PEWYZgK3sL8p1UDg3RJjMmuB16WrhP72Q4zQdWr qrlA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=n1Msy6gf; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::635 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding: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=XCsPmmxnr1lZcBvjbIjcjX/6p7RSLaTpz84U+rO8RLk=; b=fmZau8tczDtbMptYAo6HEnYJ9tUp8WWfuQQdPapY5rCeYEVJ+8fLTXwRrvHPgcchFY 0bsCEaDw6SVrwruYjsvg37u1SbYdaANVf5XTxwjCGXSApcUraN9hGsDdAfFkXR3DMjjG pV+Sv1fYdIrwWuIQpuLrrYZ8kW3nrndPL43t37gQKQu7RbN1UzJCZx2OeF5GOe7m5imq uPtPQoi/nxaj8qRwRFJv42iM0JnD5W91tWON49l2zFQgUq/JFYfaEs5nZPNMMmUrF9HO rpKPPQbJPNtS2IZ3iNhoTnpGWoStwnSRm7aP37BjUUTeY28avS4nRAy13M0oYrUYY4uL zt2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:subject:in-reply-to:references :date:message-id:mime-version:content-transfer-encoding :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=XCsPmmxnr1lZcBvjbIjcjX/6p7RSLaTpz84U+rO8RLk=; b=EURrPoRMxyBfSaHEwtvMoAZrg9ycO1TvfJem7nrZTs5S1E5f4bCdhv/sPaXP+KNqm7 9H7qN23pjPcITY0oo/5FV4Eqqtx/NGNmIYfXOJntXeNUHQ3srkWmg+UKV6ERPMkw5nbT 2dlYKXCVr0bpEPsN+64oe3ZjmJ0aTw9ZE7uPe1S0eHpaVyFueDDbrC/hpq4DfRsMko2C gb8RSVSPvqUNTb7ozPNqJxvmypqMkioUGUAdWU4l1KdANhe8ORx2AC3zva0gt/tLuRtN gAfIJIf/KGgvp88gtG9UxbR0L6X2cJBI5E9NptMXbF9xJFDSi21WOD7tUjaa81kDezbL Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM533OZI5Uo/rJto5X5NXzY0m5vtBbqQtGKsUZ1Rr31Gyg9A5Ux8Pg Z0elPP/P+piVkSQkKMjuj+Y= X-Google-Smtp-Source: ABdhPJwCDNg9yGlj2lZRHFzkMTs3A2DSLR6CRMC9x4YLvlSFPPG7dMTzfkwFBDMV2xp5qtYwknTWiA== X-Received: by 2002:ac5:c805:: with SMTP id y5mr1526537vkl.2.1628731440053; Wed, 11 Aug 2021 18:24:00 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a1f:5a12:: with SMTP id o18ls30292vkb.3.gmail; Wed, 11 Aug 2021 18:23:58 -0700 (PDT) X-Received: by 2002:a1f:9457:: with SMTP id w84mr1487585vkd.16.1628731438450; Wed, 11 Aug 2021 18:23:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628731438; cv=none; d=google.com; s=arc-20160816; b=O4xtgueqtwucYbmD6cNSeduuVXymIrEgIg0mp422ScxFs5P2Y6g0PKnn62NeZ4Q6/x ftR7HRSyXrFh+rsYQfucXIL/E6OrErSvccqrrvvI1YMTBjAHEBo9+XZhxI4GZXMISszE pn7mnbEfoujJk048lGid1TG71tCcAMYakQjoL9RZ26XRn/XGgzqbzLXnHLXENa+a6V0H YV+SAXwNPERjyHRz8Imgub18lOwgolXnbi4BnFV0dABNjoWfC6Mh2oeyCFNZb+Pi+B/g vTNluwh3FhpGw2wkyhovSVOwS3EALthbDDmagOD80PWR20ynDNuB4NC4qB2R5RivprPJ QmOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:dkim-signature; bh=Yw0hF5XKA3arCDybuPXf3iaEOy8CozVDfNU/VD4DsF4=; b=T4i65hlR63v1lB7M/xIKQOlxt+ZogbwS+SisKuY6bV+Y6JPpaGaeMBNBpQC+BQWjv+ KOCCNUaNWOhwAk6agsZPMc3LCF5ycBtmKc/FebCTO0knMCKQB77EPMTa/QcN4pXBfWz8 PpvvEA3QgA6MB0MAwLDWVqmyTk3Sy+08maVwbxeNADwZnMBZsGdLHXn2GDOyXh5+RTXa Vgh7uuCXTKTtu2i9jZNDe935bKSQ/SgAZKimzOu1SPTwJ4/J2bhC8vfBCO0kcxqrhEEQ JWH/YDvmb0Px9T2pknqBMRs1YOl3NwueFz41HAhM43h7wNx5ga3gwduEVzwxGARB4qks 6y4A== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=n1Msy6gf; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::635 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com. [2607:f8b0:4864:20::635]) by gmr-mx.google.com with ESMTPS id m184si92273vkg.1.2021.08.11.18.23.58 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Aug 2021 18:23:58 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::635 as permitted sender) client-ip=2607:f8b0:4864:20::635; Original-Received: by mail-pl1-x635.google.com with SMTP id d1so5123643pll.1 for ; Wed, 11 Aug 2021 18:23:58 -0700 (PDT) X-Received: by 2002:a17:902:7441:b029:12d:6476:d8f with SMTP id e1-20020a1709027441b029012d64760d8fmr1402865plt.28.1628731437426; Wed, 11 Aug 2021 18:23:57 -0700 (PDT) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id o10sm718004pjg.34.2021.08.11.18.23.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Aug 2021 18:23:56 -0700 (PDT) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id B80F4A2BC; Wed, 11 Aug 2021 21:23:45 -0400 (EDT) In-Reply-To: X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=n1Msy6gf; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::635 as permitted sender) smtp.mailfrom=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: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:29006 Archived-At: You're really asking a LaTeX question, not a pandoc one. Try looking at the eisvogel template for an example of a more full featured LaTeX template. Hugh Esco writes: > I tried moving the `$url_for_article$` below the `\begin{document}`, and = it=20 > rendered the correct value, but as a part of the two-column formatted tex= t=20 > body, rather than the one-column header for the paper. =20 > > It appears that the `\maketitle` might be responsible for the one-column= =20 > header with the `$title$`, `$author$` and `$date$`. What I really need I= =20 > guess is a means to inject the url and the publication name into that tit= le=20 > block. my custom --template=3D argument was created like so: > > `cp /usr/share/pandoc/data/templates/default.latex=20 > ~/.pandoc/templates/default-2col-3.latex` > > On Wednesday, August 11, 2021 at 3:18:37 PM UTC-4 Bastien Dumont wrote: > >> You've placed $url_for_article$ before \begin{document}, which should=20 >> trigger an error. Are you sure that Pandoc gives a PDF output using this= =20 >> template? >> >> Le Wednesday 11 August 2021 =C3=A0 11:46:07AM, John MacFarlane a =C3=A9c= rit : >> >=20 >> > So you have a variable in your template >> > url_for_article >> > and you're setting >> >=20 >> > url_for_article: something >> >=20 >> > in your YAML metadata? That should work. >> >=20 >> > Hugh Esco writes: >> >=20 >> > > My client wants me to create pdfs from articles extracted from the= =20 >> > > internet.=20 >> > > >> > > I am able to successfully use yaml at the top of a markdown document= =20 >> > > extracted from the html to define the title, author and date. But it= =20 >> fails=20 >> > > to render the subtitle, or institute in the pdf. Also the abstract, = if=20 >> > > defined in the yaml, shows up in the two-column body of the result= =20 >> file,=20 >> > > rather than in the one column header of the result file.=20 >> > > >> > > Any attempts to add support to the template (copied to=20 >> ~/.pandoc/templates/=20 >> > > and invoked from the command line as=20 >> --template=3Dcopied-template-name.latex)=20 >> > > are failing for yaml defined variables url and publication, includin= g=20 >> > > variations on those names, in case those happen to be reserved=20 >> keywords.=20 >> > > >> > > ``` >> > > $ diff -u /usr/share/pandoc/data/templates/default.latex=20 >> > > ~/.pandoc/templates/default-2col-3.latex >> > > --- /usr/share/pandoc/data/templates/default.latex 2018-01-26=20 >> > > 07:52:22.000000000 -0500 >> > > +++ /home/hesco/.pandoc/templates/default-2col-3.latex 2021-08-11=20 >> > > 14:03:34.846709357 -0400 >> > > @@ -220,6 +220,7 @@ >> > > \institute{$for(institute)$$institute$$sep$ \and $endfor$} >> > > $endif$ >> > > \date{$date$} >> > > +$url_for_article$ >> > >=20 >> > > \begin{document} >> > > $if(title)$ >> > > ``` >> > > >> > > --=20 >> > > You received this message because you are subscribed to the Google= =20 >> Groups "pandoc-discuss" group. >> > > To unsubscribe from this group and stop receiving emails from it, se= nd=20 >> an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> > > To view this discussion on the web visit=20 >> https://groups.google.com/d/msgid/pandoc-discuss/7b1f7006-853f-4cfe-8ecd= -d8bf7de153f9n%40googlegroups.com >> . >> >=20 >> > --=20 >> > You received this message because you are subscribed to the Google=20 >> Groups "pandoc-discuss" group. >> > To unsubscribe from this group and stop receiving emails from it, send= =20 >> an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> > To view this discussion on the web visit=20 >> https://groups.google.com/d/msgid/pandoc-discuss/m24kbvhlao.fsf%40MacBoo= k-Pro-2.hsd1.ca.comcast.net >> . >> > > --=20 > 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/msgi= d/pandoc-discuss/db7f9173-e6ba-413b-9a23-6b79cdb30c9an%40googlegroups.com. --=20 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 e= mail 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/yh480k1r6z78x2.fsf%40johnmacfarlane.net.