{latexmk} is a Perl script to automatically run latex and related commands as many times as needed to build the final document.

learn more… | top users | synonyms

47
votes
3answers
3k views

What are the differences between latexmk and rubber?

I just stumbled on this blog post about rubber and was thinking: "Isn't that exactly what latexmk does?". So, now I wonder: isn't it? Or are there any differences?
32
votes
5answers
4k views

How to make Latexmk use makeglossaries?

Is there a way to make Latexmk invoke makeglossaries (part of the glossaries package)? Specifically I want to use latexmk to compile a LaTeX document that uses the glossaries package to produce a ...
21
votes
7answers
5k views

PDF reader on Linux capable of continuous updating

I am using latexmk on a Red Hat 5 machine. I use it as: latexmk -pdf -pvc I would like to have my PDF reader automatically update the PDF as it is changed. What PDF reader do I need for this? What ...
21
votes
1answer
459 views

What are the main differences between AutoLaTeX and LaTeXMk?

I stumbled upon AutoLaTeX today and it seems to be very similar to LaTeXMk indeed. Can you summarise the main differences, which might help me choose between the two tools?
20
votes
1answer
2k views

ultrafast pdflatex with precompiling

I try to improve the time pdflatex needs to compile my book. Really working example book.tex %&preamble \begin{document} Hi \end{document} and preamble.tex \documentclass{article} I run ...
19
votes
4answers
4k views

Override TikZ externalize “up-to-date” flag

I am currently using the TikZ external package in order to avoid recompiling all figures in my thesis. There are more than 50 figures, relying on large data, and a full build without externalizing ...
19
votes
1answer
1k views

Is there latexmk functionality for LuaTeX?

