[TxMt] Including .bib files in Latex

Charilaos Skiadas skiadas at hanover.edu
Thu Mar 8 22:22:55 UTC 2007


On Mar 8, 2007, at 4:24 PM, Refsvik Kjell Are wrote:

>> And all this brings us to the suggestion on that web page, which  
>> is probably not the right place to look for it. If you read the  
>> LaTeX help (Bundles -> LaTeX -> Help), you will find a section  
>> about using latexmk.pl. This is a perl script that takes care of  
>> all the above, only doing it if it is necessary, and more that I  
>> did not mention (namely indexes). If you follow the instructions  
>> about enabling it there, then all you have to do is use the  
>> standard Typeset command, and it will do all the necessary BibTeX  
>> work for you.
>
> Music to my ears. But where can I find this perl script and where  
> do I install it?

It comes with the LaTeX Bundle. The LaTeX Bundle Help I mentioned  
above tells you what to do to enable it. You just have to set the  
environment variable TM_LATEX_COMPILER to it. (You have read the  
LaTeX Bundle Help, right? ;) )

>> Otherwise I would suggest simply to run the BibTeX command  
>> whenever you feel the need to, i.e. whenever new citations have  
>> been added to the text, and just the compile command as it  
>> currently stands, instead of always doing the four steps described  
>> above (which is not always needed, for instance if nothing has  
>> changed in the bib file). Incidentally, (always performing the  
>> four steps described above is what the script you linked to does,  
>> so you end up typesetting three times each time, when you could  
>> most of the time have typeset only once).
>
> Being a completely newbie to this world, I am not totally sure how  
> to perform this in the terminal environment. I was under the  
> impression that I could compile it all by compiling the main.tex  
> where all the files are linked/included, but nothing seems to  
> happen with the .bib file. Could you in short explain how the  
> manual compile happens and what commands to issue?

No need for the terminal, the compiling steps are just the same as  
using the Typeset&View command. To run BibTeX and take care of the  
citations, open the *tex* file in textmate, and run the "Run BibTeX"  
command. That would take care of the bib file work. You only need to  
do that when you get warnings about unknown citations. Otherwise, a  
standard Typeset&View command would do it.

If you did want to do it from the terminal though, then suppose your  
file was called foo.tex. Then you would do the following four steps:

pdflatex foo
bibtex foo
pdflatex foo
pdflatex foo

(Honestly though, I haven't done those steps as such for more than a  
year now, I just use the built in commands.

>> Haris Skiadas
>> Department of Mathematics and Computer Science
>> Hanover College
>
> Kjell Are Refsvik

Haris Skiadas
Department of Mathematics and Computer Science
Hanover College







More information about the textmate mailing list