[-- Attachment #1: Type: text/plain, Size: 402 bytes --] Hey all, From the earlier discussion on this, I got feeling a consensus had reached that this is a good idea, as long as we check that latexmk is available first. As such, here is a patch changing the default LaTeX compiler to latexmk --- as long as it's available. For what it's worth I've been using this exact command in my personal config for months now, and it's worked excellently. -- Timothy [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-ox-latex-Change-default-compiler-to-latexmk.patch --] [-- Type: text/x-patch, Size: 2093 bytes --] From 95806243e40d5f9f19a8db71e2b8b0cd0c5fdb68 Mon Sep 17 00:00:00 2001 From: TEC <tec@tecosaur.com> Date: Mon, 7 Jun 2021 00:46:09 +0800 Subject: [PATCH] ox-latex: Change default compiler to latexmk * lisp/ox-latex.el (org-latex-pdf-process): Check for the presence of latexmk when setting the default, and use it when available. Fall back to the current default. This is important for the incoming citation support, as PDF generation will now need to involve bibliography generation. By using latexmk this is taken care of for us. The -%latex part of the command is slightly hacky, but allows latexmk to behave more intelligently for non-pdflatex options. Note that latexmk also seems to care about the order of the arguments. --- lisp/ox-latex.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 9724b0d87..c761cfd7f 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -1165,9 +1165,11 @@ (defcustom org-latex-bib-compiler "bibtex" :package-version '(Org . "9.0")) (defcustom org-latex-pdf-process - '("%latex -interaction nonstopmode -output-directory %o %f" - "%latex -interaction nonstopmode -output-directory %o %f" - "%latex -interaction nonstopmode -output-directory %o %f") + (if (executable-find "latexmk") + '("latexmk -f -pdf -%latex -interaction=nonstopmode -output-directory=%o %f") + '("%latex -interaction nonstopmode -output-directory %o %f" + "%latex -interaction nonstopmode -output-directory %o %f" + "%latex -interaction nonstopmode -output-directory %o %f")) "Commands to process a LaTeX file to a PDF file. This is a list of strings, each of them will be given to the @@ -1211,7 +1213,7 @@ (defcustom org-latex-pdf-process (const :tag "texi2dvi" ("cd %o; LATEX=\"%latex\" texi2dvi -p -b -V %b.tex")) (const :tag "latexmk" - ("latexmk -g -pdf -pdflatex=\"%latex\" -outdir=%o %f")) + ("latexmk -f -pdf -%latex -interaction=nonstopmode -output-directory=%o %f")) (function))) (defcustom org-latex-logfiles-extensions -- 2.31.1
What's the status of this patch?
On Sun, Jun 6, 2021 at 12:55 PM Timothy <tecosaur@gmail.com> wrote:
>
> Hey all,
>
> From the earlier discussion on this, I got feeling a consensus had
> reached that this is a good idea, as long as we check that latexmk is
> available first.
> As such, here is a patch changing the default LaTeX compiler to latexmk
> --- as long as it's available. For what it's worth I've been using this
> exact command in my personal config for months now, and it's worked
> excellently.
>
> --
> Timothy
>
Hi Bruce,
"Bruce D'Arcus" <bdarcus@gmail.com> writes:
> What's the status of this patch?
Can you quickly review it and say whether it's good?
Thanks,
--
Bastien
Looks good, Bastien, and I think reflects the consensus of that thread.
But trying just now, I'm not able to apply the patch on my local repo
for whatever reason, so haven't tested it.
On Wed, Jun 30, 2021 at 6:48 AM Bastien <bzg@gnu.org> wrote:
>
> Hi Bruce,
>
> "Bruce D'Arcus" <bdarcus@gmail.com> writes:
>
> > What's the status of this patch?
>
> Can you quickly review it and say whether it's good?
>
> Thanks,
>
> --
> Bastien
Can we merge this patch now?
On Wed, Jun 30, 2021 at 7:14 AM Bruce D'Arcus <bdarcus@gmail.com> wrote:
>
> Looks good, Bastien, and I think reflects the consensus of that thread.
>
> But trying just now, I'm not able to apply the patch on my local repo
> for whatever reason, so haven't tested it.
>
>
>
> On Wed, Jun 30, 2021 at 6:48 AM Bastien <bzg@gnu.org> wrote:
> >
> > Hi Bruce,
> >
> > "Bruce D'Arcus" <bdarcus@gmail.com> writes:
> >
> > > What's the status of this patch?
> >
> > Can you quickly review it and say whether it's good?
> >
> > Thanks,
> >
> > --
> > Bastien
"Bruce D'Arcus" <bdarcus@gmail.com> writes:
> Can we merge this patch now?
I let Timothy decide.
--
Bastien
Bastien <bzg@gnu.org> writes:
> I let Timothy decide.
I consider this patch fit to merge. I'm just under the impression that
this I should only push files I'm listed as a maintainer for without
explicit approval.
--
Timothy
Hi Timothy,
Timothy <tecosaur@gmail.com> writes:
> Bastien <bzg@gnu.org> writes:
>
>> I let Timothy decide.
>
> I consider this patch fit to merge. I'm just under the impression that
> this I should only push files I'm listed as a maintainer for without
> explicit approval.
You can consider this an explicit approval :) Even if we do something
wrong, we can always discuss and revert it.
Thanks!
--
Bastien
Bastien <bzg@gnu.org> writes:
> You can consider this an explicit approval :) Even if we do something
> wrong, we can always discuss and revert it.
>
> Thanks!
Pushed :) For future reference, should I be less wary of pushing commits
I'm confident in and haven't had any negative feedback on?
--
Timothy
p.s. updates.orgmode.org is returning a 502 error again
Timothy <tecosaur@gmail.com> writes: > Pushed :) For future reference, should I be less wary of pushing commits > I'm confident in and haven't had any negative feedback on? Yes, sure. > p.s. updates.orgmode.org is returning a 502 error again Fixed, thanks. PS: I'm off next week but will be more available from 20-30 July. -- Bastien