Hi —- I think I might have found a bug. I haven’t been able to find a discussion on this topic, so I am posting here first in case I am wrong.

It happens when converting a simple .md file into .pdf using a YAML front-matter (pasted belor). I would get the following error:

Error producing PDF.
! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.51 A

When issuing the --verbose command I come up with a little more detail (just pasting the relevant section, full output attached).

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.51 A
      uthor B. Problem
!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on /private/var/folders/sl/2116h56d2nv7cnlvr3bb59b40000gn/T/
tex2pdf.-415aca18cb112223/input.log.

As you can see, the relevant problem seems to be when trying to render author, when parsing the fields in the YAML front-matter the author field is ignored:

\title{Title works fine}
Author B. Problem
\date{2020-04-15}

I am working with MacOs High Sierra 10.13.6
pandoc 2.9.2.1
pdfTeX 3.14159265-2.6-1.40.21 (TeX Live 2020)
kpathsea version 6.3.2

In a different computer, with older versions of both LaTeX (TexLive 2017) and Pandoc (2.9.1.1) the problem does not exist and the file compiles with no issue whatsoever. I did check however the template pandoc -D latex in case it was corrupted for some reason, but the file is the same in both computers. I also tried different ways of introducing the author information in the YAML front-matter, following the alternatives documented in the User’s Guide but all led to the same error.

Of course, when I remove the author from the YAML front-matter the file is converted as expected.

YAML front-matter

---
title: Title works fine
author: Author B. Problem
date: 2020-04-15
...

--
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/66e919a8-9ea6-4a59-a04f-70bf0008787f%40googlegroups.com.