2列; 左揃えの前にスペース; QEDシンボルの配置

2列; 左揃えの前にスペース; QEDシンボルの配置

見つけたコードを使用しましたここ段組み前の垂直スペースを削除します。いくつかの数式を左揃えにしたいのですが、問題が 2 つあります。

  1. 方程式は、解の前の行の左側に揃っていません (画像からはわかりにくいですが、揃っている環境の左側に非常に小さな水平方向のスペースがあります)。
  2. QED シンボルをソリューションの一番下の行に揃えるにはどうすればよいですか?

ご協力いただければ幸いです。

\documentclass[10pt]{amsart}
\usepackage{amsmath, amssymb, amsfonts, amsthm}

\usepackage{enumitem}

\usepackage{multicol}

% multi columns in enumerate
\SetEnumitemKey{twocol}{
    before=\raggedcolumns\setlength{\multicolsep}{\topsep}\begin{multicols}{2},
    after=\end{multicols}
}

\parindent0pt

\begin{document}
\title{Title}
\author{Author}
\date{\today}
\maketitle

Here is a problem.
\begin{enumerate}[twocol]
\item $\mathbf{a} = \langle 1, 2 \rangle$, $\mathbf{b} = \langle 3, 4 \rangle$
\columnbreak
\item $\mathbf{a} = \langle 1, 2 \rangle$, $\mathbf{b} = \langle 3, 4 \rangle$
\end{enumerate}
\begin{proof}[Solution]\hfill
\begin{enumerate}[twocol]
\item $\begin{aligned}[t]
&\mathbf{a} \cdot \mathbf{b} = (1)(3)+(2)(4) = 11 \\
&|\mathbf{a}| = \sqrt{1^2 + 2^2} = \sqrt{5} \\
&|\mathbf{b}| = \sqrt{3^2+4^2} = 5
\end{aligned}$
\item $\begin{aligned}[t]
&\mathbf{a} \cdot \mathbf{b} = (1)(3)+(2)(4) = 11 \\
&|\mathbf{a}| = \sqrt{1^2 + 2^2} = \sqrt{5}
\end{aligned}$
\end{enumerate}
\qedhere\end{proof}

Issues:
\begin{itemize}
\item The $\mathbf{a} \cdot \mathbf{b}$, $|\mathbf{a}|$, $|\mathbf{b}|$ in the solution are not left-aligned with the $\mathbf{a}$ the precedes the solution (there's a very small horizontal space).
\item The $\square$ needs to align with the lowest row in the solution.
\end{itemize}
\end{document}

ここに画像の説明を入力してください

答え1

以下に、その方法の 2 つのバリエーションを示します。どちらも、シンボルの配置が非常に似ておりqed\qedhere証明終了の直前に負の垂直スペースが先行します。2 番目のバリエーションでは、環境を使用します。これは、「水平」番号付けに使用されます。私は、コマンド from を使用してtasks可変サイズの\absマクロを定義する機会を得ました(詳細は、mathtools のドキュメントを参照してください)。\DeclarePairedDelimitermathtools

\documentclass[10pt]{amsart}
\usepackage{mathtools, amssymb, amsfonts, amsthm}%
\usepackage{enumitem}
\DeclarePairedDelimiter\abs\lvert\rvert%
\usepackage{multicol}
\usepackage{tasks}
\settasks{counter-format=(tsk[1]), label-width=1.5em}

% multi columns in enumerate
\SetEnumitemKey{twocol}{
    before=\raggedcolumns\setlength{\multicolsep}{\topsep}\begin{multicols}{2},
    after=\end{multicols}
}

\parindent0pt

\begin{document}
\title{Title}
\author{Author}
\date{\today}
\maketitle

Here is a problem.
\begin{enumerate}[twocol]
\item $\mathbf{a} = \langle 1, 2 \rangle$, $\mathbf{b} = \langle 3, 4 \rangle$
\columnbreak
\item $\mathbf{a} = \langle 1, 2 \rangle$, $\mathbf{b} = \langle 3, 4 \rangle$
\end{enumerate}
\begin{proof}[Solution]\hfill
\begin{enumerate}[twocol]
\item $\begin{aligned}[t]
&\mathbf{a} \cdot \mathbf{b} = (1)(3)+(2)(4) = 11 \\
&\abs[\big]{\mathbf{a}} = \sqrt{1^2 + 2^2} = \sqrt{5} \\
&\abs{\mathbf{b}} = \sqrt{3^2+4^2} = 5
\end{aligned}$
\item $\begin{aligned}[t]
&\mathbf{a} \cdot \mathbf{b} = (1)(3)+(2)(4) = 11 \\
&|\mathbf{a}| = \sqrt{1^2 + 2^2} = \sqrt{5}\
\end{aligned}$%
\end{enumerate}
\vspace*{-\dimexpr\baselineskip + \topsep}\qedhere
\end{proof}

Issues:
\begin{itemize}
\item The $\mathbf{a} \cdot \mathbf{b}$, $|\mathbf{a}|$, $|\mathbf{b}|$ in the solution are not left-aligned with the $\mathbf{a}$ the precedes the solution (there's a very small horizontal space).
\item The $\square$ needs to align with the lowest row in the solution.
\end{itemize}
\vspace{1cm}

Here is a problem.
\begin{tasks}(2)
\task $\mathbf{a} = \langle 1, 2 \rangle$, $\mathbf{b} = \langle 3, 4 \rangle$
\task $\mathbf{a} = \langle 1, 2 \rangle$, $\mathbf{b} = \langle 3, 4 \rangle$
\end{tasks}
\begin{proof}[Solution]\hfill
\begin{tasks}(2)
\task $\begin{aligned}[t]
&\mathbf{a} \cdot \mathbf{b} = (1)(3)+(2)(4) = 11 \\
&\abs{\mathbf{a}} = \sqrt{1^2 + 2^2} = \sqrt{5} \\
&\abs{\mathbf{b}} = \sqrt{3^2+4^2} = 5
\end{aligned}$
\task $\begin{aligned}[t]
&\mathbf{a} \cdot \mathbf{b} = (1)(3)+(2)(4) = 11 \\
&|\mathbf{a}| = \sqrt{1^2 + 2^2} = \sqrt{5}\\
\end{aligned}$%\vspace{1ex}\par
%\qedhere
\end{tasks}
\vspace*{-\baselineskip }\qedhere
\end{proof}

\end{document} 

ここに画像の説明を入力してください

関連情報