3 #This is just an example of an external script for finding corresponding file to the citation of the form Author + Year.
4 #You will need to accomodate it to your particular situation.
6 #Syntax: paperview Year Author
7 #Output: absolute path to the file(s)
10 #1) mlocate/updatedb or similar package installed and running.
11 #2) stored papers must contain first author name and year of publication in filename.
19 if [ -z "$name" ]; then exit; fi
21 FILE=`locate -i "$name" | grep -Ei '\.pdf$|\.ps$' | grep "$year" | head -n $MAX_RESULTS`
24 #Putting in background necessary so that LyX does not wait for viewer to end