Discussion:
Numbered, bracketed, Systems of Equations - How??
Brian Williams
2005-05-06 09:44:47 UTC
Permalink
Hi folks,

looks like this isn't such a newbie question after all.

Maybe I should ask it more carefully.

I want to use LyX to produce systems of equations that look like this (output exported from LyX):

$\left\{ \begin{array}{rrrrr}
(3-\lambda)C & + & 2D & = & 0\\
C & + & (4-\lambda)D & = & 0\end{array}\right.$

but with each line numbered, like eqnarray

Reasons are that I want the operators to line up correctly, and it will match the course textbooks that I am using with an Open University Maths course that I'm doing (they were published using TeX).

I've tried all kinds of combinations of brackets and environments with no luck.

By the way, the user guide says this in section 5.2: "If you decide after the fact to place parentheses (or other math structure, like a square root, or other decoration) around some math structure, you can do that by highlighting (selecting) the structure that is to go inside the parentheses...Then, choose the appropriate brackets for left and right, and click on Apply. The parentheses will be drawn around the selected structure."

This does not appear to be true for equation environments or arrays for that matter.

Has this been done in LyX yet?

Many thanks,

Brian




---------------------------------
Yahoo! Messenger - want a free & easy way to contact your friends online?
Angus Leeming
2005-05-06 09:58:55 UTC
Permalink
Post by Brian Williams
By the way, the user guide says this in section 5.2: "If you decide after
the fact to place parentheses (or other math structure, like a square
root, or other decoration) around some math structure, you can do that by
highlighting (selecting) the structure that is to go inside the
parentheses...Then, choose the appropriate brackets for left and right,
and click on Apply. The parentheses will be drawn around the selected
structure."
This does not appear to be true for equation environments or arrays for that matter.
I think that the user guide is describing a counter intuitive UI. Since
that section was written the math editor has been re-written from scratch.
It's more than likely that the two are out of sync (and that the mathed
way is better than the description).

Please file a report on bugzilla.lyx.org.
--
Angus
Herbert Voss
2005-05-06 10:43:01 UTC
Permalink
Post by Brian Williams
Hi folks,
looks like this isn't such a newbie question after all.
Maybe I should ask it more carefully.
$\left\{ \begin{array}{rrrrr}
(3-\lambda)C & + & 2D & = & 0\\
C & + & (4-\lambda)D & = & 0\end{array}\right.$
but with each line numbered, like eqnarray
Reasons are that I want the operators to line up correctly, and it will match the course textbooks that I am using with an Open University Maths course that I'm doing (they were published using TeX).
I've tried all kinds of combinations of brackets and environments with no luck.
By the way, the user guide says this in section 5.2: "If you decide after the fact to place parentheses (or other math structure, like a square root, or other decoration) around some math structure, you can do that by highlighting (selecting) the structure that is to go inside the parentheses...Then, choose the appropriate brackets for left and right, and click on Apply. The parentheses will be drawn around the selected structure."
This does not appear to be true for equation environments or arrays for that matter.
Has this been done in LyX yet?
this is not easy in LaTeX, too. And in LyX a bit crazy
in fact of the math editor and its restrictions

Herbert
Brian Williams
2005-05-06 11:22:57 UTC
Permalink
Thanks Herbert, you are a genius!

Hope you don't mind a followup! :-) Is there a way to right justify the equation numbers?

(I'm guessing the items in red are standard LaTeX macros I can find documented somewhere?)

Thanks!

Brian

Send instant messages to your online friends http://uk.messenger.yahoo.com
Herbert Voss
2005-05-06 11:46:51 UTC
Permalink
Post by Brian Williams
Hope you don't mind a followup! :-) Is there a way to right justify the equation numbers?
(I'm guessing the items in red are standard LaTeX macros I can find documented somewhere?)
yes, but it is easier to write the _whole_ stuff in real
LaTeX code, LyX is not designed for such speical stuff.

Attached a LyX solution,using tabularx

Herbert
Brian Williams
2005-05-06 13:46:41 UTC
Permalink
Hi Herbert,

using some of your ideas, I've got what I wanted using a single row, 3 element array. It's almost all done with LyX with a minimum of Latex in-line code.

Question is, do you think it's terribly kludgy? See attached.

Thanks for all your help

Brian




---------------------------------
Yahoo! Messenger - want a free & easy way to contact your friends online?
Andre Poenitz
2005-05-06 18:01:35 UTC
Permalink
Post by Brian Williams
Hi Herbert,
using some of your ideas, I've got what I wanted using a single row, 3
element array. It's almost all done with LyX with a minimum of Latex
in-line code.
Question is, do you think it's terribly kludgy? See attached.
You could defined a math macro for \refstepcounter{equation}.
And even associate a '(#)' drawing to it. So it'd look almost
'correct'.

Andre'
Herbert Voss
2005-05-07 10:44:34 UTC
Permalink
Post by Brian Williams
Question is, do you think it's terribly kludgy? See attached.
define a macro, makes life easier ...

Herbert

Georg Baum
2005-05-06 11:21:31 UTC
Permalink
Post by Brian Williams
By the way, the user guide says this in section 5.2: "If you decide after
the fact to place parentheses (or other math structure, like a square
root, or other decoration) around some math structure, you can do that by
highlighting (selecting) the structure that is to go inside the
parentheses...Then, choose the appropriate brackets for left and right,
and click on Apply. The parentheses will be drawn around the selected
structure."
This does not appear to be true for equation environments or arrays for that matter.
This is true for everything inside math mode, including arrays like the one
you cited (and IMO one of the strengths of the math editor, I use it
often). It is not possible if the math formula type is an array type by
itself (e. g. equation, align etc.), but that is rather a LaTeX restriction
than a LyX one: Where would you put the parantheses in the following LaTeX
code

\begin{align}
a&=b\\
cccc&=d
\end{align}

(note that \begin{align} switches to math mode)?


Georg
Loading...