Re: math-stuff

2004-03-17 Thread Andre Poenitz
On Tue, Mar 16, 2004 at 11:40:39AM +0100, Wolfgang Engelmann wrote:
 could somebody tell me why I get an error by using the second equation in the 
 added lyx-file?
 
 This is the relevant part of the lyx-file:
 \layout Standard
 If I take the second equation out, dvi gives no error. 
 \layout Standard
 \begin_inset Formula R=Rh/2+(ZZ-4)
 \end_inset 
 \layout Standard
 but with this one it gives errors
 \layout Standard
 \begin_inset Formula R=Rh/2+(ZZ-4)+K_{ab} 
 \end_inset 
 I am using Lyx Version 1.3.2 Mai 2003 and Mandrake 9.2

This should read

 \begin_inset Formula $R=Rh/2+(ZZ-4)$
 \end_inset 
 \layout Standard
 but with this one it gives errors
 \layout Standard
 \begin_inset Formula $R=Rh/2+(ZZ-4)+K_{ab}$

Note the extra '$...$'.

Without these, you end up in math text mode (indicated e.g. by the
upright black text instead of 'math blue italics'). An underscore within
math text usually creates trouble.

You can convert your formulas with 'M-x math-mutate simple' (or M-m t i)
or if you have lots of them by searchreplace in the .lyx file.

Andre'


Re: math-stuff

2004-03-17 Thread Andre Poenitz
On Tue, Mar 16, 2004 at 07:20:05PM +0100, Uwe Stöhr wrote:
 I've never seen that before. This seems to be a bug. What have you done 
 to create the formulas? When you put the cursor in the formula, LyX 
 status bar says Type: none. I tried to reproduce this but failed.

One way to create this is to write text _not_ surrounded by $...$,
mark it, and press C-m.

