How to align = symbol of several equations vertically?

I want to do something quite particular with PlainTeX, though I'm not one hundred percent sure it's possible.

Say I have a few equations, each on a separate line, which represent the simplification of a complicated mathematical equation in steps. The expressions on both sides of the equal sign vary in length and height until the equation is fully simplified (e.g., until it looks like $x=2$).

Now, how would I align these equations with each other in such a way that the equal signs be all vertically aligned? Simply centring everything would not work because, as I've already mentioned, the expressions on both sides of the equal sign vary from equation to equation.

This solution uses LaTex. I'm looking to do something similar with TeX only. Could I pull it off with matrices, as some sort of alignment table, without it looking super weird?

The fact is I'd like to later convert that Tex code to MathML, in order to include it in a web page.

• Please give a specific example and a minimal working sample. Then readers can answer your question more accurately and conveniently. Apr 15, 2022 at 2:38
• See \eqalign on page 191 of the TeXbook. Apr 15, 2022 at 3:51
• This smells like an XY Problem. xyproblem.info. Apr 15, 2022 at 5:02
• since mathjax implements the \begin{align} syntax for this, and that is what you want, why ask for a plain tex syntax?? Apr 15, 2022 at 9:41
• @GPWR mathjax is not supported on this site, if you want to show typeset output, upload an image. Apr 15, 2022 at 9:42

plain tex provides \eqalign for alignments, which is also supported by mathjax

\eqalign{ x^2+5 &=3^2\cr x^2 &= 4\cr x &=\pm2\cr }