Skip to main content

Princeton Bibliography Reducer

This is a package for reducing LaTeX .bib files to include just what you want.

Shameless plug: check out our book.

Made by Alex Tait

Installation

$ pip install princeton-bibreduce

Usage

There are three ways to call the same thing

1: UNIX command line executable:

$ princeton-bibreduce -cu myManuscript.aux

2: python command line:

$ python -m bibreduce -cu myManuscript.aux

3: from python code:

import bibreduce
bibreduce.main('myManuscript.aux', coauthors=True, urlLinks=True)

Behavior

Generates a .bib file. By default, it adds the _proc suffix to the generated .bib. The customizable fields are:

  • title (flag -t)

  • coauthors (flag -c)

  • doiLinks (flag -d)

  • urlLinks (flag -u)

  • abstract (flag -a)

Specifying the flag transfers that field. All fields not on this list are transferred over.

Get more help with:

$ princeton-bibreduce -h

Special behavior for links

If a link format is specified, it populates the field link. For urlLinks, it just copies over what is in the url field. For doiLinks, it puts “http://dx.doi.org/thedoi” in the link field.

Typical TeX workflow

The goal here is to remove titles from references and try to add URLs.

(optional) Centralized bib libraries

Suppose you have a centralized bib library MasterLibrary.bib Bib globals should go in

OSX: ~/Library/texmf/bibtex/bib/local/MasterLibrary.bib

Linux: ~/texmf/bibtex/bib/local/MasterLibrary.bib

Windows: C:\Users\<user name>\texmf\bibtex\bib\local\MasterLibrary.bib

The TeX file

Suppose you are then working on a TeX file myManuscript.tex containing:

\begin{document}
The text of your paper.
...
\bibliography{MasterLibrary}
\end{document}

This will pull from your centralized library.

Flow

Compile it with:

$ pdflatex myManuscript.tex
$ bibtex myManuscript.aux
$ pdflatex myManuscript.tex

Your .aux file includes everything you need to extract a .bib that is specific to this manuscript. This is where you use this module:

$ princeton-bibreduce myManuscript.aux -cu

to generate myManuscript_proc.bib. Now, go back to the .tex file and change the bibliography to the reduced one:

\bibliography{myManuscript_proc}

One more time, call:

$ pdflatex myManuscript.tex
$ bibtex myManuscript.aux
$ pdflatex myManuscript.tex

Metadata

Release files for princeton-bibreduce 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for princeton-bibreduce 0.2
File Size Uploaded Provenance Actions
princeton-bibreduce-0.2.tar.gz 5.6 kB Without provenance Details for princeton-bibreduce-0.2.tar.gz

Release files / princeton-bibreduce-0.2.tar.gz

Download URL princeton-bibreduce-0.2.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ba521746db4d58efcfe5c9cc83d5dac4e57dab672e6975b6c1e9979a533346db
BLAKE2b-256 checksum
How to use checksums
77a181e14f38732db11ffe608c6fe893d9b2be3d935930edde07bc9b883368e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for princeton-bibreduce 0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page