[OS X TeX] How to make a original latexmk.engine for TeXShop

Herbert Schulz herbs at wideopenwest.com
Fri Oct 19 13:06:53 EDT 2018



> On Oct 19, 2018, at 11:28 AM, 军其 胡 <junqihu at me.com> wrote:
> 
> The behavior of running latexmk in TeXShop is weird.
> It seems that latexmk.engine would ignore to check the timestamps of the files in the TeX projects.
> It is not like directly running latexmk in the bash shell because it would check timestamps.
> For example, if you execute this following command
> $ latexmk sam.tex
> in bash shell once, the TeX-format files will be compiled.
> If we don't modify anything in this TeX project, just run
> $ latexmk sam.tex
> again, it will give me the following information
> ---------------------------------------------------------------------------------------
> Latexmk: This is Latexmk, John Collins, 7 August 2018, version: 4.59.
> Latexmk: All targets (lnmpde.pdf) are up-to-date
> ---------------------------------------------------------------------------------------
> I can't figure out what happened in TeXShop.
> 
>> Le 19 oct. 2018 à 17:49, Herbert Schulz <herbs at wideopenwest.com> a écrit :
>> 
>> Ok, the following TeXShop engine also reads $PROJECTDIR/latexmkrc.
>> 
>> <mylatexmk.engine>
>> 
>> I assume you're using TeXShop to run the engine so I'd use
>> 
>> $pdflatex = 'xelatex -synctex=-1  --file-line-error %O %S';
>> 
>> in your $PROJECTDIR/latexmkrc file since TeXShop uses that information to find the file for the error in the log file.

Howdy,

Exactly the same behavior in TeXShop! If the files are up to date latexmk gives the same output. Are you sure you are having TeXShop use that engine?

First, how are you using the engine? You should have a line

% !TEX program = mylatexmk

(or whatever you call the engine) at the top of your file. Second, you typeset the document by using Typeset->Typeset (Cmd-T). Then TeXShop will execute the mylatexmk (or whatever…) engine.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)



More information about the MacOSX-TeX mailing list