When I insert an InlineCell into a TextCell that is too long for the whole InlineCell to fit on the current line,Mathematica pushes the whole InlineCell to the beginning of the next line. That is, Mathematica seems to prefer dropping the InlineCell to the next line over inserting a line break within it. Can I force Mathematica to fit as much of an InlineCell on a line as possible and put as little as possible on the next line?

I have played around with LinebreakAdjustments for the InlineCell and the containing cell by setting various values to 0, but have not been able to produce the behavior I would like.

Edit: If I do not modify LinebreakAdjustments for the inline cell or modify any element besides the first (leaving the first element untouched), I get results like this (blue is an InlineCell):

enter image description here

If I set the first element of LinebreakArguments (of the InlineCell) to 0 I obtain somewhat predictable behavior:

enter image description here

Below is the behavior I am trying to produce. I've just styled the text rather than use an inline cell:

enter image description here

  • 3
    $\begingroup$ It seems an inline cell must be in a rectangle area, so the format you want might not be able to achieve by a single inline cell. $\endgroup$ – Silvia Apr 19 '13 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.