答案1
我不确定这是否是您想要的,否则我可以删除此帖子。
\documentclass[]{article}
\usepackage{hyperref}
% https://tex.stackexchange.com/questions/78579/labelled-in-line-equation
\makeatletter
\newcommand*{\inlineequation}[2][]{%
\begingroup
% Put \refstepcounter at the beginning, because
% package `hyperref' sets the anchor here.
\refstepcounter{equation}%
\ifx\\#1\\%
\else
\label{#1}%
\fi
% prevent line breaks inside equation
\relpenalty=10000 %
\binoppenalty=10000 %
\ensuremath{%
% \displaystyle % larger fractions, ...
#2%
}%
~\@eqnnum
\endgroup
}
\makeatother
\begin{document}
A shortest $u_0-u_i$ path is $P_1:u_0,v_0,v_3,v_6,\cdots,v_i,u_i$ containing $i/3$
edges from $C_1$ and two edges from $M$. Length of $P_1$ is $(i+6)/2$ and maximum
of $P_1$ is for $i=3m/2$, i.e., \inlineequation[eq:inline]{\max\{|P_4|\} = (m+2)/2}\\
Now a reference to Eq.~(\ref{eq:inline}), which states that
\end{document}