Alfredo Braunstein wrote: > Alfredo Braunstein wrote: > >> Jose' Matos wrote: >> >>> - xforms, using ERT to see how it works with Alfredo's patch, I >>> guess there is some kind of off by one error, see attached image. >>> The last character is hidden by the scroll bar. Other than that I >>> really like the > > Well, it turns out that this is not a trivial bug, but something > structural with the drawing scheme we'd have to sort out. The > problem is the following: in a paragraph with first indented line, > the avail space is something like > > <------- f -----> > xxxxxxxxxxxxxxxxx > xxxxxxxxxxxxxxxxxxxxxxxxx > xxxxxxxxxxxxxxxxxxxxxxxxx > xxxxxxxxxxxxxxxxxxxxxxxxx > <----------- w ---------> > > > Now suppose the first x is a text inset. > The inset gets passed in the metrics step a maxwidth of w, and not > f. (which may be correct, because if the inset is on the second x > and is wide enough, we would expect the first x go alone in the > first row, and the inset take the full second row). And this results > on the inset being drawn starting in the first x but having width > approx. w (and so it is too wide). > > I don't see a simple (not too special cased) solution to the > problem. > > Comments and/or solutions welcomed. If you need further > clarifications just ask.
If you add a couple of paragraphs around the ERT inset, so, you'll get this (Actually, you won't. At least here. Try typing the 'para2' stuff in para3, then close the ERT inset, go to the start of the 'para2' stuff and delete the intervening hard return by hitting the delete backspace key. Now try and open the ERT inset. You can't. All is Ok if the ERT inset is open before the two paras are merged.) That to one side for the moment... Here I have a lyx screen so: para1 para1 para1 para1 para1 para1 para1 para1 para1 para1 para1 para1 para1 para1 para1 para1 para1 para1 para1 para1 para1 para1 para1 para1 para1 para1 para1 para1. ERT | 12345678901234567890123456789012 | | 34567890123456789012345678901234 | | 56789012345678901234567890123456 | | 78901234567890 | para2 para2 para2 para2 para2 para2 para2 para2 para2. para3 para3 para3 para3 para3 para3 para3 para3 para3 para3 para3 para3 para3 para3 para3 para3 para3 para3 para3 para3 para3. Ie, the ERT inset should just be told that the available width is 'f', not 'w' and all will be well. Or at least as well as the 'an inset is a single box' model will allow. What am I missing? -- Angus