I posted at patch at bugzilla for 675, which implements Jean-Marc's suggestion to \protect the graphic if inside the caption (or any other running arg). It works as predicted.
The discussion at the bug report made me think about caption handling again. The relevant code is in breakParagraph in text.C. In short, it goes as follows: - A float inset has only one caption to start with - If you try to break a caption paragraph, only one of the halves will be of caption type; the other half will be reset to default. - With cursor at position 0, the top half will be reset (ready for graphic insertion) - With cursor elsewhere, the bottom half will be reset, and the cursor postioned at its start. More logical would be the following: - with cursor final position, the bottom half is reset, and the cursor positioned at the start of the empty paragraph, ready for tabular insertion. - with the cursor in-between 0 and end -- think! What do you think the user wants? I believe that here it would be appropriate to enter a newline inset, and exit breakParagraph. That's what a user pressing Enter here is most likely trying to achieve. We should honour that. Does this sound like an idea (yes, it's adding more special code :-( ) Of course if we move to using a caption inset (on what timetable? It looks good!) we should do it inside there. Might even be easier still. - Martin
pgpMXGeyVRlmO.pgp
Description: PGP signature