From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/33176 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: iandol Newsgroups: gmane.text.pandoc Subject: Re: Defaults Files and header-includes Date: Tue, 10 Oct 2023 08:50:47 -0700 (PDT) Message-ID: <69a8684d-d7db-421f-9a8c-3454ca012511n@googlegroups.com> References: <8f5ccade-4695-4bc4-a61d-e7c9cf24db50n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_10_738281689.1696953047182" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="960"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBC2PTEMIZYERBWHFSWUQMGQEXXD5ZAA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Oct 10 17:50:53 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oo1-f64.google.com ([209.85.161.64]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1qqF0W-000AZg-Qg for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 10 Oct 2023 17:50:52 +0200 Original-Received: by mail-oo1-f64.google.com with SMTP id 006d021491bc7-57b7aefa9c4sf7948995eaf.3 for ; Tue, 10 Oct 2023 08:50:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1696953051; x=1697557851; darn=m.gmane-mx.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :sender:from:to:cc:subject:date:message-id:reply-to; bh=tXBRTG+3VysbJHs1Ti2C/Ix2TH6e9aMzUtJlE+tJ3xs=; b=iGJdDeG/h7AQ3W1USVPgKTH0AfcL4wW/WrFwTDXlLcW0K5Kw3BWw9DZ+WTXD2Joo6P /oIZghDRhXX6NOk9D5QHsFcgENjMTEHiBFldQZS2l9hRkTOofMXCqHlq3bc9sWjXDG8I 7i43dhGITj/e1F9krZpW4zZKg+qil0DiJAQ8DKuNPMOMUvGx6ysy2JZMz4mmycedzOaf twtUs9xmSHBqYPTNE4iPyjbgxiqLu27CLdEO6e6UXYkfSTacXn/IMi9kugknTTDWEWJk KXbe4EvIqUb7EM98m7FYiwtCIRLXhD9qD1yinWPttiXEZTnze9M7/yL1iioKTRoJuyK5 ouXA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696953051; x=1697557851; darn=m.gmane-mx.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=tXBRTG+3VysbJHs1Ti2C/Ix2TH6e9aMzUtJlE+tJ3xs=; b=ZGNGD1tpRm9J96xSIqgLzkbWzfojuU0GhHG1PJk/eev/gW+bFUppcnzS/i8RGLhAAE OH2bd6T3B62q6OpaefIv8PgzeVwHrNkD/BnEaclS8Wij7FgVfGrypmOICoEsue9RFBPa lIauGQffouuWW2dycBaud3SvLNfiDRb9MGMQ8QP8aKufa6k350diW6IWNlqncCaXs2T8 VDpeKZifEWX14C9cYDuKa/AVtX3e8s7nxr5bNaNifBZlIql4up0pQJT+gXk16L1MZE2g Qec4Urg9fA69gn/T9G5h4J9fj5lx4nJTlAjOl6euEUTiBtLp3hCk8QsqRF7EUdznrcjD xKSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696953051; x=1697557851; 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-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-beenthere:x-gm-message-state:sender:from :to:cc:subject:date:message-id:reply-to; bh=tXBRTG+3VysbJHs1Ti2C/Ix2TH6e9aMzUtJlE+tJ3xs=; b=akFUfSjg6qUMftrQqpIfPsaTkVSHJ2j8K9sK1X0EkYtvNal6ix1tVRAom79ATdomC8 Ay8D11m9+1R1PKSH8YkpCkYfJPRcvEAUTGigFaaHA/SgxsWpnrdm73Vq6x51xVtGdPCr MRBgdqJz9JwNZjK+JERILW8ssPmZGnG4odguoX8NurWE9V5jobWnMrJo4JROSUiQafKT R+l8oAkf29aw7i6bgnqtnTuoC25lMyd4VO7ICecPtM3o53y8g+SeONKh27+IKG+xvmSa RB2cdg/35CQGrZvb6ftIkzvfwUHq0lwj8hSOqq/EME+3Oqvi/K Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOJu0Yxu/HHTVwwlFHOHONijWUmIPH1TfiaIFcwwdTfMoeTlfY6qUuu9 gUnaPsgvl4G/ggM4MBeDB4g= X-Google-Smtp-Source: AGHT+IGReaXii7VfYhO3BVBpPLqBLpijSeZyj4AGsdOJqjPD8aWoxuSTp6a3/8N3z9iqyNPfKdXMgQ== X-Received: by 2002:a05:6870:93cb:b0:1be:ccce:7991 with SMTP id c11-20020a05687093cb00b001beccce7991mr22782305oal.13.1696953051529; Tue, 10 Oct 2023 08:50:51 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:f714:b0:1d1:3283:6299 with SMTP id ej20-20020a056870f71400b001d132836299ls1575272oab.1.-pod-prod-00-us; Tue, 10 Oct 2023 08:50:48 -0700 (PDT) X-Received: by 2002:a05:6870:b79c:b0:1e9:6d19:935b with SMTP id ed28-20020a056870b79c00b001e96d19935bmr775981oab.5.1696953047971; Tue, 10 Oct 2023 08:50:47 -0700 (PDT) In-Reply-To: <8f5ccade-4695-4bc4-a61d-e7c9cf24db50n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: iandol-Re5JQEeQqe8AvxtiuMwx3w@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:33176 Archived-At: ------=_Part_10_738281689.1696953047182 Content-Type: multipart/alternative; boundary="----=_Part_11_1127820480.1696953047182" ------=_Part_11_1127820480.1696953047182 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable So reading the docs on --metadata-file I assumed I could use this instead,= =20 so I make a new yaml file saved to the data dir metadata folder and call it= =20 from the defaults file. In the metadata.yaml file I put: *header-includes: |* * `#set heading(numbering: "(I)")`{=3Dtypst}* =20 and this gives me *#set heading(numbering: "(I)")* -- good, pandoc parsed= =20 the markdown and didn't escape the # .However I then tried a block: *header-includes: |* * ```{=3Dtypst}* * #set heading(numbering: "(I)")* * ```* And the output is *`{=3Dtypst} #set heading(numbering: "(I)")` *=E2=80=94 h= m not so=20 clear why the block generates this unesscaped but transformed markdown? Ian On Tuesday, 10 October 2023 at 20:44:41 UTC+8 iandol wrote: > Thanks John, so there is no way to stop the escaping as even if I remove= =20 > the raw attribute, the # of the typst set command also gets escaped=20 > stopping it from working...? > > Best, Ian > > On Tuesday, 10 October 2023 at 12:03:44 UTC+8 John MacFarlane wrote: > >> metadata in a defaults file is parsed as plain text not markdown=20 >> (remember, default files are basically equivalent to specifying somethin= g=20 >> on the command line, and this is how --metadata behaves). So the raw=20 >> attribute won't be recognized. >> >> >> > On Oct 9, 2023, at 6:06 PM, iandol wrote: >> >=20 >> > I want to use header-includes: in a defaults file, so assuming it is= =20 >> metadata (i.e. converted to variables for the template) do this in my=20 >> typst.yaml defaults file: >> >=20 >> > metadata: >> > header-includes: | >> > ```{=3Dtypst} >> > #set heading(numbering: "(I)") >> > ``` >> > mainfont: "Alegreya Sans" >> >=20 >> > But the output is escaped. The same header-includes text works when=20 >> added to the document metadata header directly. I'm probably doing=20 >> something stupid but didn't yet grok what that is... Any help appreciate= d! >> >=20 >> > Best, Ian >> >=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/cd6c5731-19c7-4189-9b45= -ab783decfdb4n%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/69a8684d-d7db-421f-9a8c-3454ca012511n%40googlegroups.com. ------=_Part_11_1127820480.1696953047182 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable So reading the docs on=C2=A0--metadata-file=C2=A0I assumed I could use this instead, so I make = a new yaml file saved to the data dir metadata folder and call it from the = defaults file. In the metadata.yaml file I put:

