Bulleted and numbered lists
此页面需较新浏览器(支持 SharedArrayBuffer)。请升级 Chrome、Edge、Firefox 或 Safari 至最新版本。
项目符号列表
- 项目符号列表是一种环境 —— 用
\begin打开,用\end关闭:
\begin{itemize}
\item First thing
\item Second thing
\end{itemize}
- 每一项都以
\item开头。项目符号和间距都会自动处理好。
编号列表
- 想要 1、2、3 而不是项目符号?用
enumerate—— 其余写法完全一样:
\begin{enumerate}
\item Wake up
\item Have breakfast
\end{enumerate}
- 编号是自动的,所以你可以随意调整条目顺序。
列表套列表
- 在某个
\item里再放一个列表,就能做出子条目。LaTeX 会自动缩进并改变符号样式。 - 现在试着把几行文字整理成一个整洁的项目符号列表吧。
常见错误
- 第一个
\item之前的文本。 LaTeX 会在! LaTeX Error: Something's wrong--perhaps a missing \item.处停止。 - 闭标签名称不匹配。
\begin{itemize}...\end{enumerate}会导致! LaTeX Error: \begin{itemize} on input line 3 ended by \end{enumerate}.错误。提示信息会指出列表开始的那一行。 - 新项目符号需要空行。 它仅在同个项目符号内开启新段落。每个条目都必须有自己的
\item。
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
Turn the three foods into a bulleted list. Wrap them in \begin{itemize} … \end{itemize} and put \item before each one.
点击“运行”编译并预览 PDF。
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
Order matters here, so use a numbered list. Wrap the three steps in \begin{enumerate} … \end{enumerate} with an \item before each. LaTeX numbers them 1, 2, 3 for you.
点击“运行”编译并预览 PDF。
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
Lists can sit inside lists. Under the item Fruit, add an inner itemize with the two items Apple and Pear. LaTeX changes the bullet for the inner level.
点击“运行”编译并预览 PDF。