LaTeX @Knox

 

LaTeX and BibTeX Information

Alright. So I think the hardest thing, but the most rewarding thing, about LaTeX is how well it handles references. I spent at least five hours formatting the reference list for my comprehensive examinations in Political Science back in the day. Had I used BibTeX, it would have been about an hour.

The reason that it seems so difficult is that the vast majority of that time is spent doing something boring: Coding in the sources using an esoteric format. Boring. Frustrating. But, ultimately, a time-saver.

And so, to help with reducing the boring and frustrating, I created this page. It is divided into source type. Select your source type, copy-paste the code-looking things

The Types of Sources

The following are videos that help to explain LaTeX and how to use it. It is broken into three parts: introduction to LaTeX, using LaTeX to typeset mathematics, and using LaTeX to typeset bibliographies.

Articles

In BibTeX, the @article entry type is used to properly reference an article from a journal, magazine, newspaper, or periodical. Any self-contained regularly published work that contains segments uses the @article entry type. This is an example.

@article{nash-thomas-grey-1951,
author = "John Nash, Bob Thomas, and Jane Grey",
title = "Non-cooperative Games",
journal = "Annals of Mathematics",
year = 1951,
volume = "54",
number = "2",
pages = "286--295",
doi = "10.1080/2330443X.2015.1034389"
}

As with all BibTeX entries, the very first part is how you reference this particular source. So, in the text, I would write \cite{nash-thomas-grey-1951} to place a citation related to this source. I tend towards this a the style for reference IDs. You may find your own style.

The rest of the entry is self-explanatory.

Books

In BibTeX, the @article entry type is used to properly reference an article from a journal, magazine, newspaper, or periodical. Any self-contained regularly published work that contains segments uses the @article entry type. This is an example.

@book{hawking-1988,
title = "A Brief History of Time: From the {B}ig {B}ang to Black Holes",
author = "Hawking, Stephen",
year = 1988,
publisher = "Bantam",
address = "London"
}

As with all BibTeX entries, the very first part is how you reference this particular source. So, in the text, I would write \cite{hawking-1988} to place a citation related to this source. I tend towards this a the style for reference IDs. You may find your own style.

The rest of the entry is self-explanatory. Note that the {braces} are used to ensure “Big Bang” retains that particular capitalization (it is a proper noun). Some reference styles will make the book title “A brief history of time: From the big bang to black holes”. The {braces} ensure Big Bang remains Big Bang.

Data Sources and Software Packages

Data sources and software packages are interesting in that they will frequently specify how to cite them. Sometimes, you cite the data or program by citing an article or book. In R, you can find the BibTeX entry for R and for packages by using the citation() function.

However, if all else fails, data can be referenced in BibTeX using the @misc entry type. This is an example.

@misc{nonresponse-2020,
author = {{United States Census Bureau}}
year = 2022
title = "2020 Census: Tracking Self-Response and Nonresponse Followup for Housing Units by State [Data File]",
url = {https://www.census.gov/library/visualizations/interactive/2020-census-total-response-rates-by-state.html},
urldate = {2022-11-18},
}

As with all BibTeX entries, the very first part is how you reference this particular source. So, in the text, I would write \cite{nonresponse-2020} to place a citation related to this source. I tend towards this a the style for reference IDs. You may find your own style.

The rest of the entry is self-explanatory. Note that the {braces} are used in much the same way "quotation marks" are used: to indicate the value of that field. The second set of {braces} ensure that the capitalization is kept as-is. Some referencing styles will only capitalize the first letter in a title. Here, we are ensuring that “United States Census Bureau” does not change to “United states census bureau”.

Running the citation() command in R produces this BibTeX entry, that I just copy-pasted here:

@Manual{,
title = {R: A Language and Environment for Statistical Computing},
author = {{R Core Team}},
organization = {R Foundation for Statistical Computing},
address = {Vienna, Austria},
year = {2022},
url = {https://www.R-project.org/},
}

Note: This does not give a default ID tag for the entry. So, I would probably change the first line to

@Manual{R,

Most packages will automatically provide the BibTeX result. However, if the package does not, then you can force it. Thus, if I want to get the citation for the VGAM package, I would run

print(citation("VGAM"), bibtex=TRUE)

Web Pages

In BibTeX, the @misc entry type is used to properly reference a webpage. This is an example.

@misc{WinNT,
author = {MultiMedia LLC},
title = {{MS Windows NT} Kernel},
year = 1999,
url = {http://web.archive.org/web/20080207010024/http://www.808multimedia.com/winnt/kernel.htm},
urldate = {2010-09-30}
}

As with all BibTeX entries, the very first part is how you reference this particular source. So, in the text, I would write \cite{WinNT} to place a citation related to this source. I tend towards this a the style for reference IDs. You may find your own style.

The rest of the entry is self-explanatory. Note that the {braces} are used in much the same way "quotation marks" are used: to indicate the value of that field. The second set of {braces} ensure that the capitalization is kept as-is. Some referencing styles will only capitalize the first letter in a title. Here, we are ensuring that “MS Windows NT” does not change to “Ms windows nt”.

Final Notes

These are not the only entry types available in BibTeX. There are at least 14 of them, ranging from @booklet to @phdthesis to @unpublished. These do seem to be the most used types, however.