You write Mathematics in LyX just as you would write it anyway, i.e. as if it were going to be processed by TeX and not Jade. The whole combined power of TeX/LaTeX/LyX lies at your fingertips! So let 's try some math here! This is a numbered displayed equation:
An example of an unnumbered equation:
And here is an example of an inline formula: , or again .
This is a partially numbered displayed equation:
while in this one all equations are numbered:
Now, let's do some more advanced examples:
How about these: a matrix
a partially filled matrix
a continued fraction
and some inequalities
Here is an inline inequality, with a proof of non-negativity of relative entropy ( ): show that , for Then observe that (here comes an inequality array):
If you are looking at the PDF or PS version of this document, everything will look perfect, because it was typeset directly by TeX. But if you are reading the HTML or RTF version, then you might have noticed that the equation numbering is not continuous. Rather it starts all over from (1) in each multiline equation. This is a bug of the method we use: each equation, be it inline or displayed, one line, or multi-line, will be processed by TeX as a separate document (only for HTML and RTF), starting the numbering from 1 over and over again. Till some TeX Guru (anyone reading?) out there tells me how to work around this, the simplest solution for equation numbering is to follow the rules below:
Don't put more than one labels in a multi-line equation (an equation array in LaTeX jargon). If you absolutely need to, split the equation in two, containing only one label each.
Start each equation label with “eq”, followed by a number, like “eq1”, “eq2”, “eq78” etc. My scripts number each displayed equation (i.e. not the inline ones) consequtively through the whole document, automatically assigning an id and a title to them in the SGML code. These ids and titles are always of the form “eqxxx” where xxx is the number of the equation and refer to the whole equation, not some line of it. On the other hand, LyX knows only of equation labels assigned to some line of some equation. If you followed the previous rule and if you name the one and only label of your equation with the “eqxxx” label displayed in its title, then you can refer to it from LyX like any other cross-reference and everything will work perfectly!
The best way to implement the previous rule is to just process your document once without any labels in equations. You will see that all versions will have concise and continuous numbering in the equation titles. You will see titles like “Equation 11-1. (eq2)”. The “11-1” comes from Jade and means “the first equation of chapter 11”. The “(eq2)” is the title, assigned automatically by my scripts. Now, if you want to label this equation in LyX, label only one line of it (first rule) and label it “eq2” (second rule).
of course, you take away the quotes
|Last updated Mon Sep 24 01:19:25 CEST 2007||Permalink: http://www.karakas-online.de/mySGML/lyx-writing-mathematics.html||All contents © 2002-2007 Chris Karakas|