Using consecutive equation
environments is wrong, more so if you separate them with blank lines. Use the appropriate amsmath
environments such as align
or gather
.
I'm not sure that a syntax such as
\printequations{a+b=c \\ a^2+b^2 \\ a^2+b^2=c^2}
is really better than
\begin{gather}
a+b=c \\
a^2+b^2 \\
a^2+b^2=c^2
\end{gather}
but you can obtain what you want in a simple way:
\documentclass{article}
\usepackage{amsmath}
\newcommand{\printequations}[1]{%
\begin{gather}#1\end{gather}%
}
\begin{document}
\printequations{a+b=c \\ a^2+b^2 \\ a^2+b^2=c^2}
\end{document}

If you prefer a different syntax,
\documentclass{article}
\usepackage{amsmath}
%\usepackage{xparse}% uncomment for LaTeX prior to 2020-10-01
\ExplSyntaxOn
\NewDocumentCommand{\printequations}{m}
{
\begin{gather}
\seq_set_split:Nnn \l_tmpa_seq {} { #1 }
\seq_use:Nn \l_tmpa_seq { \\ }
\end{gather}
}
\ExplSyntaxOff
\begin{document}
\printequations{{a+b}{a^2+b^2}{a^2+b^2=c^2}}
\end{document}
will produce the same as before.
If your aim is to define a set of equations and use them one after the other, you can do
\documentclass{article}
\usepackage{amsmath}
%\usepackage{xparse}% uncomment for LaTeX prior to 2020-10-01
\ExplSyntaxOn
\seq_new:N \l_egreg_equations_list_seq
\NewDocumentCommand{\defineequations}{m}
{
\seq_set_split:Nnn \l_egreg_equations_list_seq {\\} { #1 }
}
\NewDocumentCommand{\nextequation}{}
{
\seq_pop_left:NN \l_egreg_equations_list_seq \l_tmpa_tl
\begin{equation}
\l_tmpa_tl
\end{equation}
}
\ExplSyntaxOff
\begin{document}
\defineequations{a+b \\ a^2+b^2 \\ a^2+b^2=c^2}
Some text before the first equation
\nextequation
Some other text between the first and the second equation
\nextequation
Some other text between the second and third equation
\nextequation
Some final text
\end{document}

If you want to index your equations here is a possibility. The kay before the =
is an arbitrary string.
\documentclass{article}
\usepackage{amsmath}
%\usepackage{xparse}% uncomment for LaTeX prior to 2020-10-01
\ExplSyntaxOn
\NewDocumentCommand{\defineequations}{m}
{
\prop_set_from_keyval:Nn \l_egreg_equations_list_prop { #1 }
}
\NewDocumentCommand{\useequation}{m}
{
\begin{equation}
\prop_item:Nn \l_egreg_equations_list_prop { #1 }
\end{equation}
}
\ExplSyntaxOff
\begin{document}
\defineequations{
1={a+b},
2={a^2+b^2},
3={a^2+b^2=c^2}
}
Some text before the first equation
\useequation{2}
Some other text between the first and the second equation
\useequation{1}
Some other text between the second and third equation
\useequation{3}
Some final text
\end{document}

equation
after another (tex will insert spurious white paragraphs in between) this should be marked up as a singlegather
environment (oralign
if you want to align on =) and then it only needs\\
between the equations