Skip to content

Instantly share code, notes, and snippets.

@bsmithyman
Created July 30, 2013 23:49
Show Gist options
  • Save bsmithyman/6118103 to your computer and use it in GitHub Desktop.
Save bsmithyman/6118103 to your computer and use it in GitHub Desktop.
Takes a LaTeX *.aux file as its first argument. Outputs a sorted, unique list of all citekeys from the original document. Useful for e.g., copying formatted bibliographic entries to a new document manually. Written when I was taking Chapter 5 of my PhD thesis and turning it into a paper.
#!/bin/sh
< $1 grep \\citation | cut -c 10- | sed -e "s/[{},]/\n/g" | sed -e "/^$/d" | sort -u
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment