开发者

LaTeX stretching tabular/array to fill page width

I recently have had the need to make a math array or a tabular expand to fill the page width.

The effect I am trying to achieve is that for one line on the page, half is aligned at the left, and the other at the right.

For instance, just now, the following has been giving be problems...

$$
\begin{arra开发者_开发问答y}{l r}    
  \phi_{CJ}^* = \Sum_{SV} \psi_{CSJV} = P(S) P(S|V,C,S,J) & \text{(no summation on S or V which are in evidence.)}    
\end{array}
$$

The desired effect is that the first cell is aligned on the left margin, and the second is aligned on the right margin. Instead, the array is centred, with no space between the cells.

Many thanks


I wonder if instead of l and r you might consider trying p{width} for your alignment. This works okay for me:

\begin{tabular}{p{0.45\textwidth} p{0.5\textwidth}}
$\phi$$_{\mathrm{CJ}}$^* = \Sum$_{\mathrm{SV}}$ $\psi$$_{\mathrm{CSJV}}$ = P(S) P(S \&     V,C,S,J)  &  (no summation on S or V which are in evidence.)  \\
\end{tabular}

p{width} allows you to set the column width and try to fill your page, whereas I think l and r have some other (perhaps goofy) method of deciding how wide to make things.

In your equation you have P(S) P(S & V,C,S,J) and I needed to change that & to a \& to stop it from thinking it was the beginning of another column...

There's a ditty on \eqmakebox on the LaTeX/Tables Wikibook site that sounds like it might help as well, though it's a bit esoteric compared to something common like \tabular... (LINK).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