Sunday, February 5, 2012

A bibtex-batch script

I currently write my book in Texlipse, a plug-in for Eclipse. I organized it in several \input-files with a separate chapter bib for all of the chapters. I could not find any help within Texlipse how to enforce a bibtex-run on each single input file, so the following batch script can help. Open a text editor like the WordPad or NotePad++ and copy the following line:

for /f %%a IN ('dir /b *.aux') do bibtex %%a

Save the file, e.g., as bibtexBatch.BAT. For convenience, save it to the same directory in which your .aux-files are located.
Then run the 'CMD' command to get a DOS shell and change to the directory in which your .aux files are located. You run the batch file by calling it directly: bibtexBatch.BAT

It cycles through the current directory and returns all files with the .aux-extension and hands them over to bibtex.

No comments:

Post a Comment