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: Setting a template based on YAML metadata blocks
Date: Wed,  2 Aug 2023 08:01:29 +0000	[thread overview]
Message-ID: <ZMoNWdOmQQPWXIqe@localhost> (raw)
In-Reply-To: <CABHcm=pt_xyOKPCvieJH-QNvArZnCosb_h7xp4g_0RNJ0EECgQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

To my knowledge, it is not possible neither to specify the path to a template file in the header nor to include the template itself in it. However, the template variable can be used in a defaults file.

You can include raw code by adding the name of the targeted format preceded by = in the attributes of a code block or a code inline:

```{=html}
<br/>
```


Le Tuesday 01 August 2023 à 10:16:07PM, JJ a écrit :
> Hello, I've been acquainting myself with pandoc for the past few days.
> It's quite neat. I particularly do like pandoc's markdown flavour:
> it's everything I've ever wanted out of such an extension! I had some
> questions that I've been unable to find answers to in the manpage or
> elsewhere, however.
> 
> Is it possible to specify a template that pandoc is to use in a YAML
> metadata block? Presumably this would only work with --standalone.
> I've attempted `template: ` after seeing it elsewhere and hoping it
> may work, but no dice. This seems like a common enough use case that
> I'd imagine there is an option I am missing: or perhaps people on this
> mailing list have external solutions. (though I was hoping to avoid
> the use of sed: for no reason other than I've only had to use pandoc
> in my script so far, which has been quite neat)
> 
> Also, what is best practice for "including" HTML fragments in pandoc?
> I've found nothing in pandoc for this purpose so far - which, well,
> makes a lot of sense. I was planning on first trying to rework things
> to rely entirely on templates, and then in the event of failure just
> sed-ing it up. But I harbour some concerns about accidentally
> replacing text strings or code blocks.
> 
> Also also I am curious: what is the background behind *default* html
> templates needing the .html5 extension, but regular html templates
> using .html? This threw me for a bit of a loop for a bit.
> 
> -- JJ
> 
> -- 
> 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/CABHcm%3Dpt_xyOKPCvieJH-QNvArZnCosb_h7xp4g_0RNJ0EECgQ%40mail.gmail.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/ZMoNWdOmQQPWXIqe%40localhost.


  parent reply	other threads:[~2023-08-02  8:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-02  5:16 JJ
     [not found] ` <CABHcm=pt_xyOKPCvieJH-QNvArZnCosb_h7xp4g_0RNJ0EECgQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-08-02  8:01   ` Bastien DUMONT [this message]
2023-08-02 16:23   ` John MacFarlane
     [not found]     ` <6CAC3AED-3628-4F25-BBB9-D3CEA9CECA36-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2023-08-03  7:11       ` JJ
     [not found]         ` <CABHcm=rAT_j28acnFL-NBAZpQjQrtxPKXZ7KMT4MjSqZNnjbOg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-08-03 14:45           ` jcr
2023-08-03 22:06           ` John MacFarlane

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=ZMoNWdOmQQPWXIqe@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).