From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32918 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Oliver Newsgroups: gmane.text.pandoc Subject: Re: How to add to header-includes? Date: Tue, 04 Jul 2023 11:57:37 +1000 Message-ID: References: <6D8F810C-361A-44A1-AA2E-FA22B318A2C2@halloleo.hailmail.net> <87y1lgqvuz.fsf@zeitkraut.de> <441446FF-9399-4E3C-959B-12C98167C63D@gmail.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=_MailMate_902B0902-BC1C-4CC4-A857-538F31D10CA8_=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38947"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCEMPL7DTEMRBG7ZRWSQMGQEYNG3ZTA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Jul 04 03:57:52 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-wr1-f55.google.com ([209.85.221.55]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1qGVId-0009tu-BI for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 04 Jul 2023 03:57:51 +0200 Original-Received: by mail-wr1-f55.google.com with SMTP id ffacd0b85a97d-3142665f122sf2059879f8f.0 for ; Mon, 03 Jul 2023 18:57:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688435871; cv=pass; d=google.com; s=arc-20160816; b=BmSoeCGBXq1W70rpoxNc10ik+aK2mqic2xdQ2ofrRupvO921jQbfndUN2+ibE0V/nX UgNlBgR1QZQBmqrNBWLBDD3LymQsjlX2PPb6OayAKQaoBnmIYqtaA1CBVK640M1VWyRY N4amVHzgkwnXbW0d03OGkFPWzQGIQuoHSf6L1yau/jN5utSlO9xs0SaEJKurJOxhzdr8 W5FuuPA/6ljnLfQe09xTHGGJHOuuRmGD1yEaf9abMFQGluRhH11YfIbPVJqaVibBZG+q LGj/8EUdcCRwuLYNYN3bcpTKiWKKHmELsqXhe6b5pvy891nYz+PsvZp7YS5Imr4IlLSe 9Pow== 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:embedded-html:mime-version :references:in-reply-to:message-id:date:subject:to:from:feedback-id :sender:dkim-signature; bh=QGrQuci0SL0UpZIurI9fHYcc9KrtmmBUjUue3k8hXx8=; fh=WilDeuJr2kCYCFTuMedNeSS3diAl/X6Ns7GjUd6TCLY=; b=Y8YBO6PQT9+/mqThrhbO2WCcOJJc9FaqI5x6KFLwkNZzadjym9mYd0cboapVxrEtvv hSs73xUYHX8xMapKOAxpc4hEloh75fMVERGhHcgyUgibwA8wKFY3qRWOzaA9L5GBgBTt Xp/EQk1659C2kc8ZnaPqLu0sLfdt0/uhnMbiuDncWcgZTt/3DmOVzIOuFu2XfVQmnMzA Od3VnQfvkk/T+Z3D45B/rLkGylPLe/C2fHFRMH799Ud1Vfe5Z9hpVCkD39L0tJTkDPxz WTsMs7iu6gJgC/epsDg7eeo5GzzuuAx14PwtcgLXSA51P0bJiejFGAmWn8ZLw0+S4xXi YnDQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@hailmail.net header.s=fm2 header.b=YAqAnh+p; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=qwtSHRGI; spf=pass (google.com: domain of news-WPTjrydoUPgeaOpM6FAJmQkbCANdLtlA@public.gmane.org designates 64.147.123.21 as permitted sender) smtp.mailfrom=news-WPTjrydoUPgeaOpM6FAJmQkbCANdLtlA@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hailmail.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1688435871; x=1691027871; 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:embedded-html :mime-version:references:in-reply-to:message-id:date:subject:to:from :feedback-id:sender:from:to:cc:subject:date:message-id:reply-to; bh=QGrQuci0SL0UpZIurI9fHYcc9KrtmmBUjUue3k8hXx8=; b=NSrRGT8ZDnK2g1jmt5yQlqSD7bmnbYTUrRnyLowo0uZ0zzTL2xDBJ8qY6HrASR2txd ndNVLv+Y7UDP+MqhaPlwx6xC4lpFsYUoISkR1zcgNe2Ghh9DNLqXiq2QDJ76tLR/acVw jPdhRrjIMWmV/PXJDrqn4kBoQj7jmGYjMr82C7XUUwCjEywPu8JLxI/psLmhP9JsCFDu mWFEAihMXxGznRgF5O0hY61OPGhBCT8RU+BXLjHaP0q7huc4uztQPerzm8AmWbZEwLT0 ExO9MYYIXNdI/UewyQe9ZzbLonf8ds3D+hEGNk06818X7yD X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688435871; x=1691027871; 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:embedded-html :mime-version:references:in-reply-to:message-id:date:subject:to:from :feedback-id:x-beenthere:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=QGrQuci0SL0UpZIurI9fHYcc9KrtmmBUjUue3k8hXx8=; b=mBosx5iQLfGp72j44f8nSenAkARPT4ou5390hC+Gvp2SyrBqGP5MsfyKyzmcs/S63V gMQQI9/YoeKhof2EtnDCDTr/NcwFKx+1L89vX2gC7T1XvoO8JbGqk98hQvtjMnh95zsD 9l+OhSVuXpJ8mEvdOUsPFUdj+SjdxrZZUKAykF2Ywz+nVI+Ub91cN+7P+47UkO8ZyS4f rciDTQyViRRPC1RHp4QFLH+ODO8jXyb1N5SKbsTGfXzrDovY/u0aTPNNJL Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ABy/qLaEEEsDLdQCJLwT5p9DqYarfSrUX3UF3k/ND48zv8z4kqbqPIRf BtC2t7x6fxvreBQ6msPrd/4= X-Google-Smtp-Source: APBJJlElegdYfzP19SZQgBlpelPAypMKn3RnXmQsbAtjiQXf6LpFkuolsoXlgZuXLcb6V4VcT+M0oA== X-Received: by 2002:adf:e747:0:b0:314:2f5b:2ce with SMTP id c7-20020adfe747000000b003142f5b02cemr6138735wrn.12.1688435870208; Mon, 03 Jul 2023 18:57:50 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:600c:46ca:b0:3fb:ac8a:ff6f with SMTP id q10-20020a05600c46ca00b003fbac8aff6fls29930wmo.2.-pod-prod-02-eu; Mon, 03 Jul 2023 18:57:45 -0700 (PDT) X-Received: by 2002:a7b:cc82:0:b0:3fb:b008:2002 with SMTP id p2-20020a7bcc82000000b003fbb0082002mr9834504wma.0.1688435865481; Mon, 03 Jul 2023 18:57:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688435865; cv=none; d=google.com; s=arc-20160816; b=f4smjxdG8hFeULk5SYyLkOxmOQ0BLot4ilIgQh9uHlIZj4xjQ9yY/qdsYAerIDx8Be gPPW6l1msasiE+pAoXzth8oonSZYoxyJiTb10lou6w6tLitxX08lZyXbutGRQppe26hf qvmQW4of3QJkhQaM1Ux4NTVmADDc2HLjKeFwBiAywiG2gAb5KNWgcVI6FdRRDNyHzcQi wnakE/MumW7mr7b/ismt4wrjmLXbTkM89bOIJ1qLuai3oNwc1TyNb1uvqXEE57kxolSp E76sTEQCi1Il6jHQCwHmOhUcvdES4QXHmk+MSNMYgV95sHOg8nAkW5OX+3ZYcJzPX4p8 qPtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=embedded-html:mime-version:references:in-reply-to:message-id:date :subject:to:from:feedback-id:dkim-signature:dkim-signature; bh=vD0NnKPkhZrrhE/MtRHFr00bIthKs3MRRHMc/U5bbgM=; fh=WilDeuJr2kCYCFTuMedNeSS3diAl/X6Ns7GjUd6TCLY=; b=KGlKhxNgBfxLo6O0Ygi5m/2Fr/oe0FbQI1GVdLYZOKeCvDicYyJkSSekEb/mYZzm+Q VPIxSYcK7H8rui4qHxWGxUcjff7mjkVJGjr5W6kkl5euOs5ikTEZqqTMCf67Fppe+kl2 GOS2qPKay3ksmdMO9ImSsyhvc0OcZkhsBg26b4Tmoaj/l3h79K+sleV7txVAJiUwrQxY lGT3XwXWVCj3z7MY8GhBx1rt1F/ofsej23v4RKkBKKerqqfXoHL3PpLMcxncbHv0Z4oT YgpkSW7uFkjNuBgZUl+0ZXgiBE/RVD3kUQdpCoQ/fipldFH75r4hKG/4eE/KbYnQsX98 rsvw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@hailmail.net header.s=fm2 header.b=YAqAnh+p; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=qwtSHRGI; spf=pass (google.com: domain of news-WPTjrydoUPgeaOpM6FAJmQkbCANdLtlA@public.gmane.org designates 64.147.123.21 as permitted sender) smtp.mailfrom=news-WPTjrydoUPgeaOpM6FAJmQkbCANdLtlA@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hailmail.net Original-Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com. [64.147.123.21]) by gmr-mx.google.com with ESMTPS id y24-20020a1c4b18000000b003f9d3636ac6si479779wma.0.2023.07.03.18.57.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jul 2023 18:57:45 -0700 (PDT) Received-SPF: pass (google.com: domain of news-WPTjrydoUPgeaOpM6FAJmQkbCANdLtlA@public.gmane.org designates 64.147.123.21 as permitted sender) client-ip=64.147.123.21; Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 720C53200944 for ; Mon, 3 Jul 2023 21:57:43 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 03 Jul 2023 21:57:43 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudefgdehfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecuogfuuhhsphgvtghtffhomhgrihhnucdlgeelmdenuc fjughrpefhvffufffokfgjfhggtgesrgdtmherredtjeenucfhrhhomhepqfhlihhvvghr uceonhgvfihssehhrghllhholhgvohdrhhgrihhlmhgrihhlrdhnvghtqeenucggtffrrg htthgvrhhnpeejfedvheduudduheevudekvefgteejveekveeugfefudejvdfhfeffkeek veegvdenucffohhmrghinhepghhoohhglhgvrdgtohhmnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepnhgvfihssehhrghllhholhgvohdrhhgr ihhlmhgrihhlrdhnvght X-ME-Proxy: Feedback-ID: i02894466:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Mon, 3 Jul 2023 21:57:41 -0400 (EDT) X-Mailer: MailMate (1.14r5937) In-Reply-To: <441446FF-9399-4E3C-959B-12C98167C63D-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Embedded-HTML: [{"plain":[149,2384],"uuid":"CE4497A9-171A-497F-9FEA-16640E51B396"}] X-Original-Sender: news-WPTjrydoUPgeaOpM6FAJmQkbCANdLtlA@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@hailmail.net header.s=fm2 header.b=YAqAnh+p; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=qwtSHRGI; spf=pass (google.com: domain of news-WPTjrydoUPgeaOpM6FAJmQkbCANdLtlA@public.gmane.org designates 64.147.123.21 as permitted sender) smtp.mailfrom=news-WPTjrydoUPgeaOpM6FAJmQkbCANdLtlA@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hailmail.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:32918 Archived-At: --=_MailMate_902B0902-BC1C-4CC4-A857-538F31D10CA8_= Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable Thanks a lot, John Using `variables:` instead of `metadata:` does the trick. Thanks again, Oliver On 4 Jul 2023, at 7:45, John MacFarlane wrote: > This will work in header-includes in your document's metadata, but not=20 > in header-includes in the metadata section of a defaults file file.=20 > The reason is that, as documented, values passed to --metadata are=20 > parsed as plain text, while metadata in a markdown file is parsed as=20 > markdown. > > You could try > > variables: > header-includes: > - \usepackage{tikzsymbols} > > Variable text is passed through unchanged (so no escaping). > >> On Jul 3, 2023, at 1:46 AM, Oliver =20 >> wrote: >> >> Hi there >> >> In a markdown document I can add for the LaTeX writer the following=20 >> in the YAML metadata blocK: >> >> --- >> header-includes: >> - \usepackage{tikzsymbols} >> ... >> Then I can use in the document things like \Cooley[-3][cyan] and=20 >> more. :-) >> >> However I was not able to add this \usepackage declaration to a=20 >> defaults file. I tried in my defaults file myarticle.yaml the=20 >> following: >> >> from: markdown+raw_attribute >> metadata: >> documentclass: scrartcl >> header-includes: >> - \usepackage{tikzsymbols} >> but then I get the Latex error: >> >> ! LaTeX Error: Missing \begin{document}. >> [...] >> l.46 \textbackslash >> Somehow the \usepackage{tikzsymbols} command is now =E2=80=9Eescaped=E2= =80=9C so=20 >> that the backslash get printed out... How can I avoid this and give=20 >> the \usepackage declaration in the defaults file? >> >> Thanks for any pointers! >> >> Oliver >> >> >> --=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,=20 >> send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org=20 >> . >> To view this discussion on the web visit=20 >> https://groups.google.com/d/msgid/pandoc-discuss/CDCA3285-4D99-40FE-B54D= -603494C2B62D%40halloleo.hailmail.net=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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit=20 > https://groups.google.com/d/msgid/pandoc-discuss/441446FF-9399-4E3C-959B-= 12C98167C63D%40gmail.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/A380651D-9A5B-4D48-8526-DA3E2B21B711%40halloleo.hailmail.net= . --=_MailMate_902B0902-BC1C-4CC4-A857-538F31D10CA8_= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Thanks a lot, John

