正確編輯對齊環境

正確編輯對齊環境
\documentclass[10pt,a4paper]{article}
    \usepackage[utf8]{inputenc}
    \usepackage{amsmath}
    \usepackage{amsfonts}
    \usepackage{amssymb}
    \usepackage{pgfplots}
    \begin{document}
    \textit{Induc.:} 
    \begin{align*}
    \hspace{2cm}\Gamma (n+1)&=n\Gamma (n) && (B)\\
    &=n\cdot (n-1)! && (\textit{AA})
    \end{align*}
    \end{document}

您知道我如何在“Induc.”後面啟動對齊環境嗎?那麼喜歡高 2 行嗎?

編輯問題:

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{pgfplots}
\begin{document}
\begin{proof}
\textit{Induktionsanfang:} $\Gamma (1)=\int_0^\infty e^{-t}dt=1=0!$\\
\hspace{1cm}\\
\textit{Induktionsschritt:} \qquad
$\begin{aligned}[t]
\hspace{-0.7cm}\Gamma (n+1)&=n\Gamma (n) \hspace{1.6cm} (2.85)\\
&=n\cdot (n-1)! \qquad (\textit{Induktionsvoraussetzung})\\
&=n!
\end{aligned}$
\end{proof}
\end{document}

答案1

您可以aligned在內嵌數學$ .. $模式中使用。

\documentclass[10pt,a4paper]{article}
    \usepackage[utf8]{inputenc}
    \usepackage{amsmath}
    \usepackage{amsfonts}
    \usepackage{amssymb}
    \usepackage{pgfplots}
    \begin{document}
    \textit{Induc.:} \qquad 
    $
    \begin{aligned}[t]
    \Gamma (n+1)&=n\Gamma (n) && (B)\\
    &=n\cdot (n-1)! && (\textit{AA})
    \end{aligned}
    $
    \end{document}

在此輸入影像描述

答案2

也許,您希望對齊線的其餘部分居中。我建議該linegoal包有兩種變體:

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{linegoal} 
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{pgfplots}
\begin{document}

\textit{Induc.:}$ \hfill
\begin{aligned}[t]
\Gamma (n+1)&=n\Gamma (n) && (B)\\
&=n\cdot (n-1)! && (\textit{AA})
\end{aligned} $\hfill\null \\
Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text.\bigskip

\textit{Induc.:} \makebox[\linegoal]{$
\begin{aligned}[t]
\Gamma (n+1)&=n\Gamma (n) && (B)\\
&=n\cdot (n-1)! && (\textit{AA})
\end{aligned} $} 
Some more text. Some more text. 

\end{document} 

在此輸入影像描述

相關內容