【发布时间】:2020-06-22 12:24:34
【问题描述】:
我在 YAML 标头中添加脚注时遇到了一些问题。如果标题中没有该脚注,则编织执行效果很好。但是,在文档的不同部分添加脚注不会导致错误。
非常感谢任何建议。
---
title: "Document1"
author: "Test^[this is a test]"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output: pdf_document
latex_engine: xelatex
---
错误:
! Argument of \reserved@a has an extra }.
<inserted text>
\par
l.76 \author{Test\footnote{this is a test}}
sessionInfo()
R version 4.0.1 (2020-06-06)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17763)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] lubridate_1.7.9 zoo_1.8-8 magrittr_1.5 knitr_1.28 forcats_0.5.0
[6] stringr_1.4.0 dplyr_1.0.0 purrr_0.3.4 readr_1.3.1 tidyr_1.1.0
[11] tibble_3.0.1 ggplot2_3.3.2 tidyverse_1.3.0
loaded via a namespace (and not attached):
[1] tinytex_0.24 tidyselect_1.1.0 xfun_0.14 haven_2.3.1
[5] lattice_0.20-41 colorspace_1.4-1 vctrs_0.3.1 generics_0.0.2
[9] htmltools_0.5.0 yaml_2.2.1 utf8_1.1.4 blob_1.2.1
[13] rlang_0.4.6 pillar_1.4.4 glue_1.4.1 withr_2.2.0
[17] DBI_1.1.0 dbplyr_1.4.4 modelr_0.1.8 readxl_1.3.1
[21] lifecycle_0.2.0 munsell_0.5.0 gtable_0.3.0 cellranger_1.1.0
[25] rvest_0.3.5 evaluate_0.14 fansi_0.4.1 highr_0.8
[29] broom_0.5.6 Rcpp_1.0.4.6 backports_1.1.7 scales_1.1.1
[33] jsonlite_1.6.1 fs_1.4.1 hms_0.5.3 digest_0.6.25
[37] stringi_1.4.6 grid_4.0.1 cli_2.0.2 tools_4.0.1
[41] crayon_1.3.4 pkgconfig_2.0.3 ellipsis_0.3.1 xml2_1.3.2
[45] reprex_0.3.0 assertthat_0.2.1 rmarkdown_2.3.1 httr_1.4.1
[49] rstudioapi_0.11 R6_2.4.1 nlme_3.1-148 compiler_4.0.1
【问题讨论】:
标签: r r-markdown markdown