I need to divide both the condition and equation part of some cases into lines, as the cases would not fit to text width. I read some similar questions and could not see that solves my problem. A MWE is given.
\documentclass[11pt,a4paper]{article}
\usepackage[paperheight=22.9cm, paperwidth=8.1cm, margin=0.1cm]{geometry}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{authblk}
\usepackage{amsmath}
\usepackage{bm}
\title{The Title}
\author{Somebody}
\begin{document}
\maketitle
\begin{equation}\label{eq:carcost}
c = \begin{cases}
0 & \mbox{if aaaa bbbb ssssss ddddd fffff ssssss} \\
t(\psi_2-\psi_1)+t_p(\psi_3-\psi1) & \mbox{if aaaa bbbb ssssss ddddd fffff ssssss}\\
t(\psi_4-\psi_1)+t_p(\psi_5-\psi_1) & \mbox{if if aaaa bbbb ssssss ddddd fffff ssssss}\\
t(\psi_4-\psi_1)+t|\psi_2-\psi_4|+t|\psi_2-\psi_6|+t_p|\psi_3+\psi_5-\psi_1|& \mbox{if if aaaa bbbb ssssss ddddd fffff ssssss}
\end{cases}
\end{equation}
\end{document}




breqnpackage. – ozi Apr 02 '14 at 21:48\newcommand{\casestext}[2][2in]{\parbox[t]{#1}{\hangindent=1em\hangafter=1 #2}}as a definition for\casetextwhich would allow for a hanging indent of1em.breqnwould not help in this instance. – Werner Apr 02 '14 at 21:59\null\hfillin my construction. Otherwise, I'm not exactly sure how you want it displayed. Do you want it spread over three lines? – Werner Apr 03 '14 at 00:13\parbox[t]{1.5in}{\hangindent=1em\hangafter=1 $....\\....\\...$}nicely typesets the equation part too. Hence parbox with hangindent and hangafter solved all my problems in this equation. Thanks. – ozi Apr 03 '14 at 00:19\strutat the end of theparboxso that the lines aren't so unevenly spaced if there are no descenders on the last line. a\strut\ignorespacesat the beginning wouldn't be a bad idea either. – barbara beeton Apr 03 '14 at 02:37