BibTeX and R
BibTeX is a
well-known format for storing references created by Oren Patashnik and Leslie Lamport back in 1985. BibTeX that may
be reused by another software, like LaTeX, for adding
references to a work. An example structure of a BibTeX entry would
be:
@book{einstein1921,
title = {Relativity: The Special and the General Theory},
author = {Einstein, A.},
year = 1920,
publisher = {Henry Holt and Company},
address = {London, United Kingdom},
isbn = 9781587340925
}
On this case, the entry (identified as einstein1921
)
would refer to a book. This entry then can be used on a document and
include references to it.
On R (R Core Team 2021), we can replicate this
structure using the bibentry()
and toBibtex()
functions:
entry <- bibentry("book",
key = "einstein1921",
title = "Relativity: The Special and the General Theory",
author = person("A.", "Einstein"),
year = 1920,
publisher = "Henry Holt and Company",
address = "London, United Kingdom",
isbn = 9781587340925,
)
toBibtex(entry)
#> @Book{einstein1921,
#> title = {Relativity: The Special and the General Theory},
#> author = {A. Einstein},
#> year = {1920},
#> publisher = {Henry Holt and Company},
#> address = {London, United Kingdom},
#> isbn = {9781587340925},
#> }
The final results of the entry as a text string would be parsed as:
Einstein A (1920). Relativity: The Special and the General
Theory. Henry Holt and Company, London, United Kingdom. ISBN
9781587340925.
Entry Models
This section presents the specific mapping proposed for each of the
BibTeX entries, providing further information on how each field is
treated. Examples are adapted from the xampl.bib file
provided with the bibtex package (Patashnik and Berry
2010).
article
The crosswalk of @article does not require any
special treatment.
@article Model
@article |
type: article |
When converting CFF to BibTeX, type magazine-article and
newspaper-article are converted to
@article. |
author* |
authors |
|
title* |
title |
|
journal* |
journal |
|
year* |
year |
|
volume |
volume |
|
number |
issue |
|
pages |
start and end |
Separated by -- , i.e,
pages = {3–5}
would be parsed as
start: 3
end: 5 |
month |
month |
As a fallback, month could be extracted also from
date (BibLaTeX field)/ date-published |
note |
notes |
|
Examples
BibTeX entry
@article{article-full,
title = {The Gnats and Gnus Document Preparation System},
author = {Leslie A. Aamport},
year = 1986,
month = jul,
journal = {{G-Animal's} Journal},
volume = 41,
number = 7,
pages = {73+},
note = {This is a full ARTICLE entry}
}
CFF entry
type: article
title: The Gnats and Gnus Document Preparation System
authors:
- family-names: Aamport
given-names: Leslie A.
year: '1986'
month: '7'
journal: G-Animal's Journal
volume: '41'
issue: '7'
notes: This is a full ARTICLE entry
start: 73+
From CFF to BibTeX
@Article{aamport:1986,
title = {The Gnats and Gnus Document Preparation System},
author = {Leslie A. Aamport},
year = {1986},
month = {jul},
journal = {G-Animal's Journal},
volume = {41},
number = {7},
pages = {73+},
note = {This is a full ARTICLE entry},
}
book/inbook
In terms of field required on BibTeX, the only difference between
@book and @inbook is that the latter
requires also a chapter or pages,
while for @book these fields are not even optional. So
we propose here to identify an @inbook on CFF as a
book with section and start-end fields
(CFF).
Another specificity is that series field is mapped
to collection-title and address is mapped as the
address of the publisher (CFF).
@book/@inbook Model
@book |
type: book |
|
@inbook |
type: book |
For identifying an @inbook in CFF, assess if
section or start-end information is available |
author* |
authors |
|
editor* |
editors |
|
title* |
title |
|
publisher* |
publisher |
|
year* |
year |
|
chapter* |
section |
Only required on @inbook |
pages* |
start and end |
Only required on @inbook |
volume |
volume |
|
number |
issue |
|
series |
collection-title |
|
address |
address property of publisher |
As a fallback, the field location can be used |
edition |
edition |
|
month |
month |
See Note on article |
note |
notes |
|
Examples: book
BibTeX entry
@book{book-full,
title = {Seminumerical Algorithms},
author = {Donald E. Knuth},
year = 1981,
month = 10,
publisher = {Addison-Wesley},
address = {Reading, Massachusetts},
series = {The Art of Computer Programming},
volume = 2,
note = {This is a full BOOK entry},
edition = {Second}
}
CFF entry
type: book
title: Seminumerical Algorithms
authors:
- family-names: Knuth
given-names: Donald E.
year: '1981'
month: '10'
publisher:
name: Addison-Wesley
address: Reading, Massachusetts
volume: '2'
notes: This is a full BOOK entry
edition: Second
collection-title: The Art of Computer Programming
From CFF to BibTeX
@Book{knuth:1981,
title = {Seminumerical Algorithms},
author = {Donald E. Knuth},
year = {1981},
month = {oct},
publisher = {Addison-Wesley},
address = {Reading, Massachusetts},
series = {The Art of Computer Programming},
volume = {2},
note = {This is a full BOOK entry},
edition = {Second},
}
Examples: inbook
BibTeX entry
@inbook{inbook-full,
title = {Fundamental Algorithms},
author = {Donald E. Knuth},
year = 1973,
month = 10,
publisher = {Addison-Wesley},
address = {Reading, Massachusetts},
series = {The Art of Computer Programming},
volume = 1,
pages = {10--119},
note = {This is a full INBOOK entry},
edition = {Second},
type = {Section},
chapter = {1.2}
}
CFF entry
type: book
title: Fundamental Algorithms
authors:
- family-names: Knuth
given-names: Donald E.
year: '1973'
month: '10'
publisher:
name: Addison-Wesley
address: Reading, Massachusetts
volume: '1'
notes: This is a full INBOOK entry
edition: Second
section: '1.2'
start: '10'
end: '119'
collection-title: The Art of Computer Programming
From CFF to BibTeX
@InBook{knuth:1973,
title = {Fundamental Algorithms},
author = {Donald E. Knuth},
year = {1973},
month = {oct},
publisher = {Addison-Wesley},
address = {Reading, Massachusetts},
series = {The Art of Computer Programming},
volume = {1},
pages = {10--119},
note = {This is a full INBOOK entry},
chapter = {1.2},
edition = {Second},
}
booklet
In @booklet address is mapped to
location.
@booklet Model
@booklet |
type: pamphlet |
|
title* |
title |
|
author* |
authors |
|
howpublished |
medium |
|
address |
location |
|
month |
month |
See Note on article |
year |
year |
As a fallback, year could be extracted also from
date (BibLaTeX field)/ date-published |
note |
notes |
|
Examples
BibTeX entry
@booklet{booklet-full,
title = {The Programming of Computer Art},
author = {Jill C. Knvth},
date = {1988-03-14},
month = feb,
address = {Stanford, California},
note = {This is a full BOOKLET entry},
howpublished = {Vernier Art Center}
}
CFF entry
type: pamphlet
title: The Programming of Computer Art
authors:
- family-names: Knvth
given-names: Jill C.
date-published: '1988-03-14'
month: '2'
location:
name: Stanford, California
notes: This is a full BOOKLET entry
medium: Vernier Art Center
year: '1988'
From CFF to BibTeX
@Booklet{knvth:1988,
title = {The Programming of Computer Art},
author = {Jill C. Knvth},
year = {1988},
month = {feb},
address = {Stanford, California},
note = {This is a full BOOKLET entry},
howpublished = {Vernier Art Center},
date = {1988-03-14},
}
conference/inproceedings
Note that in this case, organization is mapped to
institution, as BibTeX does not prescribe the use of
institution on these entries.
@conference/@inproceedings Model
@conference / @inproceedings |
type: conference-paper |
CFF entries with type =conference are mapped back to
@inproceedings. |
author* |
authors |
|
title* |
title |
|
booktitle* |
collection-title |
|
year* |
year |
|
editor |
editors |
|
volume |
volume |
|
number |
issue |
|
series |
conference |
|
pages |
start and end |
See Note on article |
address |
location |
As a fallback, address property of conference can be
used |
month |
month |
See Note on article |
organization |
institution |
|
publisher |
publisher |
|
note |
notes |
|
Examples
BibTeX entry
@inproceedings{inproceedings-full,
title = {On Notions of Information Transfer in {VLSI} Circuits},
author = {Alfred V. Oaho and Jeffrey D. Ullman and Mihalis Yannakakis},
year = 1983,
month = mar,
booktitle = {Proc. Fifteenth Annual ACM Symposium on the Theory of Computing},
publisher = {Academic Press},
address = {Boston},
series = {All ACM Conferences},
number = 17,
pages = {133--139},
editor = {Wizard V. Oz and Mihalis Yannakakis},
organization = {The OX Association for Computing Machinery}
}
CFF entry
type: conference-paper
title: On Notions of Information Transfer in VLSI Circuits
authors:
- family-names: Oaho
given-names: Alfred V.
- family-names: Ullman
given-names: Jeffrey D.
- family-names: Yannakakis
given-names: Mihalis
year: '1983'
month: '3'
collection-title: Proc. Fifteenth Annual ACM Symposium on the Theory of Computing
publisher:
name: Academic Press
location:
name: Boston
issue: '17'
editors:
- family-names: Oz
given-names: Wizard V.
- family-names: Yannakakis
given-names: Mihalis
start: '133'
end: '139'
conference:
name: All ACM Conferences
address: Boston
institution:
name: The OX Association for Computing Machinery
From CFF to BibTeX
@InProceedings{oahoullman:1983,
title = {On Notions of Information Transfer in VLSI Circuits},
author = {Alfred V. Oaho and Jeffrey D. Ullman and Mihalis Yannakakis},
year = {1983},
month = {mar},
booktitle = {Proc. Fifteenth Annual ACM Symposium on the Theory of Computing},
publisher = {Academic Press},
address = {Boston},
editor = {Wizard V. Oz and Mihalis Yannakakis},
series = {All ACM Conferences},
number = {17},
pages = {133--139},
organization = {The OX Association for Computing Machinery},
}
incollection
As booktitle is a required field, we propose to map
that field to collection-title and the type to
generic. Therefore, an @incollection is a
type: generic with a collection-title key.
@incollection Model
@incollection |
type: generic |
Including a collection-title value |
author* |
authors |
|
title* |
title |
|
booktitle* |
collection-title |
|
publisher* |
publisher |
|
year* |
year |
|
editor |
editors |
|
volume |
volume |
|
number |
issue |
|
series |
series |
|
type |
- |
Ignored |
chapter |
section |
|
pages |
start and end |
See Note on article |
address |
address property of publisher |
See Note on book/inbook |
edition |
edition |
|
month |
month |
See Note on article |
note |
notes |
|
Examples
BibTeX entry
@incollection{incollection-full,
title = {Semigroups of Recurrences},
author = {Daniel D. Lincoll},
year = 1977,
month = sep,
booktitle = {High Speed Computer and Algorithm Organization},
publisher = {Academic Press},
address = {New York},
series = {Fast Computers},
number = 23,
pages = {179--183},
note = {This is a full INCOLLECTION entry},
editor = {David J. Lipcoll and D. H. Lawrie and A. H. Sameh},
chapter = 3,
type = {Part},
edition = {Third}
}
CFF entry
type: generic
title: Semigroups of Recurrences
authors:
- family-names: Lincoll
given-names: Daniel D.
year: '1977'
month: '9'
collection-title: High Speed Computer and Algorithm Organization
publisher:
name: Academic Press
address: New York
issue: '23'
notes: This is a full INCOLLECTION entry
editors:
- family-names: Lipcoll
given-names: David J.
- family-names: Lawrie
given-names: D. H.
- family-names: Sameh
given-names: A. H.
section: '3'
edition: Third
start: '179'
end: '183'
From CFF to BibTeX
@InCollection{lincoll:1977,
title = {Semigroups of Recurrences},
author = {Daniel D. Lincoll},
year = {1977},
month = {sep},
booktitle = {High Speed Computer and Algorithm Organization},
publisher = {Academic Press},
address = {New York},
editor = {David J. Lipcoll and D. H. Lawrie and A. H. Sameh},
number = {23},
pages = {179--183},
note = {This is a full INCOLLECTION entry},
chapter = {3},
edition = {Third},
}
manual
As in the case of conference/inproceedings,
organization is mapped to institution.
@manual Model
@manual |
type: manual |
|
title* |
title |
|
author |
authors |
|
organization |
institution |
|
address |
location |
|
edition |
edition |
|
month |
month |
See Note on article |
year |
year |
See Note on booklet |
note |
notes |
|
Examples
BibTeX entry
Note that month can’t be parsed to a single integer
in the range 1--12
as required on CFF, so it is not parsed
to avoid validation errors.
@manual{manual-full,
title = {The Definitive Computer Manual},
author = {Larry Manmaker},
year = 1986,
month = {apr-may},
address = {Silicon Valley},
note = {This is a full MANUAL entry},
organization = {Chips-R-Us},
edition = {Silver}
}
CFF entry
type: manual
title: The Definitive Computer Manual
authors:
- family-names: Manmaker
given-names: Larry
year: '1986'
location:
name: Silicon Valley
notes: This is a full MANUAL entry
edition: Silver
institution:
name: Chips-R-Us
From CFF to BibTeX
@Manual{manmaker:1986,
title = {The Definitive Computer Manual},
author = {Larry Manmaker},
year = {1986},
address = {Silicon Valley},
note = {This is a full MANUAL entry},
edition = {Silver},
organization = {Chips-R-Us},
}
mastersthesis/phdthesis
In terms of field required on BibTeX, it is identical for both
@mastersthesis and @phdthesis.
We propose here to identify each type of thesis using the field
thesis-type (CFF). So if thesis-type contains a regex pattern
(?i)(phd)
it would be recognized as
@phdthesis.
@mastersthesis/phdthesis Model
@mastersthesis |
type: thesis |
Use also thesis-type for identifying the thesis type. |
@phdthesis |
type: thesis |
Use also thesis-type for identifying the thesis type. |
author* |
authors |
|
title* |
title |
|
school* |
institution |
|
year* |
year |
|
type |
|
|
address |
address property of institution |
See Note on book/inbook |
month |
month |
See Note on article |
note |
notes |
|
Examples: mastersthesis
BibTeX entry
@mastersthesis{mastersthesis-full,
title = {Mastering Thesis Writing},
author = {Edouard Masterly},
year = 1988,
month = jun,
address = {English Department},
note = {This is a full MASTERSTHESIS entry},
school = {Stanford University},
type = {Master's project}
}
CFF entry
type: thesis
title: Mastering Thesis Writing
authors:
- family-names: Masterly
given-names: Edouard
year: '1988'
month: '6'
notes: This is a full MASTERSTHESIS entry
institution:
name: Stanford University
address: English Department
thesis-type: Master's Thesis
From CFF to BibTeX
@MastersThesis{masterly:1988,
title = {Mastering Thesis Writing},
author = {Edouard Masterly},
year = {1988},
month = {jun},
note = {This is a full MASTERSTHESIS entry},
school = {Stanford University},
}
Examples: phdthesis
BibTeX entry
@phdthesis{phdthesis-full,
title = {Fighting Fire with Fire: Festooning {F}rench Phrases},
author = {F. Phidias Phony-Baloney},
year = 1988,
month = jun,
address = {Department of French},
note = {This is a full PHDTHESIS entry},
school = {Fanstord University},
type = {{PhD} Dissertation}
}
CFF entry
type: thesis
title: 'Fighting Fire with Fire: Festooning French Phrases'
authors:
- family-names: Phony-Baloney
given-names: F. Phidias
year: '1988'
month: '6'
notes: This is a full PHDTHESIS entry
institution:
name: Fanstord University
address: Department of French
thesis-type: PhD Thesis
From CFF to BibTeX
@PhdThesis{phony?baloney:1988,
title = {Fighting Fire with Fire: Festooning French Phrases},
author = {F. Phidias Phony-Baloney},
year = {1988},
month = {jun},
note = {This is a full PHDTHESIS entry},
school = {Fanstord University},
}
misc
The crosswalk of @misc does not require any special
treatment. This entry does not require any field.
Note als that it is mapped to type: generic as incollection, but in this case
booktitle is not even an option, so the proposed
definition should cover both @misc and
@incollection without problems.
@misc Model
@misc |
type: generic |
|
author |
authors |
|
title |
title |
|
howpublished |
medium |
|
month |
month |
See Note on article |
year |
year |
See Note on booklet |
note |
notes |
|
Examples
BibTeX entry
@misc{misc-full,
title = {Handing out random pamphlets in airports},
author = {Joe-Bob Missilany},
year = 1984,
month = oct,
note = {This is a full MISC entry},
howpublished = {Handed out at O'Hare}
}
CFF entry
type: generic
title: Handing out random pamphlets in airports
authors:
- name: anonymous
year: '1984'
month: '10'
notes: This is a MISC entry
medium: Handed out at O'Hare
From CFF to BibTeX
@Misc{anonymous:1984,
title = {Handing out random pamphlets in airports},
year = {1984},
month = {oct},
note = {This is a MISC entry},
howpublished = {Handed out at O'Hare},
}
proceedings
The proposed model is similar to conference/inproceedings. Note that
@proceedings does not prescribe a
author field. On this cases, as authors is
required on CFF, we would use anonymous when converting to CFF
and omit it on the conversion back to CFF.
@conference/@inproceedings Model
@proceedings |
type: proceedings |
|
title* |
title |
|
year* |
year |
|
editor |
editors |
|
volume |
volume |
|
number |
issue |
|
series |
conference |
|
address |
location |
As a fallback, address property of conference can be
used |
month |
month |
See Note on article |
organization |
institution |
|
publisher |
publisher |
|
note |
notes |
|
Examples
BibTeX entry
@proceedings{proceedings-full,
title = {Proc. Fifteenth Annual ACM Symposium on the Theory of Computing},
year = 1983,
month = mar,
publisher = {Academic Press},
address = {Boston},
series = {All ACM Conferences},
number = 17,
note = {This is a full PROCEEDINGS entry},
editor = {Wizard V. Oz and Mihalis Yannakakis},
organization = {The OX Association for Computing Machinery}
}
CFF entry
type: proceedings
title: Proc. Fifteenth Annual ACM Symposium on the Theory of Computing
authors:
- name: anonymous
year: '1983'
month: '3'
publisher:
name: Academic Press
location:
name: Boston
issue: '17'
notes: This is a full PROCEEDINGS entry
editors:
- family-names: Oz
given-names: Wizard V.
- family-names: Yannakakis
given-names: Mihalis
conference:
name: All ACM Conferences
address: Boston
institution:
name: The OX Association for Computing Machinery
From CFF to BibTeX
@Proceedings{anonymous:1983,
title = {Proc. Fifteenth Annual ACM Symposium on the Theory of Computing},
year = {1983},
month = {mar},
publisher = {Academic Press},
address = {Boston},
editor = {Wizard V. Oz and Mihalis Yannakakis},
series = {All ACM Conferences},
number = {17},
note = {This is a full PROCEEDINGS entry},
organization = {The OX Association for Computing Machinery},
}
techreport
@techreport Model
@techreport |
type: report |
|
author* |
authors |
|
title* |
title |
|
institution* |
institution |
|
year* |
year |
|
type |
- |
Ignored |
number |
issue |
|
address |
address property of institution |
See Note on book/inbook |
month |
month |
See Note on article |
note |
notes |
|
Examples
BibTeX entry
@techreport{techreport-full,
title = {A Sorting Algorithm},
author = {Tom Terrific},
year = 1988,
month = oct,
address = {Computer Science Department, Fanstord, California},
number = 7,
note = {This is a full TECHREPORT entry},
institution = {Fanstord University},
type = {Wishful Research Result}
}
CFF entry
type: report
title: A Sorting Algorithm
authors:
- family-names: Terrific
given-names: Tom
year: '1988'
month: '10'
issue: '7'
notes: This is a full TECHREPORT entry
institution:
name: Fanstord University
address: Computer Science Department, Fanstord, California
From CFF to BibTeX
@TechReport{terrific:1988,
title = {A Sorting Algorithm},
author = {Tom Terrific},
year = {1988},
month = {oct},
address = {Computer Science Department, Fanstord, California},
number = {7},
note = {This is a full TECHREPORT entry},
institution = {Fanstord University},
}
unpublished
@unpublished Model
@unpublished |
type: unpublished |
|
author* |
authors |
|
title* |
title |
|
note* |
notes |
|
month |
month |
See Note on article |
year |
year |
See Note on booklet |
Examples
BibTeX entry
@unpublished{unpublished-minimal,
title = {Lower Bounds for Wishful Research Results},
author = {Ulrich Underwood and Ned Net and Paul Pot},
note = {Talk at Fanstord University (this is a minimal UNPUBLISHED entry)}
}
CFF entry
type: unpublished
title: Lower Bounds for Wishful Research Results
authors:
- family-names: Underwood
given-names: Ulrich
- family-names: Net
given-names: Ned
- family-names: Pot
given-names: Paul
notes: Talk at Fanstord University (this is a minimal UNPUBLISHED entry)
From CFF to BibTeX
@Unpublished{underwoodnet,
title = {Lower Bounds for Wishful Research Results},
author = {Ulrich Underwood and Ned Net and Paul Pot},
note = {Talk at Fanstord University (this is a minimal UNPUBLISHED entry)},
}