The 'labels' for input and output are generated upon evaluation by the kernel and are not notebook specific. I do not think that this is what OP is after with text cells (I might be wrong). I would assume the question is about notebook/cell specific CellFrameLabels
like the ones used by DisplayFormulaNumbered
. An alternative approach I will not discuss here would be to set CellLabel
manually (this is done for Input
and Output
cells automatically by the kernel/frontend).
Regarding Q1: I am not sure how to archive this but it might be possible to set CellFrameLabels
manually.
I have however an answer for Q2: one can archive this quite easily be replicating the the cell style of DisplayFormulaNumbered
. Here is an example for a style definition TextCellNumbered
inheriting from Text
and using a counter similar to the one used by DisplayFormulaNumbered
:
Cell[StyleData["TextCellNumbered", StyleDefinitions -> StyleData["Text"]],
MenuSortingValue->1401,
CounterIncrements->"TextCellNumbered",
CellFrameLabels->{{None,Cell[TextData[{"(",CounterBox["TextCellNumbered"],")"}],"TextCellNumber"]}, {None, None}}
]
If one places this into a style sheet or embedded notebook style definitions (The simplest way to do so is to use the menu "Format->Edit Stylesheet", then use "Customize Inherited Style" or "Add a New Style" to create a Cell in the style sheet and then mark the cell and use STR+SHIFT+E or the menu "Cell->Show Expression" to edit/paste the code given above directly into the cell expression. To apply the edited changes to the cell revert "Cell->Show Expression") one can use TextCellNumbered
to get something like
Some possible extensions and improvements could involve: assigning a MenuCommandKey
to this style to insert it with a shortcut (ALT+Number) or to change the appearance/style of the label in CellFrameLabels
with other brackets or to include the chapter number in the label with CounterBox["Chapter"]
(and setting CounterAssignments->{{"TextCellNumbered", 0}}
in the style for Chapter
).