方程式の最初の行を左に揃える方法は?

Aug 17 2020
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{flalign*}
\det\bigg(\lambda I -ABC(G_1\circ G_2)\bigg) 
\\
=
\left[
\begin{array}{cccccccccccccccccccc}
A(G_2)\otimes Q(G_1) \otimes I_{n_2} &&  G^T
 \\
 G &&
A(G_1)\otimes Q(G_2)\otimes I_{n_1}
\end{array}
\right].
\end{flalign*}    
\end{document}

私は次のコードで立ち往生しています。私は最初の行が欲しい、すなわち

\det\bigg(\lambda I -ABC(G_1\circ G_2)\bigg) 
    

ドキュメントの左側から開始します。しかし、問題は、最初の行がドキュメントの右側に配置されているため、奇妙に見えることです。

すべてをドキュメントの左側に揃えることはできますか?

誰かを助けてください。

回答

3 Zarko Aug 17 2020 at 13:45

2つの可能性:

(赤い線はテキスト領域の境界を示します)

\documentclass{article}
\usepackage{mathtools}
%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%

\begin{document}
    \begin{align*} \det\biggl(\lambda I -ABC(G_1\circ G_2)\biggr) & = \begin{bmatrix} A(G_2)\otimes Q(G_1) \otimes I_{n_2} & G^T \\ G & A(G_1)\otimes Q(G_2)\otimes I_{n_1} \end{bmatrix}. \end{align*} or with use of the \verb+\MoveEqLeft+ defined in the \verb+mathtools+ package: \begin{align*} \MoveEqLeft[4]\det\Bigl(\lambda I -ABC(G_1\circ G_2)\Bigr) \\ & = \begin{bmatrix} A(G_2)\otimes Q(G_1) \otimes I_{n_2} & G^T \\ G & A(G_1)\otimes Q(G_2)\otimes I_{n_1} \end{bmatrix}. \end{align*}
2 Denis Aug 17 2020 at 13:45

なぜすべてを左に揃えるのですか?multlineここでの使用をお勧めします

\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{multline*}
\det\bigg(\lambda I -ABC(G_1\circ G_2)\bigg)\\
=
\left[
\begin{array}{ccc}
A(G_2)\otimes Q(G_1) \otimes I_{n_2} &  G^T \\
 G & A(G_1)\otimes Q(G_2)\otimes I_{n_1}
\end{array}
\right].
\end{multline*}
\end{document}

2 Bernard Aug 17 2020 at 15:31

コードで少なくとも2つのアライメント列を宣言するだけです。フライン環境は、自動的に左側に整列しません。

私は自由にコードを単純化しました。20列の配列がなぜかわからなかったので、より単純なbmatrix環境に置き換えました。また、の引数の巨大な括弧がなぜかわからなかった\detので、ペア\bigg( ... \bigg)をに置き換えました\bigl( ... \bigr)(最後のlとrに注意してください)。

\documentclass{article}
\usepackage{amsmath}
\usepackage{showframe}
\renewcommand{\ShowFrameLinethickness}{0.2pt}

\begin{document}

\begin{flalign*}
\det\bigl(\lambda I & -ABC(G_1\circ G_2)\bigr) & &
\\[0.5ex]
 & =
\begin{bmatrix}
A(G_2)\otimes Q(G_1) \otimes I_{n_2} && G^T
 \\[1ex]
 G &&
A(G_1)\otimes Q(G_2)\otimes I_{n_1}
\end{bmatrix}
\end{flalign*}

\end{document}