Dos puntos en cursiva del entorno de comentarios (usando `amsthm`), pero la numeración está en fuente normal

Dos puntos en cursiva del entorno de comentarios (usando `amsthm`), pero la numeración está en fuente normal

Normalmente no me gusta el punto después de los encabezados de los teoremas. Por eso, agregué la siguiente línea a mi preámbulo:

\g@addto@macro{\thm@space@setup}{\thm@headpunct{:}}

lo cual funciona muy bien. Pero con esa opción, obtengo dos puntos en cursiva después del remarkencabezado, lo cual es bueno cuando no hay numeración, pero con la numeración habilitada, el número se escribe en fuente normal, no en cursiva. ¿Es posible poner el número en cursiva también o, alternativamente, poner los dos puntos en fuente normal?no¿definir un nuevo estilo de teorema?

Quiero que los dos puntos estén en fuente normal en un caso y en cursiva en el otro caso al mismo tiempo, o alternativamente, que el número esté en cursiva.

\documentclass{article}
\usepackage{amsthm}

\theoremstyle{remark}
\newtheorem{remark}{Remark}
\newtheorem*{remark*}{Remark}

\makeatletter
\g@addto@macro{\thm@space@setup}{\thm@headpunct{:}}
\makeatother

\begin{document}
    \begin{remark}
        Here is a numbered remark.
    \end{remark}
    \begin{remark*}
        Here is an unnumbered remark.
    \end{remark*}
\end{document}

ingrese la descripción de la imagen aquí

Actualizar:El problema para mí de usar dos puntos ascendentes en todas partes era el espacio entre los encabezados en cursiva sin numerar y los dos puntos. Todo \/funciona bien, vea los comentarios a continuación.

Respuesta1

El amsthmpaquete define internamente una macro \@upnpara mantener el número en posición vertical, independientemente de la fuente del encabezado. Al refinarlo a una macro vacía, el número se imprimirá en la fuente del encabezado.

\documentclass{article}
\usepackage{amsthm}

\theoremstyle{remark}
\newtheorem{remark}{Remark}
\newtheorem*{remark*}{Remark}

\makeatletter
\g@addto@macro{\thm@space@setup}{\thm@headpunct{:}}
\renewcommand{\@upn}{} % to use the same font for the number as for the head
\makeatother

\begin{document}
    \begin{remark}
        Here is a numbered remark.
    \end{remark}
    \begin{remark*}
        Here is an unnumbered remark.
    \end{remark*}
\end{document}

Respuesta2

Cambios como estos se abordan mejor con thmtools.

\documentclass{article}
\usepackage{amsthm,thmtools}

\declaretheoremstyle[
  headfont=\normalfont\itshape,
  headpunct=\textup{:},
  bodyfont=\normalfont,
]{myremark}

\declaretheoremstyle[
  headfont=\normalfont\itshape,
  headpunct=:,
  bodyfont=\normalfont,
]{myremarknonum}

\theoremstyle{myremark}
\newtheorem{remark}{Remark}
\theoremstyle{myremarknonum}
\newtheorem*{remark*}{Remark}

\begin{document}

Some text to show the context. Some text to show the context.
Some text to show the context. Some text to show the context.
Some text to show the context.

\begin{remark}
Here is a numbered remark.
\end{remark}

\begin{remark*}
Here is an unnumbered remark.
\end{remark*}

\end{document}

ingrese la descripción de la imagen aquí

Para ser honesto, preferiría un colon vertical en ambos casos.

información relacionada