I am using RStudio and RMarkdown to generate reports. I now wish to edit parts of the document. My RMarkdown document is as follows:
--
title: <center> <h1>Call Centre Report</h1> </center>
mainfont: Arial
output:
pdf_document:
latex_engine: xelatex
sansfont: Arial
fig_crop: false
toc: true
classoption: landscape
fontsize: 14pt
geometry: margin=0.5in
header-includes:
- \usepackage{booktabs}
---
<style>
.main-container {
max-width: 1200px !important;
}
</style>
```{r global_options, R.options=knitr::opts_chunk$set(warning=FALSE, message=FALSE)}
```
\newpage
# Iris
```{r fig.width=18, fig.height=7, echo=FALSE, comment=" "}
library(ggplot2)
ggplot(data = iris, aes(x = Sepal.Length, y = Sepal.Width, colour = Species)) +
geom_point() +
theme_classic()
```
<br>
<br>
```{r, echo=FALSE, results='asis'}
library(knitr)
library(xtable)
t1 <- kable(subset(iris, Sepal.Length=="5.1", select = Petal.Length:Species),
format = "latex", booktabs = TRUE, row.names = FALSE)
t2 <- kable(subset(chickwts, feed=="horsebean", select = weight:feed),
format = "latex", booktabs = TRUE, row.names = FALSE)
t3 <- kable(subset(mtcars, gear=="4", select = disp:wt),
format = "latex", booktabs = TRUE, row.names = FALSE, digits=2)
cat(c("\\begin{table}[!htb]
\\begin{minipage}{.35\\linewidth}
\\centering",
t1,
"\\end{minipage}%
\\begin{minipage}{.35\\linewidth}
\\centering",
t2,
"\\end{minipage}%
\\begin{minipage}{.35\\linewidth}
\\centering",
t3,
"\\end{minipage}
\\end{table}"
))
```
Is it possible to remove the heading "Contents" on the TOC page? I wish to keep all other headings on this page but remove only the "Contents" heading.
I know that I can edit the "Table of Contents" by the following line:
- \renewcommand{\contentsname}{Some Text Here}
But simply leaving it blank (below), still takes up space:
- \renewcommand{\contentsname}{}
\renewcommand{\contentsname}{}
with a negative vspace:\vspace{-.5cm}
– Martin Schmelzer- \renewcommand{\contentsname}{}\vspace{-.5cm}
does remove the Table of Contents but it doesn't push the text up into where the heading formally was. Hence, there is still a white space. – user2716568