In Mathematica, when an option is specified multiple times with different values, the first one will take precedence. This works with Cell
and Background
:
CellPrint@Cell["asd", "Text", Background -> Red, Background -> Blue]
However, with the CellLabel
option, the last one seems to take precedence. This is unique and unusual. Is this a bug, or intentional? Is there any reason why it should be like this? Are there other options with such behaviour?
CellPrint@Cell["asd", "Text", CellLabel -> "one", CellLabel -> "two"]
CellLabels
but where to switch them on again? It used to be in thePreferences
(like so) but it is not anymore. Where has that menu gone? $\endgroup$SetOptions[EvaluationNotebook[], ShowCellLabel -> True]
there we go. $\endgroup$Association
is used to represent large chunks of options internally: WithOptions
usually a symbol is changed by a rule and therefore a later rule will not affect it anymore. WithAssociation
the last value given to aKey
counts. $\endgroup$Background
option in the post. $\endgroup$