How to change bibliography style in Rmarkdown?
Asked Answered
C

1

0

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

Calliper answered 5/4, 2020 at 16:47 Comment(0)
M
1

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

You can just use plainmat or elsevier-harv.

enter image description here

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

Mouthpart answered 5/4, 2020 at 17:28 Comment(3)
thanks for this. Where exactly shall I place your code in the code I shared. I tried it but nothing happens.Calliper
You can Not add the code I shared. The code is part of the Elsevier template.Mouthpart
got it now sorry. Thanks I will play with it a bit thenCalliper

© 2022 - 2024 — McMap. All rights reserved.