#1080322 latexmk: add -parallel=N option

Package:
latexmk
Source:
latexmk
Submitter:
Barak A. Pearlmutter
Date:
2026-03-17 21:49:01 UTC
Severity:
normal
Tags:
#1080322#5
Date:
2024-09-02 08:42:13 UTC
From:
To:
Thanks for maintaining latexmk, which I love! I'm a total convert,
proselytizing all my LaTeX-using friends to abandon crufty Makefiles
with multiple idiosyncratic invocations of pdflatex, mkindex, etc, and
just use latexmk.

The one big fly in the ointment is when we have a big project that has
multiple independent .tex files generating multiple documents. For
that, we really want to go parallel. So we end up with something like:

    $ cat Makefile

    TARGETS=foo.pdf bar.pdf baz.pdf
    all: $(TARGETS)
    %.pdf: %.tex; latexmk $<
    FORCE:
    $(TARGETS): FORCE

and then make -j to get a parallel build.
This seems like a shame when

    $ cat latexmkrc
    # -*- perl -*-
    $pdf_mode = 1;
    $dvi_mode = $postscript_mode = 0;
    $do_cd = 1;
    push @extra_pdflatex_options, "-shell-escape";
    push @extra_pdflatex_options, "-interaction=nonstop";
    @default_files = (
        'anne/abstract.tex',
        'bob/background.tex',
        'charlie/intellectual-property.tex',
        'flaubert/sow.tex',
        'paul/proposal.tex'
        );

knows about all the various targets, so replicating the information in
the Makefile seems icky. And you get additional iciness when you start
adding clean targets and whatnot. And when multiple included graphic
files need their format converted, which could be done in parallel but
is instead serialized.

So I asked Google Gemini:

    🤠 How can I tell latexmk to build multiple targets in parallel?

and it replied:

    🟆 To configure `latexmk` to build multiple targets in parallel, you
        can use the `-parallel` option. This option specifies the number of
        parallel jobs that `latexmk` can run simultaneously.

Of course it was hallucinating. Please make its hallucination a reality!

#1080322#10
Date:
2024-09-03 02:18:09 UTC
From:
To:
Hi Barak,

nice idea, but not really in the scope of Debian to add new
functionality.
According to the last line of
	$ latexmk --help | tail -1
	Report bugs etc to John Collins <jcc8 at psu.edu>.
;-)

Best regards

Norbert

#1080322#15
Date:
2024-09-03 10:19:22 UTC
From:
To:
Okay, I'll forward it upstream.
#1080322#20
Date:
2024-09-03 12:54:38 UTC
From:
To:
Hi Barak,

Thanks, much appreciated.

Norbert

#1080322#25
Date:
2026-03-16 22:00:17 UTC
From:
To:
Am 03.09.2024 um 12:19 schrieb Barak A. Pearlmutter:

Hello Barak,

Did you forward to upstream and did you get any response?

Hilmar

#1080322#30
Date:
2026-03-17 00:40:53 UTC
From:
To:
Yes, John Collins responded with a cogent discussion of the implementation
options and their tradeoffs.

#1080322#35
Date:
2026-03-17 07:30:15 UTC
From:
To:
Am 17.03.2026 um 01:40 schrieb Barak A. Pearlmutter:

Hello Barak,

thanks for response.
I guess he did not made yet a statement if and when the feature will be
implemented, correct?

Hilmar

#1080322#40
Date:
2026-03-17 21:47:17 UTC
From:
To:
Am 17.03.2026 um 11:57 schrieb Barak A. Pearlmutter:

Hello,

having said this I would not expect an implementation, at least not in
the near future. Tagging accordingly.

Thanks,
   Hilmar