我正在写一些笔记,但在组织上遇到了问题。我定义定理如下:
\documentclass[12pt,a4paper]{book}
\theoremstyle{plain}
\newtheorem{teo}{Teorema}[chapter]
\newtheorem{theo}[teo]{Theorem}
\newtheorem{coro}[teo]{Corolary}
\newtheorem{lema}[teo]{Lemma}
\newtheorem{prop}[teo]{Proposition}
\theoremstyle{definition}
\newtheorem{df}[teo]{Definition}
\newtheorem{ex}[teo]{Example}
\newtheorem{obs}[teo]{Remark}
\begin{document}
\end{document}
在文本中,定理、定义、命题等都在同一个“反面”。我的意思是
定理 1.5
命题 1.6
例 1.7
我想组织如下:
\documentclass[12pt,a4paper]{book}
\theoremstyle{plain}
\newtheorem{teo}{Teorema}[chapter]
\newtheorem{theo}[teo]{Theorem}
\newtheorem{coro}[teo]{Corolary}
\newtheorem{lema}[teo]{Lemma}
\newtheorem{prop}[teo]{Proposition}
\theoremstyle{definition}
\newtheorem{df}[teo]{Definition}
\newtheorem{ex}[teo]{Example}
\newtheorem{obs}[teo]{Remark}
\begin{document}
\chapter{ONE}
\section{1}
Proposition 1
Theorem 1
\section{2}
Theorem 2
Example 1
\chapter{TWO}
\section{1}
Proposition 1
Theorem 1
\section{2}
Theorem 2
Example 1
\end{document}
可以这样做吗?
答案1
这里您可以:删除所有可选项[teo]
,替换可选项 [section] with
[chapter] , and redefine
\theteo`,&c,这样它就不会包含章节编号作为前缀。
\documentclass[12pt,a4paper]{book}
\usepackage{amsthm}
\theoremstyle{plain}
\newtheorem{teo}{Teorema}[chapter]
\newtheorem{theo}{Theorem}[chapter]
\newtheorem{coro}{Corollary}[chapter]
\newtheorem{lema}{Lemma}[chapter]
\newtheorem{prop}{Proposition}[chapter]
\renewcommand{\theteo}{\arabic{teo}}
\renewcommand{\thetheo}{\arabic{theo}}
\renewcommand{\thecoro}{\arabic{coro}}
\renewcommand{\thelema}{\arabic{lema}}
\renewcommand{\theprop}{\arabic{prop}}
\theoremstyle{definition}
\newtheorem{df}{Definition}[chapter]
\newtheorem{ex}{Example}[chapter]
\newtheorem{obs}{Remark}[chapter]
\renewcommand{\thedf}{\arabic{df}}
\renewcommand{\theex}{\arabic{ex}}
\renewcommand{\theobs}{\arabic{obs}}
\begin{document}
\chapter{ONE}
\section{1}
\begin{prop}
Proposition 1
\end{prop}
\begin{theo}
A first theorem
\end{theo}
\section{2}
\begin{theo}
Another theorem
\end{theo}
\begin{ex}
A funny example.
\end{ex}
\chapter{TWO}
\section{1}
\begin{prop}
Another proposition.
\end{prop}
\begin{theo}
A first theorem in chap. two
\end{theo}
\section{2}
\begin{theo}
A second theorem in chap. two
\end{theo}
\begin{ex}
A silly example.
\end{ex}
\end{document}