将方程与数学模式组件对齐

将方程与数学模式组件对齐
\documentclass[12pt]{article}
\usepackage{amsmath}

\begin{document}

%\begin{equation}

%\begin{split}

 $\theta$(\textit{g}$_1$) * ($\theta$(\textit{g}$_2$))$^{-1}$  = $\theta$(\textit{g}$_1$) * $\theta$(\textit{g}$_2^{-1}$) \\
= $\theta$(\textit{g}$_1$ \textit{g}$_2^{-1}$) \\
= $\theta$(\textit{g}) $\in$ \textit{G}, where \textit{g} = \textit{g}$_1$ \textit{g}$_2^{-1}$
%\end{split} 

%\end{equation}

\end{document}
  1. 我试图对齐等号,但删除注释会出现“}”缺失错误
  2. 有没有办法避免等式中的所有“$”?

答案1

像这样?

enter image description here

代码很简单:

\documentclass[12pt]{article}
\usepackage{amsmath}

\begin{document}

\begin{equation}
\begin{split}
\theta (g_1)\cdot (\theta(g_2))^{-1}  
    & = \theta(g_1)\cdot \theta (g_2^{-1})    \\
    & = \theta(g_1\textit{g}_2^{-1})                   \\
    & = \theta(g) \in G, \text{ where } g = g_1 g_2^{-1}
\end{split}
\end{equation}

\end{document}

相关内容