What's the best way to produce effects like this in LaTeX:
p_g(a_1) (1 - p_g(a_2)) (1 - p_g(a_3)) +
p_g(a_1) p_g(a_2) (1 - p_g(a_3)) +
(1 - p_g(a_1)) p_g(a_2) (1 - p_g(a_3))
This is not an equation, but just a long math expression that needs to
be broken into several lines.
Thanks.
b.
the amsmath package defines a multline environment
try that one (a bit information on how to use it can be found in the new
version of The LaTeX Companion chapt. 8, can be found at CTAN,
www.ctan.org/info/)
\begin{multline*} % nonumber
p_g(a_1) (1 - p_g(a_2)) (1 - p_g(a_3)) +\\
p_g(a_1) p_g(a_2) (1 - p_g(a_3)) +\\
(1 - p_g(a_1)) p_g(a_2) (1 - p_g(a_3))
\end{multline}
to get more control there's the \shoveright and \shoveleft commands, but
have a look in the chapter above
--
/daleif
F2.10 - Institut for Matematiske Fag, Matematisk Afdeling
Århus Universitet
--
Charles B. Cameron
oops, that should end with \end{multline*} ofcourse
or if you don't want labels use \begin{multline*} \end{multline*}. You
have to have AMSLaTeX to do that.
Also.. you should break the line _before_ binary operations (such as +),
but _after_ relation symbols (such as =). I think...
Cheers,
Fredrik Engström
>the amsmath package defines a multline environment
I tried
...
\usepackage{amsmath}
...
\begin{document}
...
\begin{multline*}
p_g(a_1) (1 - p_g(a_2)) (1 - p_g(a_3)) +\\
p_g(a_1) p_g(a_2) (1 - p_g(a_3)) +\\
(1 - p_g(a_1)) p_g(a_2) (1 - p_g(a_3))
\end{multline*}
...
I get:
! LaTeX Error: Environment multiline* undefined.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.228 \begin{multiline*}
?
I get identical results whether I bracket the whole thing between $$'s
or not.
>try that one (a bit information on how to use it can be found in the new
>version of The LaTeX Companion chapt. 8, can be found at CTAN,
>www.ctan.org/info/)
There's nothing at http://www.ctan.org/info (HTTP error, basically).
b.
> I tried
>
> \begin{multline*}
> p_g(a_1) (1 - p_g(a_2)) (1 - p_g(a_3)) +\\
> p_g(a_1) p_g(a_2) (1 - p_g(a_3)) +\\
> (1 - p_g(a_1)) p_g(a_2) (1 - p_g(a_3))
> \end{multline*}
>
> ...
>
>
> I get:
>
> ! LaTeX Error: Environment multiline* undefined.
I suppose you tired multi instead of mult
Herbert
> ! LaTeX Error: Environment multiline* undefined.
>
> See the LaTeX manual or LaTeX Companion for explanation.
> Type H <return> for immediate help.
> ...
>
> l.228 \begin{multiline*}
>
> ?
In fact, the following grep
% grep -i multiline /usr/share/texmf/tex/latex/amsmath/*
produces no output. The version of amstex.sty I'm using is dated year
2000.
b.
>
>
> it's better to read some docs ... ;-)
> here is an example for the multline environment
and it's better to give an url ..
http://www.lyx.org/help/mathstuff/equations/node16.html
Herbert
it's better to read some docs ... ;-)
here is an example for the multline environment
Herbert
>I suppose you tired multi instead of mult
That was my mistake. Sorry.
Thanks.
bill
I said multline!!! not multiline !!!, common mistake.
the environment is called multline
> the environment is called multline
I never realized that!! (Shows how often I use it...)
Donald Arseneau as...@triumf.ca
> bill wrote:
>
> > In <3D2D7ADD...@imf.au.dk> Lars Madsen <dal...@imf.au.dk> writes:
> >
> > >the amsmath package defines a multline environment
> >
> > I tried
> >
> > \begin{multline*}
> > p_g(a_1) (1 - p_g(a_2)) (1 - p_g(a_3)) +\\
> > p_g(a_1) p_g(a_2) (1 - p_g(a_3)) +\\
> > (1 - p_g(a_1)) p_g(a_2) (1 - p_g(a_3))
> > \end{multline*}
> >
> > I get:
> >
> > ! LaTeX Error: Environment multiline* undefined.
> >
>
> I said multline!!! not multiline !!!, common mistake.
>
> the environment is called multline
Uh, no. It is called multline*. Multline would have equation
numbers all over the place.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Email: David....@t-online.de
> Lars Madsen <dal...@imf.au.dk> writes:
>
>
>>bill wrote:
>>
>>
>>>In <3D2D7ADD...@imf.au.dk> Lars Madsen <dal...@imf.au.dk> writes:
>>>
>>>
>>>>the amsmath package defines a multline environment
>>>>
>>>I tried
>>>
>>>\begin{multline*}
>>>p_g(a_1) (1 - p_g(a_2)) (1 - p_g(a_3)) +\\
>>> p_g(a_1) p_g(a_2) (1 - p_g(a_3)) +\\
>>> (1 - p_g(a_1)) p_g(a_2) (1 - p_g(a_3))
>>>\end{multline*}
>>>
>>>I get:
>>>
>>> ! LaTeX Error: Environment multiline* undefined.
>>>
>>>
>>I said multline!!! not multiline !!!, common mistake.
>>
>>the environment is called multline
>>
>
> Uh, no. It is called multline*. Multline would have equation
> numbers all over the place.
I get only one for the last row ... :-)
Herbert
me too :-), think it's designed to be used in splitting one very long line of
math
An opinion amsldoc shares with you :-)
For the full story: amsldoc section 3.3, where useful things like
\multlinegap are also discussed.
Dan
--
Dan Luecking Department of Mathematical Sciences
University of Arkansas Fayetteville, Arkansas 72701
> For the full story: amsldoc section 3.3, where useful things like
> \multlinegap are also discussed.
Does it also explain what the AMS has against the letter "i"?
Or was it a set-up for ........
The environment is named multiline, but the i is imaginary.
(Boooo hissss)
Donald Arseneau as...@triumf.ca
> luec...@uark.edu (Dan Luecking) writes:
>
>
>>For the full story: amsldoc section 3.3, where useful things like
>>\multlinegap are also discussed.
>>
>
> Does it also explain what the AMS has against the letter "i"?
> Or was it a set-up for ........
>
> The environment is named multiline, but the i is imaginary.
something like i=sqrt(-1) ... :-)
Herbert
> > The environment is named multiline, but the i is imaginary.
> Should have been multlne n that case, shouldn't t?
\begin{multiline}
\end{-multlne}
Donald Arseneau as...@triumf.ca
>luec...@uark.edu (Dan Luecking) writes:
>
>> For the full story: amsldoc section 3.3, where useful things like
>> \multlinegap are also discussed.
>
>Does it also explain what the AMS has against the letter "i"?
My theory is it had a different name that was later rejected, and the
person responsible for making the change mistyped multiline.
Being somewhat dislexic myself, I can sympathize, and be thankful
we don't have a mutiline environment
>Or was it a set-up for ........
>
>The environment is named multiline, but the i is imaginary.
>
>(Boooo hissss)
Those mathematicians, they're such cut-ups!
> On 12 Jul 2002 13:40:16 -0700, Donald Arseneau <as...@triumf.ca> wrote:
>
> >Does it also explain what the AMS has against the letter "i"?
>
> My theory is it had a different name that was later rejected, and the
> person responsible for making the change mistyped multiline.
Nothing so complicated. Most of what is in the amsmath package today
is simply the same nomenclature, by direct descent, that got originally
used in AMS-TeX (circa 1983). I hesitate to blame Spivak for choosing
"multline" over "multiline" because I wasn't there at the time and I
don't know that it was his idea.
Practically speaking, it might be a good idea for amsmath to define both
variants. At one time there was a genuine need to avoid using more
control sequence names than necessary, but that is not much of an issue
any more with the current versions of TeX.