LaTeX は enumitem パッケージを使用して列挙タグのスタイルを切り替えます

1. 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. など) がラベル スタイルとして使用されることがわかります。

 

2. 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 エフェクト

        その他のスタイル: 上記の例によれば、必要な他のラベル スタイルを取得する方法はすぐに推測できると思います。役に立ったと思われる場合は、「いいね!」をお願いします。ここであなたにお会いできたのは運命です。あなたの研究の成功を祈っています。

3. LaTeXコンパイル環境

        1. 編集+コンパイル環境:Overleaf

        2. パッケージ参照: 上記のソースコードに記載されています

        3. ファイル間の参照: なし。プロジェクトには main.tex ファイルが 1 つだけあります。

4. 参考資料

        1.  LaTeX は enumitem パッケージを使用します

おすすめ

転載: blog.csdn.net/qq_36158230/article/details/128835542