Skip to content
Discussion options

You must be logged in to vote

Using the setstretch command it will work but will impact the spacing of the code block as well. Which is fine for my needs. I tried manipulating the line-height directly with CSS and that did not work if I did it correctly.

---
title: "Untitled"
format: 
  pdf:
    linestretch: 2
engine: knitr
---

```{css}
.table_format {
  line-height: .5;
}   
```

```{r}
library(flextable)
```
```{r}
#| tbl-cap: This is a table
dat<- iris[1:5,]
flextable(dat)
```


\setstretch{1.0}
```{r}
#| tbl-cap: This is a table
flextable(dat)
```

\setstretch{2}

```{r}
#| class-output: table_format
#| tbl-cap: This is a table
dat<- iris[1:5,]
flextable(dat)
```

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@mcanouil
Comment options

Answer selected by victorfeagins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
latex LaTeX engines related libraries and technologies
2 participants