0
$\begingroup$

When I paste an image into a notebook the cell has no label. In the Generalized Input Tutorial:

https://reference.wolfram.com/language/tutorial/GeneralizedInput.html#52003380

they show pasted images which have labels. Why are my pasted images without labels? The other cells in my notebook have labels and I have ShowCellLabels turned on.

$\endgroup$
1
  • $\begingroup$ the images do not have labels. click on one and save it. $\endgroup$ Mar 1, 2016 at 22:44

2 Answers 2

1
$\begingroup$

According to the Documentation, you should set CellLabelAutoDelete -> False for making cell labels permanent:

Create a notebook with the setting CellLabelAutoDelete -> False:

nb = CreateDocument[{ExpressionCell[Defer[1 + 1], "Input"], 
   ExpressionCell[Defer[2 + 2], "Input"]}, CellLabelAutoDelete -> False]

When inputs are evaluated, cell labels are attached to the input and output cells:

SelectionMove[nb, All, Notebook]; SelectionEvaluate[nb]

Because CellLabelAutoDelete is turned off, editing an input does not reset its cell label. Neither does saving and reopening the notebook.

$\endgroup$
0
$\begingroup$

"In/Out" labels are created, roughly, when you evaluate/create cells. And according to CellLabelAutoDelete documentation:

If you edit a previously evaluated input cell, its cell label is cleared

That's what is happening when you paste copied image. A default cell is created, with a label, but then the cell is edited by pasting your image. This clears the label.

Examples from the link you've provided are consistent with this. Every cell was evaluated after pasting images, that's why those labels appeared again.

$\endgroup$

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.