{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

9
votes
2answers
2k 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 ...
5
votes
0answers
382 views

Make latexmk and pdfviewer robust against latex errors [closed]

Sometimes latexmk fails because the file was saved premature. For example the user forgets to close a { bevore he saves the .tex file. The user has to get latexmk back on the road again and usually ...
23
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 ...
10
votes
2answers
406 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 ...
5
votes
1answer
430 views

How to only output dependencies from latexmk?

I'd like to use latexmk in a Makefile, so I've read the manual section on that. However, the dependency generation step seems less than ideal. Specifically, it seems that latexmk can only show ...
12
votes
1answer
620 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
3answers
464 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. ...
8
votes
2answers
413 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 ...
9
votes
3answers
682 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 ...
5
votes
2answers
1k views

Latexmk using -jobname and a command line \def

I am having a problem converting this pdflatex command to use latexmk: pdflatex --file-line-error --shell-escape --synctex=1 \ -jobname=foobar "\def\MyCustomDef{} \input{file-name.tex}" I ...
3
votes
2answers
384 views

Too many compiles when using latexmk with mpgraphics

\documentclass{article} \usepackage{mpgraphics} \begin{document} \begin{figure} . \label{fig:a} \caption{a} \end{figure} \begin{mpinline} draw (20,20)--(0,0)--(0,30)--(30,0)--(0,0) \end{mpinline} ...
8
votes
2answers
632 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 ...
9
votes
1answer
567 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'); ...
5
votes
1answer
4k 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 ...
6
votes
1answer
608 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
1answer
872 views

Latexmk with makeglossaries and auxdir and outdir?

How can I use glosseries with latexmk if I use outdir and auxdir parameters? I keep getting the .gls not found... Here is my latexmk build script: latexmk -outdir=out -auxdir=out -g -f -bibtex -dvi- ...
21
votes
4answers
5k 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 ...
6
votes
1answer
1k 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
315 views

Why doesn't latexmk handle errors in the preamble?

Today I discovered that if I have an error in the preamble of my tex file then Latexmk produce an error only once. Precisely, for example if my file looks like this \documentclass{article} ...
2
votes
1answer
355 views

AUCTeX write only region file

Since I'm used to use latexmk -pvc I'd like to do the following: Run latexmk -pvc (externally) on the _region_.tex file Use AUCTeX to just write the region file instead of compiling. Is there a ...
2
votes
1answer
3k views

hyperref error when using XeLaTeX and fontspec with LaTeXmk

I have defined a compilation tool for TeXWorks as follows: Program: latexmk Arguments: -e $xelatex=q/xelatex $synctexoption %0 %S/ -pdf $fullname It works fine in ...
5
votes
1answer
801 views

How to use qpdf via latexmk?

In the manual of latexmk I read that [latexmk] can also, if needed, call an external program to do other postprocessing on the generated files. How can I call qpdf with latexmk? I want to ...
22
votes
1answer
492 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?
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 ...
4
votes
2answers
809 views

How to clean up .table and .gnuplot using latexmk

I'm using latexmk as my building assistance. I'm also trying to use it as the clean-up contractor... In .latexmkrc I added: $pdf_previewer = "open -a /Applications/Skim.app"; $clean_ext = "rel paux ...
6
votes
2answers
1k 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 ...
5
votes
2answers
2k views

Latexmk: makeglossaries, Biber and pdfLaTeX / Where to put latexmkrc?

I've got myself seriously confused with latexmk. I have been using latexmk on TeX Live 2011 and I have loved it for making my document with a ToC and references with Biber. I am trying to make it work ...
9
votes
2answers
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, ...
13
votes
1answer
1k 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 ...
5
votes
1answer
227 views

Can latexmk be told to ignore specific intermediate files completely?

One latex run suffices to generate the DVI/PDF version of the LaTeX document \documentclass{article} \usepackage{comment} \includecomment{comment} \begin{document} \begin{comment} \noindent ...
7
votes
3answers
3k views

Where should I put a latexmkrc file (using TeXLive 2011 and Windows 7) so that it is available to all my document files?

I spent most of yesterday trying to get LaTeX to create a list of abbreviations using the {nomencl} package , and after a lot of research managed to succeed using latexmk and creating a customised ...
2
votes
0answers
983 views

Latexmk with makeindex and -output-directory [closed]

My current .latexmkrc looks (more or less) like this: $pdflatex = "xelatex -src-specials -synctex=1 -interaction=nonstopmode %O %S"; # for nomenclature add_cus_dep("nlo", "nls", 0, "nlo2nls"); sub ...
6
votes
1answer
830 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 ...
2
votes
0answers
290 views

xelatexmk and emacs [closed]

For technical reason, I had to set for using emacs as my working environment, as I am able to type directly some Unicode signs that otherwise I cannot code in with Texworks or TeXmaker. At this point, ...
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.
7
votes
1answer
911 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 ...
3
votes
1answer
238 views

Using Latexmk with mpost [duplicate]

Is it possible to tell latexmk to execute mpost paper.mp after each compilation run if paper.mp has changed? I tried to create a custom latexmkrc rule: add_cus_dep('mp', '1', 0, 'mpost'); sub mpost ...
52
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?
6
votes
1answer
664 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 ...
3
votes
1answer
892 views

latexmk -pvc option breaks when compiling beamer class

latexmk is the tool I'm using to compile my documents, and the -pvc option is the one which is normally on. In this setting, when I save a file which produces a compilation error, then latexmk informs ...
1
vote
1answer
2k views

LaTeXmk, xelatex and Texmaker

I am trying to set up Texmaker, so I can use latexmk with xelatex, as biber seems already supported by latexmk. I confess I do not understand how I should proceed about it. For latexmk, I am actually ...
3
votes
1answer
727 views

Vector images in PDF

I use latexmk to automatically generate my LaTeX files. I want to use vector graphics, exported from Matlab (*.eps) but I know, that this is not possible (for some reason) - just image files like ...
4
votes
1answer
2k views

How to use latexmk in Windows with MikTex and Winedt

I am using Windows 7 x64 with MikTex and WinEdt. I just found latexmk has the function for continuous preview when we type latex document. I would like to know if this works if I type my latex ...
19
votes
2answers
4k 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 ...
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 ...
5
votes
1answer
431 views

How to configure latexmk to work recursively? (PDF Thumbnails)

I'm writing a book which will include and explain a handful of different memoir page layouts. Setting the scene In the book, I want to imbed thumbnails of pages from PDFs generated with the page ...
6
votes
2answers
951 views

Specify .ist-File for latexmk in TextMate

So I'm using latexmk.pl to compile my TextMate LaTeX Project and it's running quite nice. The only thing I'm missing, is, that i want to specify an individual style file for the makeindex command, ...
22
votes
7answers
6k 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 ...
22
votes
2answers
2k 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 ...
5
votes
2answers
2k views

How to make LaTeXmk work with XeLaTeX and biber

I'm trying to make LaTeX make work with XeLaTeX and biber for my thesis. The document will have many cross references. What settings do I need to ensure it works correctly? My current settings for ...