<span class="mw-page-title-main">VIP</span>
Fabrice P. Lauss𝕪's Web

VIP

VIP are Very Important Papers, refering to the list of papers cited in a given work, or one branch in the tree of citations.

They are easily extracted from a $\mathrm{\TeX}$ with the VIPfrom script.

VIPfrom

VIPfrom is a python script that lists the BibTeX keys cited by a TeX file, as they are found in my library: sci.bib, Books.bib and arXiv.bib, all three read by default. Where its sibling bibpapersfrom cuts the database by author, this one cuts it by paper: hand it a manuscript and it tells you which of my references that manuscript actually calls, in the form my wiki documents.

Written with the help of Claude Opus 5 on 29 July (2026). Version 1.1.

Usage

laussy@azag:~/publi/20/26/3--ghost$ VIPfrom -cs ghost.tex
* {{pittman95a}}
* {{strekalov95a}}
* {{bennink02a}}
* {{gatti04a}}

That is the whole point of the thing: -cs gives the list ready to be dropped into a wiki page, one bulleted transclusion per line. -c gives the curly brackets without the star, and the bare invocation gives the naked keys, which is what one pipes further:

laussy@azag:~/publi/20/26/3--ghost$ VIPfrom ghost.tex
pittman95a
strekalov95a
bennink02a
gatti04a

laussy@azag:~/publi/20/26/3--ghost$ VIPfrom ghost.tex | keys2wiki

The last line writes the wiki page of every paper cited by the manuscript, which is the reason the script was written in the first place. With no argument at all it takes every *.tex of the current directory, so VIPfrom -cs in a paper's folder is usually all that is needed. It reads stdin when piped, and .aux files work too, since LaTeX writes \citation{...} there.

Order

The keys come out chronologically by default—by year and month as given in the bib, undated entries last—because that is the order in which a bibliography of a subject wants to be read. -o tex keeps instead the order of first citation in the manuscript, i.e. the order in which the paper introduces its references, and -o alpha sorts by key. Repeated citations are collapsed to one entry, across all the files read.

The three bases

Papers are in sci.bib, but books are in Books.bib and preprints in arXiv.bib, and a manuscript of mine cites all three sorts. All three are therefore read by default, in that order, and a key found in several bases is taken from the first that has it. So the whole library answers, and nothing has to be spelled out:

laussy@azag:~/publi/20/25/1--polariton-BEC$ VIPfrom --count poco.tex > /dev/null
261 key(s) listed, 261 cited, 0 not in the bib

-b overrides the set, to restrict to one base or to bring in a paper's local copy. Restricting that same manuscript to sci.bib alone shows what the other two carry—three books and a preprint of ours:

laussy@azag:~/publi/20/25/1--polariton-BEC$ VIPfrom --count -b ~/bib/sci.bib poco.tex > /dev/null
VIPfrom: 4 cited key(s) not in the bib: kittel_book04a, weisbuch_book95a, arXiv_casalengua24a, meystre_book01a
257 key(s) listed, 261 cited, 4 not in the bib

Keys that no base knows are never silently dropped: they are reported on stderr, so that the list on stdout stays clean when it is piped. A base named explicitly with -b that cannot be read is a fatal error, whereas one of the three default ones merely warns and is skipped, so the script still works on a machine that has only sci.bib.

-m lists those orphans instead of the good keys—handy to find what still has to be entered in the base—and -a lists everything cited, in the bib or not. A key that differs from a real one only by its case is pointed at explicitly (did you mean), that being the usual typo.

What counts as a citation

Everything that ends in cite: \cite, \citep, \citet, \citeauthor, \nocite, and the biblatex family \parencite, \textcite, \autocite, including the multi-key forms \cites{a}{b}. Optional arguments are stepped over, so \citep[see][p.~3]{gatti04a} is read correctly, and \nocite{*} pulls in the whole base. TeX comments are ignored, which matters: the commented-out citations of a draft would otherwise pollute the list. \input, \include and \subfile are followed—-n if one does not want that—so a manuscript split in pieces needs only its master file.

Two hazards were worth the care. A group of braces following a citation is not read as keys, so \cite{gatti04a} {\it and then some} does not invent a reference; and a command such as \excitation{...}, which contains no cite at all but looks as if it might, is left alone.

Options

laussy@azag:~/$ VIPfrom -h
usage: VIPfrom [-h] [-b BIB] [-c] [-cs] [-o {chrono,tex,alpha}] [-m | -a] [-n]
               [-q] [--count] [-V]
               [TEXFILE ...]

List the BibTeX keys cited by a TeX file.

positional arguments:
  TEXFILE               TeX (or .aux) file(s); default: *.tex here

options:
  -h, --help            show this help message and exit
  -b BIB, --bib BIB     bib file(s), comma-separated (default:
                        ~/bib/sci.bib,~/bib/Books.bib,~/bib/arXiv.bib)
  -c, --curly           surround each key with {{ }}
  -cs, --curly-star     like --curly, but also prefix each key with *
  -o {chrono,tex,alpha}, --order {chrono,tex,alpha}
                        output order (default: chrono)
  -m, --missing         list instead the cited keys absent from the bib
  -a, --all             also list cited keys absent from the bib
  -n, --no-recurse      do not follow \input, \include and \subfile
  -q, --quiet           do not warn about keys absent from the bib
  --count               print a total count to stderr
  -V, --version         show program's version number and exit

The BibTeX parser is the one of bibpapersfrom, brace-matching and dependency-free, so @string, @comment and nested braces do not confuse it, and the two scripts always agree on what a key is.

Version

  • v1°0: on 29 July (2026), cited keys from TeX (or aux) files, chronological by default, recursing through \input.
  • v1°1: the same day, the whole library—sci.bib, Books.bib, arXiv.bib—read by default instead of sci.bib alone; an absent default base warns rather than aborts.