Skip to main content

A tool to automatically retrieve bibtex entries

Project description

caleb

PyPI version Coverage Status Build Status

caleb is a tool to automatically fill in your Latex citations.

Usage examples

See the examples directory along with the an_example.tex file. The following examples occur in the examples directory.

  • First run pdflatex an_example.tex to generate an_example.aux. caleb will now parse an_example.aux to generate the appropriate bibliography file.
caleb an_example
  • The first important commandline option is --take-first. When making a query, it is possible that there are multiple result. By default, caleb will take no action here. However, if the --take-first flag is passed, caleb will take the first entry.
caleb --take-first an_example
caleb --method ams

Workflow integration

latexmk

  • The best way is probably to integrate into latexmk. The -pdflatex flag allows us to run caleb after each pdflatex call.
latexmk -pdf -pdflatex='pdflatex %O %S; caleb -t -m ams %B' an_example
  • We can set the -pdflatex flag in a .latexmkrc file. This can either go in the your tex project folder or in the home directory. So in the .latexmkrc file, include the following line (see examples directory for an example):
$pdflatex='pdflatex %O %S; caleb %B'

Barebones

  • The barebone approach is to run caleb before running bibtex.
pdflatex an_example
caleb an_example
bibtex an_example
pdflatex an_example
pdflatex an_example

cocalc

http://cocalc.com contains a collaborative latex editor that allows you to use a custom build command. We can use caleb by changing it to

latexmk -pdf -pdflatex='pdflatex %O %S; caleb -t -m ams %B' -f -g -bibtex -synctex=1 -interaction=nonstopmode an_example.tex

Help

caleb comes with some command line arguments.

$ caleb --help
usage: caleb [-h] [-t] [-v] [--version] [-m {crossref,ams}] [input_name]

positional arguments:
  input_name

optional arguments:
  -h, --help            show this help message and exit
  -t, --take-first      Take first result if multiple results
  -v, --verbose         Increase verbosity of output
  --version             Outputs the version
  -m {crossref,ams}, --method {crossref,ams}
                        Specify a method for retrieving citations

Installation

Dependencies

Testing and Development Dependencies

pip

pip3 install caleb --user

setup.py

python setup.py install --user

Goal of project

  • Reach feature parity with IRL Caleb

Homepage

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

caleb-0.6.0.tar.gz (7.1 kB view hashes)

Uploaded Source

Built Distribution

caleb-0.6.0-py3-none-any.whl (7.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page