2
$\begingroup$

Is there a way to change the headings on NumberedItem style?

Instead of it going

1.

2.

3.

I am looking for it to go

A.

B.

C.

with the auto increment. I can't find a style that has headings as letters.

$\endgroup$
  • $\begingroup$ What after Z? $\endgroup$ – Kuba Dec 8 '17 at 7:30
  • $\begingroup$ @Kuba internally they actually handle this problem via CharacterRange. I think this question is a dupe of one I answered a few weeks back, but I'll need to look it up. $\endgroup$ – b3m2a1 Dec 8 '17 at 7:31
  • $\begingroup$ @Kuba I only need it up to D so I hadn't considered that yet. @b3m2a1 I tried searching but I don't know how to phrase it. I looked for 'numbereditem string header' and similar but had no results. I just look through your answers for 'itemnumbered' and 'item', didn't find anything. $\endgroup$ – I should change my Username Dec 8 '17 at 7:32
  • $\begingroup$ @b3m2a1 Not sure I understand, where do they handle what? I know we can refer to character codes but what if user expects excel like convention, AA,AB,.... $\endgroup$ – Kuba Dec 8 '17 at 7:35
  • 2
    $\begingroup$ @Kuba neither was I. Here's where I dug this up: mathematica.stackexchange.com/a/159829/38205 $\endgroup$ – b3m2a1 Dec 8 '17 at 7:39
2
$\begingroup$

You should do this in the style sheet. So:

SetOptions[
    EvaluationNotebook[],
    StyleDefinitions -> Notebook[
        {
        Cell[StyleData[StyleDefinitions->"Default.nb"]],
        Cell[StyleData["ItemNumbered"],
            CellDingbat->Cell[TextData[{CounterBox["ItemNumbered"], ")"}],FontWeight->Bold],
            CounterBoxOptions->{CounterFunction->(CharacterRange["A","Z"][[#1]]&)}
        ]
        },
        StyleDefinitions->"PrivateStylesheetFormatting.nb"
    ]
]

where I used ")" instead of "." as requested in a comment.

$\endgroup$
2
$\begingroup$

From @b3m2a1's linked post mathematica.stackexchange.com/a/159829/38205

Cell["a", "ItemNumbered",
 CellChangeTimes->{{3.72170647675723*^9, 3.7217064817685165`*^9}},
 CounterBoxOptions -> {
    CounterFunction -> Function[CharacterRange["A", "Z"][[#]]]
    }]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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