On Mon, Nov 04, 2002 at 07:29:26PM +0200, Dekel Tsur wrote:
> It shouldn't be much of problem. The solution is to do something similar
> to what is done when pressing ctrl+b inside \mathbf inset:
> When the user inserts any math element inside \textrm,
> lyx should exit the \textrm inset if the cursor is at the end of the inset,
> and otherwise the inset should be broken into two.

IMHO this is the *wrong thing*. Instead you really should be putting a math
inset in a text inset (or vica versa). Usally want is math inside text inside
math, for example $x^2<x\qquad\hbox{for all $x<1$}$. The $x<1$ is part of the
text in my \hbox not part of the rest of the equation and should be respented
as such to TeX. Doing it this way would also simplify correctly handling things
like \halign inside math mode material. I have resorted to in cases along the
lines of
$$\halgin{\hfil$#$&${}=#$\qquad\hfil&#\cr
x & y^2\cr
& z^6 & ($y=z^3$ by lemma 17)\cr
& 42 & (result 7)\cr}$$
especailly when the RHS might be long enough to sometimes need to also use the
column for the reasons to fit nicely.

Also beware of Andre's hard coded behaviour because of examples like ${\rm
queue\ length}=\#\{ n \mid x(n)<42 \}$ where it would probably be better not to
turn the space into text. Putting queue length in a text box is excusable and
probably produces the same result in most cases (if \mathsrround != 0pt then I
have by doubts).

-- 
Duncan (-:
"software industry, the: unique industry where selling substandard goods is
legal and you can charge extra for fixing the problems."


Reply via email to