Sign up ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a file called matteo.tex which contains lots of macros. I'd like to create a format file with initex so that, every time tex processes a file that contains some of matteo.tex macros, it doesn't have to waste time processing the file matteo.tex. How to do it? And, then, how to make tex load the format generated from matteo.tex?

(matteo.tex is all written in plain tex).

share|improve this question
I've found the solution by myself: have a look at TEX BY TOPIC, A TEXNICIAN’S REFERENCE by VICTOR EIJKHOUT at page 257. – User Apr 17 '14 at 17:34
Please make this a proper answer. – Martin Schröder Apr 17 '14 at 19:32
@MartinSchröder What do you mean? Can I answer my own question? – User Apr 18 '14 at 12:08
Yes. – Martin Schröder Apr 18 '14 at 13:52

1 Answer 1

up vote 3 down vote accepted

To make a format file from matteo.tex, you should simply add at the end of matteo.tex the control word \dump and then type on the command line

tex matteo

Now a file called matteo.fmt should have been generated. To load such file, you should type on the command line

tex &matteo.

If the format in matteo.tex does not extends plain tex, in order to create matteo.fmt you can start tex with the option -ini, i.e. you start initex.

share|improve this answer
Thank you for this question and answer! Can you tell if the speed-up is noticeable? – morbusg Apr 19 '14 at 9:46
@morbusg I made up a test, running 50 consecutive times the compilation in both ways. It resulted that the usual way took about 9 seconds, and the ".fmt" way took about 7.5 seconds: so the difference is not so noticeable. But I think that if there were more macros in matteo.tex, the difference in time would be greater. Ah I forgot to say that in Unix systems, you have to write tex \&matteo instead of tex &matteo. – User Apr 19 '14 at 12:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.