This is slightly different from 1.2.x where it didn't matter whether
you used $...$ or not. The corresponding 'guessing logic' was broken,
though (created a mess with $ in \mboxes), so I dropped it at some point
of time. Nowadays you need at least the initial $ (or \( or \[ for
displayed math) to convert it to 'real' math, everything else gets
converted to some kind of 'math text'.

[And for the curious: Yes, that means we have had the possibility to
create 'real' 'WYSIWYM' text mode macros for quite some while now.
However, as the macro facility needs a general face lift, I refrained
from advertising this (too much)...]

Andre'


Re: math-stuff

2004-03-17 Thread Uwe Stöhr
I wanted to change the math stuff in my book from the italic like to the 
text-like appearance. 
I marked the math stuff and clicked on the math icon in the Lyx Icon bar. This 
turns the italic math to text-like appearance
 -but apparently it is not math anymore.

So how do I do it in a proper way?
Either you mark the characters, open the math panel with a right click. 
Here you choose the font 'Roman' from the math-font menu.
Or you insert the command \mathrm in a formula and copy the characters 
in the appearing pink box.

As you are a german, you'll find this all described here:

http://wiki.lyx.org/pmwiki.php/LyX/LyXMathebefehle

(chapter 11)

regards Uwe


Re: math-stuff

2004-03-17 Thread Andre Poenitz
On Tue, Mar 16, 2004 at 11:40:39AM +0100, Wolfgang Engelmann wrote:
 could somebody tell me why I get an error by using the second equation in the 
 added lyx-file?
 
 This is the relevant part of the lyx-file:
 \layout Standard
 If I take the second equation out, dvi gives no error. 
 \layout Standard
 \begin_inset Formula R=Rh/2+(ZZ-4)
 \end_inset 
 \layout Standard
 but with this one it gives errors
 \layout Standard
 \begin_inset Formula R=Rh/2+(ZZ-4)+K_{ab} 
 \end_inset 
 I am using Lyx Version 1.3.2 Mai 2003 and Mandrake 9.2

This should read

 \begin_inset Formula $R=Rh/2+(ZZ-4)$
 \end_inset 
 \layout Standard
 but with this one it gives errors
 \layout Standard
 \begin_inset Formula $R=Rh/2+(ZZ-4)+K_{ab}$

Note the extra '$...$'.

Without these, you end up in math text mode (indicated e.g. by the
upright black text instead of 'math blue italics'). An underscore within
math text usually creates trouble.

You can convert your formulas with 'M-x math-mutate simple' (or M-m t i)
or if you have lots of them by searchreplace in the .lyx file.

Andre'


Re: math-stuff

2004-03-17 Thread Andre Poenitz
On Tue, Mar 16, 2004 at 07:20:05PM +0100, Uwe Stöhr wrote:
 I've never seen that before. This seems to be a bug. What have you done 
 to create the formulas? When you put the cursor in the formula, LyX 
 status bar says Type: none. I tried to reproduce this but failed.

One way to create this is to write text _not_ surrounded by $...$,
mark it, and press C-m.

This is slightly different from 1.2.x where it didn't matter whether
you used $...$ or not. The corresponding 'guessing logic' was broken,
though (created a mess with $ in \mboxes), so I dropped it at some point
of time. Nowadays you need at least the initial $ (or \( or \[ for
displayed math) to convert it to 'real' math, everything else gets
converted to some kind of 'math text'.

[And for the curious: Yes, that means we have had the possibility to
create 'real' 'WYSIWYM' text mode macros for quite some while now.
However, as the macro facility needs a general face lift, I refrained
from advertising this (too much)...]

Andre'


Re: math-stuff

2004-03-17 Thread Uwe Stöhr
I wanted to change the math stuff in my book from the italic like to the 
text-like appearance. 
I marked the math stuff and clicked on the math icon in the Lyx Icon bar. This 
turns the italic math to text-like appearance
 -but apparently it is not math anymore.

So how do I do it in a proper way?
Either you mark the characters, open the math panel with a right click. 
Here you choose the font 'Roman' from the math-font menu.
Or you insert the command \mathrm in a formula and copy the characters 
in the appearing pink box.

As you are a german, you'll find this all described here:

http://wiki.lyx.org/pmwiki.php/LyX/LyXMathebefehle

(chapter 11)

regards Uwe


Re: math-stuff

2004-03-17 Thread Andre Poenitz
On Tue, Mar 16, 2004 at 11:40:39AM +0100, Wolfgang Engelmann wrote:
> could somebody tell me why I get an error by using the second equation in the 
> added lyx-file?
> 
> This is the relevant part of the lyx-file:
> \layout Standard
> If I take the second equation out, dvi gives no error. 
> \layout Standard
> \begin_inset Formula R=Rh/2+(ZZ-4)
> \end_inset 
> \layout Standard
> but with this one it gives errors
> \layout Standard
> \begin_inset Formula R=Rh/2+(ZZ-4)+K_{ab} 
> \end_inset 
> I am using Lyx Version 1.3.2 Mai 2003 and Mandrake 9.2

This should read

 \begin_inset Formula $R=Rh/2+(ZZ-4)$
 \end_inset 
 \layout Standard
 but with this one it gives errors
 \layout Standard
 \begin_inset Formula $R=Rh/2+(ZZ-4)+K_{ab}$

Note the extra '$...$'.

Without these, you end up in math text mode (indicated e.g. by the
upright black text instead of 'math blue italics'). An underscore within
math text usually creates trouble.

You can convert your formulas with 'M-x math-mutate simple' (or M-m t i)
or if you have lots of them by search in the .lyx file.

Andre'


Re: math-stuff

2004-03-17 Thread Andre Poenitz
On Tue, Mar 16, 2004 at 07:20:05PM +0100, Uwe Stöhr wrote:
> I've never seen that before. This seems to be a bug. What have you done 
> to create the formulas? When you put the cursor in the formula, LyX 
> status bar says Type: none. I tried to reproduce this but failed.

One way to create this is to write text _not_ surrounded by $...$,
mark it, and press C-m.

This is slightly different from 1.2.x where it didn't matter whether
you used $...$ or not. The corresponding 'guessing logic' was broken,
though (created a mess with $ in \mboxes), so I dropped it at some point
of time. Nowadays you need at least the initial $ (or \( or \[ for
displayed math) to convert it to 'real' math, everything else gets
converted to some kind of 'math text'.

[And for the curious: Yes, that means we have had the possibility to
create 'real' 'WYSIWYM' text mode macros for quite some while now.
However, as the macro facility needs a general face lift, I refrained
from advertising this (too much)...]

Andre'


Re: math-stuff

2004-03-17 Thread Uwe Stöhr
I wanted to change the math stuff in my book from the italic like to the 
text-like appearance. 
I marked the math stuff and clicked on the math icon in the Lyx Icon bar. This 
turns the italic math to text-like appearance
 -but apparently it is not math anymore.

So how do I do it in a proper way?
Either you mark the characters, open the math panel with a right click. 
Here you choose the font 'Roman' from the math-font menu.
Or you insert the command \mathrm in a formula and copy the characters 
in the appearing pink box.

As you are a german, you'll find this all described here:

http://wiki.lyx.org/pmwiki.php/LyX/LyXMathebefehle

(chapter 11)

regards Uwe


Re: math-stuff

2004-03-16 Thread Gareth Jenkins
Wolfgang Engelmann wrote:

could somebody tell me why I get an error by using the second equation in the 
added lyx-file?
 

I too have always wondered about this.

This is the relevant part of the lyx-file:

\begin_inset Formula R=Rh/2+(ZZ-4)+K_{ab} 
 

The problem seems to be that changing the math font takes lyx out of 
math mode. What (I think) you should get is;

\begin_inset Formula $\mathrm{R=Rh/2+(ZZ-4)+K_{ab}}$

which works fine if you manually edit the lyx file.
I haven't seen anything in the FAQ or archives but then searching for 
math font problems always leads to another, more frequent FAQ.

Gareth




Re: math-stuff

2004-03-16 Thread Georg Baum
Wolfgang Engelmann wrote:

 could somebody tell me why I get an error by using the second equation in
 the added lyx-file?
 
 This is the relevant part of the lyx-file:
 \layout Standard
 If I take the second equation out, dvi gives no error.
 \layout Standard
 \begin_inset Formula R=Rh/2+(ZZ-4)

This is no valid lyx file (look at the ter. The previous line should read

\begin_inset $Formula R=Rh/2+(ZZ-4)$

(Note the dollar signs). If you want your formula in roman font, mark it and
then choose Roman from the math panel. This equation works by accident,
the second does not because it contains an underscore.

How did you create the file? If such files can be created with regular LyX
commands, please file a bug on http://bugzilla.lyx.org with a description
how it is reproducible.


Georg



Re: math-stuff

2004-03-16 Thread Gareth Jenkins
Georg Baum wrote:

(Note the dollar signs). If you want your formula in roman font, mark it and
then choose Roman from the math panel. This equation works by accident,
the second does not because it contains an underscore.
How did you create the file? If such files can be created with regular LyX
commands, please file a bug on http://bugzilla.lyx.org with a description
how it is reproducible.
 

Perhaps I have mistakenly used C-m C-m to create offending equations.
I now realise this changes the font to simple text which I'm guessing 
doesn't work with math commands.
This is a bit confusing though as it should either work or not allow 
math commands to display in the preview when the font is simple text.

Gareth




Re: math-stuff

2004-03-16 Thread Uwe Sthr
could somebody tell me why I get an error by using the second equation in the 
added lyx-file?

\layout Standard
If I take the second equation out, dvi gives no error. 
\layout Standard
\begin_inset Formula R=Rh/2+(ZZ-4)
\end_inset 
\layout Standard
but with this one it gives errors
\layout Standard
\begin_inset Formula R=Rh/2+(ZZ-4)+K_{ab} 
\end_inset 
When exporting your document to LaTeX, you will see, that the formulas 
in LyX are not formulas in LaTeX:

---
\begin{document}
If I take the second equation out, dvi gives no error.
R=Rh/2+(ZZ-4)

but with this one it gives errors

R=Rh/2+(ZZ-4)+K_{ab}

\end{document}
---
I've never seen that before. This seems to be a bug. What have you done 
to create the formulas? When you put the cursor in the formula, LyX 
status bar says Type: none. I tried to reproduce this but failed.

When inserting a formula by Insert-Math, the characters should appear 
as blue italic.

The second equation gives errors, because it is not a formula in LaTeX. 
And subscripts are not allowed in normal text.

Btw. Your can avoid the preamble stuff, when using the class 'scrbook' 
instead of 'book' and set the option 'idxtotoc' (both in the menu 
Layout-Document-Layout-Document Class/Options).

regards Uwe


Re: math-stuff

2004-03-16 Thread Gareth Jenkins
Wolfgang Engelmann wrote:

could somebody tell me why I get an error by using the second equation in the 
added lyx-file?
 

I too have always wondered about this.

This is the relevant part of the lyx-file:

\begin_inset Formula R=Rh/2+(ZZ-4)+K_{ab} 
 

The problem seems to be that changing the math font takes lyx out of 
math mode. What (I think) you should get is;

\begin_inset Formula $\mathrm{R=Rh/2+(ZZ-4)+K_{ab}}$

which works fine if you manually edit the lyx file.
I haven't seen anything in the FAQ or archives but then searching for 
math font problems always leads to another, more frequent FAQ.

Gareth




Re: math-stuff

2004-03-16 Thread Georg Baum
Wolfgang Engelmann wrote:

 could somebody tell me why I get an error by using the second equation in
 the added lyx-file?
 
 This is the relevant part of the lyx-file:
 \layout Standard
 If I take the second equation out, dvi gives no error.
 \layout Standard
 \begin_inset Formula R=Rh/2+(ZZ-4)

This is no valid lyx file (look at the ter. The previous line should read

\begin_inset $Formula R=Rh/2+(ZZ-4)$

(Note the dollar signs). If you want your formula in roman font, mark it and
then choose Roman from the math panel. This equation works by accident,
the second does not because it contains an underscore.

How did you create the file? If such files can be created with regular LyX
commands, please file a bug on http://bugzilla.lyx.org with a description
how it is reproducible.


Georg



Re: math-stuff

2004-03-16 Thread Gareth Jenkins
Georg Baum wrote:

(Note the dollar signs). If you want your formula in roman font, mark it and
then choose Roman from the math panel. This equation works by accident,
the second does not because it contains an underscore.
How did you create the file? If such files can be created with regular LyX
commands, please file a bug on http://bugzilla.lyx.org with a description
how it is reproducible.
 

Perhaps I have mistakenly used C-m C-m to create offending equations.
I now realise this changes the font to simple text which I'm guessing 
doesn't work with math commands.
This is a bit confusing though as it should either work or not allow 
math commands to display in the preview when the font is simple text.

Gareth




Re: math-stuff

2004-03-16 Thread Uwe Sthr
could somebody tell me why I get an error by using the second equation in the 
added lyx-file?

\layout Standard
If I take the second equation out, dvi gives no error. 
\layout Standard
\begin_inset Formula R=Rh/2+(ZZ-4)
\end_inset 
\layout Standard
but with this one it gives errors
\layout Standard
\begin_inset Formula R=Rh/2+(ZZ-4)+K_{ab} 
\end_inset 
When exporting your document to LaTeX, you will see, that the formulas 
in LyX are not formulas in LaTeX:

---
\begin{document}
If I take the second equation out, dvi gives no error.
R=Rh/2+(ZZ-4)

but with this one it gives errors

R=Rh/2+(ZZ-4)+K_{ab}

\end{document}
---
I've never seen that before. This seems to be a bug. What have you done 
to create the formulas? When you put the cursor in the formula, LyX 
status bar says Type: none. I tried to reproduce this but failed.

When inserting a formula by Insert-Math, the characters should appear 
as blue italic.

The second equation gives errors, because it is not a formula in LaTeX. 
And subscripts are not allowed in normal text.

Btw. Your can avoid the preamble stuff, when using the class 'scrbook' 
instead of 'book' and set the option 'idxtotoc' (both in the menu 
Layout-Document-Layout-Document Class/Options).

regards Uwe


Re: math-stuff

2004-03-16 Thread Gareth Jenkins
Wolfgang Engelmann wrote:

could somebody tell me why I get an error by using the second equation in the 
added lyx-file?
 

I too have always wondered about this.

This is the relevant part of the lyx-file:

\begin_inset Formula R=Rh/2+(ZZ-4)+K_{ab} 
 

The problem seems to be that changing the math font takes lyx out of 
math mode. What (I think) you should get is;

\begin_inset Formula $\mathrm{R=Rh/2+(ZZ-4)+K_{ab}}$

which works fine if you manually edit the lyx file.
I haven't seen anything in the FAQ or archives but then searching for 
"math font" problems always leads to another, more frequent FAQ.

Gareth




Re: math-stuff

2004-03-16 Thread Georg Baum
Wolfgang Engelmann wrote:

> could somebody tell me why I get an error by using the second equation in
> the added lyx-file?
> 
> This is the relevant part of the lyx-file:
> \layout Standard
> If I take the second equation out, dvi gives no error.
> \layout Standard
> \begin_inset Formula R=Rh/2+(ZZ-4)

This is no valid lyx file (look at the ter. The previous line should read

\begin_inset $Formula R=Rh/2+(ZZ-4)$

(Note the dollar signs). If you want your formula in roman font, mark it and
then choose "Roman" from the math panel. This equation "works" by accident,
the second does not because it contains an underscore.

How did you create the file? If such files can be created with regular LyX
commands, please file a bug on http://bugzilla.lyx.org with a description
how it is reproducible.


Georg



Re: math-stuff

2004-03-16 Thread Gareth Jenkins
Georg Baum wrote:

(Note the dollar signs). If you want your formula in roman font, mark it and
then choose "Roman" from the math panel. This equation "works" by accident,
the second does not because it contains an underscore.
How did you create the file? If such files can be created with regular LyX
commands, please file a bug on http://bugzilla.lyx.org with a description
how it is reproducible.
 

Perhaps I have mistakenly used C-m C-m to create offending equations.
I now realise this changes the font to simple text which I'm guessing 
doesn't work with math commands.
This is a bit confusing though as it should either work or not allow 
math commands to display in the preview when the font is simple text.

Gareth




Re: math-stuff

2004-03-16 Thread Uwe Stöhr
could somebody tell me why I get an error by using the second equation in the 
added lyx-file?

\layout Standard
If I take the second equation out, dvi gives no error. 
\layout Standard
\begin_inset Formula R=Rh/2+(ZZ-4)
\end_inset 
\layout Standard
but with this one it gives errors
\layout Standard
\begin_inset Formula R=Rh/2+(ZZ-4)+K_{ab} 
\end_inset 
When exporting your document to LaTeX, you will see, that the formulas 
in LyX are not formulas in LaTeX:

---
\begin{document}
If I take the second equation out, dvi gives no error.
R=Rh/2+(ZZ-4)

but with this one it gives errors

R=Rh/2+(ZZ-4)+K_{ab}

\end{document}
---
I've never seen that before. This seems to be a bug. What have you done 
to create the formulas? When you put the cursor in the formula, LyX 
status bar says Type: none. I tried to reproduce this but failed.

When inserting a formula by Insert->Math, the characters should appear 
as blue italic.

The second equation gives errors, because it is not a formula in LaTeX. 
And subscripts are not allowed in normal text.

Btw. Your can avoid the preamble stuff, when using the class 'scrbook' 
instead of 'book' and set the option 'idxtotoc' (both in the menu 
Layout->Document->Layout->Document Class/Options).

regards Uwe