# How do I write small "black board" c1, c2, ... constants?

New for Mathematica 12(?) seems to be a formatted "black board" style of the former C[1], C[2], ... constants in Mathematica 11. How do I type these with formatting at input? C[1] etc. still works, but how to write it formatted? I could not find it in the escape sequence list. TIA.

• You could try typing C[1] as usual, highlight it, and then evaluate it in place with Ctrl+Shift+Enter. Aug 27, 2020 at 17:28
• The actual box form is TemplateBox[{"i"}, "C"] so you can always copy, paste, and edit that. If you're working with formulae and are gonna send them through the FE you can do Format[Subscript[\[ConstantC], i_]] := RawBoxes@TemplateBox[{ToBoxes[i]}, "C"]; and then use that form and have it spit out the appropriate C[i] form after evaluation. You can also add MakeExpression[SubscriptBox["\[ConstantC]", i_], _] := C[ToExpression[i]] to make it a proper alias of C[i] or modify InputAliases to give you TemplateBox[{"\[Placeholder]"}, "C"]. Aug 27, 2020 at 17:33
• @J.M.: That was very interesting. I did not know of the "in line" evaluation of an expression. Thank you.
– mf67
Aug 27, 2020 at 17:39

You could use InputAutoReplacements so that c1 gets automatically converted:
CurrentValue[EvaluationNotebook[], {InputAutoReplacements,"c1"}] = TemplateBox[{"1"},"C"];

or you could use InputAliases so that you need to use the Esc key as usual:
CurrentValue[EvaluationNotebook[], {InputAliases,"c2"}] = TemplateBox[{"2"}, "C"];