In the previous post I described how to setup TexStudio with multibib in windows. Recently I moved to Ubuntu 14.04 since it uses much less resources (RAM and CPU) in general use of the PC, thus the experience is much better than windows and the application are just one step away from you by “apt-get” command. One more reason for me was to get my hands on ROS (Robot Operating System). In short, I knew that the first steps to use multibib in TexStudio are the same as the ones described in the previous post, but I just have to update the “Bibtex” script.

Create a shell script file with below contents and put it in your home folder (mine is located at “/home/behzad/bibrun.sh“).

#!/bin/bash

for f in *.aux
do
    echo "Processing $f bib file.."
    bibtex "$f"
done
echo "Finished processing bib files!"

Basically this shell script file will look for all auxiliary bibliography files located in the same folder of the tex file and compile them with BibTex. Then call the shell script file whenever BibTex is supposed to be called. For TexStudio go to “Options > Configure Texstudio > Commands > BibTex” and give the path to the batch.

sh "/home/behzad/bibrun.sh"

That’s all. You can just compile the bibliography using the shortcut “F11” and then compile the master document.