public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Bastien DUMONT <bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: errors trying to add new variables to template
Date: Wed, 11 Aug 2021 19:17:39 +0000	[thread overview]
Message-ID: <YRQiU8M7bQpOkxKI@localhost> (raw)
In-Reply-To: <m24kbvhlao.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org>

You've placed $url_for_article$ before \begin{document}, which should trigger an error. Are you sure that Pandoc gives a PDF output using this template?

Le Wednesday 11 August 2021 à 11:46:07AM, John MacFarlane a écrit :
> 
> So you have a variable in your template
> url_for_article
> and you're setting
> 
> url_for_article: something
> 
> in your YAML metadata? That should work.
> 
> Hugh Esco <hresco3-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
> 
> > My client wants me to create pdfs from articles extracted from the 
> > internet.  
> >
> > I am able to successfully use yaml at the top of a markdown document 
> > extracted from the html to define the title, author and date.  But it fails 
> > to render the subtitle, or institute  in the pdf.  Also the abstract, if 
> > defined in the yaml, shows up in the two-column body of the result file, 
> > rather than in the one column header of the result file.  
> >
> > Any attempts to add support to the template (copied to ~/.pandoc/templates/ 
> > and invoked from the command line as --template=copied-template-name.latex) 
> > are failing for yaml defined variables url and publication, including 
> > variations on those names, in case those happen to be reserved keywords.  
> >
> > ```
> > $ diff -u /usr/share/pandoc/data/templates/default.latex 
> > ~/.pandoc/templates/default-2col-3.latex
> > --- /usr/share/pandoc/data/templates/default.latex    2018-01-26 
> > 07:52:22.000000000 -0500
> > +++ /home/hesco/.pandoc/templates/default-2col-3.latex    2021-08-11 
> > 14:03:34.846709357 -0400
> > @@ -220,6 +220,7 @@
> >  \institute{$for(institute)$$institute$$sep$ \and $endfor$}
> >  $endif$
> >  \date{$date$}
> > +$url_for_article$
> >  
> >  \begin{document}
> >  $if(title)$
> > ```
> >
> > -- 
> > 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/7b1f7006-853f-4cfe-8ecd-d8bf7de153f9n%40googlegroups.com.
> 
> -- 
> 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/m24kbvhlao.fsf%40MacBook-Pro-2.hsd1.ca.comcast.net.

-- 
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/YRQiU8M7bQpOkxKI%40localhost.


  parent reply	other threads:[~2021-08-11 19:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-11 18:14 Hugh Esco
     [not found] ` <7b1f7006-853f-4cfe-8ecd-d8bf7de153f9n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-08-11 18:15   ` Hugh Esco
2021-08-11 18:46   ` John MacFarlane
     [not found]     ` <m24kbvhlao.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org>
2021-08-11 19:17       ` Bastien DUMONT [this message]
2021-08-11 22:48         ` Hugh Esco
     [not found]           ` <db7f9173-e6ba-413b-9a23-6b79cdb30c9an-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-08-12  1:23             ` John MacFarlane
2021-08-12  6:42             ` BPJ

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=YRQiU8M7bQpOkxKI@localhost \
    --to=bastien.dumont-vwifzpto/vqstnjn9+bgxg@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).