4
$\begingroup$

Just upgraded from V9 to V11 and the style for the cell labels In[xx]:= and Out[xx]= has changed. In addition, the default font for inputs and outputs have also changed. For continuity reasons, I would like to create a stylesheet that I can set as my default in V11 based on the styles of V9. My questions are 1)Is there an easy way to find what these styles were? If I can find that out, how does one change the In/Out cell label styles? I see CellLabelStyle in the style inspector but no option to enter or change there or in the page where we can create new stylesheet. Thank you.

$\endgroup$
1

1 Answer 1

4
$\begingroup$

To change your cell label styles at a notebook level, go to Format > Edit Stylesheet. Then in your stylesheet enter exactly CellLabel in the 'Enter a style name' input field. This will then allow you to apply all the usual formatting options to cell labels.

Stylehsheet

Alternatively, you can use the Option Inspector. Open the Option Inspector and change the first dropdown (Show option values) to 'Global Preferences'. Then search for CellLabelStyle. Click inside it's value and you can type in a new style. This new style can either be an inbuilt style (e.g. "Text", "Section"), or it can be a custom set of inputs (e.g. {Italic, 12, RGBColor[{1, 0, 0}]}.

Option Inspector

For more information on stylesheets, this tutorial has a lot of useful tips: https://reference.wolfram.com/language/tutorial/WorkingWithStylesheets.html

$\endgroup$
3
  • $\begingroup$ My error was not to select global preferences! Thank you. Now, I have not been able to find the detail of what the V9 style settings were. Is there a way? $\endgroup$
    – user58641
    Commented Dec 2, 2016 at 19:11
  • 1
    $\begingroup$ Unfortunately if you want to preserve the font Courier for Input this way, that does not work. You stay with Consolas despite Courier in Default.nb. In order to change the font for Input, use CurrentValue[$FrontEnd, {StyleHints, "CodeFont"}] = "Courier" instead. (I got this trick from a friendly supporter of WRI, it was not grown on my own flowerbed). $\endgroup$ Commented Jan 26, 2017 at 11:20
  • 1
    $\begingroup$ This answer should be updated to instead suggest using Directive[Italic, 12, RGBColor[{1,0,0}]]. This form always worked, but it's required in modern versions because CellLabelStyle->{items...} is now interpreted to mean something different. See reference.wolfram.com/language/ref/CellLabelStyle.html for details. $\endgroup$
    – John Fultz
    Commented Jul 12, 2021 at 22:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.