Rmarkdown nocite 不显示 pdf 中的引用
Rmarkdown nocite does not display citations in pdf
很难找到不起作用的方法。我想使用 nocite
命令来显示我没有在文档中引用的参考文献条目,但我不知道为什么它不起作用。
这是一个MWE
---
title: "Test"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
pdf_document:
number_sections: true
df_print: kable
highlight: haddock
citation_package: biblatex
biblio-style: "authoryear"
bibliography: biblio.bib
link-citations: true
linkcolor: blue
---
One citation [@wuthrich2008modelling]
---
nocite: |
@wuthrich2009uncertainty
...
# References
我的 biblio.bib 包含以下内容
@inproceedings{wuthrich2008modelling,
title={Modelling the claims development result for solvency purposes},
author={W{\"u}thrich, Mario V and Merz, Michael},
booktitle={Casualty Actuarial Society E-Forum},
pages={542--568},
year={2008}
}
@article{wuthrich2009uncertainty,
title={Uncertainty of the claims development result in the chain ladder method},
author={W{\"u}thrich, Mario V and Merz, Michael and Lysenko, Natalia},
journal={Scandinavian Actuarial Journal},
volume={2009},
number={1},
pages={63--84},
year={2009},
publisher={Taylor \& Francis}
}
@article{merz2007prediction,
title={Prediction error of the expected claims development result in the chain ladder method},
author={Merz, Michael and W{\"u}thrich, Mario V},
journal={Bulletin of Swiss Association of Actuaries},
volume={1},
number={2007},
pages={117--137},
year={2007}
}
理想情况下,我想使用'@*'
命令来引用所有参考书目。
但是在网上找了半天也找不到原因。当我用 keep_tex
跟踪 tex 文件时,没有出现 \nocite{}
。所以它没有出现在参考书目中是有道理的。但是为什么?
我尝试将 nocite
放在文档中的不同位置,但没有任何改变。
sessionInfo()
是
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)
Matrix products: default
locale:
[1] LC_COLLATE=French_France.1252 LC_CTYPE=French_France.1252 LC_MONETARY=French_France.1252
[4] LC_NUMERIC=C LC_TIME=French_France.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.6.1 htmltools_0.4.0 tools_3.6.1 yaml_2.2.0 Rcpp_1.0.3
[6] rmarkdown_1.17 knitr_1.26 xfun_0.11 digest_0.6.22 rlang_0.4.1
[11] evaluate_0.14
作为解决方法,您可以直接在文档中使用\nocite{wuthrich2009uncertainty}
:
---
title: "Test"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
pdf_document:
number_sections: true
df_print: kable
highlight: haddock
citation_package: biblatex
keep_tex: true
biblio-style: "authoryear"
bibliography: biblio.bib
link-citations: true
linkcolor: blue
---
One citation [@wuthrich2008modelling]
\nocite{wuthrich2009uncertainty}
---
...
# References
很难找到不起作用的方法。我想使用 nocite
命令来显示我没有在文档中引用的参考文献条目,但我不知道为什么它不起作用。
这是一个MWE
---
title: "Test"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
pdf_document:
number_sections: true
df_print: kable
highlight: haddock
citation_package: biblatex
biblio-style: "authoryear"
bibliography: biblio.bib
link-citations: true
linkcolor: blue
---
One citation [@wuthrich2008modelling]
---
nocite: |
@wuthrich2009uncertainty
...
# References
我的 biblio.bib 包含以下内容
@inproceedings{wuthrich2008modelling,
title={Modelling the claims development result for solvency purposes},
author={W{\"u}thrich, Mario V and Merz, Michael},
booktitle={Casualty Actuarial Society E-Forum},
pages={542--568},
year={2008}
}
@article{wuthrich2009uncertainty,
title={Uncertainty of the claims development result in the chain ladder method},
author={W{\"u}thrich, Mario V and Merz, Michael and Lysenko, Natalia},
journal={Scandinavian Actuarial Journal},
volume={2009},
number={1},
pages={63--84},
year={2009},
publisher={Taylor \& Francis}
}
@article{merz2007prediction,
title={Prediction error of the expected claims development result in the chain ladder method},
author={Merz, Michael and W{\"u}thrich, Mario V},
journal={Bulletin of Swiss Association of Actuaries},
volume={1},
number={2007},
pages={117--137},
year={2007}
}
理想情况下,我想使用'@*'
命令来引用所有参考书目。
但是在网上找了半天也找不到原因。当我用 keep_tex
跟踪 tex 文件时,没有出现 \nocite{}
。所以它没有出现在参考书目中是有道理的。但是为什么?
我尝试将 nocite
放在文档中的不同位置,但没有任何改变。
sessionInfo()
是
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)
Matrix products: default
locale:
[1] LC_COLLATE=French_France.1252 LC_CTYPE=French_France.1252 LC_MONETARY=French_France.1252
[4] LC_NUMERIC=C LC_TIME=French_France.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.6.1 htmltools_0.4.0 tools_3.6.1 yaml_2.2.0 Rcpp_1.0.3
[6] rmarkdown_1.17 knitr_1.26 xfun_0.11 digest_0.6.22 rlang_0.4.1
[11] evaluate_0.14
作为解决方法,您可以直接在文档中使用\nocite{wuthrich2009uncertainty}
:
---
title: "Test"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
pdf_document:
number_sections: true
df_print: kable
highlight: haddock
citation_package: biblatex
keep_tex: true
biblio-style: "authoryear"
bibliography: biblio.bib
link-citations: true
linkcolor: blue
---
One citation [@wuthrich2008modelling]
\nocite{wuthrich2009uncertainty}
---
...
# References