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

For write_bib pls add an option to add a blank line after each entry #1862

Closed
hope-data-science opened this issue Jun 18, 2020 · 5 comments
Closed

Comments

@hope-data-science
Copy link

write_bib in knitr is great to export reference of R packages. However, when I use is recently, I find that some software could not read the exported bib file correctly. When I add a break line after each entry, it works. Therefore, might I ask you to add this feature to the function write_bib?

Examples:

# not working

@Manual{R-base,
  title = {R: A Language and Environment for Statistical Computing},
  author = {{R Core Team}},
  organization = {R Foundation for Statistical Computing},
  address = {Vienna, Austria},
  year = {2020},
  url = {https://www.R-project.org/},
}
@Manual{R-ggplot2,
  title = {ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics},
  author = {Hadley Wickham and Winston Chang and Lionel Henry and Thomas Lin Pedersen and Kohske Takahashi and Claus Wilke and Kara Woo and Hiroaki Yutani and Dewey Dunnington},
  year = {2020},
  note = {R package version 3.3.1},
  url = {https://CRAN.R-project.org/package=ggplot2},
}

# work

@Manual{R-base,
  title = {R: A Language and Environment for Statistical Computing},
  author = {{R Core Team}},
  organization = {R Foundation for Statistical Computing},
  address = {Vienna, Austria},
  year = {2020},
  url = {https://www.R-project.org/},
}
# the breakline, could leave blank
@Manual{R-ggplot2,
  title = {ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics},
  author = {Hadley Wickham and Winston Chang and Lionel Henry and Thomas Lin Pedersen and Kohske Takahashi and Claus Wilke and Kara Woo and Hiroaki Yutani and Dewey Dunnington},
  year = {2020},
  note = {R package version 3.3.1},
  url = {https://CRAN.R-project.org/package=ggplot2},
}

Thanks.

@yihui
Copy link
Owner

yihui commented Jun 22, 2020

I think that's definitely a bad bug of the "some software" you mentioned. Can its developers fix the bug?

@hope-data-science
Copy link
Author

That is NoteExpress. If the entries do not have break lines between them, all the entries would be treated as one entry. But if there are breaklines between them, they could be read just well. Finally, I just read the text and add the "\n" in R and make it work. I don't quite know the standard of .bib file.

Thanks.

@yihui yihui closed this as completed in 7fb405f Jun 22, 2020
@yihui
Copy link
Owner

yihui commented Jun 22, 2020

Well, I guess it is easier for me to add the unnecessary empty lines than you reporting the bug to NoteExpress and asking them to fix their bug, so I just did it. But it is still their bug...

@hope-data-science
Copy link
Author

I agree, because we don't need a breakline to recognize the split.
Thank you, it would help a lot.

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants