Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
488 views
in Technique[技术] by (71.8m points)

r - How to move the bibliography in markdown/pandoc

I'm currently writing my bachelor thesis and my instructor wants me to put my appendix after the bibliography but markdown/pandoc puts the references at the end by default. I read the instructions at http://yihui.name/knitr/demo/pandoc/ and tried to use the include-after-body=FILE command to put a separate .rmd file at the end of the document My code looks like this:

```{r, echo=FALSE, warning=FALSE, message=FALSE}
library(knitr)
pandoc('thesis.rmd', format="latex")
```

and for the options:

<!--pandoc
t: latex
include-after-body: appendix.rmd
o: output.pdf
-->

Where appendix.rmd is the separate appendix file.

After klicking on convert pdf, the process gets stuck with an error after the line executing pandoc --include-after-body=appendix.rmd -o thesis.pdf -f markdown -t latex -o thesis.pdf "thesis.utf8md"

The error is:

pandoc.exe: Error producing PDF from TeX source.

Is there something wrong with the code or is there some other method to remove the bibliography from the end of the document?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

There is another solution:

<div id="refs"></div>

It lets you put the references wherever you want.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...