How to change bibliography style in Rmarkdown?

依然范特西╮ 提交于 2020-05-17 06:29:06

问题


I am trying to change the style of my bibliography in Rmarkdown. I followed this solution but nothing happens in my case.

This is my code:

---
title: "Tilte"
author:
  - name: Rollo99

abstract: |
 Abstract

keywords: whatever
date: "`r Sys.Date()`"
citation_package: natbib
bibliography: library.bib
biblio-style: abbrvdin
references:
link-citations: yes
linkcolor: blue
output: 
  rticles::elsevier_article:
    number_sections: yes
header-includes:
- \setcitestyle{numbers}
- \usepackage{amsmath}
- \usepackage{hyperref}
- \usepackage{graphicx}
- \usepackage[section]{placeins}
- \usepackage{float}
- \usepackage[font=small, skip=1pt]{caption}
- \usepackage[labelfont=bf]{caption}
- \usepackage{amssymb}
- \usepackage{inputenc}
- \usepackage{placeins}
- \usepackage{blindtext}
- \usepackage{setspace}
- \usepackage[top=3cm, bottom=3cm, left=3cm, right=3cm]{geometry}
- \usepackage{amsmath}
- \usepackage{amssymb}
- \usepackage{mathrsfs}
- \usepackage{longtable}
- \usepackage{graphicx}
- \usepackage{ragged2e}
- \usepackage{csquotes}
- \usepackage[bottom]{footmisc}
- \usepackage{xpatch}
- \setlength\parindent{0pt}
- \usepackage{appendix}


I downloaded and saved abbrvdin.bst in the same repository as the bibliography from here.

What am I doing wrong?

Thanks


回答1:


The elsevier template does not support this, see the code on github.

You can just use plainmat or elsevier-harv.

A solution is to clone the repository and manipulate the file to your need. In addition to that you can raise a pull request.



来源:https://stackoverflow.com/questions/61046041/how-to-change-bibliography-style-in-rmarkdown

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!