[texshop] How use Carlisle's "mylatex" package with TeXShop?

Bruno Voisin bvoisin at icloud.com
Mon Dec 7 02:18:22 CET 2020


Just three remarks: 


- This list is set so that answers get to the original poster only, not the list. So I received none of the answers by Herb or Dick in this thread. it's only now by taking the time to read all of Murray's messages in detail that I am starting to see what this is about.


- My first reaction was "What about TeXShop's Personal Script functionality?" (in Prefs > Misc then Typeset > Personal Script). Did you try setting the Latex Program to something like

	pdflatex --file-line-error --synctex=1 &pdflatex

then selecting Personal Script in the Typeset menu when typesetting? (This assuming I got the syntax for the Personal Script right.)


- The third remark was about creating and using a dedicated .engine file. As I was starting to think about what to write, I realized it's explained already in TeXShop's Help, accessible in TeXShop at

	Help > TeXShop Help Panel > Advanced Help > Making and Using New TeX Formats

Some minor things there need updating (for example the mention of powerpc and i386), but the idea remains unchanged. When in doubt, inspect the up-to-date engines in ~/Library/TeXShop/Engines and mimick what's there.


Finally, regarding the &format trick: it's actually not a trick, it's the way TeX was designed, described in Knuth's casual, "in-passing" style in chapter 6 of the TeXbook. Knuth doesn't say &format can be put at the first line of the inputted file instead of being given on the command line, but he doesn't say it cannot be put there either.

Bruno Voisin



> On 6 Dec 2020, at 22:16, Murray Eisenberg <murrayeisenberg at gmail.com> wrote:
> 
> Your diagnosis seems to be correct.
> 
> My trials show:
> 
> (1) Having just 
> 
> 	%&fmtname
> 
> works with TeXShop Typeset choices EITHER latex OR pdflatexmk. 
> 
> (2) The pair
> 
> 	% !TEX program = latex 
> 	% !TEX parameter = -fmt fmtname 
> 
> does NOT work with either of the Typeset choices latex or pdflatexmk.
> 
> (3) The pair 
> 
> 	% !TEX program = pdflatexmk 
> 	% !TEX parameter = -fmt fmtname 
> 
> works with Typeset choice either latex or pdflatexmk and, as expected, but in either case runs pdflatexmk.
> 
> My conclusion is that the preferred method would be having just the single directive 
> 
> 	%&fmtname
> 
> at the top of the file, for then the typesetting is controlled by the choice of program or engine for Typeset (latex or pdflatexmk), Unless, of course, one wants to force pdflatexmk regardless of the choice of program/engine in the TeXShop menu.
> 
> 
>> On 6 Dec2020, at 1:57 PM, koch at uoregon.edu wrote:
>> 
>> 
>> Murray,
>> 
>> The line
>> 
>> 	%& fmtname
>> 
>> is a magic line understood by TeX, but not by TeXShop.
>> 
>> The line
>> 
>> 	% !TEX program = pdflatexmk 
>> 
>> is a magic line understood by TeXShop, but not by TeX
>> 
>> I don't have time to check right now, but I suspect that the magic line
>> 	
>> 	% !TEX parameter = ...
>> 
>> only applies to engines with associated scripts in ~/Library/TeXShop/Engines and not to build-in typesetting commands like tex and pdftex and latex and pdflatex.
>> 
>> Richard Koch
>> 
>> 
> 
> ---
> Murray Eisenberg			murrayeisenberg at gmail.com
> 503 King Farm Blvd #101	
> Rockville, MD 20850-6667	Mobile (413)-427-5334
> 
> 




More information about the texshop mailing list.