关于将方程式拆分成几行的最佳位置的建议

关于将方程式拆分成几行的最佳位置的建议

我目前正在处理这个长方程:

\begin{equation}
\begin{split}
    \mathcal{L} = \prod_{p}^{N} \prod_{i}^{K}
    f\left(Y_{p}, T_{p} \:\middle\vert\:    \begin{pmatrix}
    \gamma \: tan\left({{\sigma^{2}}_{\theta_{0}}}^{*}\right) \\
    \gamma \: tan\left({{\sigma^{2}}_{\theta_{1}}}^{*}\right) \\
    \gamma \: tan\left({{\sigma^{2}}_{\tau_{0}}}^{*}\right) \\
    \gamma \: tan\left({{\sigma^{2}}_{\tau_{1}}}^{*}\right)
    \end{pmatrix}
    \left(
    L
    \begin{pmatrix}
    {\theta_{0}}^{*} \\
    {\theta_{1}}^{*} \\
    {\tau_{0}}^{*} \\
    {\tau_{1}}^{*}
    \end{pmatrix}
    \right), \begin{pmatrix}
    b_{i} \\
    \beta_{i} 
    \end{pmatrix},
    X_{pi}\right) \\
    f\left(\begin{pmatrix}
    \gamma \: tan\left({{\sigma^{2}}_{\theta_{0}}}^{*}\right) \\
    \gamma \: tan\left({{\sigma^{2}}_{\theta_{1}}}^{*}\right) \\
    \gamma \: tan\left({{\sigma^{2}}_{\tau_{0}}}^{*}\right) \\
    \gamma \: tan\left({{\sigma^{2}}_{\tau_{1}}}^{*}\right)
    \end{pmatrix}
    \left(
    L
    \begin{pmatrix}
    {\theta_{0}}^{*} \\
    {\theta_{1}}^{*} \\
    {\tau_{0}}^{*} \\
    {\tau_{1}}^{*}
    \end{pmatrix}
    \right) \:\middle\vert\: \begin{pmatrix}
    {\mu}_{\theta_{0}} \\
    {\mu}_{\theta_{1}} \\
    {\mu}_{\tau_{0}} \\
    {\mu}_{\tau_{1}} \\
    \end{pmatrix},  diag\left(\gamma \: tan\left(\sigma_{P}\right)\right) * \left(L * L^{T} \right)  * diag \left(\gamma \: tan\left(\sigma_{P}\right) \right)
    \right)
    \end{split}
   \end{equation}

我对输出不满意,因为方程太宽并且超出了方程标签号:

在此处输入图片描述

在第二个之前我已经将公式分成了两部分F。我想进一步拆分,但我找不到一个顺利的方法。如果我在第一个之前拆分它诊断,那么似然函数的最后一个右括号很小,我不喜欢它的外观。任何有经验的建议都将不胜感激。

答案1

