I don't like how initialization (or "Code"
) cells are formatted in notebooks, namely the grey background color and the spacing/wrapping settings. I want to make them look exactly as if they were normal input cells (other than the Dingbat). However, I need to use them to later export my notebooks as .wls files.
My best attempt so far is to set new cells to be Initialization Cells by default, using the Options inspector in the Format menu, and setting InitializationCellStyle
to something different than the default "InitializationCell"
value.
This is:
Format ► Options Inspector ► Global Options ► Cell Options ► Evaluation Options ► IntitializationCell = True
Format ► Options Inspector ► Global Options ► Cell Options ► Display Options ► Private Cell Options ► InitializationCellStyle = ""
This successfully makes new cells be created as Initialization Cells with the usual "Input"
format. However, cells that are already formatted as "Code"
cells will not fully revert to the original format (only the background color seems to revert to white).
I have also tried other values for InitializationCellStyle
such as "Input"
, but most seem to have the same behavior. I have not been able to find documented possible values for that setting.
I have many different files that I would like to convert to the normal format without needing to copy the cells to new ones.
Is there any way to revert cells already formatted as "Code"
to the original "Input"
format?