Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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.

share|improve this question
    
Thank you Mike, Heike & Spartacus for your great answers! –  Gustavo Delfino Feb 2 '12 at 13:33
add comment

3 Answers 3

up vote 16 down vote accepted

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:

SetOptions[EvaluationNotebook[], 
 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.

share|improve this answer
    
Looks like you already posted the same solution as me while I was still editing my answer. –  Heike Feb 1 '12 at 22:33
    
@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. –  Mike Honeychurch Feb 1 '12 at 22:37
    
That's probably the easiest solution, provided you haven't used labels on other cells. –  Heike Feb 1 '12 at 22:46
add comment

preference window with the requested option highlighted

share|improve this answer
    
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) –  Mike Honeychurch Feb 1 '12 at 22:47
    
@Mike fair point; I voted for yours. –  Mr.Wizard Feb 1 '12 at 22:57
    
toggling on/off via the preferences panel is probably easier actually -- much easier than setting styles so I'll vote for your answer. –  Mike Honeychurch Feb 1 '12 at 23:04
add comment

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.
share|improve this answer
    
Is this settable on a per environment basis, i.e. working vs. printing? –  rcollyer Feb 1 '12 at 22:16
    
@rcollyer you could edit the style sheet if you only want to turn off labels in the printing environment. –  Heike Feb 1 '12 at 22:24
    
+1 for style sheets! –  Mr.Wizard Feb 1 '12 at 22:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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