열거 환경 내에서 한 줄 또는 단락의 들여쓰기 제거

열거 환경 내에서 한 줄 또는 단락의 들여쓰기 제거

스크린샷의 파란색 상자를 참조하세요. 단락이 있어요내부에열거. 들여쓰기 없이 단락이 왼쪽으로 정렬되도록 들여쓰기를 제거하고 싶습니다.

파란색 상자

다음은 내 작업 코드입니다.

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

답변1

제가 보기엔 왼쪽 테이블이 에 비해 꽤 넓어서 시각적/미적 문제가 발생하는 것 같습니다 0.5\linewidth. minipage환경 에 보다 적절한 상대 너비를 할당하면 0.65\linewidth환경 0.35\linewidth내부와 외부의 테이블 레이아웃 간의 차이가 enumerate훨씬 덜 분명해집니다.

어쨌든 테이블의 공간이 심하게 제한되어 있지 않는 한(여기서는 그렇지 않음)~ 아니다환경 의 레이아웃을 엉망으로 만듭니다 enumerate.

이와 별도로, 수많은 래퍼와 "외부" 환경을 제거하여 테이블을 \multicolumn{1}{|l|}{...}단순화 \multicolumn{1}{l|}{...}하십시오 tabular. 테이블에 좀 더 개방적인 "모양"을 부여하는 것은 더 적지만 간격이 넉넉한 수평선을 사용하는 것도 좋은 생각일 수 있습니다. 구체적인 코딩 제안 사항은 다음 스크린샷과 코드를 참조하세요.

여기에 이미지 설명을 입력하세요

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

부록OP의 수정된 질문을 해결하기 위해즉.,

내가 원하는 것은 단락의 열거 내에서 들여쓰기를 제거하는 것입니다.

enumitem이를 위해서는 (a) OP가 게시한 수정된 쿼리의 경우처럼 패키지가 로드되었는지 확인하고, (b) 삽입하는 것으로 충분합니다.

\end{enumerate}

직전에

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

(c) 삽입

\begin{enumerate}[resume]

즉시~ 후에해당 단락뿐만 아니라 다음 \item지시어 이전에도 마찬가지입니다.

답변2

시험시간에 아이디어를 훔쳤습니다.

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

관련 정보