Wish to add "chapter.section.Code a" to Textbook style
- To: mathgroup at smc.vnet.net
 - Subject: [mg81399] Wish to add "chapter.section.Code a" to Textbook style
 - From: chuck009 <dmilioto at comcast.com>
 - Date: Sat, 22 Sep 2007 03:22:39 -0400 (EDT)
 
Hello . . . well just hello then.  I mean, girls call themselves guys too you know.  
I'm really making progress with style sheets.  I created my textbook stylesheet myNotebook.nb and wish to integrate Mathematica code into the various sections.  So I override the TOCBookProgram style as follows:
Cell[StyleData["TOCBookProgram"],
 CellMargins->{{12, 12}, {1, 1}},
 CellGroupingRules->{"ProgramGrouping", 60},
 CellFrameLabels->{{
    Cell[
     TextData[{CounterBox["TOCBookChapterTitle"],".", 
       CounterBox["TOCBookSection"], ". Code: ", 
       CounterBox["TOCBookProgram"]}], "TOCBookProgramLabel", CellBaseline -> Baseline, Background -> 
     RGBColor[0.68, 0.85, 0.9], CellSize -> {150, 50}], Inherited}, {Inherited, Inherited}},
 TabSpacings->48.5,
 CounterIncrements->CounterFunction->CharacterRange->{"a","z"},
 MenuPosition->1842]
where I'd like the label to say:
chapter.section.Code:x
where x gets incremented as a, b,c, ... using the counter function I specified. 
But it's not working.  All I get is something like 1.1 Code: 0 
So if anyone, girls too, want to offer help . . . I really suspect ver. 7 of Mathematica to be a version of style . . . it's the wave of the future I think :)