Skip to main content
very minor
Source Link
Carl Woll
  • 132.7k
  • 6
  • 253
  • 366

The example cells in the documentation each have a count of the cells inside their section:

 Cell[TextData[{"Basic Examples", "  ", Cell["(4)", "ExampleCount"]}], "ExampleSection", "ExampleSection"] 

But this is static content, how exactly would this work dynamically? I'd like to make my own cell style where the cell dingbat counts the number of cells inside the cell group it contains (and updates itself dynamically of course).

I've looked at the stylesheet for outline-styled notebooks and then tried using the Counter* options, but these are for dynamic tallying, not content counting and there's not much documentation on these esoteric front-end things like

CounterBoxOptions->{CounterFunction:>CapitalRomanNumeral}] 

Any help would be appreciated.

enter image description here

The example cells in the documentation each have count of the cells inside their section:

 Cell[TextData[{"Basic Examples", "  ", Cell["(4)", "ExampleCount"]}], "ExampleSection", "ExampleSection"] 

But this is static content, how exactly would this work dynamically? I'd like to make my own cell style where the cell dingbat counts the number of cells inside the cell group it contains (and updates itself dynamically of course).

I've looked at the stylesheet for outline-styled notebooks and then tried using the Counter* options, but these are for dynamic tallying, not content counting and there's not much documentation on these esoteric front-end things like

CounterBoxOptions->{CounterFunction:>CapitalRomanNumeral}] 

Any help would be appreciated.

enter image description here

The example cells in the documentation each have a count of the cells inside their section:

 Cell[TextData[{"Basic Examples", "  ", Cell["(4)", "ExampleCount"]}], "ExampleSection", "ExampleSection"] 

But this is static content, how exactly would this work dynamically? I'd like to make my own cell style where the cell dingbat counts the number of cells inside the cell group it contains (and updates itself dynamically of course).

I've looked at the stylesheet for outline-styled notebooks and then tried using the Counter* options, but these are for dynamic tallying, not content counting and there's not much documentation on these esoteric front-end things like

CounterBoxOptions->{CounterFunction:>CapitalRomanNumeral}] 

Any help would be appreciated.

enter image description here

Tweeted twitter.com/#!/StackMma/status/564922974244184064
added 226 characters in body
Source Link
M.R.
  • 31.9k
  • 9
  • 102
  • 299

The example cells in the documentation each have count of the cells inside their section:

 Cell[TextData[{"Basic Examples", "  ", Cell["(4)", "ExampleCount"]}], "ExampleSection", "ExampleSection"] 

But this is static content, how exactly would this work dynamically? I'd like to make my own cell style where the cell dingbat counts the number of cells inside the cell group it contains (and updates itself dynamically of course). 

I've looked at the stylesheet for outline-styled notebooks and then tried using the CounterBoxCounter* options, but that is morethese are for dynamic tallying, not sectioncontent counting... any and there's not much documentation on these esoteric front-end things like

CounterBoxOptions->{CounterFunction:>CapitalRomanNumeral}] 

Any help would be appreciated.

enter image description here

The example cells in the documentation each have count of the cells inside their section:

 Cell[TextData[{"Basic Examples", "  ", Cell["(4)", "ExampleCount"]}], "ExampleSection", "ExampleSection"] 

But this is static content, how exactly would this work dynamically? I'd like to make my own cell style where the cell dingbat counts the number of cells inside the cell group it contains (and updates itself dynamically). I've tried using CounterBox but that is more for dynamic tallying, not section counting... any help would be appreciated.

enter image description here

The example cells in the documentation each have count of the cells inside their section:

 Cell[TextData[{"Basic Examples", "  ", Cell["(4)", "ExampleCount"]}], "ExampleSection", "ExampleSection"] 

But this is static content, how exactly would this work dynamically? I'd like to make my own cell style where the cell dingbat counts the number of cells inside the cell group it contains (and updates itself dynamically of course). 

I've looked at the stylesheet for outline-styled notebooks and then tried using the Counter* options, but these are for dynamic tallying, not content counting and there's not much documentation on these esoteric front-end things like

CounterBoxOptions->{CounterFunction:>CapitalRomanNumeral}] 

Any help would be appreciated.

enter image description here

Source Link
M.R.
  • 31.9k
  • 9
  • 102
  • 299

How can I make a stylesheet that counts subcells?

The example cells in the documentation each have count of the cells inside their section:

 Cell[TextData[{"Basic Examples", "  ", Cell["(4)", "ExampleCount"]}], "ExampleSection", "ExampleSection"] 

But this is static content, how exactly would this work dynamically? I'd like to make my own cell style where the cell dingbat counts the number of cells inside the cell group it contains (and updates itself dynamically). I've tried using CounterBox but that is more for dynamic tallying, not section counting... any help would be appreciated.

enter image description here