I am trying to evaluate the feasibility of using the plain package for building a volume one part of which is a critical edition set in plain tex using edmac, the other parts are more or less regular LaTeX. I am dealing here with an extremely complex setup, heritage code from the 1990s, whose creator has long died, but the other people on the project have kept using his system, producing a few volumes since then, and apparently they are not going to abandon it. The printed books do look great. The preceding volumes were built by first generating pdfs of the edition chapters, for each of which the starting number in the book needed to be set manually in the tex source, and these pdfs are then included by the main LaTeX file of the book. The TOC naturally has to be created manually, too. Of course it is possible to do like that again, but I would like to at least see if there's another, better, way. As I said, the thing is incredibly complex, involving a two-step pre-processing system, from input files in a custom Sanskrit encoding via a perl script to dn files for the devnag preprocessor which in the second step generates the tex source files, and a style-file providing an abstraction layer above edmac. While I was the technical person in charge of creating the last volume just using the old system, doing so was possible without an in-depth understanding of the plain tex used to create the edition. Having no other exposure to plain tex I am now struggling to create a MWE that I could then input in a LaTeX file, if that is at all possible, building an example with a real-world-file failed, I tried that of course.
\input edmac.doc
\beginnumbering
\pstart
\text{lemma}\Afootnote{note}\
\pend
\endnumbering
\bye
gives me
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019) (preloaded format=pdftex)
restricted \write18 enabled.
entering extended mode
(./mini.tex (./edmac.doc
EDMAC Critical edition macros.
Revision: 3.7 < Date: 31 Aug 1993 15:57:20 >.
) Section 1 (./mini.1)
Runaway argument?
\Afootnote {note}\^^M\pend \endnumbering \par
! Forbidden control sequence found while scanning use of \text.
<inserted text>
\par
<to be read again>
\bye
l.9 \bye
Probably some setup is missing, but maybe it's also a compatibility issue? I haven't found any other MWE yet, or, to start with, readable documentation. I did try the last example included in edmac.doc, as it was specifically for use with the devnag pre-processor, but it did not build, either.
