I have a block of text that contains both equations and lines of text. I'd like to have the equations displayed using eqnarray so that the equal signs are aligned and I'd like for them to be numbered. But! I'd also like to have text in between the equations.
Also, while we're at it, another thing I've been flipping through the help documentation trying to find is being able to have LaTeX follow a custom equation numbering system. Sometimes it's neccessary to have something like the following:
Try using the \multline command (I'm pretty sure you have to use \split with \multline)....here you use an ampersand (&) to align (so you would place them in front of the equal signs), and you could play around with how to align your text.
I hope this helps.
Diff Eq wrote:
Hi,
I'm just starting to get familiar with LaTeX.
I have a block of text that contains both equations and lines of text. I'd like to have the equations displayed using eqnarray so that the equal signs are aligned and I'd like for them to be numbered. But! I'd also like to have text in between the equations.
To solve the problem in your first post, do not use the eqnarray environment any more. The reasons for that can be found in l2tabu-english. Include the package amsmath from the AMS LaTeX Bundle and use the align environment.
With the labels set in this way you can refer to the whole group of equations as well as to the single subequations. For further information take a look at the documentation of amsmath.
localghost wrote:
To solve the problem in your first post, do not use the eqnarray environment any more. The reasons for that can be found in l2tabu-english. Include the package amsmath from the AMS LaTeX Bundle and use the align environment.
With the labels set in this way you can refer to the whole group of equations as well as to the single subequations. For further information take a look at the documentation of amsmath.
I have the same problem with a small twist: align doesn't work for me. I use eqnarray because it allows me to have one column aligned centrally, whereas align only seems to allow left- and right justified columns.
The equality signs are of different widths because of the \stackrel{}{}. Hence the column containing the equality signs must be center aligned in order for the equality signs to line up.
So, is there any way to allow both intertext and center-aligned columns?
svensandberg wrote:I have the same problem with a small twist: align doesn't work for me. [...]
Please explain this by creating a minimal working example (MWE) that shows what is not working. The only thing you need for the align environment is the amsmath package. A possible solution is provided by phi in another topic [1]. Note also the comment of daleif on this issue.
svensandberg wrote:I have the same problem with a small twist: align doesn't work for me. I use eqnarray because it allows me to have one column aligned centrally, whereas align only seems to allow left- and right justified columns.
The equality signs are of different widths because of the \stackrel{}{}. Hence the column containing the equality signs must be center aligned in order for the equality signs to line up.
So, is there any way to allow both intertext and center-aligned columns?
That is a bad syntax in writing, fine for blackboard, but should not be used in typeset text. Other than that it also looks horrible. much better to write this a real text, perhaps using \intertext between the lines, and then leave the math alone. People have to read and understand your text.
daleif, I agree it's not a good idea in the examples above because the motivation can come in the surrounding text, but those are just minimized examples created to make the forum thread readable. In a very long derivation, it can become too cumbersome to explain the steps in surrounding text, especially when equalities and inequalities are mixed ("the first equality is motivated by Lemma A; the first inequality by Lemma B; the second equality by Lemma C ..."). stackrel has been used in scientific publications. It is a quite clear and compact way to motivate each step, which is useful since many conferences have very tight space limits for papers. Do you have any other suggestions for delivering the same message without losing clarity or compactness?