{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

1
vote
0answers
12 views

vim + knitr + synctex + file watch + sumatrapdf (on windows)

I'm trying to get a task runner watching a directory for changes and then run the following: knit Rnw file pdflatex the resulting tex file (with bibtex) open pdf viewer and have both forward/reverse ...
1
vote
1answer
89 views

latexmk -pv default previewer

I currently use Acrobat as my default pdf viewer for everything other than latex related tasks. So not particularly keen on changing my system default. I would like to get latexmk to use sumatrapdf ...
3
votes
1answer
17 views

Latexmk and the location of Asymptote's generated files

I am trying out Asymptote with latexmk and I would like to automate the interaction. Consider the following latex document test.tex: \documentclass{minimal} \usepackage{asymptote} ...
0
votes
1answer
25 views

Compiling Latex in Vim Results in Error

I am trying to compile the following LaTeX using vimtex continuous compiling in vim: LaTeX: \documentclass[12pt]{article} \title{Electrolysis of Water and Aqueous Solutions} \author{Carlo Abelli \\ ...
0
votes
0answers
49 views

latexmk - command not found on OS X

I've installed the MacTex bundle on my machine. When I try to run $latexmk I get a 'command not found'. I already reinstalled the latexmk bundle in TeX Live Utility. Both universal-darwin and ...
0
votes
1answer
33 views

latexmk: jobname option and clean up incompatibility?

I'm using latexmk in a Makefile to compile my document. Since I want my output filename to be different from the input filename, I use latexmk's option jobname. The problem is: it seems to be ...
1
vote
1answer
64 views

Delete Chapter, section etc.. titles from pdf body only include them in TOC

I want chapter, section, subsections in TOC but I do not want them in the pdf body as 1 title occupies entire page. I have already put the chapter names, section names etc in headers. So the only task ...
2
votes
1answer
38 views

Add to latexmk black&white output version

I want to generate a colored and a black & white version of my latex document. Is it possible to configure latexmk via a latexmkrc file to do so? Output folder should contain two pdf files. ...
4
votes
1answer
78 views

How sensible is it to use latexmk?

Until recently I always compiled my documents via the steps, pdflatex -> makeindex/biber -> pdflatex -> pdflatex (and the intermediate steps only if necessary). Latexmk does all the ...
1
vote
0answers
40 views

in texworks under windows, latexmk hangs

I have a windows 8 installation of texworks. Texlive is located at: c:\bin\texlive\2014\bin\win32 When I run the command: latexmk -pdf $fullname (see previous question) texworks gives the ...
0
votes
0answers
33 views

latexmk compiling the wrong file in texworks

I added the tool latexmk with the argument -pdf as shown in the screenshot below. However, when it compiles, it is building the wrong file. I assume there should be a parameter in here to pass in the ...
0
votes
0answers
48 views

LatexMK in DVI Mode does not import PNG

LatexMK doesn't import PNG File(running in DVI Mode) as it cannot find bounding box. As solution's I tried the following: I found bounding box using extractbb but the bounding box is not the ...
3
votes
1answer
34 views

How can one manually add a line to the pdflatex -recorder .fls file?

I'm using a LuaLaTeX package that includes a feature that calls an external executable (i.e. something that requires -shell-escape) to generate a TeX file from a distinct source file, which is then ...
38
votes
6answers
5k 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 ...
1
vote
1answer
45 views

Latexmk not using pdflatex

I have a .tex file which attempts to \includegraphics with a .pdf file. This is perfectly possible when explicitly running pdflatex but doesn't work with latexmk because latexmk runs with latex and ...
0
votes
0answers
37 views

I'm sick of typing -pdf every darn time [duplicate]

Ok, so latexmk is great. However, you either have to type -pdf or set up a file with that in it. So, on windows, where do I put that file? All the guides are for windows.
1
vote
0answers
41 views

Latexmk, gnuplot and subfolder [closed]

I tried to setup latexmk such that my gnuplot files are generated automatically. Here is what I've done: Folder/file structure: latexmkrc foo.tex graphics/plot.gp latexmk: add_cus_dep('gp', ...
3
votes
1answer
71 views

latexmk option -c not working

I try to use latexmk, version: 4.39, with the -c option, but it does not give any output. \documentclass{article} \begin{document} Hello, world! \end{document} There is no output when I use latexmk ...
1
vote
0answers
89 views

latexmk will compile in Sublime Text, even though the data is missing

I've come across an odd problem. Here is what happens: I run the Sublime Text builder using ⌘-B on a .tex file. This file accesses external data from, say, data.csv. If I now delete that same ...
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 ...
0
votes
0answers
51 views

Latexmk not found in TexWorks

I am trying to use Latexmk in TexWorks on OSX 10.10. I declared a new Processing tools: Name: Latexmk Program: latexmk Arguments: -e, $pdflatex='pdflatex -synctex=1', -pdf, $fullname The paths are ...
3
votes
1answer
641 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, ...
2
votes
1answer
149 views

Auctex's C-c C-c issue with latexmk

This is my Emacs information. GNU Emacs 24.4.1 (x86_64-apple-darwin14.1.0, NS apple-appkit-1344.72) of 2015-02-16 I installed Auctex 11.88.2 with package-install. When I open the main tex, and ...
0
votes
0answers
48 views

How to ignore undefined references (e.g. when temporarily commenting out whole chapters)?

I'm working on a fairly large document, and compilation times are somewhat annoying. My general workflow is to use: latexmk in continuous mode to compile the document (pdflatex), and rubber-info on ...
3
votes
1answer
119 views

Using latexmk with multiple tex files in the directory

edit solution to compile : latexmk -pdf mainfile.tex I have left this example up as it might contain language used by others unfamiliar with this area :) At the very least it provides a Minimal ...
0
votes
0answers
8 views

How to add a template to my “global” latex install? [duplicate]

I'm compiling my latex via the command line using latexmk. However, I'm using a template which isn't built-in and I'd like to be able to reuse the template in the future for other documents without ...
3
votes
0answers
60 views

How to set latexmk to clean directory?

I know I can tweak $clean_ext setting inside .latexmkrc to clean specific files when invoking latexmk -c. However, it doesn't work for directory. The directory I want to clean is _minted-<main ...
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 ...
3
votes
0answers
55 views

Latexmk ignore a file

I have a directory of .tex files that I want to build using latexmk by running latexmk in that directory. However, there is one .tex file that is included by all other files, which is not a valid ...
2
votes
1answer
182 views

Latexmk: Stop processing on pdflatex error

If my tex-files contain an error (such as an undefined control sequence), latexmk will present a prompt and ask for manual input before continuing. Now, of course it is possible to force further ...
3
votes
2answers
96 views

latexmk cleanup

When I do latexmk -c foo.tex, latexmk cleans up as expected. I tried to configure latexmkrc so that this would happen automatically. Here's my latexmkrc file: $pdf_mode = 1; $silent = 1; ...
0
votes
0answers
9 views

recognizing custom packages in latexmkrc [duplicate]

I have a file, jtc.sty, that houses all the repetitive stuff that normally goes into a latex document (usepackage statments, turning paragraph indent off, and some formatting stuff) that I include in ...
7
votes
1answer
119 views

pdfLatex exitcode when running with timeout

I'm using latexmk for compilation of my document and want to limit time for every compile cycle. In order to do it I use timeout util in following way: latexmk -f -pdf -bibtex \ -pdflatex="timeout ...
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, ...
0
votes
0answers
83 views

latexmk requires two runs to finish job

I do latexmk --xelatex foo.tex to compile my job, and the program always needs another run to finish. When I run it the first time it ends saying Maximum runs of pdflatex reached without getting ...
2
votes
0answers
72 views

latexmk cd option not working

I'm using latexmk to build my latex files. The command latexmk -cd E:\work\foo.tex used to work fine until I updated my latexmk to ver 4.41 using texlive's tlmgr, and suddenly the -cd option's no ...
1
vote
1answer
245 views

How to configure latexmk to compile tmp file and then replace pdf/synctex files?

history For the reasons explained in this question How can I keep browsing my pdf with synctex at the same time as LaTeX is rebuilding it? I want to modify my latexmk settings. old configuration Up ...
4
votes
1answer
218 views

latexmk -outdir with \include

I'm trying to get latexmk to compile a .tex file with external \include{...} references to a specific build directory so I don't pollute my directory tree with .aux files, etc. However, it appears ...
1
vote
0answers
77 views

latexmk difference between linux and windows

I use Texlive and need to comple via tex>dvi>pdf using latexmk, suppress halt on error and enable synctex. The command "latexmk -cd -e \"$dvipdf =\'dvipdfm %O -o %D %S\'; $latex=\'latex %O -synctex=1 ...
5
votes
1answer
73 views

Compile a document as “draft” for the first few times and then non-draft in the final round

I'm working on a big document in which there are many images. Usually, I compile it with latexmk and it works quite well. But: with all these images it's quite slow when compiling. Is it somehow ...
1
vote
0answers
214 views

Vim-LaTeX with latexmk closes .tex at compilation

Problem When I compile a .tex document with \ll and there are no changes, I get a short prompt and then get back to my document. However when there are changes, I get two other files presented and ...
0
votes
0answers
72 views

Why is something like Latexmk needed or why do we sometimes need to compile a file multiple times?

It was my intention to use a makefile or a script to built my latex files when I do a git commit. When looking up for some best practices I came upon this site a few times and was frequently ...
1
vote
0answers
492 views

latexmk and ps2pdf on Mac OS (TextMate)

I just recently came across a TeX file which is working with eps-files, so that latexmk first generates a .dvi file. The conversion to .ps also works great, but after that latexmk is not able to ...
1
vote
1answer
98 views

Message Highlight when compiling LaTeX document by latexmk

It may sound picky, but I'd like to highlight some special messages while compiling LaTeX document by latexmk. For example, these are the first few lines of screen messages when I tried to compile a ...
1
vote
1answer
223 views

latexmkrc, asymptote and subfolders on Mac OS

I just started to learn asymptote (actually because TikZ is not that great for 3D surfaces and curves on these). To set up my system i would like asymptote to work in a subdirectory in order to keep ...
9
votes
2answers
1k 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 ...
2
votes
1answer
180 views

latexmk and \graphicspath

This is (imho) the same question as this but I'm going to provide more information on how to reproduce. The general problem seems to be that latexmk does not seem to work together with graphicx' ...
1
vote
1answer
77 views

LaTeXTools in SublimeText: quickly open subfiles

I have started using LaTeXTools in SublimeText and think it is amazing! I am wondering if there is a convenient way to open subfiles from a master file, like I can with the Structure sidebar in ...
4
votes
1answer
375 views

Can I pass LaTeX commands to latexmk instead of a filename?

This is a follow-up to How can I automate the workflow for producing multiple versions of a document? Here is toy example of my problem. I want to automate the generation of two slightly different ...
3
votes
1answer
158 views

latexmk with xelatex xdv mode

I want to know how to use latexmk with xelatex and tell it to write to xdv file a number of times until all the references are correct, then use xdvipdfmx once to generate the final output. This is ...