【发布时间】:2019-05-31 12:31:51
【问题描述】:
我希望你玩得开心。我正在处理RMarkdown 的报告,我想问一个与风格相关的问题。我正在.Rmd 文件中运行下一个代码:
---
bibliography: bb.bib
fontsize: 11pt
nocite: '@*'
output: pdf_document
link-citations: true
---
\newpage
\section{Testing}\label{sec1}
```{r}
summary(cars)
```
\section{Demo}
This was done using @shiina and we will use some info from Section \ref{sec1} to do.
```{r}
summary(iris)
```
\section{References}
在上一个圆圈中的图表是我所做的引用,但我想改变风格。在这种情况下,只有年份链接到参考书目,而作者部分Shiina and Birge 不链接到参考书目。
是否可以调整引用的样式,以便我可以拥有这个:Shiina and Birge, 2004,作者和年份都与参考书目相关联。或者可能是这样的:[Shiina and Birge, 2004] 因为RMarkdown 使用() 而不是[]。我不知道如何在 RMarkdown 中设置该样式。
bb.bib文件的内容如下:
@article {shiina,
author = {Shiina, Takayuki and Birge, John R.},
title = {Stochastic unit commitment problem},
journal = {International Transactions in Operational Research},
volume = {11},
number = {1},
publisher = {Blackwell Publishing},
pages = {19--32},
year = {2004},
}
@book{groewe2001,
title={Stochastic unit commitment in hydro-thermal power production planning},
author={Gr{\"o}we-Kuska, N. and R{\"o}misch, W.},
year={2001},
series = { Preprints aus dem Institut f{\"u}r Mathematik },
publisher = { Humboldt-Universit{\"a}t zu Berlin, Institut f{\"u}r Mathematik },
}
非常感谢您的帮助。
【问题讨论】:
标签: r rstudio r-markdown