章节编号错误

章节编号错误

长话短说,我最近不得不在我的 ubuntu 机器上重新安装 TeX-live 的全部功能。当我尝试重新编译我的分析文档时,我得到了一个干净的编译结果;但是现在章节编号全都乱了。例如,章节从第 1 节到第 6 节再到第 12 节(我认为是第 12 节),而不是像以前那样是 1、2、3。除了在文档末尾输入一些内容外,我没有对文档进行任何更改。这是我的 MWE:

\documentclass[a4paper,12pt]{book}
\usepackage[left=2.50cm,right=2.50cm,top=2.50cm,bottom=2.75cm]{geometry}
\usepackage{amsmath,amssymb,amscd,amsbsy,array,color}
\usepackage{fancyhdr,framed,latexsym,multicol,pstricks,slashed,xcolor}
\usepackage{indentfirst}
\usepackage{enumitem}

\usepackage{tikz}
\usepackage{subfig}
\usetikzlibrary{calc,positioning,shapes.geometric}

\setenumerate[1]{label=(\alph*)}
\setenumerate[2]{label=(\roman*)}
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
\newcommand{\NOT}{\sim}\newcommand{\AND}{\wedge}\newcommand{\OR}{\vee}
\newcommand{\twolinebrace}{\rlap{$\smash{\raisebox{.5\height}{\bigg   \}}}$}}
\newlength{\LHS}\newlength{\RHS}
\settowidth{\LHS}{$P \OR (Q \OR R)$}\settowidth{\RHS}{$(P \AND Q)     \OR     (P\AND R)$}
\newcolumntype{M}{>{$}p{\LHS}<{$}}
\newcolumntype{N}{>{$}p{\RHS}<{$}}
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % %


\usepackage[amsmath,framed,thmmarks]{ntheorem}

\usepackage{changes}

\usepackage{tikz}
\usepackage{tikz-cd}
\usepackage{subfig}
\usepackage{float}
\usepackage{titlesec}
\usepackage[Conny]{fncychap}
\pagestyle{fancy}
\setcounter{chapter}{-1}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{#1}{}}
\lhead{\leftmark}
\rhead{\rightmark}
\cfoot{\thepage}
\setlength{\headheight}{15pt}

\renewcommand{\thesection}{\arabic{section}}

\def    \bn{\mathbb N}
\def    \bz{\mathbb Z}
\def    \bq{\mathbb Q}
\def    \br{\mathbb R}
\def    \bc{\mathbb C}

\theoremstyle{plain}
\theoremsymbol{\ensuremath{\clubsuit}}
\theoremseparator{.}
\theoremprework{\bigskip\hrule}
\theorempostwork{\hrule\bigskip}
\newtheorem{defn}{Definition}


\theoremclass{Theorem}
\theoremstyle{break}
\theoreminframepreskip{0pt}
\theoreminframepostskip{0pt}
\theoremframepreskip{1cm}
\theoremframepostskip{1cm}
\theoremstyle{break}
\def\theoremframecommand{%
\psshadowbox[fillstyle=solid,fillcolor=gray,linecolor=black]}
\newshadedtheorem{prop}[section]{Proposition}

\definechangesauthor[name={Fr. Thomas Moore}, color=violet]{TM}
\definechangesauthor[name={Michael Dykes}, color=blue]{MD}
\definechangesauthor[name={Larkin Griffin}, color=green]{LG}

\title{Real and Complex Analysis}
\author{Michael Dykes and Croix Snapp}

\begin{document}

\maketitle
\tableofcontents


\chapter{Logic, Set Theory, Functions, and Relations.}
\section{Mathematical Logic.}
\subsection{Introduction.}
\small{Analysis is all about the theory behind Calculus. In this course, we do not take for granted such notions as what the set $\br$ of real numbers is; rather we carefully define $\br$ by `building' it out of other sets - beginning with the set $\bn$ of Natural Numbers. Numbers and number systems (i.e. $\bn, \bz, \bq, \br,$ and $\bc$) are the `building-blocks' of Analysis. Here in this book, we do not merely state the properties of the Real Number System, but we derive them. 

However, \deleted[id=MD,remark=blah blah blah]{Would you like any toast?} before we do that (and we shall in Chapter 1), we first \deleted[id=MD,remark=blah blah blah]{present}  this introductory chapter - Chapter 0 - in order to give the reader the tools needed to carry on this study of the branch of mathematics known as Analysis. Here, we present a `brief' review of Mathematical Logic, Set Theory, Functions, and Relations; and we `informally' define a few sets of which we shall make frequent use of in Analysis. All of them (or most of them) shall be dealt with more formally in the next chapter.} 

\section{Basic Set Theory.}
\subsection{Introduction.}
\textquestiondown What is a set? The following definitions and examples shall attempt to clarify these questions.

\begin{defn}[Set]A \textbf{set} is a collection of objects called     \textbf{members} of this set. We shall typically use capital letters, $X,Y,\ldots$ to denote sets; and lowercase letters, $x,y,\ldots$ to denote elements of a set.\\
If $x$ is an element of the set $X,$ we write:
\[x\in X.\]
and say that $x$ is a member of $X,$ or that $x$ belongs to $X.$ If $x$  is \textit{not} an element of $X,$ we write:
\[x\notin X.\]
\end{defn}

\section{Functions.}
\subsection{Introduction.}
Functions are of fundamental importance to all branches of mathematics. The concept of a function has undergone quite a bit of change over the past several centuries. Over this time, this concept has been separated from any connections it previously had to arithmetic, algorithmic, or geometric ideas. So we can now present the modern set-theoretical definition of a function as we do below.

\begin{defn}[Function]
Let $X$ and $Y$ be sets. Then a \textbf{function} or \textbf{map from $X$ to $Y$} is a rule, which, for each element of $X,$ specifies \textit{exactly one} element of $Y.$ We denote a function by
\[
    f \colon X \to Y \q x \mapsto f(x)
\]
\end{defn}

\subsection{Function Composition.}

\begin{prop}
Let $f \colon X \to Y, g \colon  Y \to U, h \colon U \to V$ be functions. Then the compositions $(h \circ g) \circ f$ and $h \circ (g \circ f) \colon X \to V$ are well-defined and
\[
    (h \circ g) \circ f = h \circ (g \circ f)
\]
\end{prop}

\subsection{Injections, Surjections, and Bijections.}
We now take a look at some properties of functions. We define what an  injection, surjection, and a bijection is. These are rather important classifications and are ones that you have probably encountered before.

\end{document}

答案1

您对 \newshadedtheorem 的定义是错误的。可选参数 [section] 应该放在最后。比较:

\documentclass[a4paper,12pt]{book}
\usepackage{ntheorem}

\newtheorem{prop}[section]{Proposition} %wrong, proposition increase section counter

\begin{document}

\section{a}
\begin{prop}
blub
\end{prop}
\section{b}
\end{document}

在此处输入图片描述

\documentclass[a4paper,12pt]{book}

\usepackage{ntheorem}
\newtheorem{prop}{Proposition}[section] %correct

\begin{document}

\section{a}
\begin{prop}
blub
\end{prop}
\section{b}
\end{document}

在此处输入图片描述

相关内容