Is there a way to convert a LaTeX document, which uses a lot of packages and macros, into Plain TeX, such that all macros are expanded and all dependencies on external packages are gone?
[Tex/LaTex] Convert from LaTeX to Plain TeX
conversionplain-tex
Related Solutions
Here's an example, taken from here.
% Plain TeX for a 1 page document
%% The lines between the two rows of %'s are more or less compulsory.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\magnification=\magstep1
\baselineskip=12pt
\hsize=6.3truein
\vsize=8.7truein
\font\footsc=cmcsc10 at 8truept
\font\footbf=cmbx10 at 8truept
\font\footrm=cmr10 at 10truept
\footline={\footsc the electronic journal of combinatorics
{\footbf 16} (2009), \#R00\hfil\footrm\folio}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% The further structure of the front page need not be exactly as below,
%% but the header must contain the names and addresses of the authors
%% as well as the submission and acceptance dates.
\font\bigrm=cmr12 at 14pt
\centerline{\bigrm An elementary proof of the reconstruction conjecture}
\bigskip\bigskip
\centerline{D. Remifa\footnote*{Thanks to
the editors of this wonderful journal!}}
\smallskip
\centerline{Department of Inconsequential Studies}
\centerline{Solatido College, North Kentucky, USA}
\centerline{\tt remifa@dis.solatido.edu}
\bigskip
\centerline{\footrm
Submitted: Jan 1, 2009; Accepted: Jan 2, 2009; Published: Jan 3, 2009}
\centerline{\footrm Mathematics Subject Classifications: 05C88, 05C89}
\bigskip\bigskip
\centerline{\bf Abstract}
\smallskip
{\narrower\noindent
The reconstruction conjecture states that the multiset of unlabeled
vertex-deleted subgraphs of a graph determines the graph, provided it
has at least 3 vertices. A version of the problem was first stated
by Stanis\l aw Ulam. In this paper, we show that the conjecture can
be proved by elementary methods. It is only necessary to integrate
the Lenkle potential of the Broglington manifold over the quantum
supervacillatory measure in order to reduce the set of possible
counterexamples to a small number (less than a trillion). A simple
computer program that implements Pipletti's classification theorem
for torsion-free Aramaic groups with simplectic socles can then
finish the remaining cases.\par}
\bigskip
\beginsection 1. Introduction.
This is the start of the introduction.
\bye
Result:
In short: Plain TeX and LaTeX are different macro packages that define different formats. So, in general, it is not possible to use LaTeX packages on top of Plain TeX. For a short introduction to all this rather specialized jargon you may check this blog post
It is possible to use some LaTeX packages on Plain TeX (graphics, color and hyperref, for instance), by faking some functionality of LaTeX; only that necessary to load and make the packages operative. Yet another macro package built on top of plain, eplain, has a built-in ability to load some basic LaTeX macro packages.
\beginpackages
\usepackage{graphicx,color}
\usepackage{url}
\endpackages
It is also possible to use some Plain TeX functionality in LaTeX documents with the plain
package and the plain
environment provided. Still, it's not the whole thing, but works for many things.
\usepackage{plain}
\begin{plain}
[plain stuff]
\end{plain}
You can find all this stuff in CTAN, which contains lots of thing TeX related. Beware though that you need to learn how to navigate in the tex-archive tree.
The MikTeX package manager deals mostly with LaTeX packages, so you may need to learn how to install Plain macro files manually.
Best Answer
No. See also the FAQ:
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=LaTeXtoPlain
And this question: LaTeX macro expander