我目前正在尝试在使用 csl 文件时在 Rmarkdown 文件中正确格式化我的书目。
使用 natbib 时,ref-items 之间的间距可以正常工作,但是使用 csl 文件时,它不会产生正确的间距。
由于其他几个原因,我不想使用 natbib 但 csl
由于 \setlength\bibitemsep 或类似的不适用于 csl 。
YAML
font-family: Arial
mainfont: Arial
header-includes:
- \pagenumbering{gobble}
- \usepackage{caption}
- \usepackage{float}
- \captionsetup[figure]{font=footnotesize,format=hang,labelfont=bf,textfont=it,width=.95\textwidth}
output:
bookdown::pdf_document2:
includes:
text-align: justify
latex_engine: "xelatex"
number_sections: yes
fig_caption: yes
toc: false
geometry: "left=3cm,right=3cm,top=2.5cm,bottom=2.5cm"
fontsize: 12pt
bibliography: Microt.bib
csl: the-journal-of-cell-biology.csl
linestretch: 1.5
link-citations: yes
editor_options:
markdown:
wrap: sentence
然后在 rmd 的末尾:
\```{=tex}
\newpage
\pagenumbering{gobble}
\```
# Literature {.unnumbered}
\singlespacing
使用 csl 的空间很小
使用 natbib 空间很好
citation_package: natbib
在 YAML 中
但条目太冗长