Message Boards Message Boards

Format the line spacing of an input cell?

Posted 5 years ago

In 11.3 on OS X High Sierra, if I want to change the font size of the code in an input cell, I can easily do that with the notebook's stylesheet by choosing the "Input" style and using the Option Inspector to change the font size.

However, when I try to adjust the line spacing, the same approach does not work (it's as if the LineSpacing option under "Text Layout Options" has no effect).

I can change the line spacing by editing the cell directly, using Cell->Show Expression and manually typing in the option

LineSpacing->{1,0}

But I don't want to do this manually for all Input cells. I suspect there must be some other way to control the line spacing for all Input Cells in a notebook, but I can't find where it is documented. Any pointers would be appreciated.

Thanks.

POSTED BY: Andrew
2 Replies

In the Options Inspection, under Cell Options -> Display Options there is a setting for CellMargins.

Will that work for you?

POSTED BY: A J Hardesty
Posted 5 years ago

Unfortunately, no. CellMargins affects the space to the left, right, top and bottom of a cell. I want to affect the line/paragraph spacing within an input cell.

POSTED BY: Andrew
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract