方程式编号问题,十个之后重置

方程式编号问题,十个之后重置

我的论文有问题,公式编号在 10 之后重置。例如,在文档中,公式 3.3.10 之后是 3.3.1,而不是 3.3.11。这是我的序言

   \documentclass[12pt,A4,twoside]{book}
%Φορτώνονται τα πακέτα
\usepackage{latexsym}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{xunicode}
\usepackage{xltxtra}
\usepackage{xgreek}
\nogreekalph
\usepackage{unicode-math}
\setmainfont{CMU Serif}
\setsansfont{CMU Sans Serif}
%\setmathfont{Latin Modern Math}
\usepackage{amsthm}
\usepackage{mathrsfs}
\usepackage{fullpage}
\usepackage{fancyhdr}
\usepackage{graphics}
\usepackage{graphicx}
% Ανοίγει τη βιβλιοθήκη για την εισαγωγή γραφικών
\input{epsf.tex}

% Το πακέτο για το ευρετήριο(-index)
\usepackage{makeidx}
% Για να φτιάξουμε στο τέλος του αρχείο Index
\makeindex



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%H \renewcommand ξαναορίζει κάποιες ήδη υπάρχουσες εντολές
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand\contentsname{\sc Περιεχόμενα}
\renewcommand\bibname{\sc Βιβλιογραφία}
\renewcommand\indexname{Ευρετήριο}
\renewcommand\figurename{Σχήματα}
\renewcommand\tablename{Πίνακες}
\renewcommand\chaptername{{\sc Κεφάλαιο}}
\renewcommand\appendixname{Παράρτημα}
\newtheorem{defn}{\noindent \underline{\sc Oρισμός}}
\newtheorem{definition}{\noindent \underline{\sc Definition}}
\newtheorem{theorem}{\noindent \underline{\sc Theorem}}
\newtheorem{proposition}{\noindent \underline{\sc Πρόταση}}
\newtheorem{thm}{\noindent \underline{\sc Θεώρημα}}
\newtheorem{lemma}{\noindent \underline{\sc Λήμμα}}
\newtheorem{ineq}{\noindent \sc Ανισότητα}
\newcommand{\defset}[3]{\ensuremath{\left\{\, #1\in #2\; :\;
#3\,\right\}}\xspace}
\numberwithin{equation}{section}
%renewcommand{\theequation}{\arabic{chapter}.\arabic{section}.\arabic{equation}}
\renewcommand{\thedefn}{\arabic{chapter}.\arabic{section}.\arabic{defn}}
\renewcommand{\thethm}{\addtocounter{defn}{1}\arabic{chapter}.\arabic{section}.\arabic{defn}}
\renewcommand{\theproposition}{\addtocounter{defn}{1}\arabic{chapter}.\arabic{section}.\arabic{defn}}
\renewcommand{\thelemma}{\addtocounter{defn}{1}\arabic{chapter}.\arabic{section}.\arabic{defn}}
\renewcommand{\theineq}{\addtocounter{defn}{1}\arabic{chapter}.\arabic{section}.\arabic{defn}}
%\setcounter{defn}{0}
%\setcounter{thm}{0}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\tr}{\text{tr}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% Επιλέγουμε το style
\usepackage{fancyhdr}
\pagestyle{fancy} \pagestyle{fancy}
% with this we ensure that the chapter and section
% headings are in lowercase
\fancyhf{} %delete the current section for header and footer
\renewcommand{\sectionmark}[1]{\markright{\sc \small\thesection.\ #1}{}}
\renewcommand{\chaptermark}[1]{\markboth{\sc \small{\chaptername} \ \thechapter.\ #1}{}}
%\fancyhead[LE,RO]{\bfseries\thepage}
\newcommand{\en}{\text}
\fancyfoot[CE,CO]{\thepage}\pagenumbering{arabic}
\fancyhead[RO]{\bfseries\leftmark}
\fancyhead[LE]{\bfseries\rightmark}
\renewcommand{\headrulewidth}{0.5pt}
% make space for the rule

% Ορίζει το πλάτος της σελίδας (γραμμένου κειμένου) σε cm ή in
%\textwidth=15.5cm  % 6.0in
% Ορίζει το μήκος της σελίδας (γραμμένου κειμένου) σε cm ή in
\textheight=22.5cm % 8.0in
% Ορίζουν το  πού να αρχίζει  η σελίδας σε cm
\evensidemargin = -0.6cm %δεξιό κενό
\oddsidemargin = -0.0cm  %αριστερό κενό
% Ορίζει το paragraph indentation
%\parindent=0.cm
% Ορίζει το separation between par.
%\parskip=0.1cm
%\tolerance=10000 %\brokenpenalty=10000
\headheight 0cm %πάνω κενό
%\footheight 15pt %κάτω κενό
% Ορίζει την απόσταση μεταξύ των γραμμών.
%\renewcommand{\baselinestretch}{1.2}  % Όμοια \def\baselinestretch{1.4}
\headsep = 1cm \topmargin = 1cm  \voffset = -0.8cm \footskip =
1.6cm

答案1

代码片段太长(不必要的东西)又太短,它没有显示问题,即当方程式数量达到 10 时重置方程式数量。

因此这个答案解决了一些其他问题。

  • 宏定义计数器值的外观。它应该/不能包含计数器值的分配和更改:\the<counter>

    • then\addtocounter也进入引用。每次\ref调用这样的引用时,计数器都会增加。

    • hyperref使用锚点名称,并且不喜欢作业等不可扩展的东西。\the<counter>

    软件包amsthm支持定理定义的共享计数器,例如:

    \newtheorem{lemma}[defn]{...}
    

    词干将使用计数器defn而不是自己的计数器。请参阅下面的示例。

  • 包已加载,因此无需graphicx显式加载,因为它已由 加载。但是非常过时的旧东西,应该删除。graphicsgraphicx\input{epsf.tex}

  • A4无法识别Class/global 选项。相反,Classbook可以识别a4paper

  • \fancyhead被使用,但\headheight被设置为零。

共享计数器的示例:

\documentclass[12pt,a4paper,twoside]{book}
\usepackage{amsmath}
\usepackage{amsthm}

\newtheorem{defn}{\noindent \underline{Defn}}
\newtheorem{proposition}[defn]{\noindent \underline{\sc Proposition}}
\newtheorem{thm}[defn]{\noindent \underline{\sc Thm}}
\newtheorem{lemma}[defn]{\noindent \underline{\sc Lemma}}
\newtheorem{ineq}[defn]{\noindent \sc Ineq}

\renewcommand{\thedefn}{\arabic{chapter}.\arabic{section}.\arabic{defn}}
\renewcommand{\thethm}{\arabic{chapter}.\arabic{section}.\arabic{defn}}
\renewcommand{\theproposition}{\arabic{chapter}.\arabic{section}.\arabic{defn}}
\renewcommand{\thelemma}{\arabic{chapter}.\arabic{section}.\arabic{defn}}
\renewcommand{\theineq}{\arabic{chapter}.\arabic{section}.\arabic{defn}}

\begin{document}
\chapter{My chapter}
\section{My section}
\begin{defn} Definition 1 \end{defn}
\begin{lemma} Lemma 1 \end{lemma}
\begin{lemma} Lemma 2 \end{lemma}
\begin{defn} Definition 2 \end{defn}
\end{document}

结果

相关内容