我在 LaTeX 中有以下文本:
我希望项目 A 的第二个句子从第一个句子的第一个单词开始(因此“它是原始的……”用“数据是事实……”概括)。我在互联网上搜索了一个例子,特别是描述列表,但我无法管理它(已经尝试过\noindent
其他包)。
代码 (introduction.tex
):
\begin{description}
\item[A)] Data are facts, events or transactions and so on which have been recorded.
It is raw material input from which information is produced.
\item[B)] Information is data that has been processed and communicated in such
a way that it can be interpreted and understood by the recipient.
\end{description}
主.tex
文件名为thesis.tex
。在主文件中声明了包。
答案1
只是想补充一下@Werner 的精彩回答:
如果环境中的标签很长description
,有时将文本换行到标签下方看起来会更好。开始标签,如下所示:
\documentclass{article}
\usepackage{enumitem}% http://ctan.org/pkg/enumitem
\begin{document}
\begin{description}[style=unboxed,leftmargin=0cm]
\item[A)] Data are facts, events or transactions and so on which have been recorded.
It is raw material input from which information is produced.
\item[Some labels are pretty long] Information is data that has been processed and communicated in such
a way that it can be interpreted and understood by the recipient.
\end{description}
\end{document}
导致:
答案2
这enumitem
包裹可轻松控制列表格式和长度操作。以下是使用您的description
和自动的快速比较enumerate
:
\documentclass{article}
\usepackage{enumitem}% http://ctan.org/pkg/enumitem
\begin{document}
\begin{description}
\item[A)] Data are facts, events or transactions and so on which have been recorded.
It is raw material input from which information is produced.
\item[B)] Information is data that has been processed and communicated in such
a way that it can be interpreted and understood by the recipient.
\end{description}
\begin{enumerate}[label=\textbf{\Alph*)},ref=\Alph*,leftmargin=*]
\item Data are facts, events or transactions and so on which have been recorded.
It is raw material input from which information is produced.
\item Information is data that has been processed and communicated in such
a way that it can be interpreted and understood by the recipient.
\end{enumerate}
\end{document}
使用后者的优点是,您可以像通常使用浮动和分段单元一样来排列分项内容。使用\label
固定项目标签很麻烦,容易出错,并且无法处理引用。\ref
description
\item[<lab>]
答案3
您尝试过这个enumitem
包吗?它为您提供了对列表的大量控制。它的选项以及与列表相关的不同长度的图表(例如,这个) 肯定会让你做你所描述的事情。