How to redefine the title page in pandoc

I want to change the way the title page in the pdfs look.

I have a markdown document set up with with a YAML metadata block in the beginning.

title: my Title author: My name date: \today header-includes: |
    \fancyhead[L]{\color{nice_red}{\fontsize{40}{60}\selectfont \textbf{\_}}}
    \fancyfoot[R]{\vspace*{5mm} \includegraphics{imports/Logo.eps}}
    \fancyfoot[L]{\vspace*{5mm}\color{gray02}{\today \\ \thepage} }
\usepackage[top=4cm, bottom=1cm, left=1cm, right=1cm,paperwidth=280mm, paperheight=180mm,headsep=3cm]{geometry}
subparagraph: yes'

pdf is then generated with pandoc (2.2) via pandoc - o out.pdf

I added \renewcommand{\maketitle}{Test} to the YAML block but then I get this instead of the document:

Error producing PDF.
! Argument of \title has an extra }.
<inserted text> 
l.110 \clearpage


I did some more poking around, trying to not get the pandoc title page:
- removing title, author and date from the YAML produces the same error
- moving latex code into separate tex file and using --include-in-header in_header.tex produces same error

this was because I used \title in my fancyhdr

- - Source


answered 1 week ago Silvan Rehm #1

Here's my solution for now: don't change the title page from pandoc but create my own. I did not supply pandoc with a title in the YAML thus it skips the title page.

I was not able to use \title{Title} to set the \title but instead had to use \renewcommand{\title}{Title}.

comments powered by Disqus