列挙環境内の1行または1段落のインデントを削除します

列挙環境内の1行または1段落のインデントを削除します

スクリーンショットの青いボックスを見てください。段落があります内部列挙。段落がインデントなしで左揃えになるように、そのインデントを削除したいと思います。

青い箱

以下は私の作業コードです:

\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を割り当てると、環境の内側と外側のテーブル レイアウトの違いはそれほど目立たなくなります。minipage0.65\linewidth0.35\linewidthenumerate

いずれにせよ、テーブルのスペースが極端に限らない限り(ここではそうではありませんが)、私はない環境のレイアウトを台無しにします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の修正された質問に対応するために、すなわち

私が望んでいるのは、段落の列挙内のインデントを削除することだけです。

そのためには、(a) パッケージがロードされていることを確認するenumitem(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}

関連情報