%20%E3%81%AB%E6%8F%83%E3%81%88%E3%80%81%E6%9C%80%E5%BE%8C%E3%81%AE%E6%96%B9%E7%A8%8B%E5%BC%8F%E3%82%92%E4%B8%AD%E5%A4%AE%E3%81%AB%E9%85%8D%E7%BD%AE%E3%81%99%E3%82%8B%E3%81%AB%E3%81%AF%E3%81%A9%E3%81%86%E3%81%99%E3%82%8C%E3%81%B0%E3%82%88%E3%81%84%E3%81%A7%E3%81%97%E3%82%87%E3%81%86%E3%81%8B%E3%80%82.png)
私は、alignat環境を使用して、5つの方程式を3行に次のように配置しようとしています。1行目に2つの方程式、2行目に2つの方程式(1行目の方程式と揃えて)、5番目の方程式中央揃え3 行目だけで。参考までに、私の失敗した試みを以下に示します。
\begin{alignat}{3}
a ={}& b
&\qquad &
c ={}& d
\\
e ={}&f
&\qquad &
g ={}& h
\\
{\centering
i = j
}
\end{alignat}
3 行目の方程式i=j
を左揃えにしたり、右揃えにしたり、他の 4 つの方程式の特定の部分と揃えたりしたくないことに注意してください。3 行目に方程式だけを配置し、その行の中央に配置したいのです。最初の 2 行は問題なく作成できますが (align または alignat を使用)、3 行目の方程式を 1 つだけ中央に配置することはできません。
答え1
各行に番号を付ける必要がある場合は、alignat
次のようにネストできますgather
。
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{gather}
\begin{alignat}{2}
a &= b &\qquad
c &= d
\\
e &=f &
g &= h
\end{alignat}
\\
i = j
\end{gather}
\end{document}
数字がない場合、方法は次のとおりです。
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{gather*}
\begin{alignedat}{2}
a &= b &\qquad
c &= d
\\
e &=f &
g &= h
\end{alignedat}
\\
i = j
\end{gather*}
\end{document}
答え2
まあ、こんな感じでしょうか? 注意:は の後ではなく、&
の前に配置する必要があります=
。これにより、正しいスペースも自動的に使用されます。
\begin{gather*}
\begin{aligned}
a &= b
&
c &= d
\\
e &= f
&
g &= h
\end{aligned}
\\
i = j
\end{gather*}
答え3
array
列間の間隔に関して何らかの助けを与えれば、通常の方法でも機能します。
\documentclass{article}
\begin{document}
\[
\begin{array}{r@{{}={}}l@{\qquad}r@{{}={}}l}
f(x) & ax^2 + bx + c & g(x) & mx + c \\[\jot]
f_1(x) & 2x^2 + 3x - 4 & g_1(x) & 3x - 1 \\[\jot]
\multicolumn{4}{c}{h(x)=ax^3 + bx^2 + cx + d}
\end{array}
\]
\end{document}
列の指定では、@{{}={}}
関数 f と g の間の等号を処理し、 でそれらを分離し\qquad
、 は\\[\jot]
方程式の間に少し垂直方向のスペースを追加します。最後の方程式は、 を使用した従来の方法で中央に配置されます\multicolumn{.}{c}{...}
。
答え4
ここでは関係ないかもしれませんが、プレーン TeX でこれを行う方法は次のとおりです (Werner の例のコンテンツを使用しました)。
$$
\displaylines{
\eqalign{f(x)&=ax^2+bx+c\cr f_1(x)&=2x^2+3x-4}
\qquad
\eqalign{g(x)&=mx+c\cr g_1(x)&=3x-1}
\cr\noalign{\kern\dp\strutbox}
h(x)=ax^3+bx^2+cx+d
}
$$
\bye