Como ter o rótulo enumerado alinhado à esquerda

Como ter o rótulo enumerado alinhado à esquerda

Eu tenho esse MWE:

\documentclass[12pt,a4paper]{article}

\usepackage{nicematrix}

\begin{document}
\begin{enumerate}
\item 

\begin{center}

$\begin{pNiceMatrix}[first-row,first-col]
 & \{1,2\} & \{1,3\} & \{1,4\} & \{2,3\} & \{2,4\} & \{3,4\} \\
x_1 & 1 & 0 & 1 & 0 & 0 & 0 \\
x_2 & -1 & 0 & 0 & 1 & 1 & 0 \\
x_3 & 0 & 0 & 0 & -1 & 0 & 1 \\
x_4 & 0 & 0 & -1 & 0 & -1 & -1 \\
\end{pNiceMatrix}$

\end{center}

\item Two.
\item Three.

\end{enumerate}
\end{document}

insira a descrição da imagem aqui

Infelizmente, o 1. logo antes da matriz também é centralizado. Como posso evitar isso?

Responder1

Hack rápido e sujo:

\documentclass[12pt,a4paper]{article}

\usepackage{nicematrix}

\begin{document}
\begin{enumerate}
\item  \hfill $\begin{pNiceMatrix}[first-row,first-col]
 & \{1,2\} & \{1,3\} & \{1,4\} & \{2,3\} & \{2,4\} & \{3,4\} \\
x_1 & 1 & 0 & 1 & 0 & 0 & 0 \\
x_2 & -1 & 0 & 0 & 1 & 1 & 0 \\
x_3 & 0 & 0 & 0 & -1 & 0 & 1 \\
x_4 & 0 & 0 & -1 & 0 & -1 & -1 \\
\end{pNiceMatrix}$\hfill\mbox{}

\item Two.
\item Three.

\end{enumerate}
\end{document}

insira a descrição da imagem aqui

Responder2

Uma solução simples é colocar a matriz dentro de a minipage:

\documentclass[12pt,a4paper]{article}

\usepackage{nicematrix}

\begin{document}
\begin{enumerate}
\item 
\begin{minipage}{\linewidth}
\begin{center}
$\begin{pNiceMatrix}[first-row,first-col]
 & \{1,2\} & \{1,3\} & \{1,4\} & \{2,3\} & \{2,4\} & \{3,4\} \\
x_1 & 1 & 0 & 1 & 0 & 0 & 0 \\
x_2 & -1 & 0 & 0 & 1 & 1 & 0 \\
x_3 & 0 & 0 & 0 & -1 & 0 & 1 \\
x_4 & 0 & 0 & -1 & 0 & -1 & -1 \\
\end{pNiceMatrix}$
\end{center}
\end{minipage}
\item Two.
\item Three.

\end{enumerate}
\end{document}

saída de código

informação relacionada