[OS X TeX] How to make a original latexmk.engine for TeXShop
Herbert Schulz
herbs at wideopenwest.com
Fri Oct 19 17:49:42 CEST 2018
> On Oct 19, 2018, at 10:30 AM, 军其 胡 <junqihu at me.com> wrote:
>
> I think it's still not a good one, since it only read ~/latexmkrc.
> But I want to make latexmk read $PROJECTDIR/latexmkrc.
>
>> Le 19 oct. 2018 à 16:19, Herbert Schulz <herbs at wideopenwest.com> a écrit :
>>
>> Here's a simple latexmk engine (mylatexmk.engine --- rename it as you wish) that will read in ~/latexmkrc as you wish.
>>
>> <mylatexmk.engine.zip>
>>
>> Just unzip it, place it in ~/Library/TeXShop/Engines and restart TeXShop. It should then appear in the popup engine list on the Source file Toolbar (NOT under the Typeset menu.
>
> I put the following lines into $PROJECTDIR/latexmkrc:
> ---------------------------------------------------------------------------------------
> $pdflatex = 'xelatex -synctex=-1 %O %S';
> $pdf_mode = 1;
> $postscript_mode = 0;
> $dvi_mode = 0;
>
> add_cus_dep('adx', 'and', 0, 'makeadx2and');
> sub makeadx2and {
> system( "makeindex -o \"$_[0].and\" \"$_[0].adx\"" );
> }
>
> add_cus_dep('nlo', 'nls', 0, 'makenlo2nls');
> sub makenlo2nls {
> system( "makeindex \"$_[0].nlo\" -s nomencl.ist -o \"$_[0].nls\"" );
> }
> ---------------------------------------------------------------------------------------
> it always works well.
>
>> By the way, what special settings do you use that aren't properly set by the latexmk engine supplied with TeXShop?
Howdy,
Ok, the following TeXShop engine also reads $PROJECTDIR/latexmkrc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mylatexmk.engine
Type: application/octet-stream
Size: 82 bytes
Desc: not available
URL: <https://tug.org/pipermail/macostex-archives/attachments/20181019/d14d55d7/attachment.obj>
-------------- next part --------------
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.
You were talking about latex and I see you want to use xelatex. Try the xelatexmk engine along with a platexmkrc file and see if that works for you
Good Luck,
Herb Schulz
(herbs at wideopenwest dot com)
-------------- next part --------------
----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
More information about the macostex-archives
mailing list