根據需要縮排文本

根據需要縮排文本

我想將文字縮排如下:myfig.png

我嘗試過,但找不到一個好的解決方案。任何幫助將不勝感激...

答案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}

在此輸入影像描述

相關內容