这里有谁知道如何生成像附图中那样的两列列表吗?我很难让矩阵看起来像共享图像中那样整齐地对齐……
答案1
下一个代码是使用 multicol 包中的矩阵环境
\documentclass{article}
\usepackage{multicol}
\usepackage{amsmath}
\begin{document}
\begin{enumerate}
\item Determinar la transpuesta de cada una de las sigientes matrices. Adem\'as si la matriz es cuadrada, calcular su traza.
\begin{multicols}{2}
\begin{enumerate}
\item
$\left( \begin{matrix}
-4 & 2 \\
5 & -1
\end{matrix} \right)$
\item
$\left( \begin{matrix}
0 & 8 & -6 \\
3 & 4 & 7
\end{matrix} \right)$
\item
$\left( \begin{matrix}
-3 & 9 \\
0 & -2 \\
6 & 1
\end{matrix} \right)$
\item
$\left( \begin{matrix}
10 & 0 & -8 \\
2 & -4 & 3 \\
-5 & 7 & 6
\end{matrix} \right)$
\end{enumerate}
\end{multicols}
\end{enumerate}
\end{document}
答案2
这是一种将每个矩阵包装在 a 中的方法minipage
,其特征resume
是包裹enumitem
:
如果您希望将标签与顶部对齐,那么您可以使用adjustbox
:
代码:
\documentclass{article}
\usepackage{enumitem}
\usepackage{amsmath}
\newcounter{MatrixCount}
\setcounter{MatrixCount}{0}
\newenvironment{MyMatrix}{%
\begin{minipage}{0.48\linewidth}
\ifnum\arabic{MatrixCount}=0
\smallskip
\begin{enumerate}[series=MyList]
\stepcounter{MatrixCount}%
\else
\begin{enumerate}[resume*=MyList]
\fi
\item $\begin{pmatrix}
}{%
\end{pmatrix}$%
\end{enumerate}%
\end{minipage}%
\ifnum\arabic{MatrixCount}=2
\par
\setcounter{MatrixCount}{0}%
\fi
\stepcounter{MatrixCount}%
}%
\begin{document}
\begin{enumerate}
\item Here are a some matrices.
\begin{MyMatrix}
-4 & 2 \\
5 & -1
\end{MyMatrix}
% ------------- No blank line here.
\begin{MyMatrix}
0 & 8 & -6 \\
3 & 4 & 7
\end{MyMatrix}
% ------------- No blank line here.
\begin{MyMatrix}
-3 & 9 \\
0 & -2 \\
6 & 1
\end{MyMatrix}
% ------------- No blank line here.
\begin{MyMatrix}
10 & 0 & -8 \\
2 & -4 & 3 \\
-5 & 7 & 6
\end{MyMatrix}
% ------------- No blank line here.
\begin{MyMatrix}
1 & -1 & 3 & 5 \\
\end{MyMatrix}
% ------------- No blank line here.
\begin{MyMatrix}
-2 & 5 & 1 & 4 \\
7 & 0 & 1 & -6 \\
\end{MyMatrix}
\end{enumerate}
\end{document}
adjustbox
将标签对齐到顶部的代码
\documentclass{article}
\usepackage{enumitem}
\usepackage{adjustbox}
\usepackage{amsmath}
\newcounter{MatrixCount}
\setcounter{MatrixCount}{0}
\newenvironment{MyMatrix}{%
\begin{minipage}{0.48\linewidth}
\ifnum\arabic{MatrixCount}=0
\smallskip
\begin{enumerate}[series=MyList]
\stepcounter{MatrixCount}%
\else
\begin{enumerate}[resume*=MyList]
\fi
\item \begin{adjustbox}{valign=t}
$\begin{pmatrix}
}{%
\end{pmatrix}$%
\end{adjustbox}%
\end{enumerate}%
\end{minipage}%
\ifnum\arabic{MatrixCount}=2
\par
\setcounter{MatrixCount}{0}%
\fi
\stepcounter{MatrixCount}%
}%
\begin{document}
\begin{enumerate}
\item Here are a some matrices.
\begin{MyMatrix}
-4 & 2 \\
5 & -1
\end{MyMatrix}
% ------------- No blank line here.
\begin{MyMatrix}
0 & 8 & -6 \\
3 & 4 & 7
\end{MyMatrix}
% ------------- No blank line here.
\begin{MyMatrix}
-3 & 9 \\
0 & -2 \\
6 & 1
\end{MyMatrix}
% ------------- No blank line here.
\begin{MyMatrix}
10 & 0 & -8 \\
2 & -4 & 3 \\
-5 & 7 & 6
\end{MyMatrix}
% ------------- No blank line here.
\begin{MyMatrix}
1 & -1 & 3 & 5 \\
\end{MyMatrix}
% ------------- No blank line here.
\begin{MyMatrix}
-2 & 5 & 1 & 4 \\
7 & 0 & 1 & -6 \\
\end{MyMatrix}
\end{enumerate}
\end{document}
答案3
如果您想要从左到右的枚举,the
可以使用任务包来实现:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{fourier}
\usepackage{amsmath}
\usepackage{enumitem}
\usepackage{tasks}
\settasks{ label-offset=0.85em,counter-format =(tsk[a]) , column-sep =8pt, item-indent=4em, after-item-skip=0.6ex, after-skip=3ex}
\begin{document}
\begin{enumerate}[wide=0pt]
\item Determinar la transpuesta de cada una de las sigientes matrices. Adem\'as si la matriz es cuadrada, calcular su traza.
\begin{tasks}(2)
\task
$ \begin{pmatrix}
-4 & 2 \\
5 & -1
\end{pmatrix} $
\task
$ \begin{pmatrix}
0 & 8 & -6 \\
3 & 4 & 7
\end{pmatrix} $
\task
$ \begin{pmatrix}
-3 & 9 \\
0 & -2 \\
6 & 1
\end{pmatrix} $
\task
$ \begin{pmatrix}
10 & 0 & -8 \\
2 & -4 & 3 \\
-5 & 7 & 6
\end{pmatrix} $
\task
$ \begin{pmatrix}
1 & -1 & 3 & 5
\end{pmatrix} $
\task
$ \begin{pmatrix}
-2 & 5 & 1 & 4\\
7 & 0 & 1 & -6
\end{pmatrix} $
\task
$ \begin{pmatrix}
-5 \\ 0 \\ 7
\end{pmatrix} $
\task
$ \begin{pmatrix}
-& 0 &6\\
0 & 1 & -1\\
6 & -3 & 5
\end{pmatrix} $
\end{tasks}
\end{enumerate}
\end{document}