1

I'm trying to define a function that requires a large amount of text in a cases environment. By adding a

\\ 

I can create some space between the top and bottom lines, but i'd rather create a smaller space (perhaps half a line), \smallskip and similar don't seem to work in this environment, and adding extra options to

\\      

like [5pt] also seems not to work.

Any ideas what will?

p_k(j,M)&=
\begin{cases}
1\text{ } \parbox[t]{.6\textwidth}{ if the matrix $M$ includes one or more entry of the value $k$ in the row $j$ of $M$,}\\
\\
0 \text{ otherwise.} 
\end{cases}
2

I think you miss the &s in the right position.

I think [5pt] are too few, try something greater, e.g. [14pt].

\documentclass{article}
\usepackage{amsmath}

\begin{document}
\[p_k(j,M)=
\begin{cases}
1 &\parbox[t]{.6\textwidth}{if the matrix $M$ includes one or more entry of the value $k$ in the row $j$ of $M$,}\\[14pt]
0 &\text{otherwise.} 
\end{cases}
\]
\end{document}

enter image description here

  • Weirdly in my document, that piece of code produces even spacing between the lines. I assume this is to do with my headers, any idea what could cause this? – Abijah Feb 28 '18 at 17:29
  • working on it ... – Abijah Feb 28 '18 at 17:31
  • It appears to be due to \doublespacing I can only use 20pt or higher. – Abijah Feb 28 '18 at 17:56
  • @Abijah Did you load setspace? – CarLaTeX Feb 28 '18 at 18:05
  • Yes I did :) :) – Abijah Feb 28 '18 at 18:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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