pandoc "cannot parse yaml header" when converting md to pdf
See http://johnmacfarlane.net/pandoc/README.html#yaml-metadata-block
There must be something in your document that looks like a YAML metadata block, but isn't.
Such a block would start with ---
on a line by itself and end with ---
or ...
on a line by itself. The line numbers in the error message refer to lines inside the metadata block, not to lines of the document.
By the way, you can turn off YAML metadata block parsing entirely by putting
--from markdown-yaml_metadata_block
in your pandoc command line.
Related videos on Youtube
DarkKight666
Updated on September 15, 2022Comments
-
DarkKight666 over 1 year
I am trying to convert a markdown document to pdf using pandoc, and it was working fine until it just started to show an error:
pandoc: Could not parse YAML header: did not find expected alphabetic or numeric character "source" (line 32, column 85 pandoc: YAML header is not an object "source" (line 17, column 1) pandoc: Could not parse YAML header: did not find expected alphabetic or numeric character "source" (line 8, column 91)
Lines 32 and 8 are blank lines between paragraphs, and all that's on line 17 is "---".
I don't even know what YAML is, but I don't want to use it, just MD->LaTeX->PDF.
Searched for these errors but could only find stuff mentioning YAML, not the errors.
Any help would be appreciated.
-
DarkKight666 over 10 yearsthanks, was using
---
for horizontal rules and didn't know about that yaml block thing. -
oalders over 6 yearsI ran into this where I had
---
and it wasn't followed by an empty line. -
cmaceachern almost 2 years