header-includes: |
`#set heading(numbering: "(I)")`{=3Dtyps= t}
=C2=A0 =C2=A0=C2=A0
and this gives= me=C2=A0#set heading(numbering: "(I)") -- good, pandoc parsed the markdown and didn't escape the # .However = I then tried a block:

header-includes: |
```{=3Dtypst}
= #set heading(numbering: "(I)")
```


And the outpu= t is=C2=A0`{=3Dtypst} #set heading(numbering:= "(I)")`=C2=A0=E2=80=94 hm not so clear why the block generates = this unesscaped but transformed markdown?

Ian
On Tue= sday, 10 October 2023 at 20:44:41 UTC+8 iandol wrote:
Thanks John, so there is no way to= stop the escaping as even if I remove the raw attribute, the # of the typs= t set command also gets escaped stopping it from working...?

=
Best, Ian

On Tuesday, 10 October 2023 at 12:03:44 UTC+8 John MacFa= rlane wrote:
metadata = in a defaults file is parsed as plain text not markdown (remember, default = files are basically equivalent to specifying something on the command line,= and this is how --metadata behaves). So the raw attribute won't be rec= ognized.


> On Oct 9, 2023, at 6:06 PM, iandol <ian...@= gmail.com> wrote:
>=20
> I want to use header-includes: in a defaults file, so assuming it = is metadata (i.e. converted to variables for the template) do this in my ty= pst.yaml defaults file:
>=20
> metadata:
> header-includes: |
> ```{=3Dtypst}
> #set heading(numbering: "(I)")
> ```
> mainfont: "Alegreya Sans"
>=20
> But the output is escaped. The same header-includes text works whe= n added to the document metadata header directly. I'm probably doing so= mething stupid but didn't yet grok what that is... Any help appreciated= !
>=20
> Best, Ian
>=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-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/cd6c573= 1-19c7-4189-9b45-ab783decfdb4n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/69a8684d-d7db-421f-9a8c-3454ca012511n%40googlegroups.= com.
------=_Part_11_1127820480.1696953047182-- ------=_Part_10_738281689.1696953047182--