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 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 . > To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CDCA3285-4D99-40FE-B54D-603494C2B62D%40halloleo.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 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.