Someone told me "You can configure latexmk in 0.2.3 in texworks". How, please?

(I need it so that compilation is done properly for bibligraphies.)

I'm in Debian 6 and using TexLive.

3 Answers 3


Go to Edit->Preferences->Typesetting to add Processing tools. Use latexmk under Program and ensure that you have perl installed. Then go to Arguments for further configuration.

If you want to compile via pdflatex, use

$pdflatex='pdflatex -synctex=1 %S'

If you want to compile via latex+dvipdfm, use

$latex='latex -synctex=1 %S'
$dvipdf='dvipdfm %S'

If you want to compile via latex+dvips+ps2pdf, use

$latex='latex -synctex=1 %S'
$dvips='dvips -P pdf -t a4 %S'

Check the box View PDF after running.

The -synctex=1 flag enables synctex, the ability to jump between source code and output with a right click.

The -P pdf option ensures you get a quality pdf output when using dvips, while the -t a4 option takes care of papersize, which may be changed to -t letter as appropriate.

For all configuration options, refer to the latexmk manual.

  • I don't really know what options I should use. I just know I normally use pdflatex but latexmk is supposed to be ideal for bibliography compilation cause it runs something twice. Can you tell me how I would simulate the latexmk present by default in version 4? Which of the above options should I use?
    – ptrcao
    May 24, 2011 at 12:15
  • Nobody has ever explained to me why biblographies need to be run twice before. Perhaps you can?
    – ptrcao
    May 24, 2011 at 12:31
  • 2
    @ptrcao This answer has some comments on why you need to run things several times. It might be helpful
    – Seamus
    May 24, 2011 at 14:36
  • 2
    @ptrcao This answer speaks directly to your question: Undefined citation warnings
    – Alan Munn
    May 24, 2011 at 16:09
  • @WillHunting How can I configure latex+dvips ?
    – azetina
    Dec 3, 2012 at 17:54

You can find all information here: https://github.com/TeXworks/texworks/wiki/AdvancedTypesettingTools


On my machine with texworks (version 0.5 r.952 (Debian)), latexmk version 4.31, and pdflatex from texlive 2011, the above mentioned solution(s) does not work. But the following works.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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