I wanted to give opmac a try. It is supposed to be part of csplain, which is supposed to be part of texlive.

I am running TeX, Version 3.14159265 (TeX Live 2015) using debian from ubuntu 14.04.

But when I try to compile a plain tex document using \input opmac I get the following errors:

tex opmactest.tex
This is TeX, Version 3.14159265 (TeX Live 2015) (preloaded format=tex)
(./opmactest.tex (./opmac.tex (./opmac.tex (./opmac.tex (./opmac.tex
(./opmac.tex (./opmac.tex (./opmac.tex (./opmac.tex (./opmac.tex         (./opmac.tex
(./opmac.tex (./opmac.tex (./opmac.tex (./opmac.tex
! TeX capacity exceeded, sorry [text input levels=15].
l.3 \input opmac.tex

No pages of output.


\input opmac

\typosize[11/13] % setting the basic font size and the baselineskip
\margins/1 a4 (1,1,1,1)in % setting 1in margins for A4 paper

Help me get my feet back on the ground

  • Not sure how I really installed. Any way to check?
    – A Feldman
    May 3, 2016 at 23:14
  • I think this is how I installed my copy: tug.org/texlive/acquire-netinstall.html If I had installed the ubuntu package I would be 2 years behind I think, I would not have texlive 2015.
    – A Feldman
    May 3, 2016 at 23:17
  • Sorry. Yes. You installed from upstream. Is your installation current? This is part of TeX Live and your example compiles fine for me.
    – cfr
    May 3, 2016 at 23:17
  • This is the odd thing, I have absolutely never had any problems finding any package, until now. I do not know if it is current, I guess I could update it, but really it is not more than a year or so at this point.
    – A Feldman
    May 3, 2016 at 23:19
  • 1
    @AFeldman Be careful: it's difficult to happily use LaTeX again after trying OPmac :)
    – User
    May 4, 2016 at 20:32

1 Answer 1


Based the console output from your compilation of opmactest.tex and our discussion in comments, it seems you forgot to remove an earlier test file which you had called opmac.tex from your working directory. This file presumably includes the line

\input opmac


\input opmac.tex

In either case, the file inputs itself and then inputs itself again and again and again. It would continue indefinitely except that TeX cuts off the nesting. That is, it limits the levels of file nesting allowed, effectively blocking the infinite regress.

Remove the spurious opmac.tex from your working directory and opmactest.tex should compile fine. It compiles OK for me with TeX, pdfTeX, XeTeX and LuaTeX.

  • 1
    you don't need to assume it: the log is telling you that the run is loading a ./opmac.tex at the current local directory.
    – jarnosc
    May 3, 2016 at 23:48
  • @erreka Yes. But I'm assuming something about its contents.
    – cfr
    May 4, 2016 at 0:37
  • I don't think you are "assuming" it either: you suspect that the file calls itself.
    – jarnosc
    May 4, 2016 at 19:15
  • Well, at least it only called itself 15 times at a go. When I look at the log above it screams to me (preloaded format=tex) (./dummytest.tex (./dummy.tex (./dummy.tex (./dummy.tex (./dummy.tex (./dummy.tex (./dummy.tex (./dummy.tex (./dummy.tex (./dummy.tex (./dummy.tex (./dummy.tex (./dummy.tex (./dummy.tex (./dummy.tex ! TeX capacity exceeded, sorry [text input levels=15]. l.3 \input dummy.tex for leaving that file there after I realized that it would not work with opmac.tex as a filename because it would call itself.
    – A Feldman
    May 4, 2016 at 20:56

You must log in to answer this question.

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