public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Oliver <news-WPTjrydoUPgeaOpM6FAJmQkbCANdLtlA@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: How to add to header-includes?
Date: Tue, 04 Jul 2023 11:57:37 +1000	[thread overview]
Message-ID: <A380651D-9A5B-4D48-8526-DA3E2B21B711@halloleo.hailmail.net> (raw)
In-Reply-To: <441446FF-9399-4E3C-959B-12C98167C63D-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 3211 bytes --]

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 header-includes in the metadata section of a defaults file file. 
> The reason is that, as documented, values passed to --metadata are 
> parsed as plain text, 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 following 
>> 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 
>> defaults file. I tried in my defaults file myarticle.yaml the 
>> 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 „escaped“ 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 email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 
>> <mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/pandoc-discuss/CDCA3285-4D99-40FE-B54D-603494C2B62D%40halloleo.hailmail.net 
>> <https://groups.google.com/d/msgid/pandoc-discuss/CDCA3285-4D99-40FE-B54D-603494C2B62D%40halloleo.hailmail.net?utm_medium=email&utm_source=footer> 
>> .
>
> -- 
> 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/441446FF-9399-4E3C-959B-12C98167C63D%40gmail.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/A380651D-9A5B-4D48-8526-DA3E2B21B711%40halloleo.hailmail.net.

[-- Attachment #2: Type: text/html, Size: 6011 bytes --]

      parent reply	other threads:[~2023-07-04  1:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-22  8:25 oliver
     [not found] ` <6D8F810C-361A-44A1-AA2E-FA22B318A2C2-WPTjrydoUPgeaOpM6FAJmQkbCANdLtlA@public.gmane.org>
2023-05-22  8:59   ` Bastien DUMONT
2023-05-22 13:53     ` news-WPTjrydoUPgeaOpM6FAJmQkbCANdLtlA
2023-05-22 14:27   ` Albert Krewinkel
     [not found]     ` <87y1lgqvuz.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2023-05-25 11:37       ` Oliver
2023-07-03  8:46       ` Oliver
     [not found]         ` <CDCA3285-4D99-40FE-B54D-603494C2B62D-WPTjrydoUPgeaOpM6FAJmQkbCANdLtlA@public.gmane.org>
2023-07-03 21:45           ` John MacFarlane
     [not found]             ` <441446FF-9399-4E3C-959B-12C98167C63D-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2023-07-04  1:57               ` Oliver [this message]

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=A380651D-9A5B-4D48-8526-DA3E2B21B711@halloleo.hailmail.net \
    --to=news-wptjrydoupgeaopm6fajmqkbcandltla@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).