script for references in tex