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

Herbert Schulz herbs at wideopenwest.com
Fri Oct 19 14:51:09 EDT 2018



> On Oct 19, 2018, at 1:26 PM, 军其 胡 <junqihu at me.com> wrote:
> 
> Ok! Following your instructions, latexmk.engine DOES work. Although there are only two lines
> -------------------------------
> #!/bin/bash
> latexmk "$1"
> -------------------------------
> in latexmk.engine.
> 
> I'm confused of the role of latexmk.engine in TeXShop. 
> When I use latexmk in Emacs, I only take it as the wrapped scripts instead of TeX engine.
> In other words, latexmk always ignore the local file variable of Emacs in the TeX-format files when it is called in Emacs.
> In fact, the TeX engine for latexmk is specified in latexmkrc.
> However, by clicking latexmk button in TeXShop, latexmk.engine would also read the local file variable.
> 
>> Le 19 oct. 2018 à 19:06, Herbert Schulz <herbs at wideopenwest.com> a écrit :
>> 
>> 
>> 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.

Howdy,

I sent an updated engine in a later email. Sorry about so many posts.

There are many extra dependencies that are already in the rc files associated with each of the TeXShop engines and they satisfy almost everyone's ordinary needs. If you have special needs for a given project you can always create a platexmkrc (the p is for project) in the same folder as the project. I use different engines for different documents and it's helpful for me to see that I'm using xelatex when I use the xelatexmk engine rather than a generic latexmk engine. The latexmk engine actually is set up to use latex->dvips->ps2pdf.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)



More information about the MacOSX-TeX mailing list