Message Boards Message Boards

0 Replies
0 Total Likes
View groups...
Share this post:

How to use automatic numbering in ActionMenu in a docked cell?

Posted 10 years ago
I am trying to fine-tune the appearance of the notes I am preparing for my students. I would like to have a menu in a docked cell in the notebook that chooses the appropriate sections in the document. I also would like to have the section numbers included in this pop-up menu. I tried to use "automatic numbering", this is the code I use:
SetOptions[EvaluationNotebook[], DockedCells -> Cell[
   BoxData[ToBoxes[ActionMenu["Choose a chapter/section", {"
\*CounterBox["BookChapterNumber", "ChapterLimitConvCont"] Limit, \
convergence, continuity" :> NotebookLocate["ChapterLimitConvCont"],
\*CounterBox["BookChapterNumber", "ChapterLimitConvCont"].
\*CounterBox["Section", "SectionSeqLimit"] Limit of a sequence \
(option)" :> NotebookLocate["SectionSeqLimit"]
It puts the pop-up menu in the docked cell and when the section is chosen, it jumps to the right place, but the section and chapter numbers are all appearing as 0 in the pop-up menu. I guess I need to do some initialization so that these numbers are updated before the docked cell is put up, but I cannot figure out how to do this. I can always put in these numbers manually, but it would be nice to have it automatic in case I would like to add sections in the middle of the notebook. Any suggestions?
POSTED BY: Ferenc Beleznay
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract