I have a Markdown file that I want to compile to LaTeX. I want to put \usepackage{tikz}
in the header. Here's what I tried:
$ cat test.md | pandoc -s -f markdown -t latex -H \usepackage{tikz} > test.tex
File usepackage{tikz} not found in resource path
Then I removed the -H
flag and made a YAML header for my Markdown.
---
title: My title
author: My name
header-includes:
- '`\usepackage{tikz}`{=latex}'
---
It yields
File tikz not found in resource path.
I'm using Tectonic so I don't have TikZ installed locally. I just want to add a string of text to my header, so I guess I must be on the wrong path if pandoc
expects to find software in some path.
How do I make pandoc
add a package to my header?
tectonic
specific issue. About headers, I am not entirely sure what you mean while converting tolatex
withpandoc
; but among other things you can modify default latex template (that might be the most straightforward way), save it and call in ittemplate
variable.<space><space>-<space>\usepackage{tikz}
and nothing more.