[XeTeX] startup time

Ross Moore ross.moore at mq.edu.au
Fri Jul 3 23:01:30 CEST 2020


Hi Michael, and others.

On 04/07/2020, at 5:44, "Michael Maxwell" <mmaxwell at umd.edu> wrote:

> 
> 
> On 7/3/2020 2:28 PM, Zdenek Wagner wrote:
>> There are several options:
>> 1. Dump your own format with your styles. You will have to regenerate the format after update of any of these style files and you will have to take care of dependencies

>> I already have 2 and 3, although afaict 3 has little if any effect, because the processing time appears to be taken up with macro expansion (or whatever it is that tex does while processing the preamble).
> 
> 1 is what I was looking for, but how do you do it?  I tried
>   xelatex -ini <my tex file>

You will need to also have
       \input latex.ltx
first, as you are building an extended LaTeX from scratch.

Place the  \dump  command after all your packages and definitions,
but before  \begin{document} .

But there are tricks and traps that will have to explore for your own documents and choice of packages.
For example, if any package defines its own auxiliary file for passing information to later LaTeX runs, then find exactly when this file is read, and opened for writing.
A file-pointer cannot be preserved in dumped format file. 
So you'll probably have to move that package to after the  \dump  rather than before it.


> but it chokes on the \documentclass; or when I try it on my style sheet alone, it chokes on the \ProvidesPackage.  Apparently it works with plain TeX, but not with LaTeX?  And I'm not sure this would do what I want anyway; what it means to "be xeinitix"; a web search for that term was unproductive (unless you're looking for some kind of gas warning light).
> 
> Can you give me a lead on how to do #1?

I used to do this kind of thing a lot, almost 20 years ago when computers were much slower than they are now. I even wrote a package called  ldump  to capture some of the definitions that packages delay using \AtBeginDocument .
Moore's Law (no relation) has made it rather unnecessary now, though we are putting more and more into our documents, so it may still have a use.

Hope this helps.

   Ross


More information about the XeTeX mailing list.