标记方程的问题

标记方程的问题

我正在尝试标记我的方程式,但遇到了以下问题:

当我用命令标签写入环境“方程式”时:

\begin{equation}\label{eq2}
\omega_1\omega_1,\ldots,\omega_1\omega_g$$ 
$$\omega_{r_1}\omega_{s_1},\ldots,
\omega_{r_{g-2}}\omega_{s_{g-2}}$$ 
$$\omega_2\omega_g,\ldots,\omega_g\omega_g
\end{equation}

我在 PDF 中显示的是 (4.1),而不是 (1),为什么?更糟糕的是,当我尝试使用命令 $\ref$ 时,PDF 中显示的只是数字 1,而不是 4.1。

有人能帮助我吗?

谢谢

编辑

我的序言:

\documentclass[‎fleqn,a4paper,12pt, oneside]{article}
\usepackage{graphicx,color}
\usepackage[utf8]{inputenc}
\usepackage{enumerate}
\usepackage{geometry}
\usepackage{pstricks}
\usepackage{graphicx,color}
\usepackage[toc,page]{appendix}
\usepackage{multirow,booktabs}
\usepackage{amssymb, amsthm, mathrsfs, amsfonts, amsmath}
\usepackage{amsbsy, hyperref}
\usepackage{latexsym}
\usepackage{booktabs}
\usepackage{yfonts}
\usepackage{tikz}
\usepackage{eurosym}
\usepackage[titles]{tocloft}
\usepackage{newfloat}
\usepackage[labelfont=rm,format=plain,indention=0cm,singlelinecheck=off,justification=raggedright,skip=2pt]{caption}
\usepackage{chngcntr}
\usepackage{natbib} 
\usepackage{parskip} 
\usepackage{setspace}


 \geometry{
a4paper,total={210mm,297mm},
 left=30mm,right=20mm,
 top=30mm,bottom=20mm,
 } 

\setcounter{secnumdepth}{6}
\renewcommand\theparagraph{\Alph{paragraph}}

\makeatletter
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {0.0001pt \@plus .2ex}%
                                     {\normalfont\normalsize}}
\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {0.0001pt \@plus .2ex}%
                                     {\normalfont\normalsize}}
\counterwithin{paragraph}{subsubsection}
\counterwithin{subparagraph}{paragraph}

\counterwithin*{paragraph}{section}                     
\setcounter{tocdepth}{5}                                                
\makeatother

\setlength{\parindent}{2cm}


\setlength\parskip{0cm} 

\setcounter{page}{0} 

\makeatletter 
\renewcommand\@seccntformat[1]{\normalsize{\csname the#1\endcsname}
\hspace{0.1em}}
\makeatother

\makeatletter 
\renewcommand\l@section            {\bf \@dottedtocline{1}{0em}{4em}}
\renewcommand\l@subsection      {\bf \@dottedtocline{2}{0em}{4em}}
\renewcommand\l@subsubsection{\bf \@dottedtocline{3}{0em}{4em}}
\renewcommand\l@paragraph{\rm \@dottedtocline{4}{0em}{4.5em}}
\renewcommand\l@subparagraph{\rm \@dottedtocline{5}{0em}{4.5em}}


\AtBeginDocument{
\renewcommand\contentsname{\center \normalsize{SUM\'ARIO}}}

\AtBeginDocument{
\renewcommand\listtablename{\center \normalsize{LISTA DE TABELAS}}
}
\setlength{\cfttabindent}{0em}
\renewcommand{\cfttabpresnum}{Tabela }
\renewcommand{\cfttabaftersnum}{ -- }
\setlength{\cfttabnumwidth}{4.6em}



\newlistof{grafico}{graf}{\center \normalsize{\bf LISTA DE GR\'AFICOS}}
\DeclareFloatingEnvironment[name={Gr\'afico},fileext=graf]{grafico}

\setlength{\cftgraficoindent}{0em}
\renewcommand{\cftgraficopresnum}{Gr\'afico }
\renewcommand{\cftgraficoaftersnum}{ -- }
\setlength{\cftgraficonumwidth}{4.8em}


\setlength{\cftfigindent}{0em}

\renewcommand{\cftfigaftersnum}{ -- }
\setlength{\cftfignumwidth}{4.6em}

\geometry{verbose,a4paper,tmargin=30mm,bmargin=20mm,lmargin=30mm,rmargin=20mm}


\newtheorem{theorem}{Teorema}[section]
\newtheorem{remark}{Observaçao}[section]
\newtheorem{corollary}{Corolário}[section]
\newtheorem{example}{Exemplo}[section]
\newtheorem{definition}{Definição}[section]
\renewcommand{\proofname}{Prova}
\newtheorem{lemma}{Lema}[section]

\newtheorem{proposition}{Proposição}[section]

\newcommand{\bigslant}[2]{{\raisebox{.9em}{$#1$}\left/\raisebox{-.9em}{$#2$}\right.}}
\newcommand{\lt}{<}
\newcommand{\gt}{>}


\newenvironment{quoting}
   \small\singlespacing
   \begin{list}{}{%
       \setlength{\listparindent}{0cm}%
       \setlength{\itemindent}{\listparindent}%
       \setlength{\rightmargin}{0cm}%
       \setlength{\leftmargin}{4cm}%
       \setlength{\parsep}{0pt}}%
    \item\relax}%
  {\end{list}}

\numberwithin{equation}{section}

答案1

我认为罪魁祸首可能是\numberwithin{equation}{section}

如果你把它丢弃,你会得到什么?

答案2

如果要在每个新部分重置方程编号,但不想显示部分编号,请使用

\numberwithin*{equation}{section}

(带有星号)。

相关内容