I am a big fan of latexmk and lately I have been looking a bit towards LuaTeX. However I am am yet to find a way to get the functionality of latexmk (mainly recompilation on changes and automatic ...
19
votes
6answers
2k views

Use latexmk to filter the log file

I am usually using latexmk in a split shell with my code on the left and latexmk in -pvc mode on the right. When using some packages which themselves load a lot of other packages (think beamer) the ...
17
votes
2answers
3k views

Set up vim with latex-suite to use latexmk

Today I started using vim in combination with the latex-suite plugin, and so far I love it. Other editors also make using LaTeX easier by providing code completed and such, but latex-suites's ...
16
votes
1answer
1k views

texify or latexmk?

MiKTeX 2.9 comes with both and they apparently do the same thing. I was wondering what the difference between them is (if any) and which one is preferable for large documents.
15
votes
1answer
2k views

Compile using latexmk in emacs

In the accepted answer in for the question it is suggested how to add latexmk support to emacs. If I get it right, compiling the .tex file should be assigned to C-c C-c. However this doesn't work for ...
14
votes
4answers
2k views

Use MiKTeX option through latexmk

When I use MiKTeX normally, I call this: pdflatex --aux-directory="C:\Users\doncherry\Documents\LaTeX\AUXI_global" foo.tex For latexmk outputting pdf (via pdfLaTeX) with continuous previewing, my ...
13
votes
2answers
3k views

Using Biber with latexmk

With version 4.22, latexmk claims to [s]upport the use of biber (with the biblatex package) as an alternative to bibtex for generating bibliographies, with automatic determination of whether to ...
12
votes
3answers
400 views

Arara problem with xelatexmk rule

After many tests in Mac OS X and Ubuntu, I haven't been able to run arara with Brent Longborough's xelatexmk.yalm rule. No matter what I do, arara seems to run latexmk with pdflatex, not with xelatex. ...
12
votes
1answer
506 views

Errors in latexmk with use of auto-pst-pdf and hyperref

If we compile \documentclass[a4paper]{article} \usepackage[pdftex]{hyperref} \usepackage{pstricks,auto-pst-pdf} \begin{document} \tableofcontents \section{Curves} \begin{postscript} \begin{pspicture} ...
12
votes
1answer
202 views

What is the name of the bibfile when an extension is given in \bibliography?

When using bibtex, one supplies a command like \bibliography{test} in the document to indicate the use of a bibfile test.bib, and the extension is omitted. However, it is natural for a user also to ...
11
votes
2answers
3k views

Specify -output-directory when using latexmk

I am using latexmk for the automatic resolution of needed reruns. I would like to put all build files (aux, log, bbl, pdf, etc.) in a subdirectory. I cannot find an option for latexmk to do this. If ...
11
votes
1answer
886 views

Can I make latexmk quieter?

I'm using latexmk -quiet, and while it suppresses most status messages, there are still a few irrelevant messages that it gives me: $ latexmk -pdf -silent document.tex Latexmk: Run number 1 of rule ...
10
votes
3answers
972 views

Most efficient method to strip all of the LaTeX code from a document?

Can some people please give me some suggestions for the most efficient method to strip all of the LaTeX code from a document? The best method that comes to my mind, which I have no clue about how to ...
10
votes
2answers
352 views

latexmk / imakeidx interoperational efficiency

imakeidx and latexmk are two of my favorite utilities of all TeX-time, especially in the face of book-size compilations (super thanks @egreg and @John Collins!). Apart from ease of producing multiple ...
10
votes
1answer
1k views

How to make `latexmk` run the appropriate amount of times

System: Ubuntu 13.04, Texlive2012, Emacs 24.something, I run Emacs from the terminal and not the GUI, and I have server mode on in Emacs. When compiling my latex documents, I use AucTeX in emacs to ...
10
votes
1answer
2k views

gnuplot in LaTeX, without gnuplottex

I'm using the cairolatex terminal in gnuplot to create some surface plots (pgfplots is failing the task because of its hunger for memory). As the number of plots increase, I would like to include the ...
9
votes
2answers
1k views

Textmate + Latexmk

Textmate for OS X, has a LaTeX bundle (a great bundle indeed). But this bundle packs the latexmk script (version 3.7 or so), I am wondering if anyone was able to update the latexmk version that comes ...
9
votes
3answers
626 views

latexmk precompiler options

Are there any precompiler options for latexmk I can use inside my LaTeX source files? (For instance, to tell latexmk to compile using XeLaTeX instead of PDFLaTeX.) I know how to do that with the ...
9
votes
1answer
1k views

How do I set up my config file to have latexmk default to making a pdf?

I can't see any situation where I would want to compile a dvi file. Therefore I'd like to have latexmk default to giving me a pdf via pdflatex, so I don't have to type -pdf every time. I've tried ...
9
votes
1answer
3k views

all-in-one-engine for TeXShop

I am trying to write my 'Matura work' for school in LaTeX. Therefore I am using MacTeX and TeXShop and normally it works fine. But I am really annoyed with running all these different engines like ...
9
votes
2answers
1k views

Emacs-org-mode and latexmk

After getting to know org mode here, I tried it out. It seems to be, indeed, very helpful. However, I want it to work smoothly with LaTeX, and as a compiling script I want to use latexmk. I followed ...
9
votes
1answer
487 views

Can my custom dependency for latexmk be improved?

In my answer to this question on how to make latexmk use makeglossaries for generating glossaries, I propose the following custom dependency: add_cus_dep('glo', 'gls', 0, 'run_makeglossaries'); ...
8
votes
2answers
1k views

Clean .bbl files with latexmk -C

I use TeXLive 2012 and compile with run latexmk -pvc -pdf -quiet test.tex later I clean the directory with latexmk -C But test.bbl remains. How can I help latexmk to find bbl files? test.bbl ...
8
votes
4answers
460 views

XeLaTeX - terminal output too verbose

Is it possible to reduce the amount of information you get from running: xelatex texfile.tex The oh so long output: This is XeTeX, Version 3.1415926-2.4-0.9998 (TeX Live 2012/Debian) restricted ...
8
votes
2answers
349 views

Check if pdf is up to date for git pre-commit hook?

It'd be really nice to do a git commit -m "some stupid broken commit" and get back a refusal from git, because the latest version of the document hasn't been successfully compiled yet (ie. changes ...
8
votes
1answer
410 views

Configuring latexmk to use a preprocessor (lhs2TeX)

I want to preprocess an input file before compiling it with, say, pdflatex. I found one way to do this using the "internal" specification described in the latexmk manual, but I expected there to be a ...
8
votes
2answers
539 views

latexmk with external references

Is there a way to make latexmk aware of external references as they are imported via the xr package? My Problem is that I have several files for weekly exercise sheets. Sometimes I have references to ...
7
votes
1answer
1k views

latexmk: Multiple custom-generated files and \input

Referring to this question, I found that having multiple custom-generated files in a document generated by latexmk doesn't really work for me. The modus operandi is that latexmk runs pdflatex, ...
7
votes
2answers
574 views

Make latexmk ignore errors and finish compiling

I like to use latexmk in command line this way: latexmk -pvc -pdf -xelatex foo.tex In the event of an error in the translation, I have to manually terminate the compilation in the command line (the ...
7
votes
1answer
990 views

Can I use latexmk -C for cleaning up only, and compile with another tool?

Can I compile my document with other tools and use latexmk -C only for cleaning up? One application could be to use it then in the clean: section of a Makefile that uses pdflatex for make pdf.
7
votes
1answer
385 views

What is the most elegant way to provide a cross-platform project with automated compilation routine?

There are many different ways to automate the compilation of a LaTeX project. I would like to start a discussion, what would be the most flexible and elegant and omnipotent way to provide a project ...
7
votes
1answer
364 views

Continuously compile/watch source files in ConTEXt?

Is there an equivalent to latexmk in Context? I want the script to watch my source files for changes and continuously recompile them. Here is how I would do it with latexmk: latexmk -bibtex -pdf ...
7
votes
2answers
224 views

latexmk endless loop when non-PDF outputs are specified

My source file is based on the standalone package. The \documentclass command specifically looks like this: \documentclass[preview, convert={density=300}]{standalone} If the source file is named ...
7
votes
2answers
513 views

How to ignore .latexmkrc

I usually love my .latexmkrc settings. However I am trying to play with Template Toolkit to build a LaTeX file, then compile it with latexmk (all of this inside a perl script) and thus I would like to ...
6
votes
3answers
2k views

configure latexmk in Texworks 0.2.3

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.
6
votes
1answer
757 views

Latexmk can't see a dependency on a .fmt format file

I'm using latex on a small netbook, and with average-sized files (~150 pages at the moment) compilation is already pretty slow. So I am looking for every way to speed up the compilation. In this ...
6
votes
1answer
695 views

latexmk -pvc doesn't recompile if included files change

My current project layout looks like this: Mainfile.tex with \begin{document} including preamble (\documentclass, packages, newcommands, etc) and chapters, split into separate subfiles. I'm using ...
6
votes
1answer
492 views

How to know that latexmk picks up my configuration file?

I've put .latexmkrc file into my working directory, but it doesn't seem to be doing anything. Is there a way to check that latexmk picks up my configuration file?
6
votes
2answers
846 views

! Bad space factor (0)

When trying to compile my .tex file using the latexmk -latex=xelatex command, I receive the following error: ! Bad space factor (0). <recently read> \@savsf l.39 \end{seriate} ? Then, if ...
6
votes
1answer
565 views

How to use latekmk with feynmf/feynmp?

Background The latexmk tool can be used to automatically process your LaTeX files enough times to generate the output. As discussed here and here, latexmk now supports setting out_dir which passes ...
6
votes
1answer
3k views

Ignore compile errors

How can I set up a permanent compile loop that keeps trying even when there are errors? I'm using latexmk with a remote compile setup as discussed here and here. However, if I save a document with a ...
6
votes
1answer
239 views

xelatex vs. xelatexmk compilation – what’s the difference?

I'm using TeX Live 2012 in a Windows environment. I used to compile with xelatexmk, which isn't included in TeX Live's "Processing tools". When I wanted to switch from LaTeX to XeLaTeX, I read ...
6
votes
1answer
814 views

How to run latexmk with LuaTeX on Windows?

This is a bit of a follow-up question to: Is there latexmk functionality for LuaTeX? I am trying to setup latexmk on Windows 7 together with LuaTeX but it does not work for some unknown reason. ...
5
votes
1answer
3k views

pdflatex, latexmk, synctex: Adding an option to pdflatex causes synctex to fail

The user "Mike" kindly helped me on Latex, Emacs: automatically open TeX Help buffer on error and close it after correction of the error? to create the following function which makes error detection ...