
次のスクリーンショットで黄色でハイライトされているように、(i)、(ii) などを使用して、補題の番号付けを作成したいと思います。
そこで作成したコードは以下のようになります。
\documentclass[journal]{IEEEtran}
\newtheorem{lemma}{Lemma}
\begin{document}
\begin{lemma}\label{lemma:min_req_time}
The new sequence has following properties.
\renewcommand{\labelenumi}{\Roman{enumi}}
\begin{enumerate}
\item The minimum required time of the robot operation is $(n-1)w + nv$ in between the processing and cleaning states, including vice versa, of every step.
\item In addition, the minimum required time of the robot operation is $(n+1)w + (n+2)v$ after finishing the processing or cleaning for the first time and repeating the same cycle for the next cleaning or processing.
\end{enumerate}
\end{lemma}
\end{document}
Tex Live 2022 の裏面の結果は次のとおりです。
(i)、(ii) などの番号付けスタイルを取得するためにコードで何を修正する必要があるか、誰か提案してもらえますか?
ありがとう。
答え1
enumitem
このパッケージはラベルを再定義するよりクリーンな方法を提供するので、このパッケージを使用することをお勧めします。さらに、同じ形式で参照を印刷することもできます。次の例をご覧ください。それなし enumitem
:
\documentclass[journal]{IEEEtran}
\begin{document}
\renewcommand{\labelenumi}{(\roman{enumi})}
\noindent The new sequence has following properties.
\begin{enumerate}
\item The minimum\ldots\label{item:one}
\item In addition\ldots\label{item:two}
\end{enumerate}
Here are references to \ref{item:one} and \ref{item:two}.
\end{document}
これにより
上記のパッケージを使用すると、次のことを実現できます。
\documentclass[journal]{IEEEtran}
\usepackage{enumitem} % <- load enumitem
\begin{document}
%\renewcommand{\labelenumi}{(\roman{enumi})} % <- not needed anymore
\noindent The new sequence has following properties.
\begin{enumerate}[label=(\roman*)] % <- specify label format
\item The minimum\ldots\label{item:one}
\item In addition\ldots\label{item:two}
\end{enumerate}
Here are references to \ref{item:one} and \ref{item:two}. % <- produce matching references
\end{document}
参照をラベルのように見せたくない場合は、 を指定できるのでこれも問題ありませんref
。たとえば、 を使用すると、 、\begin{enumerate}[label=(\roman*),ref=[\alph*-]
のようなラベルが表示されますが(i)
、、(ii)
のような参照が表示されます (なぜこれが必要になるのかわかりませんが、可能です)。[a-
[b-
\setlist[enumerate]{label=(\roman*)}
プリアンブルを挿入すれば、これらの変更をグローバルに行うことも可能です。
答え2
変更することをお勧めします
\renewcommand{\labelenumi}{\Roman{enumi}}
に
\renewcommand{\labelenumi}{(\roman{enumi})}
1つの環境のみの番号付けスタイルを変更したい場合はlemma
、 の直後にディレクティブを実行します\begin{lemma}
。変更を適用したい場合は、全て enumerate
環境では、ドキュメントのプリアンブルにあるディレクティブを必ず実行してください。
\documentclass[journal]{IEEEtran}
\newtheorem{lemma}{Lemma}
\usepackage{newtxmath} % Times Roman math font (optional)
\begin{document}
\begin{lemma}\label{lemma:min_req_time}
\renewcommand{\labelenumi}{(\roman{enumi})}
The new sequence has following properties.
\begin{enumerate}
\item The minimum required time of the robot operation is $(n-1)w + nv$ in between the processing and cleaning states, including vice versa, of every step.
\item In addition, the minimum required time of the robot operation is $(n+1)w + (n+2)v$ after finishing the processing or cleaning for the first time and repeating the same cycle for the next cleaning or processing.
\item \dots\dots
\item \dots\dots
\item \dots\dots
\item \dots\dots
\item \dots\dots
\end{enumerate}
\end{lemma}
\end{document}