public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Problem rendering the 'author' field from the YAML front-matter
@ 2020-04-15 12:39 Ramiro Alvarez Ugarte
       [not found] ` <66e919a8-9ea6-4a59-a04f-70bf0008787f-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Ramiro Alvarez Ugarte @ 2020-04-15 12:39 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 2556 bytes --]



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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.

[-- Attachment #1.2: Type: text/html, Size: 12649 bytes --]

[-- Attachment #2: verbose_output.md --]
[-- Type: text/markdown, Size: 13844 bytes --]

```
[makePDF] temp dir:
/private/var/folders/sl/2116h56d2nv7cnlvr3bb59b40000gn/T/tex2pdf.-415aca18cb112223
[makePDF] Command line:
pdflatex "-halt-on-error" "-interaction" "nonstopmode" "-output-directory" "/private/var/folders/sl/2116h56d2nv7cnlvr3bb59b40000gn/T/tex2pdf.-415aca18cb112223" "/private/var/folders/sl/2116h56d2nv7cnlvr3bb59b40000gn/T/tex2pdf.-415aca18cb112223/input.tex"

[makePDF] Environment:
("TEXINPUTS","/private/var/folders/sl/2116h56d2nv7cnlvr3bb59b40000gn/T/tex2pdf.-415aca18cb112223:")
("TEXMFOUTPUT","/private/var/folders/sl/2116h56d2nv7cnlvr3bb59b40000gn/T/tex2pdf.-415aca18cb112223")
("rvm_bin_path","/Users/ramiroalvarezugarte/.rvm/bin")
("TERM_PROGRAM","Apple_Terminal")
("GEM_HOME","/Users/ramiroalvarezugarte/.rvm/gems/ruby-2.4.1")
("SHELL","/bin/bash")
("TERM","xterm-256color")
("IRBRC","/Users/ramiroalvarezugarte/.rvm/rubies/ruby-2.4.1/.irbrc")
("TMPDIR","/var/folders/sl/2116h56d2nv7cnlvr3bb59b40000gn/T/")
("Apple_PubSub_Socket_Render","/private/tmp/com.apple.launchd.E7K89N4Qi6/Render")
("TERM_PROGRAM_VERSION","404.1")
("OLDPWD","/Users/ramiroalvarezugarte/Dropbox")
("MY_RUBY_HOME","/Users/ramiroalvarezugarte/.rvm/rubies/ruby-2.4.1")
("TERM_SESSION_ID","3288BEC7-8740-4602-AF1A-EAD3D419AD03")
("USER","ramiroalvarezugarte")
("_system_type","Darwin")
("rvm_path","/Users/ramiroalvarezugarte/.rvm")
("SSH_AUTH_SOCK","/private/tmp/com.apple.launchd.3Bo6Pd0LBq/Listeners")
("rvm_prefix","/Users/ramiroalvarezugarte")
("PATH","/Users/ramiroalvarezugarte/Downloads/google-cloud-sdk/bin:/Users/ramiroalvarezugarte/.rvm/gems/ruby-2.4.1/bin:/Users/ramiroalvarezugarte/.rvm/gems/ruby-2.4.1@global/bin:/Users/ramiroalvarezugarte/.rvm/rubies/ruby-2.4.1/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/usr/local/MacGPG2/bin:/opt/X11/bin:/Users/ramiroalvarezugarte/.rvm/bin")
("PWD","/Users/ramiroalvarezugarte/Dropbox/Working_papers")
("LANG","en_US.UTF-8")
("_system_arch","x86_64")
("XPC_FLAGS","0x0")
("_system_version","10.13")
("XPC_SERVICE_NAME","0")
("rvm_version","1.29.3 (latest)")
("SHLVL","1")
("HOME","/Users/ramiroalvarezugarte")
("LOGNAME","ramiroalvarezugarte")
("GEM_PATH","/Users/ramiroalvarezugarte/.rvm/gems/ruby-2.4.1:/Users/ramiroalvarezugarte/.rvm/gems/ruby-2.4.1@global")
("DISPLAY","/private/tmp/com.apple.launchd.Ueuci4WHcS/org.macosforge.xquartz:0")
("RUBY_VERSION","ruby-2.4.1")
("_system_name","OSX")
("_","/usr/local/bin/pandoc")

[makePDF] Source:
%Este
% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url}
%
\documentclass[
]{article}
\usepackage{lmodern}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
  \usepackage{textcomp} % provide euro and other symbols
\else % if luatex or xetex
  \usepackage{unicode-math}
  \defaultfontfeatures{Scale=MatchLowercase}
  \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
