
Me gustaría crear una numeración para un Lema usando (i), (ii), etc., como se muestra en amarillo resaltado en la siguiente captura de pantalla.
Luego, el código que creé de la siguiente manera.
\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}
El resultado al dorso con Tex Live 2022 es el siguiente.
¿Alguien puede sugerir qué se debe modificar en el código para obtener el estilo de numeración de (i), (ii), etc., por favor?
Gracias.
Respuesta1
Sugiero usar el enumitem
paquete ya que proporciona (en mi opinión) una forma más limpia de redefinir la etiqueta. Además permite imprimir referencias en el mismo formato. Eche un vistazo al siguiente ejemplosin 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}
Esto produce
Si utiliza el paquete anterior, podemos lograr lo siguiente:
\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}
Si no desea que las referencias se parezcan a las etiquetas, esto tampoco es un problema porque puede especificar ref
: Usando, por ejemplo, \begin{enumerate}[label=(\roman*),ref=[\alph*-]
obtendrá etiquetas como (i)
, (ii)
pero referencias como [a-
( [b-
no tengo idea de por qué debería querer esto, pero es posible). ).
También es posible realizar estos cambios de forma global si los pones \setlist[enumerate]{label=(\roman*)}
en el preámbulo.
Respuesta2
te sugiero que cambies
\renewcommand{\labelenumi}{\Roman{enumi}}
a
\renewcommand{\labelenumi}{(\roman{enumi})}
Si desea cambiar el estilo de numeración para un solo lemma
entorno, ejecute la directiva inmediatamente después \begin{lemma}
. Si desea que el cambio se aplique atodo enumerate
entorno, asegúrese de ejecutar la directiva en el preámbulo del documento.
\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}