Vea el cuadro azul en la captura de pantalla. tengo un párrafoADENTROuna enumeración. Quiero eliminar la sangría para que el párrafo quede alineado a la izquierda SIN sangría.
A continuación se muestra mi código de trabajo:
\documentclass[12pt,letterpaper]{article}
\usepackage[utf8]{inputenc}
\usepackage[margin=1in,footskip=0.25in]{geometry}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathptmx}
\linespread{1.1}
\usepackage{graphicx}
\usepackage{enumitem}
\usepackage{caption}
\title{\textbf{CHECKLISTS}}
\author{}
\date{}
\begin{document}
\maketitle
This is a paragraph before the enumeration. This is a paragraph before the enumeration. This is a paragraph before the enumeration. This is a paragraph before the enumeration. This is a paragraph before the enumeration. \par
\noindent\rule{\textwidth}{1pt}
\begin{enumerate}
\item First line. First line. First line. First line. First line. First line. First line. First line.
\item Second line. Second line. Second line. Second line. Second line. Second line. Second line.
\item Third line. Third line. Third line. Third line. Third line. Third line. Third line. Third line. Third line.
This is a paragraph \textbf{WITHIN the enumeration}. This is a paragraph \textbf{WITHIN the enumeration}. This is a paragraph \textbf{WITHIN the enumeration}. This is a paragraph \textbf{WITHIN the enumeration}.
\item Fourth line. Fourth line. Fourth line. Fourth line. Fourth line. Fourth line. Fourth line.
\end{enumerate}
The enumeration has ended here.\par
\noindent\rule{\textwidth}{1pt}
This is a new story. This is a new story. This is a new story. This is a new story. This is a new story. This is a new story. This is a new story. This is a new story.
\end{document}
Respuesta1
A mi modo de ver, el problema visual/estético se debe a que la mesa de la izquierda es bastante más ancha que 0.5\linewidth
. Una vez que asigna anchos relativos más apropiados a los minipage
entornos (por ejemplo, 0.65\linewidth
y 0.35\linewidth
), la diferencia entre los diseños de las tablas dentro y fuera del enumerate
entorno es mucho menos evidente.
En cualquier caso, a menos que sus tablas tengan grandes limitaciones de espacio (que no es el caso aquí), recomendaríanometerse con el diseño del enumerate
entorno.
Por separado, simplifique sus tablas deshaciéndose de la multitud de \multicolumn{1}{|l|}{...}
envoltorios \multicolumn{1}{l|}{...}
y deshaciéndose del tabular
entorno "externo". También puede ser una buena idea darle a la mesa un "aspecto" más abierto, utilizando menos reglas horizontales pero bien espaciadas. Consulte la siguiente captura de pantalla y el código para obtener algunas sugerencias de codificación específicas.
\documentclass[12pt,letterpaper]{article}
%\usepackage[utf8]{inputenc} % that's the default nowadays
\usepackage[margin=1in,footskip=0.25in]{geometry}
\usepackage{amsmath,amssymb}
\usepackage{mathptmx}
%\linespread{1.1}
\usepackage{setspace} \setstretch{1.1}
\usepackage{parskip} % zero \parindent, non-zero \parskip
\usepackage{enumerate} % I'd use 'enumitem' package
\usepackage{caption}
\captionsetup[table]{textfont=bf}
\usepackage{booktabs}
\begin{document}
\rule{\linewidth}{1pt}
\begin{enumerate}
\item First line. First line. First line. First line. First line. First line. First line. First line.
\item Second line. Second line. Second line. Second line. Second line. Second line. Second line.
\item Third line. Third line. Third line. Third line. Third line. Third line. Third line. Third line.
% Table 1
\begin{minipage}[t]{0.65\linewidth}
\captionof{table}{Major Losses from 2020 to 2023}
\centering
\begin{tabular}{@{}llr@{}}
\toprule
Year & Bets & \multicolumn{1}{l}{Loss} \\
\midrule
2020 & AMZN, AAPL, GOOG, META & \$12,067 \\
2021 & PFE, T & \$10,559 \\
2022 & LULU & \$10,565 \\
2023 & BABA, C, WFC & \$14,390 \\
\midrule[\heavyrulewidth]
& \multicolumn{1}{r}{\textbf{Total}} & \textbf{\$42,581}
\end{tabular}
\end{minipage}%
%
% Table 2
\begin{minipage}[t]{.35\linewidth}
\captionof{table}{Largest Losses}
\centering
\begin{tabular}{@{}lr@{}}
\toprule
Company & \multicolumn{1}{l}{Loss} \\
\midrule
BABA & \$11,410 \\
X & \$11,854 \\
D & \$11,879 \\
MU & \$12,565 \\
OUST & \$8,752 \\
MSFT & \$3,804 \\
\midrule[\heavyrulewidth]
\multicolumn{1}{r}{\textbf{Total}} & \textbf{\$60,264}
\end{tabular}
\end{minipage}
\item Fourth line. Fourth line. Fourth line. Fourth line. Fourth line. Fourth line. Fourth line.
\end{enumerate}
The enumeration ends here.
\rule{\linewidth}{1pt}
This is a new story. This is a new story. This is a new story. This is a new story.
This is a new story. This is a new story. This is a new story. This is a new story.
\begin{center}
% Table 3
\begin{minipage}[t]{0.65\linewidth}
\captionof{table}{Major Losses from 2020 to 2023}
\centering
\begin{tabular}{@{}llr@{}}
\toprule
Year & Bets & \multicolumn{1}{l}{Loss} \\
\midrule
2020 & AMZN, AAPL, GOOG, META & \$12,067 \\
2021 & PFE, T & \$10,559 \\
2022 & LULU & \$10,565 \\
2023 & BABA, C, WFC & \$14,390 \\
\midrule[\heavyrulewidth]
& \multicolumn{1}{r}{\textbf{Total}} & \textbf{\$42,581}
\end{tabular}
\end{minipage}%
%
% Table 4
\begin{minipage}[t]{.35\linewidth}
\captionof{table}{Largest Losses}
\centering
\begin{tabular}{@{}lr@{}}
\toprule
Company & \multicolumn{1}{l}{Loss} \\
\midrule
BABA & \$11,410 \\
X & \$11,854 \\
D & \$11,879 \\
MU & \$12,565 \\
OUST & \$8,752 \\
MSFT & \$3,804 \\
\midrule[\heavyrulewidth]
\multicolumn{1}{r}{\textbf{Total}} & \textbf{\$60,264}
\end{tabular}
\end{minipage}
\end{center}
\rule{\linewidth}{1pt}
\end{document}
Apéndicepara abordar la pregunta revisada del OP,verbigracia.,
Todo lo que quiero es eliminar la sangría DENTRO de la enumeración de un párrafo.
Para eso, basta con (a) asegurarse de que el enumitem
paquete esté cargado, como es el caso en la consulta revisada publicada por el OP, (b) insertar
\end{enumerate}
justo antes de
This is a paragraph \textbf{WITHIN the enumeration}.
This is a paragraph \textbf{WITHIN the enumeration}.
This is a paragraph \textbf{WITHIN the enumeration}.
This is a paragraph \textbf{WITHIN the enumeration}.
y (c) insertar
\begin{enumerate}[resume]
inmediatamentedespuésese párrafo, sino también antes de la próxima \item
directiva.
Respuesta2
Idea robada de la clase de examen.
\documentclass[12pt,letterpaper]{article}
\usepackage[utf8]{inputenc}
\usepackage[margin=1in,footskip=0.25in]{geometry}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathptmx}
\linespread{1.1}
\usepackage{graphicx}
\usepackage{enumitem}
\usepackage{caption}
\makeatletter
\newcommand{\fullwidth}[1]{% #1 = text
\par\hspace*{-\@totalleftmargin}\parbox{\textwidth}{\strut #1\strut}\par}
\makeatother
\title{\textbf{CHECKLISTS}}
\author{}
\date{}
\begin{document}
\maketitle
This is a paragraph before the enumeration. This is a paragraph before the enumeration. This is a paragraph before the enumeration. This is a paragraph before the enumeration. This is a paragraph before the enumeration. \par
\noindent\rule{\textwidth}{1pt}
\begin{enumerate}
\item First line. First line. First line. First line. First line. First line. First line. First line.
\item Second line. Second line. Second line. Second line. Second line. Second line. Second line.
\item Third line. Third line. Third line. Third line. Third line. Third line. Third line. Third line. Third line.
\fullwidth{This is a paragraph \textbf{WITHIN the enumeration}. This is a paragraph \textbf{WITHIN the enumeration}. This is a paragraph \textbf{WITHIN the enumeration}. This is a paragraph \textbf{WITHIN the enumeration}.}
\item Fourth line. Fourth line. Fourth line. Fourth line. Fourth line. Fourth line. Fourth line.
\end{enumerate}
The enumeration has ended here.\par
\noindent\rule{\textwidth}{1pt}
This is a new story. This is a new story. This is a new story. This is a new story. This is a new story. This is a new story. This is a new story. This is a new story.
\end{document}