Using variables: instead of metadata: does the trick.

Thanks again,
Oliver

On 4 Jul 2023, at 7:45, John MacFarlane wrote:

This will work in header-includes in your document's metadata, but not in h= eader-includes in the metadata section of a defaults file file. The reason = is that, as documented, values passed to --metadata are parsed as plain tex= t, while metadata in a markdown file is parsed as markdown.

You could try 

variables:
  header-includes:
    - \usepackage{tikzsymbols}

Variable text is passed through unchanged (so no escaping).

On Jul 3, 2023, at 1:46 AM, Oliver <news-WPTjrydoUPgeaOpM6FAJmQkbCANdLtlA@public.gmane.org> = wrote:

Hi there

In a markdown document I can add for the LaTeX writer the f= ollowing in the YAML metadata blocK:

---
header-includes:
  - \usepackage{tikzsymbols}
...

Then I can use in the document things like \Cooley[-3][cyan] and = more. :-)

However I was not able to add this \usepackage declaration to a d= efaults file. I tried in my defaults file myarticle.yaml the following:

from: ma=
rkdown+raw_attribute
metadata:
  documentclass: scrartcl
  header-includes:
    - \usepackage{tikzsymbols}

but then I get the Latex error:

! LaTeX =
Error: Missing \begin{document}.
[...]
l.46 \textbackslash

Somehow the \usepackage{tikzsymbols} command is now =E2=80=9Eesca= ped=E2=80=9C so that the backslash get printed out... How can I avoid this = and give the = \usepackage declaration in the defaults file?

Thanks for any pointers!

Oliver


--
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 pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.goog= le.com/d/msgid/pandoc-discuss/CDCA3285-4D99-40FE-B54D-603494C2B62D%40hallol= eo.hailmail.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 e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msg= id/pandoc-discuss/441446FF-9399-4E3C-959B-12C98167C63D%40gmail.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.c= om/d/msgid/pandoc-discuss/A380651D-9A5B-4D48-8526-DA3E2B21B711%40halloleo.h= ailmail.net.
--=_MailMate_902B0902-BC1C-4CC4-A857-538F31D10CA8_=--