1

I have seen various examples in text books and web pages (like here) of two column equation blocks, where the left column has some equation(s) and the right column has some explanation on variable meanings and/or other things. I wish to split an equation like below into two columns with a vertical separator in between without involving minipage, Tikz, and other fancy stuff like that. Seems like something that should be in common demand. But I cannot find an example of it. Any help would be greatly appreciated.

\begin{flalign}
z &= \frac{R\left(S_2 − S_1\right)}{2\left(S_1 + S_2\right)} + \frac{R}{2}\\
text{\scriptsize{where}}
    &\text{\scriptsize{ $R$ is the camera range,}} \nonumber\\
    &\text{\scriptsize{$S_1$ is the amount of the light pulse received, and}} \nonumber\\
    &\text{\scriptsize{$S_2$ is the amount of the light pulse blocked \cite{medina1992three} \nonumber.
}}
\end{flalign}

I am using the scrbook documentclass.

1 Answer 1

1

You can use a | delimiter and an array

% arara: pdflatex

\documentclass{scrbook}
\usepackage{blindtext}
\usepackage{mathtools}
\usepackage{array}

\begin{document}
\blindtext
\begin{equation}
    z = \frac{R(S_2 − S_1)}{2(S_1 + S_2)} + \frac{R}{2} \quad \left|\quad\begin{array}{r@{\ }>$l<$}
    R   & is the amount of the light pulse received, and\\
    S_1 & is the amount of the light pulse received, and\\
    S_2 & is the amount of the light pulse blocked [MED92]\\
\end{array}\right.
\end{equation}
\begin{equation}
    z = \frac{R(S_2 − S_1)}{2(S_1 + S_2)} + \frac{R}{2} \quad \left|\quad\begin{array}{>$l<$}
    $R$ is the amount of the light pulse received, and\\
    $S_1$ is the amount of the light pulse received, and\\
    $S_2$ is the amount of the light pulse blocked [MED92]\\
\end{array}\right.
\end{equation}
\blindtext
\end{document}

enter image description here

4
  • Thanks for the input! Actually, I wanted to have the text side-by-side with the equation, and the visible vertical line between the equation and the text, not between the 'where' and the rest of the text :) Nov 3, 2014 at 15:27
  • That indeed does it! Thank you very much! I wish there were a less hackish way, but this works too! Nov 3, 2014 at 15:40
  • 1
    @SubhamoySengupta Then you will like my completely revised answer. I got your question wrong in the first case.
    – LaRiFaRi
    Nov 3, 2014 at 15:50
  • May I request one small modification? What would happen if there are 2 subequations? Nov 3, 2014 at 19:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .