Opened 22 years ago

Closed 16 years ago

#1435 closed defect (fixed)

mathed treats formulas within other formulas as \mbox

Reported by: Uwe Stöhr Owned by: poenitz
Priority: high Milestone: 1.6.3
Component: mathed Version: 1.4.0
Severity: normal Keywords:
Cc: forenr

Description (last modified by Juergen Spitzmueller)

When using boxes in formulas you have to insert an extra formula in the
argument of a box. When you try to do this with pressing M-m, mathed produces a
\textrm environment, which causes LaTeX-errors.

This bug was once reported for \framebox: #924

This bug occurs with \colorbox, \fcolorbox, \raisebox and \makebox
but doesn't appear with \fbox and \mbox, see the attachment.

Attachments (1)

newfile1.lyx (2.3 KB ) - added by Uwe Stöhr 22 years ago.
testcase

Download all attachments as: .zip

Change History (15)

by Uwe Stöhr, 22 years ago

Attachment: newfile1.lyx added

testcase

comment:1 by Uwe Stöhr, 22 years ago

Summary: mathed treats formulas within boxes as \textrm mathed treats formulas within boxes as \textrm

It would be nice if the extra formula is automatically created when entering a
box-command in mathed (except for \boxed because there it's is done by AMSmath).

comment:2 by Uwe Stöhr, 21 years ago

Version: 1.3.21.3.3

Could somebody please have a look at it?
It frets me nearly every day and should be easy to fix, see #924.

I would do this by myself but don't know C/C++.
Sorry if I'm nerving.

comment:3 by Uwe Stöhr, 21 years ago

Summary: mathed treats formulas within boxes as \textrmmathed treats formulas within other formulas as \textrm

It is a general problem of mathed, that it isn't possible to create a formula
inside a formula. But this is sometimes necessary, like for the boxes listed in
comment 0.

It is also not possible to create the formula with the char '$', because mathed
has no ERT-mode. (but this is another restriction)

comment:4 by Lars Gullik Bjønnes, 20 years ago

Is this a valid or invalid bug André

comment:5 by Uwe Stöhr, 19 years ago

Version: 1.3.31.3.7

Still my favorite bug.

comment:6 by Uwe Stöhr, 19 years ago

blocked: 1452

comment:7 by Uwe Stöhr, 19 years ago

blocked: 2466

comment:8 by Uwe Stöhr, 19 years ago

Summary: mathed treats formulas within other formulas as \textrmmathed treats formulas within other formulas as \mbox
Version: 1.3.71.4.0

In LyX 1.4.0 LyX treats formulas inside formulas as \mbox:

The sequence "S-C-m C-m a" leads to this LaTeX code:
\[\mbox{a}\]
instead of
\[$a$\]

Formulas inside formulas are needed for \framebox and \fbox, see #2466.

comment:9 by Georg Baum, 19 years ago

Milestone: 1.5.0

Part of the general text-in-math problem, so it will not be fixed before 1.5.0.

comment:10 by Georg Baum, 18 years ago

Keywords: fileformat added
Milestone: 1.5.01.6.0

Postponing. Making the existing InsetMathMBox work is too much for 1.5.0.

comment:11 by Juergen Spitzmueller, 17 years ago

Milestone: 1.6.01.7.0

comment:12 by forenr, 16 years ago

Cc: forenr added
Keywords: fixedintrunk added; fileformat removed
Milestone: 2.0.01.6.3

The problem discussed in this report is already solved in 1.6.
After r29746 it is now possible using Ctrl-m for entering math mode when the
cursor is in a text-in-math environment. So, marking as fixedintrunk.

comment:13 by forenr, 16 years ago

Keywords: fixedinbranch added

Fixed in branch at r29748.

comment:14 by Juergen Spitzmueller, 16 years ago

Description: modified (diff)
Keywords: fixedintrunk fixedinbranch removed
Resolution: fixed
Status: newclosed

LyX 1.6.3 is ready.

Note: See TracTickets for help on using tickets.