[texshop] How use Carlisle's "mylatex" package with TeXShop?
Murray Eisenberg
murrayeisenberg at gmail.com
Sat Dec 5 21:05:52 CET 2020
(1) Does
% !TEX parameter = "&mylatex”
refer to making the fmt file, or typesetting runs after making the fmt file?
(2) It turns out I have to use the package mylatexformat rather than mylatex in order to successfully compile a fmt file from my source’s preamble.
In that case, do I correctly assume that I just change “&mylatex” to “&mylatexformat”?
I note that https://tex.stackexchange.com/a/377033/13492 <https://tex.stackexchange.com/a/377033/13492> gives instead the instruction to put the line
%&foo
at the top of my source named foo during typesetting runs (after I created the .fmt).
> On 5 Dec2020, at 11:59 AM, Herbert Schulz <herbs at wideopenwest.com> wrote:
>
>> On Dec 5, 2020, at 9:47 AM, Murray Eisenberg <murrayeisenberg at gmail.com> wrote:
>>
>> David Carlisle has a LaTeX package “mylatex” that allows one to create from a document source a special format executing everything from the source’s preamble. See “texdoc mylatex” and https://github.com/davidcarlisle/dpctex/tree/master/mylatex .
>>
>> Once the package has been used to create the specialized .fmt, one would use it from the command line like this:
>>
>> pdflatex "&mylatex” doc
>>
>> where doc is the name of the .tex source file.
>>
>> How can the existing TeXShop engines latex and pdflatexmk be modified so as to use the new format?
>>
>> I want to do this with a book-length document whose preamble loads a great number of packages, so as to speed up the typeset time on each run, but do this still within TeXShop rather than the command line.
>> ---
>> Murray Eisenberg murrayeisenberg at gmail.com
>> 503 King Farm Blvd #101
>> Rockville, MD 20850-6667 Mobile (413)-427-5334
>>
>>
>
> Howdy,
>
> I think this will work with the pdflatexmk engine since it accepts the TeXShop `parameter' directive: simply add the line
>
> % !TEX parameter = "&mylatex"
>
> below the `program' (or `TS-program') directive for using pdflatexmk. If you ever need shell-escape you can use the same method wwith the line
>
> % !TEX parameter = -shell-escape
>
> and you can even combine them with
>
> % !TEX parameter = "&mylatex" -shell-escape
>
> and add other parameters for pdflatex on that line.
>
> One nice thing about that is that it works for any of the basic latexmk based engines, (pdf/xe/lua)latexmk.
>
> Good Luck,
>
> Herb Schulz
> herbs at wideopenwest.com
>
>
---
Murray Eisenberg murrayeisenberg at gmail.com
503 King Farm Blvd #101
Rockville, MD 20850-6667 Mobile (413)-427-5334
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/texshop/attachments/20201205/43598bdb/attachment-0001.html>
More information about the texshop
mailing list.