Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Citation has incorrect format #54

Closed
carbonmetrics opened this issue Oct 22, 2018 · 8 comments
Closed

Citation has incorrect format #54

carbonmetrics opened this issue Oct 22, 2018 · 8 comments

Comments

@carbonmetrics
Copy link

This question was posted by me on stackoverflow, where it had 10 views and zero reactions:

I am trying out the new Radix for R Markdown.

The citations do not work very well for me. All titles have curly braces around them, and names with special characters are not shown correctly.

screenshot_2018-10-19_18-57-03

Here is an example:

---
title: "Untitled"
description: |
  A new article created using the Radix format.
author:
  - name: Nora Jones 
    url: https://example.com/norajones
    affiliation: Spacely Sprockets
    affiliation_url: https://example.com/spacelysprokets
date: "`r Sys.Date()`"
bibliography: bib.bib
output: radix::radix_article
---

This is the citation [@Rockstrom2009]
Using the bib.bib file:

@article{Rockstrom2009,
archivePrefix = {arXiv},
arxivId = {10.1038/461472a},
author = {Rockstr{\"{o}}m, Johan and Steffen, Will and Noone, Kevin and Persson, {\AA}sa and Chapin, F. Stuart and Lambin, Eric and Lenton, Timothy M. and Scheffer, Marten and Folke, Carl and Schellnhuber, Hans Joachim and Nykvist, Bj{\"{o}}rn and de Wit, Cynthia A. and Hughes, Terry and van der Leeuw, Sander and Rodhe, Henning and S{\"{o}}rlin, Sverker and Snyder, Peter K. and Costanza, Robert and Svedin, Uno and Falkenmark, Malin and Karlberg, Louise and Corell, Robert W. and Fabry, Victoria J. and Hansen, James and Walker, Brian and Liverman, Diana and Richardson, Katherine and Crutzen, Paul and Foley, Jonathan},
doi = {10.5751/ES-03180-140232},
eprint = {461472a},
isbn = {0028-0836},
issn = {17083087},
journal = {Nature},
keywords = {Atmospheric aerosol loading,Biogeochemical nitrogen cycle,Biological diversity,Chemical pollution,Climate change,Earth,Global freshwater use,Land system change,Ocean acidification,Phosphorus cycle,Planetary boundaries,Stratospheric ozone,Sustainability,carrying capacity,climate change,ecology,nitrogen,phosphorus,planetary boundaries},
number = {24 September 2009},
pmid = {19779433},
primaryClass = {10.1038},
title = {{Planetary boundaries: Exploring the safe operating space for humanity}},
volume = {461},
year = {2009}
}

The bib file was exported through Mendeley 1.19.2 with LaTeX escape special characters = on. Using RStudio 1.2.1060 and R 3.4.4 on a Xubuntu 64 16.04 system.

How can I make these references show correctly? I have already tried switching off LaTeX special characters. The same biographic entries work fine in LaTeX.

@jjallaire
Copy link
Member

jjallaire commented Oct 22, 2018 via email

@carbonmetrics
Copy link
Author

I have posted the issue. I have cleaned the bibliography with a C script, but the problem remains with double names of authors and special signs. The problem does not occur in rmarkdown or latex.

@jjallaire
Copy link
Member

Okay, thanks for posting that issue over there. As I mentioned before this is a defect in a library called by a library we consume, so we can't really fix it unless we re-write Radix to do all of it's own bibliography handling.

@carbonmetrics
Copy link
Author

Thanks. The C patch fixed the problem partially. It may be possible to fix it further along those lines. I can imagine that nobody wants to rewrite Radix. But the Distill people do not seem to undertake any action and this problem hits the core of what Radix aims to do: academic writing.

My guess is that there are more people with this same problem. It will reduce the uptake of Radix, which would be an absolute shame. I really can't use Radix if it can't cite properly, whatever the cause.

@jjallaire
Copy link
Member

I understand that. I think the answer here may ultimately be that we take over bibliographic rendering from Distill (i.e. just ignore their default processing and do our own).

@kevinykuo
Copy link
Contributor

Sent a PR upstream distillpub/template#98, will follow up with necessary changes here.

@carbonmetrics
Copy link
Author

carbonmetrics commented Apr 16, 2019

There was a problem with formatting of citations in radix, and it is still there in distill. #54.

I love the formatting of the output in this package, but in its present form it cannot be used for its intended purpose.

@jjallaire
Copy link
Member

I just pushed a change that should address this (we now use pandoc to generate the bibliography rather than the distill framework): e8585bc

You can install this with remotes::install_github("rstudio/distill")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants