I use the following pandoc
command to compile a PDF from a mardown file:
pandoc infile.md metadata.yaml -o outfile.pdf
my yaml
file has the following content:
---
documentclass: extarticle
fontsize: 11pt
header-includes:
- \usepackage{fancyhdr}
- \usepackage{graphicx}
- \usepackage{hyperref}
- \pagestyle{fancy}
- \fancyfoot[CO,CE]{\href{https://creativecommons.org/licenses/by-nc-nd/4.0/deed.de}{\includegraphics[scale=0.7]{CC.png}}}
- \fancyfoot[LE,RO]{\thepage}
output: pdf_document
---
How can I add PDF metadata to the PDF file?
I found a tex
solution here:
\usepackage[pdftex,
pdfauthor={Your Name},
pdftitle={The Title},
pdfsubject={The Subject},
pdfkeywords={Some Keywords},
pdfproducer={Latex with hyperref, or other system},
pdfcreator={pdflatex, or other tool}]{hyperref}
but however I add this to my yaml
file, I get an error:
[WARNING] Could not parse YAML metadata at line 59 column 1: :4:0: Unexpected '\'
Error producing PDF.
! Undefined control sequence.
l.60 \includegraphics
Best Answer
I found an answer in the pandoc-manual:
adding this to the
yaml
file works almost perfect:only
subject:
is not working.