-
I would like to insert a computed table into a two-column PDF layout. Consider the following example: ---
title: "Two-Column Layout with Table"
format:
pdf:
documentclass: article
classoption: twocolumn
---
```{r setup, include=FALSE}
library(knitr)
```
This is some introductory text.
```{r}
kable(head(cars))
``` This produces the following error:
It seems like the I'm using Quarto 1.6.39 on Arch Linux (but the problem also occurs on other OSs like Windows). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
Quarto does not control what third party packages/libraries emit. For LaTeX packages conflicts, you need to handle them independently of Quarto. Sidenote: prefer YAML syntax in Quarto
to
|
Beta Was this translation helpful? Give feedback.
I think that if you ask knitr for latex output, then it emits tabular, which does work.
What you need to avoid in the emitted LaTeX code is:
longtable
(because it plays badly with LaTeX crossreferences and two-column mode)table
(because it plays badly with LaTeX crossreferences)