I am currently using Texworks + Linux. To compile the PDF I hit pdflatex + bibtex + pdflatex + pdflatex. Is there a way so that I create a new typeset that does that in one click?

Found the easy answer:

1- add a new typeset tool, (Edit > Preferences > Typesetting > Add Processing tools)


2- And use Browse to add your simple bash code:



pdflatex $filename                                                          
bibtex $filename_bib                                                        
pdflatex $filename                                                          
pdflatex $filename 

If you're looking for a solution to the problem rather than an answer to the question (as I understand it), I'd recommend using arara.

There's very good integration documentation available in arara's critically-acclaimed manual, chapter 4.

Essentially, you place a few lines at the top of your TeX document like this:

% arara: pdflatex
% arara: bibtex
% arara: pdflatex
% arara: pdflatex

and then run

$ arara my-file.tex

and arara will understand those first few lines and do what you want. Those first few lines come with options, too, but that's for the documentation to explain :)

As @cfr points out, it's also extensible! You can add your own rules to arara and share them if you can't find what you're looking for. (I believe those types of questions would be on-topic here, but I'm not certain.)

| improve this answer | |
  • 1
    And you can add custom thingies. Also for the documentation to explain. But neat. – cfr Apr 8 '15 at 1:46

Not the answer you're looking for? Browse other questions tagged or ask your own question.