My Daily Hacks

Menu Close

Category: Software Hacks

Configure multibib package with TexStudio in UBUNTU

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.

Configure multibib package with TexStudio

Recently I had an issue using the multibib package with my thesis Latex code. I wanted to separate list of my publications from the  cited publication in the thesis and put it in a separate section. Basically multibib does this just by calling the package and introducing new commands for multiple bibliography entries,

\usepackage{multibib}
\newcites{journal,conf}{{Journal articles},{Peer reviewed conferences}}

and then calling the associated bibliography files.

\nocitejournal{*}
\bibliographystylejournal{plainyr-rev}
\bibliographyjournal{mypublicationsJ}
% 'mypublicationsJ' is the name of the bib file
\nociteconf{*}
\bibliographystyleconf{plainyr-rev}
\bibliographyconf{mypublicationsC}
% 'mypublicationsC' is the name of the bib file

The problem is that TexStudio does not compile the extra introduced bib files and just compiles the main bib file. After some searching I found that there is a workaround which might even work with other latex editors. Create a batch file with below contents and put it in the “bin” folder of the miktex (usually located at “C:\Program Files (x86)\MiKTeX 2.9\miktex\bin“).

@ECHO off
IF (%1)==() GOTO end
FOR %%f in (%1\*.aux) DO bibtex %%f
@ECHO on
:end

Basically this batch file will look for all auxiliary bibliography files and compile them with BibTex. Then call the batch whenever BibTex is supposed to be called. For TexStudio go to “Options > Configure Texstudio > Commands > BibTex” and give the path to the batch file followed by “?a“.

"C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\multibibrun.bat" ?a

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

Update: If you are still having difficulties ensure that the path you have your “.tex” file does not include any spaces.

How I enabled third party VOIP on my Thomson router

After I switched my home internet connection from ADSL to Fiber I got a free router from my ISP (Vodafone). It is a Thomson TG784nG784n V3 router but the firmware is kind of locked down and not all the options are available in the web interface. The router comes with two RJ-11 jacks to connect to land line phones. One of the jacks is dedicated to my land line which I receive calls, but the second one is not used at all.  After doing some internet search and getting my hand dirty on the router, I enabled a third party VOIP on the second line of the router. Now I can call any number with cheap rates just by picking up the second phone and dialing, using my preferred third party VOIP provider. You may follow the steps below to do the same for your router since the instructions might work on other models too.
Read more