Entfernen Sie die Einrückung für eine Zeile oder einen Absatz innerhalb einer Aufzählungsumgebung.

Entfernen Sie die Einrückung für eine Zeile oder einen Absatz innerhalb einer Aufzählungsumgebung.

Siehe das blaue Kästchen im Screenshot. Ich habe einen AbsatzINNENeine Aufzählung. Ich möchte die Einrückung dafür entfernen, sodass der Absatz OHNE Einrückung linksbündig ausgerichtet ist.

Blaue Box

Unten ist mein funktionierender Code:

\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}

Antwort1

Meiner Ansicht nach wird das visuelle/ästhetische Problem dadurch verursacht, dass die linke Tabelle um einiges breiter ist als 0.5\linewidth. Sobald Sie den Umgebungen geeignetere relative Breiten zuweisen minipage– sagen wir 0.65\linewidthund 0.35\linewidth–, ist der Unterschied zwischen den Tabellenlayouts innerhalb und außerhalb der enumerateUmgebung viel weniger offensichtlich.

Auf jeden Fall würde ich, sofern Ihre Tabellen nicht stark platzbeschränkt sind (was hier nicht der Fall ist),nichtdas Layout der enumerateUmgebung durcheinander bringen.

Vereinfachen Sie außerdem Ihre Tabellen, indem Sie die Vielzahl von Wrappern und die „äußere“ Umgebung entfernen. Es kann auch eine gute Idee sein, \multicolumn{1}{|l|}{...}der \multicolumn{1}{l|}{...}Tabelle tabularein offeneres „Aussehen“ zu verleihen – indem Sie weniger, aber dafür gut verteilte horizontale Linien verwenden. Im folgenden Screenshot und Code finden Sie einige spezifische Codierungsvorschläge.

Bildbeschreibung hier eingeben

\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}

Nachtragum auf die überarbeitete Frage des OP einzugehen,nämlich.,

Ich möchte lediglich die Einrückung INNERHALB der Aufzählung für einen Absatz entfernen.

Dazu genügt es, (a) sicherzustellen, dass das enumitemPaket geladen ist - wie es in der überarbeiteten Abfrage des OP der Fall ist, (b) einzufügen

\end{enumerate}

kurz bevor

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}.

und c) einfügen

\begin{enumerate}[resume]

sofortnachdiesem Absatz, sondern auch vor der nächsten \itemRichtlinie.

Antwort2

Idee aus Prüfungsvorlesung geklaut.

\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}

verwandte Informationen