My document takes 5sec to compile (draft mode), and most of the time is spent on the preamble. This is due to all the packages that I use. Is there a way to precompile the preamble to speedup compilation?
Asked
Active
Viewed 208 times
3
-
1mylatex (https://ctan.org/pkg/mylatex) or mylatexformat. But it could also help to simply clean up the preamble. Or are you sure that you really need all the packages? – Ulrike Fischer Dec 24 '20 at 11:49
-
Yeah. I added your answer to the question. – Zohar Levi Dec 24 '20 at 12:18
-
2please don't add answers to question sit destroys the question and answer format of the site – David Carlisle Nov 01 '21 at 08:43
1 Answers
3
- Based on Ulrike's comment.
- The package
mylatexfrom David Carlisle addresses this problem. - But according to Ultrafast PDFLaTeX with precompiling (2012), David recommends the
mylatexformatpackage from a different author: "My truly ancientmylatexfiles on ctan do this or there is a newer version of that with additional features and better maintained:mylatexformat".
The file
mylatex.ltxpermits you to create a format that pre-loads a set of package files (and/or other macros) that you regularly use. In some circumstances, this can be a great advantage (though on an ordinarily fast modern computer on the desktop, gains will be limited)
Dr. Manuel Kuehner
- 22,451
-
2@david-carlisle In case you are willing to improve this answer. – Dr. Manuel Kuehner Nov 01 '21 at 02:56