[Tex/LaTex] Theorem without counter (any TeX)

theorems

I often use theorems on LaTeX and have defined various kinds of them. At times, however, it is best not to define a specific theorem which would otherwise be a once-in-a-long-time usage, as for example with the "Fundamental Theorem of Algebra" or the "Hairy Ball Theorem" and such. A pdf I found on the Internet suggests the following code:

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

The only problem is that, besides needing a definition of a counter thm (which can easily be solved by removing the [thm]), this gives such theorems a counter. So I get "Fundamental Theorem of Algebra 1", which doesn't make sense since there is only one theorem with that name. So the question is: how do I make a theorem with no counter?

Best Answer

If you have a single named theorem, the easiest way is

\usepackage{amsthm}

\newtheorem*{HBT}{Hairy Ball Theorem}

so that

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

will produce what you want.

If you have several named theorems, then a strategy similar to what you found will work:

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

and the input will be

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

You can also give the attribution in the usual way:

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

Complete example; choose your preferred strategy.

\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}

enter image description here

Related Question