François Patte <[email protected]> writes:

> Le 11/09/2020 à 14:05, Arash Esbati a écrit :
>> Denis Bitouzé <[email protected]> writes:
>> 
>>> Le 11/09/20 à 12h50, François Patte a écrit :
>>>
>>>> Is it possible to run latexmk as the default compilator while using
>>>> Ctrl-c-c in auctex?
>>>
>>> Maybe with this (don't know if it is enough):
>>>
>>> (add-hook 'LaTeX-mode-hook '(lambda () (setq TeX-command-default 
>>> "Latexmk")))
>> 
>> You also need an entry for "Latexmk" in `TeX-command-list', something
>> like this should do the job:
>> 
>> (eval-after-load "tex"
>>   '(add-to-list 'TeX-command-list
>>              '("Latexmk" "latexmk -pdf %s" TeX-run-TeX nil t
>>                   :help "Run latexmk on file")
>>              t))
>
> Thank you. This with Denis' suggestion does the job.

You're welcome.

> Strangely, at the end of compilation the minibuf claims that I should
> re-run latex to get cross references right. It is strange with
> latexmk... Instead it it should be: "Latexmk: All targets (maridas.xdv
> maridas.pdf) are up-to-date", the last line of the output buffer (C-c C-l).
>
> Also: when an error occurs, this is not reported in the minibuf, only
> "Type C-c C-l to display results of compilation".

AUCTeX doesn't have a parser specific to Latexmk.  There is an
`auctex-latexmk.el' library available which adds a sentinel for Latexmk
to AUCTeX[1].  Maybe you want to use that library or `steal' some code
there.

Best, Arash

Footnotes:
[1]  https://github.com/tom-tan/auctex-latexmk



Reply via email to