Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I learned here that I can use \\[<len>] to explicitly set the vertical skip space between lines, e.g., <len> set to 3ex. I'd like to set <len> to, say, 2-times the normal length in this environment (e.g., align or dcases) but I don't know the length parameter that determines this.

Another example: I'd like to change the explicit 3ex below to some multiple of the vertical line-skip space in the align environment. Does anyone know what that is?

\documentclass{beamer}
\usepackage{amsmath}
\usepackage{mathtools}
\begin{document}
  \begin{frame}
    Some sample text
    \begin{spreadlines}{3ex}
      \begin{align*}
        \pi(\mu \mid x) &= \frac{\pi(\mu)\,\mathcal{L}(x \mid \mu)}{p(x)} \\
                        &= \begin{dcases*}
                             \frac{(1-w)\phi(x)}{p(x)} & for \(\mu=0\) \\
                             \frac{w\gamma(\mu)\phi(x-\mu)}{p(x)} & for \(\mu \neq 0\).
                           \end{dcases*}
      \end{align*}
    \end{spreadlines}
  \end{frame}
\end{document}
share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

use multiples of \baselineskip and in tabulars/arrays \normalbaselineskip

\documentclass{scrartcl}
\usepackage{mathtools}

\begin{document}

\begin{spreadlines}{2\baselineskip}
  \begin{align*}
    \pi(\mu \mid x) &= \frac{\pi(\mu)\,\mathcal{L}(x \mid \mu)}{p(x)} \\[\normalbaselineskip]
                    &= \begin{dcases*}
                         \frac{(1-w)\phi(x)}{p(x)} & for \(\mu=0\) \\
                         \frac{w\gamma(\mu)\phi(x-\mu)}{p(x)} & for \(\mu \neq 0\).
                       \end{dcases*}
  \end{align*}
\end{spreadlines}

\end{document}
share|improve this answer
    
I noticed that using 2\baselineskip instead of either 3ex or 5\jot shrinks the spacing between the align environment and the text immediately preceding it. I'm doing this in a beamer document so that might be driving this result. –  brianjd Oct 26 '11 at 17:12
    
then give a complete example not only a fragment of code –  Herbert Oct 26 '11 at 17:53
    
I completed the example I originally provided. –  brianjd Oct 27 '11 at 1:30
    
I cannot see it. With \begin{spreadlines}{\normalbaselineskip} i get no other spacing –  Herbert Oct 27 '11 at 6:48
add comment

The linespacing in align and gather is defined by a length called \jot, though exactly what this value represents, I don't know.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{minipage}[t]{.45\textwidth}
  \begin{gather}
    a = b \\
    c = d
  \end{gather}
\end{minipage}
\begin{minipage}[t]{.45\textwidth}
  \begin{gather}
    a = b \\[2\jot]
    c = d
  \end{gather}
\end{minipage}

enter image description here

share|improve this answer
    
\jot represents a length for adjusting the spacing: the default is to add 1\jot to the baseline skip. –  egreg Oct 26 '11 at 16:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.