Do yourself a favor: learn Markdown – Episode 7: BibTeX for online articles

Generate BibTeX from URL

Summary

A tool to create a BibTeX entry for online articles or blogs.

Generate BibTeX from URL

This is a follow-up on 6 “Episode”” in previous posts titled “Do yourself a favor: learn Markdown…

In a previous article (Sgro (2022)) I presented how to add bibliographical information within an Rmarkdown document (Allaire et al. (2023)) with the BibTex format in order to include books, but mostly published articles with a PubMed entry.

This short post is to provide a tool to ease the creation of a BibTex entry for online articles, blogs, etc. using the free tool. “Generate BibTeX from URL” (Dzialowski (2023)) that I have just used for the dplyr posts (Sgro (2023a) and Sgro (2023b).)

Here is a simple example: creating a BibTeX entry for the Faculty page of the Biochemistry Department:

1. Go to the web site: www.getbibtex.com/
2. Enter the web address in the text box.
3. Press the “Get BibTeX” button.

getbibtex.cominterface
Enter the URL in the text box.

The results will appear below in the BibTeX format that can be copied.

getbibtex.com result panel
BiTeX formatted entry is provided.

We can now make some minor adjustments by hand now that the information is in the correct format. I typically do the following:

  1. Edit the title (within to @misc{}) as it is derived from the TITLE entry of the web page.
  2. Fill-in author and year often left blank.

The edited is done on the complete entry which has been pasted as text into a local file which I usually call online.bib.

To use the reference within the Rmarkdown text we add @ before the title. So for this particular page it would be cited with @wiscFaculty and result in this text citation within the text: “Faculty — Biochem.wisc.edu” (2023) and then referenced at the bottom of the page.

The author of this useful script has made the source code available on GitHub (Dzialowski (2023).) As a further example here are the 2 entries I created with this tool for the tool itself and the github code pages. These were generated automatically, I just edited the title and the year as detailed abov.

@misc{Karlosos_getbibtex_2023,
    author = {Karol Dzialowski},
    title = {{U}{R}{L} to {B}ib{T}e{X} generator - get {B}ib{T}e{X} for any website},
    howpublished = {\url{https://www.getbibtex.com/}},
    year = {2023},
    note = {[Accessed 26-12-2023]},
}

@misc{Karlosos_github_2023,
    author = {{K}arlosos {K}arol {D}ziałowski},
    title = {{G}it{H}ub - karlosos/getbibtex: {B}ib{T}e{X} entry generator},
    howpublished = {\url{https://github.com/karlosos/getbibtex}},
    year = {2023},
    note = {[Accessed 26-12-2023]},
}

References

Allaire, JJ, Yihui Xie, Christophe Dervieux, Jonathan McPherson, Javier Luraschi, Kevin Ushey, Aron Atkins, et al. 2023. Rmarkdown: Dynamic Documents for rhttps://CRAN.R-project.org/package=rmarkdown.
Dzialowski, Karol. 2023. “URL to BibTeX Generator – Get BibTeX for Any Website.” https://www.getbibtex.com/.
“Faculty — Biochem.wisc.edu.” 2023. https://biochem.wisc.edu/faculty/.
Sgro, Jean-Yves. 2022. “Do Yourself a Favor: Learn Markdown – Episode 5. BibTeX Interface for PubMed.” https://bcrf.biochem.wisc.edu/2022/10/28/do-yourself-a-favor-learn-markdown-episode-5-bibtex-interface-for-pubmed/.
———. 2023a. “Data Exploration in R with Tidyverse Dplyr – Part 1 – Overview.” https://bcrf.biochem.wisc.edu/2023/12/26/data-exploration-in-r-with-tidyverse-dplyr-part-1-overview/.
———. 2023b. “Data Exploration in R with Tidyverse Dplyr – Part 2 – 10 Examples.” https://bcrf.biochem.wisc.edu/2023/12/26/data-exploration-in-r-with-tidyverse-dplyr-part-2-10-examples/.

Top image credits:  With books, with computer,and mouse surfer, from Pixabay artist Peggy_Marco.