4

I would like to write a formula of the form

$$ A = B \times C $$

where $A$ is some long phrase, e.g., ``the marginal utility of doing so and so given that we know this and that'', and $B$ and $C$ are similar phrases. The problem is that the texts $A,B,C$ extend to the right, and I would like to restrict each to be about 1/4 of the horizontal length of the page, and would like to allow them to extend downwards for as much space as needed to fit the phrase. Any help would be appreciated.

2 Answers 2

4

How about:

enter image description here

\documentclass{article}
\usepackage{array,ragged2e}
\newcolumntype{P}{>{\RaggedRight\arraybackslash}p{0.25\textwidth}}
\begin{document}
\[
\left(\begin{array}{P}
the marginal utility of doing so and so given this and that
\end{array}\right)
=
\left(\begin{array}{P}
the marginal utility of doing so and so given this and that
\end{array}\right)
\times
\left(\begin{array}{P}
the marginal utility of doing so and so given this and that
\end{array}\right)
\]
\end{document}

The P column type that's use inside each of the three array environments is defined to take up a width of 0.25\textwidth, it allows automatic line wrapping, and it typesets its contents ragged-right (rather than fully-justified) while allowing hyphenation. If hyphenation is not appropriate, replace \RaggedRight with \raggedright. If you want the material centered instead of raggedright, replace \RaggedRight with \Centering (or \raggedright with \centering).

4
  • You can use tabular, instead of array.
    – egreg
    Dec 7, 2014 at 22:18
  • @egreg - But tabular inserts \tabcolsep (6pt) of whitespace at both edges, whereas array inserts \arraycolsep (5pt). The smaller amount of whitespace seems better (to me at least).
    – Mico
    Dec 7, 2014 at 22:33
  • Is there any way to make the arrays shrink in size if the text is smaller than 1/4 of the page? (marginal utility ...) = (short phrase) \times (marginal utility ...)?
    – Ben
    Dec 8, 2014 at 10:31
  • @Ben - To typeset a "short phrase" -- which I assume is something that fits on a single line with a width of less than 0.25\textwidth -- I would simply write (\mbox{short phrase}). If you've loaded the amsmath package, you could use \text instead of \mbox. If the parentheses that surround the short phrase look a bit puny, use \bigl( or even \Bigl( instead of (, and \bigr) or \Bigr) instead of ).
    – Mico
    Dec 8, 2014 at 10:54
2
\[
\parbox{.25\textwidth}{something...}
=
\parbox{.25\textwidth}{something...}
\times
\parbox{.25\textwidth}{something...}
\]

You must log in to answer this question.

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