![Dos columnas; Espacio antes de la alineación izquierda; colocación del símbolo QED](https://rvso.com/image/353043/Dos%20columnas%3B%20Espacio%20antes%20de%20la%20alineaci%C3%B3n%20izquierda%3B%20colocaci%C3%B3n%20del%20s%C3%ADmbolo%20QED.png)
He usado el código encontrado.aquípara eliminar el espacio vertical antes de las columnas múltiples. Quiero alinear a la izquierda algunas ecuaciones. Tengo dos problemas:
- Las ecuaciones no están alineadas a la izquierda con la línea que precede a la solución (es difícil saberlo en la imagen, pero hay un espacio horizontal muy pequeño en el lado izquierdo del entorno alineado).
- ¿Cómo puedo hacer que el símbolo QED se alinee con la fila inferior de la solución?
Cualquier ayuda sería apreciada.
\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}
Respuesta1
Aquí hay dos variantes de cómo hacerlo, que son muy similares para la ubicación del qed
símbolo, \qedhere
precedido por un espacio vertical negativo justo antes del final de la prueba. La segunda variante utiliza el tasks
entorno, que se realiza para la numeración "horizontal". Aproveché para definir una \abs
macro de tamaño variable con el \DeclarePairedDelimiter
comando from mathtools
(ver detalles para su uso en la documentación de mathtools).
\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}