在公式的行尾编号处添加文字?

发布于 2023-03-15 13:46:51

7741678859018_.pic.jpg

如上图所示,在公式编号5.471处添加文字:diffusion coefficient

查看更多

关注者
0
被浏览
767
2 个回答
Beatrice
Beatrice 2023-03-15
这家伙很懒,什么也没写!
\documentclass{article}
\usepackage{showframe}
\usepackage{tabularray}
\usepackage{amsmath}
\begin{document}
\begin{equation}
a+b=c
\end{equation}
\begin{equation*}
\stepcounter{equation}
\begin{tblr}{colspec={Q[c,m]X[c,m]Q[r,m]},columns={colsep=0pt},cell{1}{2}={r=2}{}}
                                         & a+b=c & (\theequation)                 \\
\phantom{(\text{diffusion coefficient})} &       & (\text{diffusion coefficient}) \\
\end{tblr}
\end{equation*}
\begin{equation}
a+b=c
\end{equation}
\end{document}

image.png

雾月
雾月 2023-03-15
这家伙很懒,什么也没写!

\tag 里加上 tabular 就可以了。

\documentclass{article}
\usepackage{amsmath}

\makeatletter
\newcommand{\tagarray}[2][r]{\refstepcounter{equation}%
  \tag*{\tabcolsep\z@ \jot\z@ \begin{tabular}{#1}#2\end{tabular}}}
\makeatother

\begin{document}

\begin{equation}
\boxed{D_p = \int_a^b \mathrm{d}x} \tagarray{(\theequation)\\(diffusion coefficient)}\label{wd}
\end{equation}

\end{document}

image.png

撰写答案

请登录后再发布答案,点击登录

发布
问题

分享
好友

手机
浏览

扫码手机浏览