I want to center multi row equationing but all my attemts won't work. I'm working with pandoc/knitr of Rmarkdown. I show you an example:
\begin{equation}
\begin{aligned}
<!-- \begin{center} -->
\label{eq1}
x_1 = 1, x_2 = 1 \\
h(x) = f(-20 + 15 + 17) \\
h(x) = f(12) \approx 1 \\
<!-- \end{center} -->
\end{aligned}
\end{equation}
\end{aligned}
\end{equation}
When I use center, I get this error:
! Missing $ inserted.
<inserted text>
$
l.100 \begin{center}
Thanks for any help.
center
is a text-mode environment. Don't use it inside math mode. (The material inside acenter
env. is taken to be text-mode material by default.)