I know that I can close a notebook and open it again in order to remove the In/Out labels. What I would like to know is if there is another easy way of removing these labels without having to close the notebook. Actually I just want to hide them from my printouts.

It seems to me like it should be a printing option, but I can't find it.

  • $\begingroup$ Thank you Mike, Heike & Spartacus for your great answers! $\endgroup$ – Gustavo Delfino Feb 2 '12 at 13:33

You can set this in a style sheet so that it is done once and you don't have to do it again:

Cell[StyleData[All, "Printout"], ShowCellLabel -> False]

or can you programmatically add this private style to your notebook:

 StyleDefinitions -> 
  Notebook[{Cell[StyleData[StyleDefinitions -> "Default.nb"]], 
    Cell[StyleData[All, "Printout"], ShowCellLabel -> False]},
   StyleDefinitions -> "PrivateStylesheetFormatting.nb"]

If you are unfamiliar with editing style sheets that latter option is probably the best.

  • $\begingroup$ Looks like you already posted the same solution as me while I was still editing my answer. $\endgroup$ – Heike Feb 1 '12 at 22:33
  • $\begingroup$ @Heike. yes. the only difference is that I would not make the change for Input>Printout and Output>Printout I would do it for the style environment name Printout so it covers all print cells. $\endgroup$ – Mike Honeychurch Feb 1 '12 at 22:37
  • $\begingroup$ That's probably the easiest solution, provided you haven't used labels on other cells. $\endgroup$ – Heike Feb 1 '12 at 22:46

preference window with the requested option highlighted

  • $\begingroup$ that setting suppresses In/Out in the working environment as well whereas the OP seems to want to remove them just from printouts (I guess he could toggle off when printing ...which is pretty straight forward) $\endgroup$ – Mike Honeychurch Feb 1 '12 at 22:47
  • $\begingroup$ @Mike fair point; I voted for yours. $\endgroup$ – Mr.Wizard Feb 1 '12 at 22:57
  • $\begingroup$ toggling on/off via the preferences panel is probably easier actually -- much easier than setting styles so I'll vote for your answer. $\endgroup$ – Mike Honeychurch Feb 1 '12 at 23:04
  • 2
    $\begingroup$ As of Version 11.1 this preference dialog seems to have vanished. So it is down to the Option Inspector it seems. $\endgroup$ – gwr Mar 26 '17 at 21:47
  • $\begingroup$ @gwr That's a little disappointing. I wonder if it was removed by choice, by oversight, or by design. Does the Option Inspector setting still work as intended? $\endgroup$ – Mr.Wizard Mar 26 '17 at 22:16

You could uncheck ShowCellLabel under Cell Options > Cell Labels in the Option Inspector.

If you only want to turn off input and output cells in the printing environment, you could edit the style sheet of the document.

  • In order to do that you choose Edit Stylesheet... in the format menu.
  • Click on the link to the base definition of the style sheet and copy and paste the cell 'Local definition for style "Input" in style environment "Printout"' from the base definition to the private style definitions,
  • Select the cell and check Show Expression from the Cell menu and add the option ShowCellLabel->False,
  • Uncheck Show Expression and repeat for the "Output" style in the Printout style environment.
  • $\begingroup$ Is this settable on a per environment basis, i.e. working vs. printing? $\endgroup$ – rcollyer Feb 1 '12 at 22:16
  • $\begingroup$ @rcollyer you could edit the style sheet if you only want to turn off labels in the printing environment. $\endgroup$ – Heike Feb 1 '12 at 22:24

Your Answer

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

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