我正在使用r-markdown撰写一篇文章,并希望通过保留.tex文件来提交。
一切都很顺利地制作了PDF,即使.tex文件看起来也很好,但是参考文献键消失了。是否有一种自动将r-markdown文件中的引用键(例如
我正在运行
所有R软件包均已更新到最新版本:
title: "My title"
author: "My name"
date: "`r format(Sys.time(), '%d %B, %Y')`"
abstract: "My abstract"
output:
html_document:
df_print: paged
word_document: default
pdf_document:
keep_tex: yes
bibliography: bibfile.bib
一切都很顺利地制作了PDF,即使.tex文件看起来也很好,但是参考文献键消失了。是否有一种自动将r-markdown文件中的引用键(例如
[@smith1995]
)转换为.tex文件中的引用命令(例如\cite{smith1995}
),并创建相应的参考文献的方法?我正在运行
R版本4.0.3
和pandoc 2.5
在x86_64-pc-linux-gnu(64位)
上。所有R软件包均已更新到最新版本:
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] texreg_1.37.5
loaded via a namespace (and not attached):
[1] httr_1.4.2 viridis_0.5.1 tidyr_1.1.2 tidygraph_1.2.0 viridisLite_0.3.0 splines_4.0.3
[7] foreach_1.5.1 ggraph_2.0.3 network_1.16.1 assertthat_0.2.1 yaml_2.2.1 robustbase_0.93-6
[13] ggrepel_0.8.2 backports_1.2.1 pillar_1.5.0 lattice_0.20-41 quantreg_5.85 glue_1.4.2
[19] digest_0.6.27 polyclip_1.10-0 colorspace_1.4-1 htmltools_0.5.1.1 cowplot_1.1.1 Matrix_1.3-2
[25] plyr_1.8.6 conquer_1.0.2 lpSolve_5.6.15 pkgconfig_2.0.3 broom_0.7.5 SparseM_1.78
[31] purrr_0.3.4 ergm_3.11.0 scales_1.1.1 tweenr_1.0.1 sna_2.6 MatrixModels_0.4-1
[37] ggforce_0.3.2 tibble_3.0.6 mgcv_1.8-33 generics_0.1.0 farver_2.0.3 ggplot2_3.3.3
[43] ellipsis_0.3.1 cli_2.3.1 splitstackshape_1.4.8 magrittr_1.5 crayon_1.3.4 statnet.common_4.4.1
[49] evaluate_0.14 mcmc_0.9-7 fansi_0.4.1 doParallel_1.0.16 nlme_3.1-152 MASS_7.3-53
[55] rem_1.3.1 vegan_2.5-6 tools_4.0.3 data.table_1.14.0 lifecycle_0.2.0 matrixStats_0.58.0
[61] stringr_1.4.0 MCMCpack_1.5-0 trust_0.1-8 munsell_0.5.0 cluster_2.1.0 compiler_4.0.3
[67] rlang_0.4.10 grid_4.0.3 iterators_1.0.13 rstudioapi_0.11 igraph_1.2.6 rmarkdown_2.7
[73] gtable_0.3.0 codetools_0.2-18 DBI_1.1.1 reshape2_1.4.4 graphlayouts_0.7.1 rDNA_2.1.18
[79] R6_2.5.0 gridExtra_2.3 rle_0.9.2 knitr_1.31 dplyr_1.0.4 utf8_1.1.4
[85] permute_0.9-5 rJava_0.9-13 stringi_1.5.3 parallel_4.0.3 Rcpp_1.0.6 vctrs_0.3.6
[91] xfun_0.21 DEoptimR_1.0-8 tidyselect_1.1.0 coda_0.19-4
bibliography
关键字吗?https://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html - Carlos Luis Rivera\cite{smith1995}
。 - haraldpandoc-citeproc
,已经被弃用,并在从.[R]md生成.tex时标记@mention
,如果我理解正确的话...?)。R Markdown Cookbook的一章指导您使用未与RStudio IDE捆绑的Pandoc版本。请问升级Pandoc后问题是否仍然存在? - Carlos Luis Rivera