Turning off title page in Rmd using knitr
<p>Edit:</p>

<p>Desired result can almost be reached, when overriding pagestyle "plain" and using documentclass article.</p>

<pre><code>\fancypagestyle{plain}{
   \fancyhf{}
   \fancyhead[RO,RE]{Header}
   \fancyfoot[RO,RE]{\thepage}
}
</code></pre>

<p>The problem I am facing no is that the headsep (space between header and table) is greater on the first page. This seems to be because of \maketitle. When removing </p>

<pre><code>$if(title)$
\maketitle
$endif$
</code></pre>

<p>from the (default) pandoc template everything works as expected. 
Imho the same result should also be reachable (without editing the template) but using "title: false" in the yaml-header in my .rmd file. But the "\maketitle" command seems to be there anyways when looking at the generated .tex. Why is that?</p>

<p>Original Question:</p>

<p>I'm trying to turn off the titlepage when creating a pdf using knitr. The document contains a longtable with repeated headers.</p>

<p>I'm expecting a pdf, where all pages have header and footer Information (and headsep) as specified. In the running example below page 1 behaves differently. Attempt to disable titlepage was not successfull.</p>

<p>test.Rmd</p>

<pre><code>---
author: "Fabian"
output: pdf_document
documentclass: report 
classoption: notitlepage
params: 
  testParam: !r data.frame(a = 1:100, b = 2:101)
header-includes:
  \usepackage{longtable}
  \usepackage{xcolor}

  \usepackage{hyperref}
  \hypersetup{colorlinks = false}

  \usepackage{geometry}
  \geometry{a4paper, landscape, left = 13mm, right = 14mm, top = 5mm, bottom = 13mm, includeheadfoot}
  \headsep = 5mm

  \usepackage{graphicx}
  \usepackage{lastpage}
  \usepackage{fancyhdr}
  \pagestyle{fancy}
  \fancyhf{}
  \fancyhead[RO,RE]{Header}
  \fancyfoot[RO,RE]{\thepage}
---

```{r setup, include = F}
library(data.table)
```

\centering
\begin{longtable}{ll}
\hline
```{r createLatexheader, eval = T, echo = F, results = "asis"}
header &lt;- names(data)
latexHaeder &lt;- paste0(paste0(header, collapse = " &amp; "), " \\\\ \n")
cat(latexHaeder)
```
\hline
\endhead

```{r createLatexdata, eval = T, echo = F, results = "asis"}
data &lt;- params$testParam
setDT(data)
data[, ID := .I]
latexData &lt;- data[, .(LATEX = paste0(.SD, collapse = " &amp; ")), by = ID]$LATEX
latexData &lt;- paste0(paste0(latexData, collapse = " \\\\ \n"), " \\\\ \n")
cat(latexData)
```
\end{longtable}
</code></pre>