Note: As documented in the question and answer here, I have, for the time being, solved this problem in a very ad hoc way. But the problem resurfaces every time I get a new computer, so I'd like to know what is the right way to solve it --- a way that does not require so much improvisation.

I have hundreds of old Plain TeX files (rewriting these files is not a practical option). I want to be able to apply pdftex to these files and get output that displays images. I do this with a macro called "\graph" where the command


This displays the contents of picname.pdf, scaled to a height of "height". (The parameter "width" is a historical relic and gets ignored.)

The code that implements this macro is



\input c:/dos/belfry/graphixx
\input c:/dos/belfry/eplain

The file c:/dos/belfry/graphixx.tex starts with

\input c:/dos/belfry/miniltx

I have a Windows .bat file that automatically prepends the above lines to my .tex file whenever pdftex is invoked. (I have a different .bat file that automatically appends a different set of lines whenever tex (as opposed to pdftex) is invoked, but that's not of concern here.)

I cannot remember why the \pdfoutput line is there. I also cannot remember how my local versions of graphixx, eplain, and miniltx differ from the standard versions, except that I know my macro works when I invoke the local versions and not when I invoke the standard ones. I'm not sure you need this information, because I suspect that answers to this question will tell me to start by ditching those non-standard versions anyway, but for the record I have posted all three files here.

(Mea culpa for having created such a mess in the first place. In my defense, every time I've gotten a new computer and downloaded the latest version of MikTeX, I've found that it no longer runs the files that have always run in the past, and I've been in a great hurry to get up and running again, and the current situation is the result of my desperate flailing to make things work any way I could. I should, of course, have kept better documentation.)

I can also, on request, share the full error logs I've gotten in the past, but again I suspect these are irrelevant, because I presume the solution will be to scrap everything and start from scratch to write a macro that will work and will be robust under whatever changes MikTeX is likely to make in the future.

My question: The next time I get a new computer and download yet another revised version of MikTeX, what should I do to make my \graph macro work as intended?

  • sorry I didn't see the link. As expected you are using in part outdated and changed files. Try to make a failing example that use up-to-date versions and official versions of the files Aug 7, 2020 at 19:09
  • @UlrikeFischer :I'm sorry that I can not easily make a failing example now because (as noted in my other question) I've copied over a bazillion old files so that nothing fails. To create a failing example, I'd have to re-install the new MikTeX, create my failing example, and then (at least temporarily) re-instate my ad hoc solution by copying old files over new ones. That's more than I have the energy for right now, but if you believe it would help you find an answer (and if you're interested) I'll try to find that energy soon.
    – WillO
    Aug 7, 2020 at 19:48
  • But again---i'm not sure a failing example is necessary, since all I'm asking for is advice on how to start all over again from scratch writing a macro that will work.
    – WillO
    Aug 7, 2020 at 19:49
  • well the general advice is: don't use home made files and commands if you can't handle them. Stick to the official interfaces. As soon as you start to change the files and to make local copies you are on your own. Aug 7, 2020 at 20:12
  • @UlrikeFischer : You seem to have misunderstood the question. I am asking how to make my \graph macro work without using homemade files.
    – WillO
    Aug 7, 2020 at 20:15

1 Answer 1


I have no problems to use eplain and graphicx in a current miktex:

\input eplain
\input miniltx
\input graphicx.sty


  • Thanks for this. It did not work for me with the current miktex, but I can't re-check that at the moment because I no longer have the current miktex installed. I will find time to re-install and check this later, and if it still doesn't work, I will post the error log.
    – WillO
    Aug 7, 2020 at 20:18
  • I just want to make sure we're clear on this: When you say you had no problems, you were using pdftex, yes?
    – WillO
    Aug 7, 2020 at 20:19
  • sure. pdfLaTeX wouldn't work, it would error. Aug 7, 2020 at 20:22
  • Thank you again. I just ran this (exactly as you have it, without any references to my local files) and it did in fact work. (This is with my home-brewed MikTeX installed, the one that overwrites all the current files with old files.) When I have a break in my schedule, I'll try again with the current MikTeX. (I still wish very much that it were possible to simply download old versions of MikTeX, for compatibility with whatever little tweaks one has made over the years.)
    – WillO
    Aug 7, 2020 at 20:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .