<div dir="ltr"><div dir="ltr"><br></div><div dir="ltr">Hi Herb.</div><div dir="ltr"><br></div><div>Everything (TeXShop and TeX Live) is up to date.</div><div dir="ltr"><br><div>After some experimenting, I think I found the conditions for this to happen.</div><div>1) In TeXShop > Preferences > Engine, add the option <span style="color:rgb(0,0,0);font-family:Menlo;font-size:12px">--shell-escape</span> and tick Shell Escape Warning.</div><div>2) Create a new file beginning with <span style="color:rgb(0,0,0);font-family:Menlo;font-size:12px">% !TEX TS-program = pdflatexmk</span>.</div></div><div class="gmail_quote"><div class="gmail_attr">3) Typeset it.  TeXShop will ask about using shell escape.  Whichever the answer it will ignore the program to use.</div><div class="gmail_attr"><br></div><div class="gmail_attr">It seems to me that on first typeset TeXShop puts a flag in the file saying if shell escape is to be used or not, but then it forgets the <span style="color:rgb(0,0,0);font-family:Menlo;font-size:12px">!TEX TS-program</span> part.</div><div class="gmail_attr"><br></div><div class="gmail_attr">Guillermo</div><div class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr">On Sun, 20 Mar 2022 at 18:11, Herbert Schulz <<a href="mailto:herbs@wideopenwest.com">herbs@wideopenwest.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> On Mar 20, 2022, at 11:52 AM, G. M.-S. <<a href="mailto:lists.gms@gmail.com" target="_blank">lists.gms@gmail.com</a>> wrote:<br>
><br>
> Hello.<br>
> <br>
> Something must be misconfigured on my side, but I have been unable to find where.<br>
> <br>
> The first time I typeset a new LaTeX file test.tex containing<br>
> <br>
> % !TEX TS-program = pdflatexmk<br>
> \documentclass{article}<br>
> \begin{document}<br>
> Test.<br>
> \begin{equation}<br>
> \label{eq}<br>
> 2+2=4<br>
> \end{equation}<br>
> As seen in \ref{eq}.<br>
> \end{document}<br>
> <br>
> with TeXShop I get<br>
> <br>
> This is pdfTeX, Version 3.141592653-2.6-1.40.23 (TeX Live 2022/dev) (preloaded format=pdflatex)<br>
>  restricted \write18 enabled.<br>
> entering extended mode<br>
> (./test.tex<br>
> LaTeX2e <2021-11-15> patch level 1<br>
> L3 programming layer <2022-02-24><br>
> (/usr/local/texlive/2021/texmf-dist/tex/latex/base/article.cls<br>
> Document Class: article 2021/10/04 v1.4n Standard LaTeX document class<br>
> (/usr/local/texlive/2021/texmf-dist/tex/latex/base/size10.clo))<br>
> (/usr/local/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def)<br>
> No file test.aux.<br>
> <br>
> LaTeX Warning: Reference `eq' on page 1 undefined on input line 29.<br>
> <br>
> [1{/usr/local/texlive/2021/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]<br>
> (./test.aux)<br>
> <br>
> LaTeX Warning: There were undefined references.<br>
> <br>
> <br>
> LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.<br>
> <br>
>  )</usr/local/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb<br>
> ></usr/local/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb><br>
> Output written on test.pdf (1 page, 23320 bytes).<br>
> SyncTeX written on test.synctex.<br>
> Transcript written on test.log.<br>
> <br>
> If I typeset again, latexmk is called and everything works as expected.<br>
> <br>
> So this seems to be related to the fact that there is only one file called test.*.<br>
> <br>
> Guillermo<br>
<br>
Howdy,<br>
<br>
This is very strange. What version of TeXShop are you using? When you say `first time' do you mean first time ever (i.e., you are a new user of TeXShop) or does this happen with any file using the pdflatexmk engine the first time you typeset? What is the console output when pdflatexmk is actually used?<br>
<br>
Good Luck,<br>
<br>
Herb Schulz<br>
<a href="mailto:herbs@wideopenwest.com" target="_blank">herbs@wideopenwest.com</a></blockquote><div> </div></div></div>