Ein reproduzierbares Beispiel ist und Sitzungsinformationen unter dem folgenden Link
https://rpubs.com/stebif68/1236124
Code: Select all
---
title: "reproducible example"
date: "2023-04-13"
output:
bookdown::html_document2: default
bookdown::pdf_document2: default
---
```{r setup, include=FALSE}
knitr::opts_chunk$set
library(tidyverse)
library(flextable)
library(officer)
```
```{r, echo=F}
sessionInfo()
```
Table \@ref(tab:test) with kable is working in both html & pdf
```{r test, echo=TRUE}
kableExtra::kable(tibble(variable= "hello", another = "bye"), caption = "The mtcars data.")
```
Table \@ref(tab:tab2) with flextable in html in not working
```{r ft.align="center", tab.cap='airquality dataset', tab.id='tab2', label='tab2', echo=T}
ft