├── .gitignore ├── bibtool-rsc ├── delete-double-entries.rsc ├── fix-page-range.rsc ├── crossref.rsc ├── book-article-rewrite.rsc ├── incollection-title-rewrite.rsc └── book-title-rewrite.rsc ├── bin └── procbib.sh └── README.markdown /.gitignore: -------------------------------------------------------------------------------- 1 | *.bak 2 | socbib-pandoc.bib -------------------------------------------------------------------------------- /bibtool-rsc/delete-double-entries.rsc: -------------------------------------------------------------------------------- 1 | check.double.delete=on 2 | pass.comments=off 3 | -------------------------------------------------------------------------------- /bibtool-rsc/fix-page-range.rsc: -------------------------------------------------------------------------------- 1 | rewrite.rule { pages # "\([0-9]+\) *- *\([0-9]+\)" = "\1--\2" } 2 | -------------------------------------------------------------------------------- /bibtool-rsc/crossref.rsc: -------------------------------------------------------------------------------- 1 | sort.format = {{%1.#s(crossref )a#z}$key} 2 | sort.reverse = off 3 | sort = on 4 | -------------------------------------------------------------------------------- /bibtool-rsc/book-article-rewrite.rsc: -------------------------------------------------------------------------------- 1 | rewrite.limit=1 2 | rewrite.rule {journal # "^\({\)\([^#]*\)\(}\)$" = "\1!!!\2!!!\3"} 3 | -------------------------------------------------------------------------------- /bibtool-rsc/incollection-title-rewrite.rsc: -------------------------------------------------------------------------------- 1 | rewrite.limit=1 2 | rewrite.rule {booktitle # "^\({\)\([^#]*\)\(}\)$" = "\1!!!\2!!!\3"} 3 | -------------------------------------------------------------------------------- /bibtool-rsc/book-title-rewrite.rsc: -------------------------------------------------------------------------------- 1 | rewrite.limit=1 2 | rewrite.rule {title # "^\({\)\([^#]*\)\(}\)$" = "\1!!!\2!!!\3"} 3 | rewrite.rule {shorttitle # "^\({\)\([^#]*\)\(}\)$" = "\1!!!\2!!!\3"} 4 | -------------------------------------------------------------------------------- /bin/procbib.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## Sort the file 4 | cp socbib.bib socbib.bak 5 | bibtool -r biblatex.rsc -s -i socbib.bib -o socbib.bib 6 | bibtool -r biblatex.rsc bibtool-rsc/crossref.rsc -i socbib.bib -o socbib.bib 7 | 8 | ## Make a pandoc-ready copy 9 | cp socbib-pandoc.bib socbib-pandoc.bak 10 | cp socbib.bib socbib-pandoc.bib 11 | perl -pi -e 's/:_//g' socbib-pandoc.bib 12 | perl -pi -e 's/_//g' socbib-pandoc.bib 13 | -------------------------------------------------------------------------------- /README.markdown: -------------------------------------------------------------------------------- 1 | # BibTeX files of use to sociologists 2 | 3 | * Author: Kieran Healy 4 | * Affiliation: Sociology Department, Duke University 5 | * Date: 2008-06-29 6 | * Keywords: sociology, bibtex, bib, econsoc, culture, oss, blood, organs, commodification, altruism 7 | 8 | 9 | # Summary # 10 | 11 | The contents of my ../texmf/bibtex/bib directory. 'socbib.bib' is a consolidated bibtex file created by merging a number of bibtex files I've compiled over the years. The content reflects citations in my own work. 12 | 13 | The bibtool-rsc folder contains some elementary resource files I use while converting, sorting, and normalizing the bib file using the bibtool utility. Bibtool is available via [Homebrew](http://brew.sh)---use `brew install bib-tool` to get it. To properly sort the bib file after adding and entry, do 14 | 15 | bibtool -s -i socbib.bib -o socbib.bib 16 | bibtool -r bibtool-rsc/crossref.rsc -i socbib.bib -o socbib.bib 17 | 18 | The first command sorts the entries alphabetically. The second puts crossref'd items (e.g. book chapters) at the beginning, so that bibtex can find their parent entries (e.g. edited volumes) properly. 19 | 20 | 21 | --------------------------------------------------------------------------------