LaTeX使用enumitem包切换enumerate标签样式

文章介绍了如何在LaTeX中使用enumerate环境创建列表,并通过enumitem包来定制不同的标签样式,包括数字加括号、粗体数字、小写字母、大写字母和罗马数字等。此外,提到了LaTeX的在线编译环境Overleaf。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一、直接使用enumerate

        源码:

\documentclass{article}
\begin{document}
\section{LaTeX Style Sample}
There is nothing to show, thank you for reading.
\begin{enumerate}
    \item Apple is a kind of fruit.
    \item Cat is a kind of animal.
    \item Butterfly is a kind of insect.
\end{enumerate}
\end{document}

        效果:可看到,默认的是以数字序号作为标签样式,即1. 、2.、3.等

 

二、配合enumitem包使用enumerate

        配合enumitem包需要在LaTeX之中导入该包,具体就是在源码之中加入下面一行代码(\begin{document}之前):

\usepackage{enumitem}

        样式1:数字序号+括号 (关键代码在第6行,后面也是)

\documentclass{article}
\usepackage{enumitem}
\begin{document}
\section{LaTeX Style Sample}
There is nothing to show, thank you for reading.
\begin{enumerate}[label=(\arabic*)]
    \item Apple is a kind of fruit.
    \item Cat is a kind of animal.
    \item Butterfly is a kind of insect.
\end{enumerate}
\end{document}

        样式1效果

        样式2:粗体数字序号

\documentclass{article}
\usepackage{enumitem}
\begin{document}
\section{LaTeX Style Sample}
There is nothing to show, thank you for reading.
\begin{enumerate}[label=$\mathbf{\arabic*}.$]
    \item Apple is a kind of fruit.
    \item Cat is a kind of animal.
    \item Butterfly is a kind of insect.
\end{enumerate}
\end{document}

        样式2效果

        样式3:粗体数字序号+括号

\documentclass{article}
\usepackage{enumitem}
\begin{document}
\section{LaTeX Style Sample}
There is nothing to show, thank you for reading.
\begin{enumerate}[label=$(\mathbf{\arabic*})$]
    \item Apple is a kind of fruit.
    \item Cat is a kind of animal.
    \item Butterfly is a kind of insect.
\end{enumerate}
\end{document}

        样式3效果

        样式4:小写字母

\documentclass{article}
\usepackage{enumitem}
\begin{document}
\section{LaTeX Style Sample}
There is nothing to show, thank you for reading.
\begin{enumerate}[label=\alph*.]
    \item Apple is a kind of fruit.
    \item Cat is a kind of animal.
    \item Butterfly is a kind of insect.
\end{enumerate}
\end{document}

        样式4效果

        样式5:大写字母

\documentclass{article}
\usepackage{enumitem}
\begin{document}
\section{LaTeX Style Sample}
There is nothing to show, thank you for reading.
\begin{enumerate}[label=\Alph*.]
    \item Apple is a kind of fruit.
    \item Cat is a kind of animal.
    \item Butterfly is a kind of insect.
\end{enumerate}
\end{document}

        样式5效果

        样式6:罗马字母(注意,这个也可以大写)

\documentclass{article}
\usepackage{enumitem}
\begin{document}
\section{LaTeX Style Sample}
There is nothing to show, thank you for reading.
\begin{enumerate}[label=\roman*.]
    \item Apple is a kind of fruit.
    \item Cat is a kind of animal.
    \item Butterfly is a kind of insect.
\end{enumerate}
\end{document}

        样式6效果

        其他样式:根据上述的示例,相信聪明的你可以快速猜到如何得到其他你所需要的标签样式,觉得有用请点个赞,感谢。有缘在此相见,祝各位科研顺利。

三、LaTeX编译环境

        1. 编辑+编译环境:Overleaf

        2. 包的引用:已在上述源码给出

        3. 文件之间的引用:无,项目中仅有一个main.tex文件

四、参考

        1. LaTeX使用enumitem包

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

飞机火车巴雷特

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值