# Getting “The memory dump file could not be found” when trying to compile mpost file

I am using texmaker with the following mp example:

filenametemplate "%j%c.mps";
beginfig(1);

z1=(0,0);
z2=(10mm,10mm);

drawarrow(z1--z2);
label.ulft(btex $A$ etex, .5[z1,z2]);

endfig;


I keep getting this message

tex: The memory dump file could not be found. tex: Data: tex.fmt fatal: Command failed: tex --parse-first-line --interaction=nonstopmode mp082440.tex; see mpxerr.log


any hints?

-
What program do you exactly call? It looks like you can tex, hut it should be mf. Or am I wrong? –  tohecz Dec 10 '12 at 8:24

Since texmaker is a cross-platform front-end - it sounds like the underlying TeX setup is misconfigured, or the things that texmaker automatically does to keep a healthy TeX system are not working.

The nuts and bolts of what is happening when you run this:

1. metapost recognises the btex etex pair and creates a fairly minimal plain tex document, specially encoded as one diagram per page.
2. tex is called to typeset this file.
3. tex loads plain.fmt (the precompiled set of macros that define Plain TeX) and creates a dvi file, containing info on strings of characters and rules inserted at various positions in each miniature page
4. metapost inserts the character pulls the dvi file apart and inserts a picture containing the corresponding text objects in place of the btex ... etex.

What is failing here is step 3. The Plain.fmt file does not exist, or can't be found, or can't be created.

Since you haven't said which Operating System you are using, I am guessing that it is some version of Microsoft Windows, and given the nature of the error, I am guessing that it is an issue with permissions, in that texmaker is trying to automatically create the .fmt file and can't write a file in the location it expects. The same error shows up and is diagnosed as being a MS Windows permission problem in MikTeX here: the memory dump file could not be found

-