\fi
% Use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\IfFileExists{microtype.sty}{% use microtype if available
  \usepackage[]{microtype}
  \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\makeatletter
\@ifundefined{KOMAClassName}{% if non-KOMA class
  \IfFileExists{parskip.sty}{%
    \usepackage{parskip}
  }{% else
    \setlength{\parindent}{0pt}
    \setlength{\parskip}{6pt plus 2pt minus 1pt}}
}{% if KOMA class
  \KOMAoptions{parskip=half}}
\makeatother
\usepackage{xcolor}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
\hypersetup{
  pdftitle={Title works fine},
  pdfauthor={Author B. Problem},
  hidelinks,
  pdfcreator={LaTeX via pandoc}}
\urlstyle{same} % disable monospaced font for URLs
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering

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

\begin{document}
\maketitle

Does this work?

Hi --- much love to the community. I think I might have found a bug, so
posting here first in case I am wrong.

It happens when converting a simple \texttt{.md} file into
\texttt{.pdf}. I would get the following error:

\end{document}

[makePDF] Run #1
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode

(/private/var/folders/sl/2116h56d2nv7cnlvr3bb59b40000gn/T/tex2pdf.-415aca18cb11
2223/input.tex
LaTeX2e <2020-02-02> patch level 5
L3 programming layer <2020-03-06>
(/usr/local/texlive/2020/texmf-dist/tex/latex/base/article.cls
Document Class: article 2019/12/20 v1.4l Standard LaTeX document class
(/usr/local/texlive/2020/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2020/texmf-dist/tex/latex/lm/lmodern.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/amsfonts/amssymb.sty
(/usr/local/texlive/2020/texmf-dist/tex/latex/amsfonts/amsfonts.sty))
(/usr/local/texlive/2020/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/local/texlive/2020/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/local/texlive/2020/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/local/texlive/2020/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/usr/local/texlive/2020/texmf-dist/tex/generic/iftex/ifxetex.sty
(/usr/local/texlive/2020/texmf-dist/tex/generic/iftex/iftex.sty))
(/usr/local/texlive/2020/texmf-dist/tex/generic/iftex/ifluatex.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/base/fontenc.sty
(/usr/local/texlive/2020/texmf-dist/tex/latex/lm/t1lmr.fd))
(/usr/local/texlive/2020/texmf-dist/tex/latex/base/inputenc.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/base/textcomp.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/upquote/upquote.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/microtype/microtype.sty
(/usr/local/texlive/2020/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/microtype/microtype-pdftex.def)
(/usr/local/texlive/2020/texmf-dist/tex/latex/microtype/microtype.cfg))
(/usr/local/texlive/2020/texmf-dist/tex/latex/parskip/parskip.sty
(/usr/local/texlive/2020/texmf-dist/tex/latex/kvoptions/kvoptions.sty
(/usr/local/texlive/2020/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty)
(/usr/local/texlive/2020/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty))
(/usr/local/texlive/2020/texmf-dist/tex/latex/etoolbox/etoolbox.sty))
(/usr/local/texlive/2020/texmf-dist/tex/latex/xcolor/xcolor.sty
(/usr/local/texlive/2020/texmf-dist/tex/latex/graphics-cfg/color.cfg)
(/usr/local/texlive/2020/texmf-dist/tex/latex/graphics-def/pdftex.def))
(/usr/local/texlive/2020/texmf-dist/tex/latex/xurl/xurl.sty
(/usr/local/texlive/2020/texmf-dist/tex/latex/url/url.sty))
(/usr/local/texlive/2020/texmf-dist/tex/latex/bookmark/bookmark.sty
(/usr/local/texlive/2020/texmf-dist/tex/latex/hyperref/hyperref.sty
(/usr/local/texlive/2020/texmf-dist/tex/latex/pdftexcmds/pdftexcmds.sty
(/usr/local/texlive/2020/texmf-dist/tex/generic/infwarerr/infwarerr.sty))
(/usr/local/texlive/2020/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty)
(/usr/local/texlive/2020/texmf-dist/tex/generic/pdfescape/pdfescape.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/hycolor/hycolor.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/auxhook/auxhook.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/usr/local/texlive/2020/texmf-dist/tex/generic/intcalc/intcalc.sty)
(/usr/local/texlive/2020/texmf-dist/tex/generic/etexcmds/etexcmds.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/hyperref/puenc.def)
(/usr/local/texlive/2020/texmf-dist/tex/generic/bitset/bitset.sty
(/usr/local/texlive/2020/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty))
(/usr/local/texlive/2020/texmf-dist/tex/generic/atbegshi/atbegshi.sty))
(/usr/local/texlive/2020/texmf-dist/tex/latex/hyperref/hpdftex.def
(/usr/local/texlive/2020/texmf-dist/tex/latex/atveryend/atveryend.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty

(/usr/local/texlive/2020/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty
))) (/usr/local/texlive/2020/texmf-dist/tex/latex/bookmark/bkm-pdftex.def))

! 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.

[makePDF] Run #2
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode

(/private/var/folders/sl/2116h56d2nv7cnlvr3bb59b40000gn/T/tex2pdf.-415aca18cb11
2223/input.tex
LaTeX2e <2020-02-02> patch level 5
L3 programming layer <2020-03-06>
(/usr/local/texlive/2020/texmf-dist/tex/latex/base/article.cls
Document Class: article 2019/12/20 v1.4l Standard LaTeX document class
(/usr/local/texlive/2020/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2020/texmf-dist/tex/latex/lm/lmodern.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/amsfonts/amssymb.sty
(/usr/local/texlive/2020/texmf-dist/tex/latex/amsfonts/amsfonts.sty))
(/usr/local/texlive/2020/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/local/texlive/2020/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/local/texlive/2020/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/local/texlive/2020/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/usr/local/texlive/2020/texmf-dist/tex/generic/iftex/ifxetex.sty
(/usr/local/texlive/2020/texmf-dist/tex/generic/iftex/iftex.sty))
(/usr/local/texlive/2020/texmf-dist/tex/generic/iftex/ifluatex.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/base/fontenc.sty
(/usr/local/texlive/2020/texmf-dist/tex/latex/lm/t1lmr.fd))
(/usr/local/texlive/2020/texmf-dist/tex/latex/base/inputenc.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/base/textcomp.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/upquote/upquote.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/microtype/microtype.sty
(/usr/local/texlive/2020/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/microtype/microtype-pdftex.def)
(/usr/local/texlive/2020/texmf-dist/tex/latex/microtype/microtype.cfg))
(/usr/local/texlive/2020/texmf-dist/tex/latex/parskip/parskip.sty
(/usr/local/texlive/2020/texmf-dist/tex/latex/kvoptions/kvoptions.sty
(/usr/local/texlive/2020/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty)
(/usr/local/texlive/2020/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty))
(/usr/local/texlive/2020/texmf-dist/tex/latex/etoolbox/etoolbox.sty))
(/usr/local/texlive/2020/texmf-dist/tex/latex/xcolor/xcolor.sty
(/usr/local/texlive/2020/texmf-dist/tex/latex/graphics-cfg/color.cfg)
(/usr/local/texlive/2020/texmf-dist/tex/latex/graphics-def/pdftex.def))
(/usr/local/texlive/2020/texmf-dist/tex/latex/xurl/xurl.sty
(/usr/local/texlive/2020/texmf-dist/tex/latex/url/url.sty))
(/usr/local/texlive/2020/texmf-dist/tex/latex/bookmark/bookmark.sty
(/usr/local/texlive/2020/texmf-dist/tex/latex/hyperref/hyperref.sty
(/usr/local/texlive/2020/texmf-dist/tex/latex/pdftexcmds/pdftexcmds.sty
(/usr/local/texlive/2020/texmf-dist/tex/generic/infwarerr/infwarerr.sty))
(/usr/local/texlive/2020/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty)
(/usr/local/texlive/2020/texmf-dist/tex/generic/pdfescape/pdfescape.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/hycolor/hycolor.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/auxhook/auxhook.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/usr/local/texlive/2020/texmf-dist/tex/generic/intcalc/intcalc.sty)
(/usr/local/texlive/2020/texmf-dist/tex/generic/etexcmds/etexcmds.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/hyperref/puenc.def)
(/usr/local/texlive/2020/texmf-dist/tex/generic/bitset/bitset.sty
(/usr/local/texlive/2020/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty))
(/usr/local/texlive/2020/texmf-dist/tex/generic/atbegshi/atbegshi.sty))
(/usr/local/texlive/2020/texmf-dist/tex/latex/hyperref/hpdftex.def
(/usr/local/texlive/2020/texmf-dist/tex/latex/atveryend/atveryend.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty

(/usr/local/texlive/2020/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty
))) (/usr/local/texlive/2020/texmf-dist/tex/latex/bookmark/bkm-pdftex.def))

! 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.

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
``` 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-15 21:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-15 12:39 Problem rendering the 'author' field from the YAML front-matter Ramiro Alvarez Ugarte
     [not found] ` <66e919a8-9ea6-4a59-a04f-70bf0008787f-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-04-15 16:08   ` John MacFarlane
     [not found]     ` <m2eesok9za.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2020-04-15 21:51       ` Problem rendering the 'author' field from the YAML front-matter [solved, corrupted template file] Ramiro Alvarez Ugarte

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).