2

The code

 \[\boxed{\begin{split}
     3\mathrm{d}6 + \text{ability} + \text{skill} & \ge 10 + \text{ability} + \text{skill} \\
     &\text{or} \\
    3\mathrm{d}6 + \text{ability} + \text{skill} & \ge 10 + \text{ability} + 4 \\
     &\text{or} \\
    3\mathrm{d}6 + \text{ability} + 4 & \ge 10 + \text{ability} + \text{skill} \\
     &\text{or} \\
    3\mathrm{d}6 + \text{ability} + 4 & \ge 10 + \text{ability} + 4
 \end{split}}\]

works.

But the code

 \[\begin{split}
     \boxed{3\mathrm{d}6 + \text{ability} + \text{skill} & \ge 10 + \text{ability} + \text{skill}} \\
     &\text{or} \\
    \boxed{3\mathrm{d}6 + \text{ability} + \text{skill} & \ge 10 + \text{ability} + 4} \\
     &\text{or} \\
    \boxed{3\mathrm{d}6 + \text{ability} + 4 & \ge 10 + \text{ability} + \text{skill}} \\
     &\text{or} \\
    \boxed{3\mathrm{d}6 + \text{ability} + 4 & \ge 10 + \text{ability} + 4}
 \end{split}}\]

doesn't.

How can I make it work?

Werner
  • 603,163

1 Answers1

3

Here are some options:

enter image description here

\documentclass{article}

\usepackage{amsmath,eqparbox}

\begin{document}

\[
  \boxed{
    \begin{aligned}
      3\mathrm{d}6 + \text{ability} + \text{skill} & \ge 10 + \text{ability} + \text{skill} \\
        &\text{or} \\
      3\mathrm{d}6 + \text{ability} + \text{skill} & \ge 10 + \text{ability} + 4 \\
        &\text{or} \\
      3\mathrm{d}6 + \text{ability} + 4 & \ge 10 + \text{ability} + \text{skill} \\
        &\text{or} \\
      3\mathrm{d}6 + \text{ability} + 4 & \ge 10 + \text{ability} + 4
    \end{aligned}
  }
\]

\begin{gather*}
  \boxed{\eqmakebox[LHS][r]{$3\mathrm{d}6 + \text{ability} + \text{skill}$}
    \eqmakebox[RHS][l]{${}\geq 10 + \text{ability} + \text{skill}$}} \\
    \text{or} \\
  \boxed{\eqmakebox[LHS][r]{$3\mathrm{d}6 + \text{ability} + \text{skill}$} 
    \eqmakebox[RHS][l]{${}\geq 10 + \text{ability} + 4$}} \\
    \text{or} \\
  \boxed{\eqmakebox[LHS][r]{$3\mathrm{d}6 + \text{ability} + 4$}
    \eqmakebox[RHS][l]{${}\geq 10 + \text{ability} + \text{skill}$}} \\
    \text{or} \\
  \boxed{\eqmakebox[LHS][r]{$3\mathrm{d}6 + \text{ability} + 4$}
    \eqmakebox[RHS][l]{${}\geq 10 + \text{ability} + 4$}}
\end{gather*}

\newlength{\LHSlong}\newlength{\LHSshort}%
\newlength{\RHSlong}\newlength{\RHSshort}%
\newcommand{\LHSfill}{\hspace*{\dimexpr\LHSlong-\LHSshort}}%
\newcommand{\RHSfill}{\hspace*{\dimexpr\RHSlong-\RHSshort}}%
\settowidth{\LHSlong}{$3\mathrm{d}6 + \text{ability} + \text{skill}$}%
\settowidth{\RHSlong}{${}\geq 10 + \text{ability} + \text{skill}$}%
\settowidth{\LHSshort}{$3\mathrm{d}6 + \text{ability} + 4$}%
\settowidth{\RHSshort}{${}\geq 10 + \text{ability} + 4$}%
\begin{gather*}
  \boxed{3\mathrm{d}6 + \text{ability} + \text{skill} \geq 10 + \text{ability} + \text{skill}} \\
    \text{or} \\
  \boxed{3\mathrm{d}6 + \text{ability} + \text{skill} \geq 10 + \text{ability} + 4} \RHSfill \\
    \text{or} \\
  \LHSfill\boxed{3\mathrm{d}6 + \text{ability} + 4 \geq 10 + \text{ability} + \text{skill}} \\
    \text{or} \\
  \LHSfill\boxed{3\mathrm{d}6 + \text{ability} + 4 \geq 10 + \text{ability} + 4}\RHSfill
\end{gather*}

\end{document}

The last option relies on the fact that your constructions seems deterministic with two fixed Left/Right Hand Sides. As such, we're able to measure their widths and use it to correct for the too-short equation sides.

Werner
  • 603,163