2

According to this line How to speed up pdflatex for a very large document on MacOS X? . Precompile preamble significantly speed up pdflatex compilation.

The method is to generate a precompile.fmt file( which is 6MB in my case), then copy it to the folder contains the tex file, and add %&precompile to the first line of tex file.

I did so, and found it really speed up the compilation. But since the precompile.fmt file is a little bit large. I think to copy it to every tex folder is really a waste of disk space. So is there a way to load the same precompile.fmt file from the same location in different tex file?

marsupilam
  • 6,383
user15964
  • 865
  • Go to the TeXShop Help Panel, select “Advanced Help” and then “Making and Using New TeX Formats”. – GuM Jun 04 '15 at 15:19
  • are you working on a mac, or on some other platform? (if on a mac, tagging this question for that would be appropriate.) – barbara beeton Jun 04 '15 at 15:30
  • @GustavoMezzetti I just figure out the way. Write the first line as %& Path\precompile – user15964 Jun 04 '15 at 15:31
  • Well, sure. I thought you were looking for an automatized solution. Edit: but, after all, this is too. :-) – GuM Jun 04 '15 at 15:51
  • @GustavoMezzetti What do you mean by "automatized solution“? I am currently using texstudio – user15964 Jun 04 '15 at 15:53
  • @user15964 -- i think that by "automatized solution" (i'd say "automated") is meant a solution in which it wouldn't be necessary to specify the location of the format file. – barbara beeton Jun 04 '15 at 17:21
  • I am very busy during these days and I haven't got much time to visit TeX.SX: that's why I answer so late, please accept my apologies. In this case, however, @barbarabeeton has already answered for me (and btw, yes, "automatizzato" sounds weird even in Italian! :-) . – GuM Jun 06 '15 at 21:33

1 Answers1

2

Move the precompile.fmt file in the folder

~/Library/texmf/web2c/pdftex

creating the missing folders as you go.

On different TeX Live based distribution (the above path is good for MacTeX) the correct path would be

~/texmf/web2c/pdftex

(assuming the standard setup is used).

egreg
  • 1,121,712