{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

10
votes
1answer
2k 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 ...
7
votes
2answers
724 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 ...
5
votes
1answer
156 views

Recompile main LaTeX document with latexmk when an associated m4 circuit macro file changed?

I've a main LaTeX document with an associated \input{file} in it. This file is generated by the combination of the m4 macro processor and dpic (m4 file.m4 | dpic > file.tex) in order to take the ...
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 ...
0
votes
1answer
112 views

latexmk pointing to a line of code with an error that I don't see [closed]

When trying to compile my code, latexmk keeps hitting me with an undefined control sequences. I have checked above, below, and the line it says is causing the issue, but I don't see anything wrong. ...
4
votes
1answer
4k views

Perl Interpreter could not be found [duplicate]

I downloaded MikTeX and got TeXworks. I try to follow the manual and create an example document. But I get an error message in the "Console output" window: "Latexmk.exe: The Perl intetpreter could not ...
1
vote
2answers
792 views

AUCTeX -output-directory + copy *.pdf to working directory

Part I: Could someone please give me an example of how to configure AUCTeX to use the -output-directory option? I've tried inserting -output-directory="/tmp" in a variety of ways at different ...
5
votes
1answer
594 views

How to run LaTeX and lilypond-book in one command?

I was wondering if there was any command which would let me create a PDF from a LyTeX source in one step. Currently, I am first executing lilypond-book: lilypond-book --latex-program=pdflatex --pdf ...
0
votes
0answers
34 views

latexmk: generated tex file (via custom add_cus_dep) not found in first pass [duplicate]

I have a latexmk-based project that uses some generated tex files included via \input. I'm generating these files using a latexmkrc file. # latexmkrc $cleanup_includes_cusdep_generated=1; ...
3
votes
0answers
841 views

Problem with un-clear error messages (using LaTeXmk[fls file] and XeLaTeX[bad file descriptor]) [closed]

More or less out of the blue, I've gotten the following: xelatex: Bad file descriptor Latexmk: fls file doesn't appear to have been made I've no clue about the first and the second is confusing in ...
6
votes
1answer
259 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 ...
1
vote
1answer
612 views

pdflatexmk compiles \glossaries fine but neglects \glsaddall

I'm using TeXShop and the pdflatexmk script. When I link at least one entry of the glossary with \gls{label} the glossary compiles fine and all works well (working code example). However I want to use ...
5
votes
1answer
301 views

exceltex dependencies in latexmk

I'm working on getting exceltex and latexmk communicating by adding custom dependencies to .latexmkrc. As far as I understand, exceltex works by writing an entry for each \inctab/inccell command 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 ...
3
votes
2answers
896 views

latexmk and nomencl

I'm trying to implement the nomencl package in my Master's thesis, but I'm experiensing serious trouble when it comes to make latexmk/makeindex create or update the nls file. I ended up creating the ...
10
votes
3answers
1k 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 ...
0
votes
1answer
225 views

texlatexmk and mVersion problem

I've just run into a problem with mVersion and by extension latexmk. As users of mVersion know, it updates a file version.dat with each run of the pdf/xe/lua/whatever engine. Until I reached the point ...
3
votes
1answer
69 views

Command line equivalent of “$preview_mode = 1”?

I'm setting up variants of running the latexmk command, and need some help writing a command line that will be used whenever I do not want to use the .latexmkrc file (i.e., -norc). On Mac, it is ...
4
votes
1answer
189 views

Specify timezone for \today and \currenttime

Is there a way I can specify the timezone LaTeX should use when printing the \today and \currenttime (or the datetime package in general)? I need this because travisCI does build my PDF automatically ...
7
votes
1answer
420 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 ...
3
votes
1answer
458 views

latexmk separate build directory

I'm trying to use latexmk for the first time in Ubuntu. My project directory is the following: Project src build images In the src directory are the .tex and .bib files. I want the .aux, .bbl, ...
1
vote
1answer
1k views

Latexmk missing in TeXlive 2012

I would like to use latexmk tools together with TeX Live 2012, but I could not find latexmk. Is it extra tools, or did TeX Live stop supporting it? In my case, I have OS Ubuntu 12.10.
4
votes
2answers
178 views

TeXworks and pvc parameter of latexmk

When we use TeXworks as editor is there any point in using -pvc argument of latexmk?
8
votes
4answers
487 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 ...
12
votes
1answer
210 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 ...
7
votes
1answer
1k 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
2answers
238 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 ...
3
votes
0answers
4k views

Sublime Text 2 and bibtex [closed]

I'm using Sublime Text 2 (ST2) with LaTeXTools to build my .tex-documents. But the .bib-file is not found or doesn't build (I believe the last one). The LaTeX log reports undefined citations, and the ...
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 ...
5
votes
0answers
369 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 ...
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 ...
10
votes
2answers
369 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 ...
4
votes
1answer
348 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
532 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
420 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
359 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
640 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
907 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
359 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
572 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
501 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
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 ...
6
votes
1answer
516 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
791 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- ...
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 ...
6
votes
1answer
857 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
294 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
314 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
2k 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
718 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 ...