Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like all new Input and Output cells, in fact all new cells including section headers and such, to have a specific stylistic property (CellBracketOptions -> {"Color" -> MyFavoriteColor}).

This is easy enough to do with CurrentValue[$FrontEnd,...]=.... However, I want this behavior to be exhibited only by new cells created in a specific *Mathematica** installation. I.e. a notebook generated elsewhere should look like it would in a default Mathematica FrontEnd, and only new cells created in this Mathematica installation should have the new property.

My use case here is that I have a notebook that I would like to use for collaborations, where each person would be assigned a color, and when they use their copy of Mathematica the cells they enter would automatically have a distinctly colored cell bracket. When exchanging this notebook, the cells authored by each user would be readily identifiable by their cell bracket color.

share|improve this question

This is how you can customize given notebook. Needs some testing but seems to work.

It distinguishes users based on $UserName but you can use $MachineID or whatever.

CurrentValue[ EvaluationNotebook[], {TaggingRules, "Collaborators"}] = {
   "Kuba" -> Orange, "Friend" -> Red};

  CellDynamicExpression :> Refresh[
    With[{col = CurrentValue[EvaluationNotebook[], {TaggingRules, "Collaborators"}]}
        MemberQ[First /@ col, $UserName]
              SetOptions[#, CellDynamicExpression -> None];
              CurrentValue[#, {CellBracketOptions, "Color"}] = ($UserName /. col)
        ] &@EvaluationCell[]
 ]], None]]

enter image description here

share|improve this answer

Your Answer


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.