不要なインデント

不要なインデント

次のコードでは、「3 人の海賊を含むシナリオ...」以下のすべてが、上のテキストに対してインデントされています。

\documentclass{article}
\title{Assignment \#1}
\author{Giri}
\date{March 20, 2014}
\begin{document}
\maketitle     
\section*{Question 1}
\textit{Scenario containing 2 pirates :} \\*\\*
 Regardless of how the gold is split, the 2nd pirate will vote against the 1st pirate and take all the gold. \\*\\*

\textit{Scenario containing 3 pirates:} 

\begin{table}[ht]
\caption{3 Pirates}
\centering
\begin{tabular}{c c c}
\hline\hline
Pirate\#1 & Pirate\#2 & Pirate\#3 \\  
\hline
x & x & x \\
\hline
\end{tabular}
\end{table}

In this...

\end{document}

なぜこのようなことが起こるのか誰か教えてもらえませんか?

答え1

インデントを一切行わない場合は、 をロードする方がよいでしょう。これにより、段落のインデントが 0 に設定され、などparskipを使用する環境の適切な書式を維持しながら、段落の垂直方向のスキップが拡大されます。\parindent\parskip

\documentclass{article}
\usepackage{parskip}% if you don't want paragraphs indented but would prefer to mark them by increased vertical spacing
\title{Assignment \#1}
\author{Giri}
\date{March 20, 2014}
\begin{document}
\maketitle
\section*{Question 1}
\textit{Scenario containing 2 pirates :} \\*\\*
 Regardless of how the gold is split, the 2nd pirate will vote against the 1st pirate and take all the gold. \\*\\*

\textit{Scenario containing 3 pirates:}

\begin{table}[ht]
\caption{3 Pirates}
\centering
\begin{tabular}{c c c}
\hline\hline
Pirate\#1 & Pirate\#2 & Pirate\#3 \\
\hline
x & x & x \\
\hline
\end{tabular}
\end{table}

In this...

\end{document}

非インデント海賊

あるいは、リスト環境を使用して書式設定の一貫性を保つ方が簡単な場合もあります。例:

\documentclass{article}
\usepackage{enumitem}
  \newlist{pirates}{description}{1}
  \setlist[pirates,1]{font=\normalfont\itshape,style=nextline,labelindent=0pt,leftmargin=0pt,itemsep=1.5em}
\title{Assignment \#1}
\author{Giri}
\date{March 20, 2014}
\begin{document}
\maketitle
\section*{Question 1}

\begin{pirates}
    \item[Scenario containing 2 pirates:] \mbox{}\\
      Regardless of how the gold is split, the 2nd pirate will vote against the 1st pirate and take all the gold.
    \item[Scenario containing 3 pirates:] \mbox{}\\
      \begin{table}[ht]
      \caption{3 Pirates}
      \centering
      \begin{tabular}{c c c}
      \hline\hline
      Pirate\#1 & Pirate\#2 & Pirate\#3 \\
      \hline
      x & x & x \\
      \hline
      \end{tabular}
      \end{table}
\end{pirates}
In this...

\end{document}

piratesこれは基本的に、特定の方法でフォーマットされた新しい特殊なリストを設定します。例は次のようになります。

海賊リスト

答え2

新しい段落の前にを追加する必要があります\noindent。デフォルトでは、最初の段落はインデントされず、後続のすべての段落はインデントされます。 の後に続く\sectionが新しい段落の開始であることは明らかです。ただし、後続の段落を区別するには、通常、段落をインデントします。

テキストが長ければ、これはより明確になります。

ここに画像の説明を入力してください

ノート:

  • 表の後の段落は、後続の段落がインデントされる理由を示す良い例です。この段落がインデントされていない場合、読者はこれが後続の段落の始まりであるかどうかを知る方法がありません。

  • 段落をまったくインデントしたくない場合は、次のようにします。

    \usepackage[parfill]{parskip}
    

コード:

\documentclass{article}

\title{Assignment \#1}
\author{Giri}
\date{March 20, 2014}
\begin{document}
\maketitle     
\section*{Question 1}
\textit{Scenario containing 2 pirates :} \\*\\*
 Regardless of how the gold is split, the 2nd pirate will vote against the 1st pirate and take all the gold. \\*\\*

Here is some longer text to show that only the start of that paragraph is indented.
\textit{Scenario containing 3 pirates:} 

\begin{table}[ht]
\caption{3 Pirates}
\centering
\begin{tabular}{c c c}
\hline\hline
Pirate\#1 & Pirate\#2 & Pirate\#3 \\  
\hline
x & x & x \\
\hline
\end{tabular}
\end{table}

In this, and some more text here again to show that only the start of the paragraph is indented.

\end{document}

関連情報