1
我使用RStudio的Rmarkdown與真正的pandoc引用。我也使用LaTeX編碼解決方法縮進引用。直到RStudio版本1.0.153這個方法工作得很好。自最新版本1.1.383以來,它不再工作。如何在Rmarkdown pandoc真實參考中帶回縮進解決方法?
這是我的代碼:
---
title: Example
author: Author
output: pdf_document
bibliography: bibliography.bib
---
```{r setup, include=FALSE, tidy=TRUE}
library(knitr)
opts_chunk$set(echo = TRUE)
```
# Chapter
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
voluptua [@hawking_thermodynamics_1983]. At Einstein [[email protected]_ist_1905]
vero eos et accusam et justo duo dolores et ea
rebum.
# References
\vspace{-.55cm}
\setlength{\parindent}{-0.2in}
\setlength{\leftskip}{0.2in}
\setlength{\parskip}{8pt}
\noindent
<div id="refs"></div>
```{r refmgr references, results="asis", echo=FALSE}
# PrintBibliography(bib)
```
\setlength{\parindent}{0in}
\setlength{\leftskip}{0in}
\setlength{\parskip}{0pt}
# Appendix
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore
et dolore magna aliquyam erat, sed diam voluptua.
的bibliography.bib的內容:
@article{einstein_ist_1905,
title = {Ist die Trägheit eines Körpers von seinem Energieinhalt abhängig?},
volume = {323},
url = {https://s3.amazonaws.com/objects.readcube.com/articles/downloaded/wiley/a56a92baf12b80889d9de6f28f51f22f8bec1a2b366de4e8171f0d47e890d37a.pdf?response-content-disposition=attachment%3B%20filename%3D%22Einstein-1905-Annalen_der_Physik.pdf%22&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIS5LBPCM5JPOCDGQ%2F20170830%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170830T124037Z&X-Amz-Expires=127162&X-Amz-SignedHeaders=host&X-Amz-Signature=3de93a7b9a7edbcc0676232820c448641df14f4a22d339ad07a8cc06200d7632},
doi = {doi:10.1002/andp.19053231314},
pages = {639--641},
journaltitle = {Ann. Phys.},
author = {Einstein, Albert},
urldate = {2017-08-30},
date = {1905},
file = {a56a92baf12b80889d9de6f28f51f22f8bec1a2b366de4e8171f0d47e890d37a.pdf:C\:\\Users\\jay\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\dbkhbdqv.default\\zotero\\storage\\TTPHSMIX\\a56a92baf12b80889d9de6f28f51f22f8bec1a2b366de4e8171f0d47e890d37a.pdf:application/pdf}
}
@article{hawking_thermodynamics_1983,
title = {Thermodynamics of black holes in anti-de Sitter space},
volume = {87},
issn = {0010-3616, 1432-0916},
url = {http://link.springer.com/10.1007/BF01208266},
doi = {10.1007/BF01208266},
pages = {577--588},
number = {4},
journaltitle = {Communications in Mathematical Physics},
author = {Hawking, S. W. and Page, Don N.},
urldate = {2017-10-13},
date = {1983-12},
langid = {english},
file = {57cae4b908ae3ac722b1eaa1.pdf:C\:\\Users\\jay\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\dbkhbdqv.default\\zotero\\storage\\DZ38DDCK\\57cae4b908ae3ac722b1eaa1.pdf:application/pdf}
}
正如您所看到的<div>
標記(用於讓參考文件出現在附錄之前)似乎沒有更多需要被識別。我無法從RStudio Release History中找出任何東西。
有沒有人知道我如何恢復引用的縮進?
有時候,小事情有很大的不同。 – jaySf
Aye :-)我認爲這是一個pandoc解析器版本的行爲改變,可能浮出水面,因爲隨着rstudio發佈的pandoc也會更新。 – hrbrmstr