On Thu, Feb 02, 2006 at 09:09:40AM +0100, Helge Hafting wrote:
> Marc D. wrote:
> 
> >I have created a rather large lyx file (all my course notes). In one
> >section, I can't get it to work. I have reduced the problem to a
> >minimum. There are 3 characters on my screen, in two lines.
> >
> >I get SIX errors with those 3 characters.
> >
> >Answer: it's the \textmf that causes ALL six errors. (and all 35
> >errors in my original file). All from a a single, obviously
> >misplaced, \textmf tag that I DID NOT INSERT (or knowingly insert. I
> >don't USE different fonts in my document!)
> >
> Seems you have found a bug in lyx, then.
> 
> When I write 2^Q (in math mode), I get something that works.  However,
> if I select the formula and change the font, I do get the same problem
> as you.  This problem exists in lyx 1.4 too.
> 
> If, however, I write 2^Q as text, then select it and press ctrl+M (to
> turn it into a formula, then I also get that problem. This time
> without doing any font change.  This problem does not exist in the
> soon to be lyx 1.4, so it will go away.
> 
> So I suggest, as a workaround, that you press ctrl+M first, then type
> your formula in math mode. 

Or type '$2^Q' as text, mark it, press C-m.

> >Why doesn't LyX do the right thing when converting said text to
> >LaTeX?
> 
> Error in lyx.

I could argue about that.

> >Why, when I erased the entire paragraph containing this string and
> >retyped it, did the textmf string REAPPEAR in exactly the same
> >place?? I had to go into the lyx file and manually delete the bugger.
> 
> You probably type it the same way every time - I guess you write your
> formulas as text, then converts it to math?  That technique doesn't
> work in lyx 1.3.4, although it is fixed in lyx 1.4.

It works when done properly, i.e. wrapped in $...$ or \[...\]
(or at least prefixed by $ or \[)

Andre'

Reply via email to