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. Then it will work. You may also note that a
formula _not_ using
the troublesome \textrm will show up as blue in the lyx window, where the
wrong formulas are black.
I have just manually removed the \textmf from the .lyx file and now
it works.
Questions:
What key sequence would have inserted \textmf when ANY occurence of
such text causes so many errors?
Why doesn't LyX do the right thing when converting said text to LaTeX?
Error in lyx.
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. I recommend that you do it the other way;
Activate math mode first (press ctrl+M or use the menus) then type in
the formula.
Helge Hafting