根据需要缩进文本

根据需要缩进文本

我想将文本缩进如下:我的图

我试过了,但找不到好的解决办法。任何帮助都将不胜感激...

答案1

您想使用该description环境。

\documentclass{book}

\begin{document}

\mainmatter

\chapter{Introduction}

Something to tell what this book is about. Now we
describe the contents of each chapter.

\begin{description}
\item[Chapter 2] deals with gnus, big animals rarely found in Arctic
regions, but that frequently plague silly text examples like this.
Note that gnus are not to be confused with gnats, that are much
smaller animals; enough of this silliness to fill up more than
two lines.

\item[Chapter 3] deals with reindeer, big animals that live in
cold countries and that are very important in this time of the year.
We'll tell how to possibly see reindeer, by remaining awake all the
night between 24 and 25 December.
\end{description}

Something more about the text.

\end{document}

在此处输入图片描述

您可能希望自定义描述列表;在这种情况下,enumitem建议使用该包。在示例中,缩进设置为与正常段落缩进相同。

\documentclass{book}
\usepackage{enumitem}

\begin{document}

\mainmatter

\chapter{Introduction}

Something to tell what this book is about. Now we
describe the contents of each chapter.

\begin{description}[leftmargin=\parindent]
\item[Chapter 2] deals with gnus, big animals rarely found in Arctic
regions, but that frequently plague silly text examples like this.
Note that gnus are not to be confused with gnats, that are much
smaller animals; enough of this silliness to fill up more than
two lines.

\item[Chapter 3] deals with reindeer, big animals that live in
cold countries and that are very important in this time of the year.
We'll tell how to possibly see reindeer, by remaining awake all the 
night between 24 and 25 December.

\end{description}

Something more about the text.

\end{document}

在此处输入图片描述

相关内容