From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/33006 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bastien DUMONT Newsgroups: gmane.text.pandoc Subject: Re: Setting a template based on YAML metadata blocks Date: Wed, 2 Aug 2023 08:01:29 +0000 Message-ID: References: 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="20720"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDCINCES2QJRBXM2VCTAMGQEYSMIFUY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Aug 02 10:01:40 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lf1-f63.google.com ([209.85.167.63]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1qR6nb-00050T-0k for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 02 Aug 2023 10:01:39 +0200 Original-Received: by mail-lf1-f63.google.com with SMTP id 2adb3069b0e04-4fe3202b9c9sf2931027e87.0 for ; Wed, 02 Aug 2023 01:01:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690963298; cv=pass; d=google.com; s=arc-20160816; b=Ib5Yq/cwjQOYG3EeQwMUaNtmbEFxMXQcAaITVpWmlH+BZy/sZp/bcmS605UCZBm0cu kUB03mAKqAUGX0mJfGVppMHIAMD4bCz3wf8+YdkRnRLb8y64AfR3zrvEv5ZBtVmgJGIr EeeXQNDZpfM7f+yAg/OV7SHI6ElJRIQFWWgc0dHCxj36LvFVUOBVX1Xv6BXB0H54nrgH V2xzfSyXxtrD+bwFhd4LE3d02Hm9GCCLRjjgj5/KfvKN8ohyEL7iLPThasO63V2fMEaD UxRlbGYB55DnYh9+hwJJOQgXWh3zjWKBA+5U1D9bFIvsv5Tw+4+U1AXHGjLWPJt4qYuB 7NSg== 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:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:sender:dkim-signature; bh=rtB+oIIoenab/7L//iRL8jb8oV2/t4oDFDZdeQQLD/c=; fh=zTk1OJJ/UIgC4n6p1b11w1SmP+rZGhoEUDeu1dHTagY=; b=YJyIrfMnnNXFuZjg/H1aHemCJCOKsSvbA2pH0yMeU14u0Egnz0n+bI6M+sjCGIJp+f DUx/Yi0gNwOZzijkJN/8s5J5ruBAh9e/Lrln8izdOggWoIWhMl9YIcXgpbivklsA0BfK wmCbPsKUSVAmZXkZLUqebffVgRu2D6xcuK08NF6MZ6keVanOhT27aGF49UrhZx5+qki6 /p5k0CDrm8AXIaRq6fMySzYsynx0UlHlkAgRptbM5oJLtln+nwWnvhcbTGk6EFJFX9DF 4c/v0qGpIrTtGUMl6Yw1PBMiDJjowjhmygq4JAZepa/2uz4zQ3opXzVjsymg7UKQs7Oc t0rw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=Tp9qFvVB; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1690963298; x=1691568098; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:sender:from:to:cc :subject:date:message-id:reply-to; bh=rtB+oIIoenab/7L//iRL8jb8oV2/t4oDFDZdeQQLD/c=; b=ZRHEB6o/59wGNnpb0tyZGZ+KbJsoTbtomDvuSQQBPiaYZ5wTSa7EAWmq+eYceNK8uG +4tPGl8yHLtC4M1CpjuNlm/Ctp2xSKRHFAKW8CjR1r11TT8DtwVWbkXJ0Hk0lv4rUyDp ydIspF4g31XjttKI8RV2txMt9FJFpGpI7BiWh2Geal+zcr/1oNwkiFuu1wpe5PI5kJuK gPRQUBeoJ9sFt2TOipeWdZUgvlVrAMC4LbQ5jOQB+oV+N80IBealh/CyHvdddwvq9MEv oB9AZmKOMlEGu8CJB X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690963298; x=1691568098; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:x-beenthere :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=rtB+oIIoenab/7L//iRL8jb8oV2/t4oDFDZdeQQLD/c=; b=I+lFvZ6cRBxgnqzmSm7CglMP40ggTjRvcot4FZnCPqEQ49FHJf5qd07LBHTXIlw3OR Gqs4kq+KdtRPsqAF6J2//ljtFT/ASJd8D6g4cRsH2tkBjzqsD8zx1ZRiDJ9SFkSCbs1q 2pB2SBARrGdKeRl5q5JeUdL7lUkp3GFoW6C3tJoGBMAKBDAw3tcIEaUcKXZmdE5mz3Cd S+ZS5q4GTRPSolK0+MIzbPRqIFNr Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ABy/qLbSEkdQ1+ocZd5dbUT31w+fuIdqVWizp6WanJwwpjCUWhHWIJ/6 N+SwqvGMXYCoSvmWzwTyDKY= X-Google-Smtp-Source: APBJJlFyLnjqjlSzyxZLNwVVnMM0tVB4zb1CzaDJ0PYYmfqtIUalkGnQ7gBtK8a4Ks7vH4sUCx8XrA== X-Received: by 2002:a19:4419:0:b0:4fb:8771:e898 with SMTP id r25-20020a194419000000b004fb8771e898mr4009596lfa.15.1690963298295; Wed, 02 Aug 2023 01:01:38 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6512:608:b0:4fb:a37b:86a8 with SMTP id b8-20020a056512060800b004fba37b86a8ls2053637lfe.1.-pod-prod-02-eu; Wed, 02 Aug 2023 01:01:32 -0700 (PDT) X-Received: by 2002:a05:6512:1592:b0:4fb:7b2a:78de with SMTP id bp18-20020a056512159200b004fb7b2a78demr5225274lfb.45.1690963291431; Wed, 02 Aug 2023 01:01:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690963291; cv=none; d=google.com; s=arc-20160816; b=j658SAH5eHEEhZ0DWxLIsZpUGxWfxk9gf0vus5irLUJJf94y+0RjuzDv0su7V2ruWR ZxiBkfzG3eDzYGjun3/UTwnXdRgh8sDyiF8TkFzgUglmBXDWH5I6Z4RkYZz4B+6kpzmS 40gwdwQphu/VY1XyjAmTG3tw/JEiFheby5YXOX/bjdIQGkR8N4WRTwWh8/1+ZI/z97aN WOOxWnCCCXmljPeUKrhcH0ZDSFv1C19+TE3GDOaesjts0aa/jp7j8NTVitrelRFfoyqw aNYWYg2SPvrkZvHw8qEKauVxU1ImbhHx0UugQkbHRn78MXYp6fIcQxbaESU7BJtNUkr8 LYbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:to:from:date :dkim-signature; bh=4UQdEhigkX6P9xK7c4gFYUyz213shxfcTZgvP0Blf1Y=; fh=zTk1OJJ/UIgC4n6p1b11w1SmP+rZGhoEUDeu1dHTagY=; b=owRXtgtVls3tYvwpZPmpv/v3IzUkaMQW7npXR4DeXvzbWsUfxwZjNhgDmv/G9Jccqe WCvjzYHXtSGvHY4wSNtemNXflI+hJvXfuklNBVdKbg/gUI1eCVjBoEm3UnJagWEMxOy8 QkA5n0Tii7r7x2VehSaypEmxSsfU9BYWfHDqJBQUvcfhx8vP6eaBrZynsVjYBO4V7IAq welk4PlngCQ+I8pLVDVwwSu5Dx7umwAFIcYUt1suGr8aKf2b77Ce5WQVKmJH9fZ6RaPR a/enMPrl1cBrml7ltqhyxEpfi9A4eu7OSjYvdQC7NrtGTSx421QIVcZ+9xK4Haf4P7PI 8TIQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=Tp9qFvVB; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net Original-Received: from mout01.posteo.de (mout01.posteo.de. [185.67.36.65]) by gmr-mx.google.com with ESMTPS id c18-20020a056512075200b004fe3e3471c8si304211lfs.10.2023.08.02.01.01.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Aug 2023 01:01:31 -0700 (PDT) Received-SPF: pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) client-ip=185.67.36.65; Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 96FBE240027 for ; Wed, 2 Aug 2023 10:01:30 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RG4Dp23kTz9rxB for ; Wed, 2 Aug 2023 10:01:30 +0200 (CEST) Content-Disposition: inline In-Reply-To: X-Original-Sender: bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=Tp9qFvVB; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net 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:33006 Archived-At: To my knowledge, it is not possible neither to specify the path to a templa= te file in the header nor to include the template itself in it. However, th= e template variable can be used in a defaults file. You can include raw code by adding the name of the targeted format preceded= by =3D in the attributes of a code block or a code inline: ```{=3Dhtml}
``` Le Tuesday 01 August 2023 =C3=A0 10:16:07PM, JJ a =C3=A9crit : > 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. >=20 > 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) >=20 > 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. >=20 > 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. >=20 > -- JJ >=20 > --=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/CABHcm%3Dpt_xyOKPCvieJH-QNvArZnCosb_h7xp4g_0RNJ0EECgQ%40ma= il.gmail.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/ZMoNWdOmQQPWXIqe%40localhost.