How to make CounterIncrement step in increments of 2
This works. Thank you for the help!
SetOptions[InputNotebook[],
CounterAssignments -> {{"ItemNumbered", -1}}]
SetOptions[InputNotebook[],
StyleDefinitions ->
Notebook[{Cell[StyleData[StyleDefinitions -> "Default.nb"]],
Cell[StyleData["ItemNumbered"],
CellDingbat ->
Cell[TextData[{CounterBox["ItemNumbered"], "."}],
FontWeight -> "Bold"], CellMargins -> {{81, 10}, {4, 8}},
StyleKeyMapping -> {"Tab" -> "SubitemNumbered"},
CellFrameLabelMargins -> 4,
CellChangeTimes -> {3.657516045744032`*^9},
CounterIncrements -> {"ItemNumbered", "ItemNumbered"},
CounterAssignments -> {{"SubitemNumbered",
0}, {"SubsubitemNumbered", 0}}, MenuSortingValue -> 1630,
FontFamily -> "Arial", FontSize -> 15,
Global`ReturnCreatesNewCell -> True]}, WindowSize -> {808, 751},
WindowMargins -> {{Automatic, 20}, {16, Automatic}},
FrontEndVersion ->
"10.3 for Mac OS X x86 (32-bit, 64-bit Kernel) (October 9, 2015)",
StyleDefinitions -> "PrivateStylesheetFormatting.nb"]]
SetOptions[EvaluationNotebook[]
, StyleDefinitions -> Notebook @
{ Cell[StyleData[StyleDefinitions -> "Default.nb"]]
, Cell[StyleData["ItemNumbered"], CounterBoxOptions -> {CounterFunction -> (#*2-1&)}]
, Cell[StyleData["SubitemNumbered"], CounterBoxOptions -> {CounterFunction -> (#*2-1&)}]
, Cell[StyleData["SubsubitemNumbered"], CounterBoxOptions -> {CounterFunction -> (#*2-1&)}]
}
]
As pointed out by @Kuba, the same CounterFunction
must be applied to items, sub-items and sub-sub-items to ensure that the counters at all levels match.
Example:
Do[
If[j === 1 && k === 1, CellPrint@Cell["item", "ItemNumbered"]]
; If[k === 1, CellPrint@Cell["subitem", "SubitemNumbered"]]
; CellPrint@Cell["subsubitem", "SubsubitemNumbered"]
, {i, 3}, {j, 3}, {k, 2}
]