Я пытался добавить цитату в сноску (или даже в любой текст в таблице), но она не работает, текст цитаты отображается как есть. Я подумал, что мне нужно изменить таблицу форматирования на markdown
вместо latex
и использовать bookdown::pdf_document2
, но оба не решили проблему. другая попытка состояла в том, чтобы создать текст цитирования вне таблицы с отдельным фрагментом кода, а затем paste
внутри footnote
также не работал. это мой код:
---
title: "scientific report"
output:
pdf_document:
fig_caption: true
keep_tex: true
number_sections: yes
latex_engine: xelatex
csl: elsevier-with-titles.csl
bibliography: citations.bib
link-citations: true
linkcolor: blue
---
# This is an exaample
the number of the table below is [\ref{do}]
P.S. I wrote the superscript (a) manually in the xlsx file.
```{r echo=FALSE }
library(knitr)
library(kableExtra)
library("readxl")
dfdf <- read_excel("dyss_count.xlsx")
df <- as.data.frame(dfdf)
options(knitr.kable.NA = '')
kable(df, "latex", longtable = T, booktabs = T,escape = F ,caption = 'dosage \\label{do}',align = "c") %>%
kable_styling(latex_options = c('repeat_header'), font_size = 7) %>%
footnote(general ="A general footnote",
alphabet = 'the source is @Burg_2019',
general_title = "General: ", number_title = "Type I: ",
alphabet_title = "Type II: ",
footnote_as_chunk = T, title_format = c("italic", "underline")
)
результат:
Буду очень признателен за любую полезную информацию.