3
$\begingroup$

I have a notebook where the number on the "EquationNumbered" cell goes from (6) to (1) within the same section. Is there any way to manually correct equation numbers?

I seem to encounter this issue regularly. Would it be possible to create a equation numbered cell without the automatic equation numbering?

Ideally, I would like to keep the parenthesis on the right-hand side of the page and simply allow an equation number to be entered instead of assigned.

The current "CounterFunction" under Automatic Numbering Options in Cell Properties is set to "Identity" with no parameter specified. Would it be possible to

  1. Make the equation number editable.
  2. Change the "CounterFunction"

Are there any third-party applications that would allow me to do advanced formatting of Mathematica notebooks to address such items as editing equation numbering, produce sections containing two side-by-side columns of text, formatting tables, etc...?

Additional Info: When I change the stylesheet to Standard Report and set the cell types to "DisplayFormulaNumbered", the equation numbering works properly.

This seems to be a problem with the "EquationNumbered" cell type.

$\endgroup$
1
  • $\begingroup$ Two-column would be hard to support. It's possible, if you're clever about it, but tough. The smartest way to do it would be to have a two-column cell type that automatically splits itself when viewed in the "Printout" style. $\endgroup$
    – b3m2a1
    Nov 13, 2017 at 7:58

1 Answer 1

6
$\begingroup$

I'm going to assume you're using the "Book/Textbook" style, because I can't remember where else I've seen "EquationNumbered".

If so, we can figure out what would reset the counter for "EquationNumbered" like so:

counterAssignments =
  With[{
     styles =
      FE`Evaluate@
        FEPrivate`GetPopupList["MenuListStyles"] // Values
     },
    AssociationMap[
     CurrentValue[EvaluationNotebook[],
       {StyleDefinitions, #, "CounterAssignments"}
       ] &,
     styles
     ]
    ] // DeleteCases[$Failed | {}];

Select[counterAssignments, Not@*FreeQ["EquationNumbered"]] // Keys

{"BookChapterNumber", "Title", "Subtitle"}

So you must have one of those somewhere in your section?

If so, just add CounterAssignments->None to the cell.

As for changing the CounterFunction, we can see what sort of things are supported by using my answer here:

oiOps["counterFunction"]

{{"Decimal Numbers", "Identity"}, {"Roman Numerals", 
  "RomanNumeral"}, {"Capital Roman Numerals", 
  "CapitalRomanNumeral"}, {"abc...", 
  "(Part[CharacterRange[\"a\", \"z\"], #]&)"}, {"ABC...", 
  "(Part[CharacterRange[\"A\", \"Z\"], #]&)"}, {"Greek Letters", 
  "(Part[CharacterRange[\"\\[Alpha]\", \"\\[Omega]\"], #]&)"}, \
{"Capital Greek Letters", 
  "(Part[CharacterRange[\"\\[CapitalAlpha]\", \"\\[CapitalOmega]\"], \
#]&)"}, {"Circled numbers", 
  "(Part[CharacterRange[\"\\:2460\", \"\\:2469\"], #]&)"}, {"Black \
circled numbers", 
  "(Part[CharacterRange[\"\\:2776\", \"\\:277F\"], #]&)"}, {"Black \
sans-serif circled numbers", 
  "(Part[CharacterRange[\"\\:278A\", \"\\:2793\"], #]&)"}, {"Days of \
the week", 
  "(Part[{\"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \
\"Friday\", \"Saturday\", \"Sunday\"}, #]&)"}, {"Months", 
  "(Part[{\"January\", \"February\", \"March\", \"April\", \"May\", \
\"June\", \"July\", \"August\", \"September\", \"October\", \
\"November\", \"December\"}, #]&)"}, Delimiter, {"Other Mathematica \
Function", None}}

The way you change the CounterFunction at the style level is to set it in the CounterBoxOptions. Note that this seems to only work with a limited subset of functions. Generally it seems only Identity, RomanNumeral, and the Part[CharacterRange[...], ...] constructions are allowed.

In any case, here's a way to tag things with Korean vowel characters. Ignore the SSEdit. Just assume you're doing these edits to the "EquationNumbered" cell at the stylesheet level.

SSEdit["EquationNumbered",
 {
  CellFrameLabels -> {
    {
     None,
     Cell[TextData[{"(", CounterBox["EquationNumbered"], ")"}]]
     },
    {None, None}
    },
  CounterBoxOptions -> {
    CounterFunction -> Function[CharacterRange["ᅡ", "ᆁ"][[#]]]
    }
  },
 "MakeCell" -> True
 ]

asd

As for manual equation number editing, you can do that through the CellFrameLabels without much trouble. Just do a Button that pops up a dialog to call SetOptions on the cell or set something like CurrentValue[{TaggingRules, "EquationNumbers", someTag}] = number and then have a Dynamic[CurrentValue[{TaggingRules, "EquationNumbers", someTag}], RawBoxes[CounterBox["EquationNumbered"]]] or in the Button label.

$\endgroup$

Your Answer

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

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