3
$\begingroup$

If one wants to use the automatic numbering feature of Mathematica, he has to make tags for cells of the type he wants to be referenced to. Then, as soon as he needs to make a reference to the tagged cell, he goes to Menu/Insert/Automatic Numbering. This brings up the dialog "Create Automatic Numbering Object". There one finds three fields: one is entitled "Counter", the two others enable one to select the tag of the cell to be numbered.

In the field "Counter" one finds a number of cell types, and one MUST select the type he needs. In some StyleSheets, such as JournalArticle, the number of cell types is really impressive. In this case the stage of choosing the cell type from the Counter field of the "Create Automatic Numbering Object" dialog considerably brakes the writing process and becomes a head ache.

I heavily use the JournalArticle StyleSheet along with the automatic numeration. However, I only make numeration and refer to two types of Cells: (i) DisplayFormulaNumbered and (ii) Figure.

Here comes my question:

Is it possible to customize the "Create Automatic Numbering Object" dialog such, that only two types of cells: (i) DisplayFormulaNumbered and (ii) Figure would show up there?

(my data PC WindowsXP, Mathematica 9.0.1.0)

$\endgroup$

2 Answers 2

1
$\begingroup$

I think the automaticaNumbering is not perfect, I found a way to use AutomaticaNumbering.

That is :Create Your Own Stylesheet. You can search StyleData in Help,

And the SectionNumbered gives good example when see the CellExpression, and we can modifiy it in our personal-stylesheet.nb

If you want to remove AutomaticaNumbering of some stylesheet, just CtrL+Shift+E and remove the part related.

Shortcut to insert CounterBox

and I saw this which maybe also helpful

The picture show the case: find a buil-in cell-style is really AutomaticaNumbering, but with no CountBox, it's in the parent stylesheet. enter image description here

$\endgroup$
8
  • $\begingroup$ It is a very interesting possibility, but could you be a bit more precise. I actually do use a custom StyleSheet and could easily modify it. However, as soon as I open my StyleSheet, mark, say, the cell Section and make Ctrl+Shift+E, I get the following: Cell[StyleData["Section"], FontSize->28, FontWeight->"Bold"]. As you may see it contains no Counter box. $\endgroup$ Commented May 7, 2013 at 10:04
  • $\begingroup$ Another story is with, say, EquationNumbered cell. In this case after I press Ctrl+Shift+E I see the following: Cell[StyleData["EquationNumbered"], CellFrameLabels->{{None, Cell[ TextData[{"(", CounterBox["EquationNumbered"], ")"}]]}, {None, None}}, FontFamily->"Courier New", FontSize->12, FontWeight->"Plain", FontSlant->"Italic", FontVariations->{"StrikeThrough"->False, "Underline"->False}, Magnification->1.5]. Here I see the CounterBox that could be removed. But exactly here I need it. $\endgroup$ Commented May 7, 2013 at 10:05
  • $\begingroup$ So, could you kindly give a precise example of how you remove the built-in counting in a StyleSheet cell like, for example, Section $\endgroup$ Commented May 7, 2013 at 10:06
  • $\begingroup$ in your first comment, a CellStyle with No CounterBox in CellExpression, that it just inherit from a parent stylesheet, if you open the parent stylesheet, Ctrl+F will find the cell with CounterBox, but with some protection so couldn't remove the CounterBox, so Just copy them all to one's personal stylesheet, and remove the CounterBox Part. $\endgroup$ Commented May 7, 2013 at 10:46
  • $\begingroup$ And you can also use SetOptions to create your own Stylesheets. $\endgroup$ Commented May 7, 2013 at 10:47
2
$\begingroup$

My initial answer was not sufficient. Here are some better input aliases to use:

CurrentValue[EvaluationNotebook[], {InputAliases, "dfn"}] = DynamicBox[
    ToBoxes[
        ActionMenu[
            "tags",
            With[{tags = CurrentValue[Cells[CellStyle->"DisplayFormulaNumbered"], CellTags]},
                #:>NotebookWrite[
                    ParentBox@EvaluationBox[],
                    CounterBox["DisplayFormulaNumbered", #]
                ]& /@ tags
            ]
        ]
    ]
];
CurrentValue[EvaluationNotebook[], {InputAliases, "fig"}] = DynamicBox[
    ToBoxes[
        ActionMenu[
            "tags",
            With[{tags = CurrentValue[Cells[CellStyle->"Figure"], CellTags]},
                #:>NotebookWrite[
                    ParentBox@EvaluationBox[],
                    CounterBox["Figure", #]
                ]& /@ tags
            ]
        ]
    ]
];
$\endgroup$
1
  • $\begingroup$ It is not quite clear, how to use these InputAliases. Could you kindly give an example? $\endgroup$ Commented Dec 15, 2017 at 8:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.