这是我的尝试,
\begin{equation}
\begin{array}{cccc}
\partial_t C & + \partial_x u C + \partial_x v C = & D_x \partial_{xx} C + D_y \partial_{yy} C + & R(C) \\
\begin{Bmatrix}
\text{Time rate of\\
change\\
of concentration\\
of chemical\\
component }
\end{Bmatrix} & +
\begin{Bmatrix}
\text{ Term of advection\\
of chemical component }
\end{Bmatrix} & +
\begin{Bmatrix}
\text{ Change in\\
component\\
due to\\
diffusion \\}
\end{Bmatrix} & +
\begin{Bmatrix}
\text{Rate of\\ formation
of component - Rate of\\ consumption of\\ component }
\end{Bmatrix}
\end{array}
\end{equation}
另一个问题:如何告诉 Latex 根据上面的第一个等式自动尊重括号之间的文本的宽度
答案1
(注意到我误解了 OP 的总体目标后,编辑了答案)
像这样吗?
\documentclass{article}
\usepackage[margin=1in]{geometry}
\usepackage{mathtools,ragged2e,array}
\newcolumntype{C}{>{{}}c<{{}}} % column type for binary and relational operator symbols
\newcommand\mymat[2][0.12]{%
\begin{Bmatrix}
\footnotesize
\begin{tabular}{@{}p{#1\textwidth}@{}} % default width is 0.12\textwidth
\itshape\Centering #2
\end{tabular}
\end{Bmatrix}
}
\begin{document}
\begin{equation}
\setlength\arraycolsep{0pt}
\begin{array}{cCcCcCc}
\partial_t C
& + & \partial_x u C + \partial_x v C
& = & D_x \partial_{xx} C + D_y \partial_{yy} C
& + & R(C) \\[2ex]
\mymat{Time rate of change of concentration of chemical component}
& + &
\mymat[0.1]{Term of advection of chemical component}
& = &
\mymat[0.1]{Change in component due to diffusion}
& + &
\mymat[0.14]{Rate of formation of component~$-$ Rate of consumption of component}
\end{array}
\end{equation}
\end{document}
答案2
我猜你喜欢方括号中与上述等式相关的文本。为此,人们通常使用类似这样的内容:
\documentclass{article}
\usepackage{geometry}
\usepackage{mathtools}
\usepackage{newtxtext,newtxmath} % optional
\usepackage{ragged2e}
\usepackage{array}
\usepackage{stackengine}
\stackMath
\newcommand{\underlabel}[3][9em]{\stackunder{#2}
{\overbrace{\scriptsize
\begin{tabular}{@{}>{\Centering}p{#1}@{}}#3\end{tabular}}_{}}%
}
\newcommand{\mystrut}{\vphantom{\partial_{yy}}}
\begin{document}
\begin{equation}
\underlabel{\partial_t C\mystrut}{Time rate of change of concentration of chemical component}
\ + \ \underlabel{\partial_x u C + \partial_x v C\mystrut}{Term of advection of chemical component}
\ = \ \underlabel[11em]{D_x \partial_{xx} C + D_y \partial_{yy} C}{Change in component due to diffusion}
\ + \ \underlabel[11em]{R(C)\mystrut}{\tabcolsep=3pt
\begin{tabular}{@{}m{5em} c m{5em} @{}}
Rate of formation of component
&$-$& Rate of consumption of component
\end{tabular}}
\end{equation}
\end{document}