원하지 않는 들여쓰기

원하지 않는 들여쓰기

다음 코드를 사용하면 "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

들여쓰기를 원하지 않으면 로드하는 것이 좋습니다 parskip. 이는 단락 들여쓰기를 0으로 설정하고 등을 사용하는 환경의 적절한 형식을 유지하면서 수직 건너뛰기가 증가된 단락을 표시합니다 \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새 단락 앞에 추가해야 합니다 . 기본값은 첫 번째 단락을 들여쓰지 않고 이후의 모든 단락을 들여쓰는 것입니다. a 다음에는 \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}

관련 정보