Teorema sem contador (qualquer TeX)

Teorema sem contador (qualquer TeX)

Costumo usar teoremas no LaTeX e defini vários tipos deles. Às vezes, no entanto, é melhor não definir um teorema específico que de outra forma seria um uso ocasional, como por exemplo com o "Teorema Fundamental da Álgebra" ou o "Teorema da Bola Peluda" e outros. . Um pdf que encontrei na Internet sugere o seguinte código:

\makeatletter
\newtheorem{@thmattr}[thm]{\theorem@attr}
\newenvironment{thmattr}[1]
{\def\theorem@attr{#1}\begin{@thmattr}}
{\end{@thmattr}}
\makeatother

O único problema é que, além de precisar de uma definição de contador thm(que pode ser facilmente resolvida removendo o [thm]), isso dá a tais teoremas um contador. Então recebo o "Teorema Fundamental da Álgebra 1", o que não faz sentido, pois só existe um teorema com esse nome. Então a questão é: como faço um teorema sem contador?

Responder1

Se você tiver um único teorema nomeado, a maneira mais fácil é

\usepackage{amsthm}

\newtheorem*{HBT}{Hairy Ball Theorem}

para que

\begin{HBT}
There is no nonvanishing continuous tangent vector field on 
even dimensional $n$-spheres.
\end{HBT}

produzirá o que você deseja.

Se você tiver vários teoremas nomeados, uma estratégia semelhante à que você encontrou funcionará:

\newtheorem*{namedthm*}{\thistheoremname}
\newcommand{\thistheoremname}{} % initialization
\newenvironment{namedthm}[1]
  {\renewcommand{\thistheoremname}{#1}\begin{namedthm*}}
  {\end{namedthm*}}

e a entrada será

\begin{namedthm}{Hairy Ball Theorem}
There is no nonvanishing continuous tangent vector field on 
even dimensional $n$-spheres.
\end{namedthm}

Você também pode atribuir a atribuição da maneira usual:

\begin{namedthm}{Hairy Ball Theorem}[Brouwer]
There is no nonvanishing continuous tangent vector field on 
even dimensional $n$-spheres.
\end{namedthm}

Exemplo completo; escolha sua estratégia preferida.

\documentclass{article}
\usepackage{amsthm}

\newtheorem*{HBT}{Hairy Ball Theorem}

\newtheorem*{namedthm*}{\thistheoremname}
\newcommand{\thistheoremname}{} % initialization
\newenvironment{namedthm}[1]
  {\renewcommand{\thistheoremname}{#1}\begin{namedthm*}}
  {\end{namedthm*}}

\begin{document}

\begin{HBT}
There is no nonvanishing continuous tangent vector field on 
even dimensional $n$-spheres.
\end{HBT}

\begin{namedthm}{Hairy Ball Theorem}
There is no nonvanishing continuous tangent vector field on 
even dimensional $n$-spheres.
\end{namedthm}

\begin{namedthm}{Hairy Ball Theorem}[Brouwer]
There is no nonvanishing continuous tangent vector field on 
even dimensional $n$-spheres.
\end{namedthm}

\end{document}

insira a descrição da imagem aqui

Responder2

Usando ntheorem, você tem os estilos de teorema emptye emptybreak. O nome é um argumento opcional. Aqui estão 4 possibilidades (tive que corrigir o estilo vazio porque ele não aceitava a label separator):

        \documentclass[12pt,a4paper]{article}

        \usepackage[utf8]{inputenc}
        \usepackage[T1]{fontenc}
        \usepackage{MinionPro}
        \usepackage{amsmath}
        \usepackage[svgnames, x11names]{xcolor}
        \usepackage{framed}
        \usepackage[framed, amsmath, thmmarks]{ntheorem}%
        \newcommand*\C{\mathbf C}

        \makeatletter
        \renewtheoremstyle{empty}%
          {\item[]}%
          {\item[\theorem@headerfont \hskip\labelsep\relax ##3\theorem@separator]}
        \makeatother

        \theoremheaderfont{\upshape\scshape}
        \theorembodyfont{\itshape}

        \theoremstyle{empty}
        \theoremseparator{.\,—}
        \newtheorem{namedthm}{}
        \newframedtheorem{namedfrthm}{}
        \theoremstyle{emptybreak}
        \theoremheaderfont{\bfseries\scshape}
        \theorembodyfont{\upshape\color{DarkSeaGreen4}}
        \theoremseparator{\smallskip}
        \newtheorem{NamedThm}{}
        \newframedtheorem{NamedfrThm}{}
        %\newframedtheorem{namedfrthm}}
        \begin{document}


        \begin{namedthm}[Fundamental Theorem of Algebra]
        Every polynomial with coefficients in  $ \C $ has a root in  $ \C $.  In other words,  the field of complex numbers is algebraically closed.
        \end{namedthm}

        \begin{namedfrthm}[Fundamental Theorem of Algebra]
        Every polynomial with coefficients in  $ \C $ has a root in  $ \C $.  In other words,  the field of complex numbers is algebraically closed.
        \end{namedfrthm}

        \begin{NamedThm}[Fundamental Theorem of Algebra]
        Every polynomial with coefficients in  $ \C $ has a root in  $ \C $.  In other words,  the field of complex numbers is algebraically closed.
        \end{NamedThm}

        \begin{NamedfrThm}[Fundamental Theorem of Algebra]
        Every polynomial with coefficients in  $ \C $ has a root in  $ \C $.  In other words,  the field of complex numbers is algebraically closed.
        \end{NamedfrThm}

        \end{document}

insira a descrição da imagem aqui

informação relacionada