I want that the title of my table (blabla) goes close to the top of the table (no extra space). This question may be the same as from Sara, but I provide a reproducible example. I have tried these tips, but they don't work out.
---
title: "XYZ"
output:
beamer_presentation
---
```{r, include=FALSE}
library(knitr)
```
##
```{r}
kable(mtcars[1:2,1:2],
caption = "blabla",
format = "latex")
```
\begin{table}
\caption{blabla}
\centering
\begin{tabular}{l|r|r}
\hline
& mpg & cyl\\
\hline
Mazda RX4 & 21 & 6\\
\hline
Mazda RX4 Wag & 21 & 6\\
\hline
\end{tabular}
\end{table}
Produces:
How can I remove the extra white space (in either case)? It would better a proper solution, i.e., without manually changing the LaTeX code from kable...
