6

The text is too long and would like to split it in two: Any help please!

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{flalign*}
\textit{K}^{k,r}_{j}&   : \text{The transportation and handling \\ of item $k$, type $r$ machines in period $j$}& 
\end{flalign*}

\end{document}
egreg
  • 1,121,712
user28251
  • 726

2 Answers2

6

As Peter Grill mentioned in a comment, a \parbox ("paragraph-containing box") provides a fine solution method. The \parbox macro takes three arguments: the first, which is optional (and hence gets placed in square brackets), specifies the alignment: t, m (default), and b; the second specifies the width, and the third the actual text that needs to be typeset.

In the example below, I've chosen 3.5" as the width of the parbox; obviously, you're free to choose a different width. (For a way to make LaTeX compute the maximum available width and make it available to the parbox, see the posting Compute remaining horizontal space in align environment. (Thanks to Peter Grill for suggesting this possibility.)

The \raggedright instruction in the MWE -- suggested by @daleif -- at the start of the second required argument instructs LaTeX to typeset the text in raggedright mode rather than fully-justified mode; this is useful for avoiding potential extreme stretching of the text. The horizontal line above the equation is there just to illustrate the width of the text block.

enter image description here

\documentclass[fleqn]{article}
\usepackage{amsmath}
\begin{document}
\hrule % just to illustrate width of the text block
\begin{equation*}
K^{k,r}_{j} :\ 
\parbox[t]{3.75in}{\raggedright The transportation and handling of item~$k$, 
   type~$r$ machines in period~$j$}
\end{equation*}
\end{document}

Addendum: An essentially equivalent result can be achieved by typesetting the material in a two-column array environment, with the second column being of type p -- essentially a "parbox". Here's just the equation part of the required code (the preamble is the same as above):

\begin{equation*}
\begin{array}{@{} l p{3.75in} @{}}  % choose width of `p` column to suit your needs
K^{k,r}_{j} : &
\raggedright The transportation and handling of item~$k$, type~$r$ machines in period~$j$\\
\end{array}
\end{equation*}
Mico
  • 506,678
6

The simplest way to cope with this is with a tabular:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\[
\begin{tabular}{l@{}l}
$K^{k,r}_{j}$ : \mbox{} & The transportation and handling of \\
                        & item $k$, type $r$ machines in period $j$
\end{tabular}
\]

\end{document}

enter image description here

Note that \textit{K} is not needed: a “K” in math mode is italic by default.

egreg
  • 1,121,712