From http://www.organognosi.com/create-universal-indexes-for-your-own-books-and-papers/#codesyntax_1