我建议采用这种布局,并使其具有aligned环境,geometry使包装具有更合适的利润率和fleqn环境nccmath

    \documentclass{article}
    \usepackage{nccmath}
    \usepackage{mathtools}
    \DeclareMathOperator{\diag}{diag}
    \usepackage[showframe]{geometry}

    \begin{document}

    \begin{fleqn}
    \begin{equation}
    \begin{aligned}
        \mathcal{L} = \prod_{p}^{N} \prod_{i}^{K}
        f\left(Y_{p}, T_{p} \:\middle\vert\: \begin{pmatrix}
        \gamma \tan\left({{\sigma^{2}}_{\theta_{0}}}^{*}\right) \\
        \gamma \tan\left({{\sigma^{2}}_{\theta_{1}}}^{*}\right) \\
        \gamma \tan\left({{\sigma^{2}}_{\tau_{0}}}^{*}\right) \\
        \gamma \tan\left({{\sigma^{2}}_{\tau_{1}}}^{*}\right)
        \end{pmatrix}
        \left(
        L
        \begin{pmatrix}
        {\theta_{0}}^{*} \\
        {\theta_{1}}^{*} \\
        {\tau_{0}}^{*} \\
        {\tau_{1}}^{*}
        \end{pmatrix}
        \right), \begin{pmatrix}
        b_{i} \\
        \beta_{i}
        \end{pmatrix},
        X_{pi}\right) \\[1ex]
        f\left(\begin{pmatrix}
        \gamma \tan\left({{\sigma^{2}}_{\theta_{0}}}^{*}\right) \\
        \gamma \tan\left({{\sigma^{2}}_{\theta_{1}}}^{*}\right) \\
        \gamma \tan\left({{\sigma^{2}}_{\tau_{0}}}^{*}\right) \\
        \gamma \tan\left({{\sigma^{2}}_{\tau_{1}}}^{*}\right)
        \end{pmatrix}
        \left(
        L
        \begin{pmatrix}
        {\theta_{0}}^{*} \\
        {\theta_{1}}^{*} \\
        {\tau_{0}}^{*} \\
        {\tau_{1}}^{*}
        \end{pmatrix}
        \right) \:\middle\vert\: \begin{pmatrix}
        {\mu}_{\theta_{0}} \\
        {\mu}_{\theta_{1}} \\
        {\mu}_{\tau_{0}} \\
        {\mu}_{\tau_{1}} \\
        \end{pmatrix}, \diag\left(\gamma \: \tan\left(\sigma_{P}\right)\right) * \left(L * L^{T} \right) * \diag \left(\gamma \tan\left(\sigma_{P}\right) \right)
        \right)
        \end{aligned}%\raisetag{12ex}
       \end{equation}
    \end{fleqn}

    \end{document} 

在此处输入图片描述

答案2

这是另一个aligned基于的解决方案,对f字符进行对齐。

关于数学符号的说明:我通过省略我认为不必要的括号简化并(希望)精简了一些术语。我还删除了不少花括号,因为它们除了造成代码混乱外,没有任何作用。

在此处输入图片描述

\documentclass{article} % or some other suitable class
\usepackage[a4paper,margin=2.5cm]{geometry} % set page parameters as needed
\usepackage{amsmath,amssymb,mleftright}
\DeclareMathOperator{\diag}{diag}
\newcommand\sigmaP{\sigma^{}_{\!P}}

\begin{document}

\begingroup % localize scope of next instruction
\renewcommand\arraystretch{1.333}
\begin{equation} 
\begin{aligned}[b]
    \mathcal{L} 
    = \prod_{p}^{N} \prod_{i}^{K} \,
    &f\mleft[
    Y_{p}, T_{p} 
    \:\middle\vert\:    
    \begin{pmatrix}
    \gamma \tan \sigma^{2\,*}_{\theta_0} \\
    \gamma \tan \sigma^{2\,*}_{\theta_1} \\
    \gamma \tan \sigma^{2\,*}_{\tau_0} \\
    \gamma \tan \sigma^{2\,*}_{\tau_1}
    \end{pmatrix}
    \mleft(
    L
    \begin{pmatrix}
    \theta_0^* \\
    \theta_1^* \\
    \tau_0^* \\
    \tau_1^*
    \end{pmatrix}
    \mright), 
    \begin{pmatrix}
    b_{i} \\
    \beta_{i} 
    \end{pmatrix},
    X_{pi}
    \mright] \\ % end of row 1
    \times &f
    \mleft[
    \begin{pmatrix}
    \gamma \tan \sigma^{2\,*}_{\theta_0} \\
    \gamma \tan \sigma^{2\,*}_{\theta_1} \\
    \gamma \tan \sigma^{2\,*}_{\tau_0} \\
    \gamma \tan \sigma^{2\,*}_{\tau_1}
    \end{pmatrix}
    \mleft(
    L
    \begin{pmatrix}
    \theta_0^* \\
    \theta_1^* \\
    \tau_0^* \\
    \tau_1^*
    \end{pmatrix}
    \mright) 
    \:\middle\vert\: 
    \begin{pmatrix}
    \mu^{}_{\theta_0} \\
    \mu^{}_{\theta_1} \\
    \mu^{}_{\tau_0} \\
    \mu^{}_{\tau_1} \\
    \end{pmatrix},\   
    \diag(\gamma \tan\sigmaP)\cdot (L L^{\!T})\cdot \diag(\gamma \tan\sigmaP)
    \mright]
\end{aligned}\end{equation}
\endgroup

\end{document}

相关内容