反証のない定理(任意のTeX)

反証のない定理(任意のTeX)

私は LaTeX で定理をよく使用し、さまざまな種類の定理を定義してきました。ただし、たとえば「代数の基本定理」や「ヘアリー ボール定理」など、たまにしか使用されない特定の定理は定義しない方がよい場合もあります。インターネットで見つけた PDF では、次のコードが提案されています。

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

唯一の問題は、カウンタの定義が必要であることthm(これは を削除することで簡単に解決できます[thm]) に加えて、このような定理にカウンタが与えられることです。したがって、「代数 1 の基本定理」が得られますが、その名前の定理は 1 つしかないため、意味がありません。そこで質問です。カウンタのない定理を作成するにはどうすればよいでしょうか。

答え1

単一の名前付き定理がある場合、最も簡単な方法は

\usepackage{amsthm}

\newtheorem*{HBT}{Hairy Ball Theorem}

となることによって

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

あなたが望むものを生み出します。

名前付き定理が複数ある場合は、見つけたものと同様の戦略が機能します。

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

そして入力は

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

完全な例。好みの戦略を選択してください。

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

ここに画像の説明を入力してください

答え2

を使用すると、および定理スタイルntheoremが得られます。名前はオプションの引数です。次の 4 つの可能性があります ( を受け入れなかったため、空のスタイルにパッチを適用する必要がありました)。emptyemptybreaklabel 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}

ここに画像の説明を入力してください

関連情報