add function to search tex file for bib file

This is WIP just created the pull request so you can see the idea and think about it/work on it/comment ...