rstudio / rticles

LaTeX Journal Article Templates for R Markdown
https://pkgs.rstudio.com/rticles/
1.46k stars 516 forks source link

missing comma in sage harvard reference style (SAGE template) #447

Closed maltehueckstaedt closed 2 years ago

maltehueckstaedt commented 2 years ago

Hello!

I would like to use the SAGE template for submitting an article. Unfortunately, I noticed that the Citation does not conform to the sage harvard reference style. Here is an example from the skeleton

Bildschirmfoto 2021-11-18 um 14 00 37

Instead of "last name, comma and year" it cites "last name and year".

I would appreciate any tips on how to use the template with "last name, comma and year" citation.

Thanks a lot!


By filing an issue to this repo, I promise that

I understand that my issue may be closed if I don't fulfill my promises.

cderv commented 2 years ago

Sage format article is using provided biblio style https://github.com/rstudio/rticles/blob/ca8f30f1e2ab31b75e87080356176e602733e084/inst/rmarkdown/templates/sage/resources/template.tex#L82-L85

which is passed through YAML https://github.com/rstudio/rticles/blob/ca8f30f1e2ab31b75e87080356176e602733e084/inst/rmarkdown/templates/sage/skeleton/skeleton.Rmd#L26

This is because this formats seems to use natbib only for bibliography.

According files are provided with the format and maybe those files are out of date and needs updating ?

You can try find another bst file for this biblio style and see if it changes something.

@oguzhanogreden contributed the format. Do you have insight here @oguzhanogreden ?

We would need to go through the guideline and update the journal template accordingly;

One option is also to not rely on natbib only but allow to use the Pandoc citation processing which could use CSL. It seems there is a CSL for Sage harvard style : https://www.zotero.org/styles?q=Sage%20-%20Harvard

maltehueckstaedt commented 2 years ago

thank you @cderv,

another simple workaround is to put the following LaTex line after the YAML:

\setcitestyle{aysep={,}}
oguzhanogreden commented 2 years ago

I don't have anything to contribute to this discussion, unfortunately.

It's been a long time since I've quit academia and academic writing.

cderv commented 2 years ago

@MalteHueckstaedt do you think we should add this in the template directly ? Is this required per guidelines ?

maltehueckstaedt commented 2 years ago

@cderv, yes, i think the guideline of sage harvard reference style clearly requires the comma between author and year.

In fact, the line\setcitestyle{aysep={,}} can simply be inserted into the template at line 51 and the problem is solved.

https://github.com/rstudio/rticles/blob/08d75eb3067425cc442ed3706bda6ee68ba2a2e3/inst/rmarkdown/templates/sage/resources/template.tex#L50-L52

This would go just like that:

\begin{document}

+ \setcitestyle{aysep={,}}

\title{$title$}

Should I make a pull request?

cderv commented 2 years ago

@MalteHueckstaedt yes please do.

Thanks a lot for this solution !

maltehueckstaedt commented 2 years ago

done: https://github.com/rstudio/rticles/pull/451

github-actions[bot] commented 2 years ago

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.