From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/33179 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 19:24:38 -0700 (PDT) Message-ID: References: <8f5ccade-4695-4bc4-a61d-e7c9cf24db50n@googlegroups.com> <69a8684d-d7db-421f-9a8c-3454ca012511n@googlegroups.com> <2e8f4aa6-79e4-4bf0-808a-764da284133dn@googlegroups.com> <6FE0832A-2D38-447D-8044-CDAC6991A55F@gmail.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_14864_2111417938.1696991078061" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36006"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBC2PTEMIZYERBZ4OTCUQMGQEN64L6UA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Oct 11 04:24:42 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oa1-f56.google.com ([209.85.160.56]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1qqOtu-00098d-Ql for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 11 Oct 2023 04:24:42 +0200 Original-Received: by mail-oa1-f56.google.com with SMTP id 586e51a60fabf-1bf00f8cf77sf9793649fac.0 for ; Tue, 10 Oct 2023 19:24:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1696991081; x=1697595881; 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=YWLPzhINIahjq8WWrxvNxIFtnIc8XFCEQMw4GB+QpdM=; b=YjCmI5wURMZXavSB5ymnmlGg9jXe1EF0zz8ibcTnKRYSE3D1lkXLlr30Ib5u45vehG s1vpAzPOhyatUkC3D06Lttp+M3PD465305Q7j/WSJs2FIQKuy1EvocIouD/DWSYoOtsU aCzjNJYIvCeZOilYwkV8Xx6hRIdBKEtFjNB0u3rylEtm2lQJZws0oejaq/yfIzg7y+vO ZGXnPZNvO84tNPcMyi1yBH0YUdoJ4RZulAT1siEJYX6YdSOXwzYc9+9z/c5IR3kuCOrW ijJSS7rpK2jlOtVuLx4iMAFMWFObLz+CIWS615SGAendozIcjgcmTuvLBNl6tpPC5XRz 3tjQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696991081; x=1697595881; 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=YWLPzhINIahjq8WWrxvNxIFtnIc8XFCEQMw4GB+QpdM=; b=akWibVJIclCtff4RFgBGXKO9B3rdFDpA7iFKmTeXQzfaLRAR4wlrGT2k8/lZRmzqf1 cJ+fpGgSSUdOX0RuDjvyvTxgkCvxFY4rqxXvq9dHTffyjfFFjoEeuBVaAbznz52qLhHG wFwV5s5Lw5ABfet5rNrqs0F2XTVbxCyAklhSqVveQ+QZuqRBDUQNPF8MJH0y2MbEsJaQ 5BHZwEVJnfONRU+BBAXPy3OWrFbkMRZdTEeIXrb7uKgWbmxUG64MujIl7/B6qFxLJ++R 17WUtC/30dH0Ii4cWc0SHL2UvR+ZtPbEnIOwlSMdQPaS29PWrm1vfYeFwvrgVf6VO0qd fPvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696991081; x=1697595881; 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=YWLPzhINIahjq8WWrxvNxIFtnIc8XFCEQMw4GB+QpdM=; b=kQ0aW1c6DmpBiVTeZ63LpkkoxBmxU93B+wEdJ/0Qb+HyiuVx1KMyO2spIAh0AtNXgo pig89rEbrIE5F5IwqADjUowfTOf0IQbmuRJKneGWsAjPLwV/kB2XvRW5Z/ZHgFDCVLc4 K7wTEUYogVxuztORBEDpb9gu6OFjl62Igd4TcfGRrgH+ToYTFlIkRLEeFHnLU+DWyCeu 9zR0ydUvkTmpjZVZBByEe7SRRqjXeEpIUl3kakTeTS4HfMrMHC6XbtbGU1b4dHSRh4IC cjUkMZLRZ1e+tg7TRMTPAeghL89EZNnmoF8cH9VmpnptZi/gqh Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOJu0YxqG03QWV45o0JmjYBOd04+53VzmMXrFSxLA+bEUL8ZS4UjGQim 6iuoMNq0m9clv8I2MiuO9A4= X-Google-Smtp-Source: AGHT+IF6Gh5UACknwHFOQyaitDiw9nRUjJ0R2L3hRLWaRu/Yihx5TBOI+iSoweMoj32+bPeU2HDejg== X-Received: by 2002:a05:6870:ac86:b0:1e9:9180:6f60 with SMTP id ns6-20020a056870ac8600b001e991806f60mr413995oab.23.1696991081575; Tue, 10 Oct 2023 19:24:41 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:560a:b0:1dd:651a:720b with SMTP id m10-20020a056870560a00b001dd651a720bls10626618oao.1.-pod-prod-04-us; Tue, 10 Oct 2023 19:24:39 -0700 (PDT) X-Received: by 2002:a05:6870:a8a5:b0:1e9:7c0c:e1e0 with SMTP id eb37-20020a056870a8a500b001e97c0ce1e0mr888008oab.10.1696991078869; Tue, 10 Oct 2023 19:24:38 -0700 (PDT) In-Reply-To: <6FE0832A-2D38-447D-8044-CDAC6991A55F-Re5JQEeQqe8AvxtiuMwx3w@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:33179 Archived-At: ------=_Part_14864_2111417938.1696991078061 Content-Type: multipart/alternative; boundary="----=_Part_14865_756042543.1696991078061" ------=_Part_14865_756042543.1696991078061 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks as always John, see https://github.com/jgm/pandoc/issues/9128 Best, Ian On Wednesday, 11 October 2023 at 01:06:42 UTC+8 John MacFarlane wrote: > Hm, this is maybe something that could be improved, if you want to put up= =20 > a bug report. > > > On Oct 10, 2023, at 8:58 AM, iandol wrote: > >=20 > > OK, I realised the YAML needs a trailing newline after the string=20 > scalar, this works fine: > >=20 > > header-includes: | > > ```{=3Dtypst} > > #set heading(numbering: "I.") > > #set text(font: "Alegreya Sans", size: 14pt, discretionary-ligatures:= =20 > true, number-type: "old-style") > > ``` > >=20 > >=20 > > ...note the trailing blank line... > >=20 > > On Tuesday, 10 October 2023 at 23:50:47 UTC+8 iandol wrote: > > So reading the docs on --metadata-file I assumed I could use this=20 > instead, so I make a new yaml file saved to the data dir metadata folder= =20 > and call it from the defaults file. In the metadata.yaml file I put: > >=20 > > 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: > >=20 > > header-includes: | > > ```{=3Dtypst} > > #set heading(numbering: "(I)") > > ``` > >=20 > >=20 > > And the output is `{=3Dtypst} #set heading(numbering: "(I)")` =E2=80=94= hm not so=20 > clear why the block generates this unesscaped but transformed markdown? > >=20 > > 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 remov= e=20 > the raw attribute, the # of the typst set command also gets escaped=20 > stopping it from working...? > >=20 > > Best, Ian > >=20 > > 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 something= =20 > on the command line, and this is how --metadata behaves). So the raw=20 > attribute won't be recognized.=20 > >=20 > >=20 > > > On Oct 9, 2023, at 6:06 PM, iandol wrote:=20 > > >=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 > > >=20 > > > metadata:=20 > > > header-includes: |=20 > > > ```{=3Dtypst}=20 > > > #set heading(numbering: "(I)")=20 > > > ```=20 > > > mainfont: "Alegreya Sans"=20 > > >=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 appreciated= !=20 > > >=20 > > > Best, Ian=20 > > >=20 > > > --=20 > > > You received this message because you are subscribed to the Google=20 > Groups "pandoc-discuss" group.=20 > > > To unsubscribe from this group and stop receiving emails from it, sen= d=20 > an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org=20 > > > 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 > > >=20 > >=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/2e8f4aa6-79e4-4bf0-808a-= 764da284133dn%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/d355fe31-9bd9-4590-bb30-4d9ea07468can%40googlegroups.com. ------=_Part_14865_756042543.1696991078061 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks as always John, see=C2=A0https://github.com/jgm/pandoc/issues/9128
Best, Ian

<= div dir=3D"auto" class=3D"gmail_attr">On Wednesday, 11 October 2023 at 01:0= 6:42 UTC+8 John MacFarlane wrote:
Hm, this is maybe something that could be improved, if= you want to put up a bug report.

> On Oct 10, 2023, at 8:58 AM, iandol <ian...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>=20
> OK, I realised the YAML needs a trailing newline after the string = scalar, this works fine:
>=20
> header-includes: |
> ```{=3Dtypst}
> #set heading(numbering: "I.")
> #set text(font: "Alegreya Sans", size: 14pt, discretio= nary-ligatures: true, number-type: "old-style")
> ```
> =20
>=20
> ...note the trailing blank line...
>=20
> On Tuesday, 10 October 2023 at 23:50:47 UTC+8 iandol wrote:
> So reading the docs on --metadata-file I assumed I could use this = instead, so I make a new yaml file saved to the data dir metadata folder an= d call it from the defaults file. In the metadata.yaml file I put:
>=20
> header-includes: |
> `#set heading(numbering: "(I)")`{=3Dtypst}
> =20
> and this gives me #set heading(numbering: "(I)") -- good= , pandoc parsed the markdown and didn't escape the # .However I then tr= ied a block:
>=20
> header-includes: |
> ```{=3Dtypst}
> #set heading(numbering: "(I)")
> ```
>=20
>=20
> And the output is `{=3Dtypst} #set heading(numbering: "(I)&qu= ot;)` =E2=80=94 hm not so clear why the block generates this unesscaped but= transformed markdown?
>=20
> 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 the raw attribute, the # of the typst set command also gets escaped = stopping it from working...?
>=20
> Best, Ian
>=20
> On Tuesday, 10 October 2023 at 12:03:44 UTC+8 John MacFarlane wrot= e:
> 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 attribut= e won't be recognized.=20
>=20
>=20
> > On Oct 9, 2023, at 6:06 PM, iandol <ian...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:=20
> >=20
> > I want to use header-includes: in a defaults file, so assumin= g it is metadata (i.e. converted to variables for the template) do this in = my typst.yaml defaults file:=20
> >=20
> > metadata:=20
> > header-includes: |=20
> > ```{=3Dtypst}=20
> > #set heading(numbering: "(I)")=20
> > ```=20
> > mainfont: "Alegreya Sans"=20
> >=20
> > But the output is escaped. The same header-includes text work= s when added to the document metadata header directly. I'm probably doi= ng something stupid but didn't yet grok what that is... Any help apprec= iated!=20
> >=20
> > Best, Ian=20
> >=20
> > --=20
> > You received this message because you are subscribed to the G= oogle Groups "pandoc-discuss" group.=20
> > To unsubscribe from this group and stop receiving emails from= it, send an email to pandoc-dis= cus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.=20
> > To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/cd6c= 5731-19c7-4189-9b45-ab783decfdb4n%40googlegroups.com.=20
>=20
>=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..= .@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/2e8f4aa= 6-79e4-4bf0-808a-764da284133dn%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/d355fe31-9bd9-4590-bb30-4d9ea07468can%40googlegroups.= com.
------=_Part_14865_756042543.1696991078061-- ------=_Part_14864_2111417938.1696991078061--