# How to preserve In/Out tags like what they did in documentation files

Every evaluation generates a pair of In[n]/Out[n] signs tagged before actual input and output. Like the following:

If I save the file, close it and re-open it, that In[n]/Out[n] signs will disappear (as expected). Like the following:

However, A code example in documentation file will always have its In[n]/Out[n] signs no matter you have computed that piece of code or not. Like the following:

My question is: How to perserve the In[n]/Out[n] signs generated by computation even if I re-open the same file on a fresh kernel? Like what it looks like for documentation files.

Maybe it is necessary to use DumpSave like stated in this question?

Besides, how to access stylesheet of documentation files? If I can apply that style to my code notes would be great.

-
The documentation notebooks have Savable -> False, so you can edit but not save them. So all you need to do is to start with a clean kernel (Quit), evaluate the notebook, save and then set Saveable to False. – R. M. Jul 8 '14 at 5:36
@rm-rf hrmm... answer? – Yves Klett Jul 8 '14 at 7:09
@YvesKlett Can't use mma right now, so no dice. Please feel free to post it as an answer after verifying that it does work... I'm not sure I got the steps in the right order :) – R. M. Jul 8 '14 at 7:13
@rm-rf Thank you for your advice. But I don't think it's a Saveable problem. (Or maybe you can enlighten me more precisely?) I have re-phrased my question. Hope it is clearer now? – Naitree Jul 8 '14 at 7:39
@Naitree I was wrong then :) Mike's answer is the correct one – R. M. Jul 8 '14 at 7:48

You need to set CellLabelAutoDelete->False

You can do this programmatically:

SetOptions[EvaluationNotebook[],CellLabelAutoDelete->False]

or set it in your stylesheet.

-
Many thanks. A simple setting saved my day! :) – Naitree Jul 8 '14 at 7:48