帮助对齐方程式

帮助对齐方程式

谁能帮我提供一个代码,使方程式与附图一致?

我试图插入一个大括号来覆盖左侧图像上的两个方程式,但我不知道为什么我的括号只覆盖一个方程式。

诚挚问候,塞尔吉奥

等式左边有一个大括号,括住两个等式

答案1

以下是实现此目的的简单方法:

\documentclass{article}

\usepackage{amsmath,amstext}
\usepackage{newtxmath}
\begin{document}

\begin{equation}
\begin{cases}
\displaystyle
\nu(z_0)+\frac{g}{f}\frac{\partial\,\eta_s}{\partial\,x}
=\frac{g}{f}\frac{\partial\,\eta}{\partial\,x}\\[15pt]
\displaystyle\text{with }\nu(z_0) = 
\frac{1}{f\rho_0}\frac{\partial\,P_{z0}}{\partial\,x}
\end{cases}
\Rightarrow \eta = \eta_s+ \frac{P_{z0}}{\rho_0g}
\end{equation}

\end{document}

输出:

在此处输入图片描述

答案2

使用amsmath

\documentclass{article}
\usepackage{amsmath}

\begin{document}
If you want it center-aligned inside the braces, use \texttt{gathered}
\begin{equation}
    \left\{
        \begin{gathered}
            v(z_0) + \frac{g}{f} \frac{\partial\eta_s}{\partial x} = \frac{g}{f} \frac{\partial \eta}{\partial x} \\
            \text{with } v(z_0) = \frac{1}{f\rho_0} \frac{\partial P_{z0}}{\partial x} \text{ (junk to show alignment)} 
        \end{gathered}
        \right. \implies \eta = \eta_s + \frac{P_{z0}}{\rho_0 g}
    \end{equation}

If you want it either left-aligned, it is slightly simpler:
\begin{equation}
        \begin{cases}
            v(z_0) + \frac{g}{f} \frac{\partial\eta_s}{\partial x} = \frac{g}{f} \frac{\partial \eta}{\partial x} \\
            \text{with } v(z_0) = \frac{1}{f\rho_0} \frac{\partial P_{z0}}{\partial x} \text{ (junk to show alignment)}
        \end{cases}
        \implies \eta = \eta_s + \frac{P_{z0}}{\rho_0 g}
    \end{equation}

If for some reason you want it right aligned, you can use \texttt{aligned}

\begin{equation}
    \left\{
        \begin{aligned}
             v(z_0) + \frac{g}{f} \frac{\partial\eta_s}{\partial x} = \frac{g}{f} \frac{\partial \eta}{\partial x} \\
             \text{with } v(z_0) = \frac{1}{f\rho_0} \frac{\partial P_{z0}}{\partial x} \text{ (junk to show alignment)}
        \end{aligned}
        \right. \implies \eta = \eta_s + \frac{P_{z0}}{\rho_0 g}
    \end{equation}

\end{document}

在此处输入图片描述

答案3

我会这样做,使用中的dcasesrcases 环境mathtools。此外,该esdiff包简化了 (部分) 导数的输入。

\documentclass{article}

\usepackage{mathtools}
\usepackage{fourier, erewhon}
\usepackage{esdiff}

\begin{document}

\begin{equation}
  \begin{rcases}\begin{dcases}
    ν(z₀)+\frac{g}{f}\diffp{\eta_s}{x}
    =\frac{g}{f}\diffp{η}{x}\\[0.5ex]
    \text{with }ν(z₀) =
    \frac{1}{f\rho₀}\diffp{P_{z0}}{x}
    \end{dcases}\end{rcases}
     ⇒ η= \eta_s+ \frac{P_{z0}}{\rho₀g}
    \end{equation}

\end{document} 

在此处输入图片描述

相关内容