TransWikia.com

How to keep align environment from getting cut by end of page

TeX - LaTeX Asked on February 21, 2021

I have the following equasions:

    begin{align}label{eq11}
        begin{split}
        & s_{xy}=(x_p-x_s)L_y
        & s_{xz}=(x_p-x_s)L_z
        & s_{yx}=(y_p-y_s)L_x
        & s_{yz}=(y_p-y_s)L_z
        & s_{zx}=(z_p-z_s)L_x
        & s_{zy}=(z_p-z_s)L_y
        & a_{xyz} = |(x_p-x_s)(y_p-y_s)(z_p-z_s)|
        & a_{xy} = |(x_p-x_s)(y_p-y_s)|
        & a_{xz} = |(x_p-x_s)(z_p-z_s)|
        & a_{yz} = |(y_p-y_s)(z_p-z_s)|
        & c_{xy} = x_sy_p-x_py_s
        & c_{xz} = x_sz_p-x_pz_s
        & c_{yz} = y_sz_p-y_pz_s
        end{split}
    end{align}

The equations are exceeding the lower edge of the page as demonstrated in the image:

enter image description here

As this is a paper, I wish all the equation to stay on one page (no page breaks in the middle), and I do wish to save as much space as possible.

How can I keep the align{} environment from getting cut?

One Answer

(I edited this answer after the OP clarified that a page break within the group of equations is forbidden.)

Some comments and observations:

  • Since you've ruled out allowing a page break within the group of 13 equations, a commonly given piece of advice -- to allow page breaks either globally, by issuing an allowdisplaybreaks directive, or selectively, by issuing a suitably placed displaybreak directive, does not apply.

    Anyway, to enable such page breaks, you'd have to get rid of the split wrapper (and issue 12 notag directives to suppress equation numbers for 12 of the 13 individual equations). This is because allowdisplaybreaks has no effect on equations contained in split, aligned, gathered, and alignedat environments.

  • The obvious alternative is to issue a clearpage directive immediately before begin{align}. The upsides are that all 13 equations will occur on a single page and that the equation won't protrude into the bottom margin. The [serious!] downside is that there may be a considerable amount of wasted whitespace at the bottom of the page that precedes the group of equations.

    In case, say, only the final equations of the 13 equations would protrude into the bottom margin, you might be able to avoid the big blob of wasted whitespace by issuing an enlargethispage{1.1baselineskip} directive before begin{align}.

  • Finally, you could contemplate indulging in a compromise of sorts. Since the group of 13 equations appears to be consist of groups of 6, 4, and 3 subequations, you might employ a subequations wrapper and employ two or three separate align/split environments inside the subequations environment. LaTeX will then automatically insert a page break between the groups as needed.

    After all, if you can tell a story about the group of 13 equations, it shouldn't be too difficult to tell a story about a group of 13 equations that consists of 3 subgroups, right?

enter image description here

documentclass{article}
usepackage{mathtools} % superset of 'amsmath' package
usepackage[paperheight=6cm,margin=1cm]{geometry} % just for this example
pagestyle{empty} % just for this example

begin{document}
begin{subequations}
    % note the use of 'equation' instead of 'align'
    begin{equation}label{eq11a}begin{split}
        s_{xy} &= (x_p-x_s)L_y
        s_{xz} &= (x_p-x_s)L_z
        s_{yx} &= (y_p-y_s)L_x
        s_{yz} &= (y_p-y_s)L_z
        s_{zx} &= (z_p-z_s)L_x
        s_{zy} &= (z_p-z_s)L_y
    end{split}end{equation}
    begin{equation}label{eq11b}begin{split}
        a_{xyz} &=  mathrlap{|(x_p-x_s)(y_p-y_s)(z_p-z_s)|}
        a_{xy}  &=  |(x_p-x_s)(y_p-y_s)|
        a_{xz}  &=  |(x_p-x_s)(z_p-z_s)|
        a_{yz}  &=  |(y_p-y_s)(z_p-z_s)|
    end{split}end{equation}
    begin{equation}label{eq11c}begin{split}    
        c_{xy}  &=  x_sy_p-x_py_s
        c_{xz}  &=  x_sz_p-x_pz_s
        c_{yz}  &=  y_sz_p-y_pz_s
    end{split}end{equation}
end{subequations}
end{document}

Correct answer by Mico on February 21, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP