Syntax 在sharelatex中生成带标签的方程

Syntax 在sharelatex中生成带标签的方程,syntax,latex,label,equation,Syntax,Latex,Label,Equation,我在sharelatex中建立了以下等式: \[\frac{\delta u}{\delta x}+\frac{\delta v}{\delta y}=0\] 我如何用数字自动标记这个等式 在我的文档开始之前,我有以下内容。我的代码有点凌乱,但我希望它能显示阻止方程工作的问题是什么 \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{nomencl} \makenomenclature \usepackage[engl

我在sharelatex中建立了以下等式:

\[\frac{\delta u}{\delta x}+\frac{\delta v}{\delta y}=0\]

我如何用数字自动标记这个等式

在我的文档开始之前,我有以下内容。我的代码有点凌乱,但我希望它能显示阻止方程工作的问题是什么

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{nomencl}
\makenomenclature

\usepackage[english]{babel}
\usepackage[round]{natbib}
\usepackage{natbib}
\setcitestyle{square}
\usepackage[utf8]
\usepackage[table, svgnames, dvipsnames]{xcolor} %color row
\usepackage{makecell}
\renewcommand\theadfont{\normalsize}
\usepackage{caption}
\usepackage{siunitx}
\usepackage[justification=centering,font=small,labelfont=bf,tableposition=top]{caption}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[bottom]{footmisc}
\usepackage[margin=1.1in]{geometry}
\geometry{a4paper,total={170mm,257mm},left=22mm,right=22mm,top=30mm,bottom=20mm}
\usepackage{booktabs}
\usepackage[numbers]{natbib}
\usepackage{float}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{array}
\usepackage{blindtext}
\usepackage{color}
\usepackage{comment}
\usepackage{fancyhdr}
\usepackage{float}
\usepackage{footnote}
\usepackage{gensymb}
\usepackage{graphicx}
\usepackage{graphics}
\usepackage{hyperref}
\usepackage{lastpage}
\usepackage{listings}
\usepackage{longtable}
\usepackage{nomencl}
\usepackage{pifont}
\usepackage{subcaption}
\usepackage{subfiles}
\usepackage{tablefootnote}
\usepackage{times}
\usepackage{tikz}
\usepackage{watermark}
\usepackage{pdfpages}
\usepackage[pdftex]{graphicx}
\usepackage{graphicx,subcaption}


%for the tables
\usepackage[margin=1in,letterpaper]{geometry} % text block parameters
\usepackage{tabularx,siunitx,booktabs}
\usepackage[skip=0.5\baselineskip]{caption}
\usepackage{newtxtext,newtxmath}
\newcommand\mX[1]{\multicolumn{1}{X}{#1}}  % handy shortcut macros
\newcommand\mcc[1]{\multicolumn{2}{c}{#1}}
\newcommand\mcl[1]{\multicolumn{2}{l}{#1}}\usepackage[margin=1in,letterpaper]{geometry} % text 
\usepackage{multirow}
\graphicspath{{./Figures/}}
\setlength\parindent{0pt} 
\usetikzlibrary{arrows,calc,positioning,shadows,shapes}
\newcommand{\cmark}{\textcolor{green!80!black}{\ding{51}}}
\newcommand{\xmark}{\textcolor{red}{\ding{55}}}
\usepackage{enumitem}%make indented dots
\usepackage{textcomp} 
\usepackage{amsmath} 

% Array commands, depends on \usepackage{array}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}


% Something with captions, depends on \usepackage{caption}
\DeclareCaptionLabelFormat{andtable}{#1~#2  \&  \tablename~\thetable}

% Front page settings depends on \usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{Name}
\newcommand{\specialcell}[2][c]{%
 \begin{tabular}[#1]{@{}c@{}}#2\end{tabular}}
\rhead{Project}
\renewcommand{\baselinestretch}{1.3} % Line spacing

% Color settings depends on \usepackage{color}
\definecolor{mygreen}{RGB}{28,172,0} % color values Red, Green, Blue
\definecolor{mylilas}{RGB}{170,55,241}

\begin{document}```

I have tried several codes but nothing is working. Not even the equation option.

Thanks for help in advance! 
我如何用数字自动标记这个等式

在我的文档开始之前,我有以下内容。我的代码有点凌乱,但我希望它能显示阻止方程工作的问题是什么

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{nomencl}
\makenomenclature

\usepackage[english]{babel}
\usepackage[round]{natbib}
\usepackage{natbib}
\setcitestyle{square}
\usepackage[utf8]
\usepackage[table, svgnames, dvipsnames]{xcolor} %color row
\usepackage{makecell}
\renewcommand\theadfont{\normalsize}
\usepackage{caption}
\usepackage{siunitx}
\usepackage[justification=centering,font=small,labelfont=bf,tableposition=top]{caption}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[bottom]{footmisc}
\usepackage[margin=1.1in]{geometry}
\geometry{a4paper,total={170mm,257mm},left=22mm,right=22mm,top=30mm,bottom=20mm}
\usepackage{booktabs}
\usepackage[numbers]{natbib}
\usepackage{float}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{array}
\usepackage{blindtext}
\usepackage{color}
\usepackage{comment}
\usepackage{fancyhdr}
\usepackage{float}
\usepackage{footnote}
\usepackage{gensymb}
\usepackage{graphicx}
\usepackage{graphics}
\usepackage{hyperref}
\usepackage{lastpage}
\usepackage{listings}
\usepackage{longtable}
\usepackage{nomencl}
\usepackage{pifont}
\usepackage{subcaption}
\usepackage{subfiles}
\usepackage{tablefootnote}
\usepackage{times}
\usepackage{tikz}
\usepackage{watermark}
\usepackage{pdfpages}
\usepackage[pdftex]{graphicx}
\usepackage{graphicx,subcaption}


%for the tables
\usepackage[margin=1in,letterpaper]{geometry} % text block parameters
\usepackage{tabularx,siunitx,booktabs}
\usepackage[skip=0.5\baselineskip]{caption}
\usepackage{newtxtext,newtxmath}
\newcommand\mX[1]{\multicolumn{1}{X}{#1}}  % handy shortcut macros
\newcommand\mcc[1]{\multicolumn{2}{c}{#1}}
\newcommand\mcl[1]{\multicolumn{2}{l}{#1}}\usepackage[margin=1in,letterpaper]{geometry} % text 
\usepackage{multirow}
\graphicspath{{./Figures/}}
\setlength\parindent{0pt} 
\usetikzlibrary{arrows,calc,positioning,shadows,shapes}
\newcommand{\cmark}{\textcolor{green!80!black}{\ding{51}}}
\newcommand{\xmark}{\textcolor{red}{\ding{55}}}
\usepackage{enumitem}%make indented dots
\usepackage{textcomp} 
\usepackage{amsmath} 

% Array commands, depends on \usepackage{array}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}


% Something with captions, depends on \usepackage{caption}
\DeclareCaptionLabelFormat{andtable}{#1~#2  \&  \tablename~\thetable}

% Front page settings depends on \usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{Name}
\newcommand{\specialcell}[2][c]{%
 \begin{tabular}[#1]{@{}c@{}}#2\end{tabular}}
\rhead{Project}
\renewcommand{\baselinestretch}{1.3} % Line spacing

% Color settings depends on \usepackage{color}
\definecolor{mygreen}{RGB}{28,172,0} % color values Red, Green, Blue
\definecolor{mylilas}{RGB}{170,55,241}

\begin{document}```

I have tried several codes but nothing is working. Not even the equation option.

Thanks for help in advance! 

你的前言中有几个错误。如果忽略它们,则必须修复它们。tex-only语法检查文档的其余部分,最终得到的可能是有效的pdf,也可能不是有效的pdf

  • 不能使用不同的选项多次加载同一个包。日志文件将清楚地告诉您由于选项冲突而导致的错误。在您的示例中,这涉及到
    geometry
    graphicx
    和natbib

  • \usepackage[utf8]
    是一个语法错误。您必须提供一个包名,而不仅仅是一个选项

  • 许多其他软件包被多次加载,并且一些选项已经过时,您应该花一点时间来清理这个序言



... 通过使用
等式
环境而不是
\[…\]
-但是请停止向我们扔代码片段,并对此表示歉意!下次我会尽力去做的。我试过等式,但它不起作用。我使用\documentclass{article}。请不要等到下次再尝试<代码>公式应该与
文章
类一起使用,但是您的代码中可能有程序包或其他内容会产生干扰。这就是为什么我们真的必须看到一个可编译的程序,它允许我们重现问题。否则我们只能猜测。