7
$\begingroup$

I applied the stylesheet JournalArticle to a notebook. When I use the Reference cell style there, it automatically inserts "A.", "B.", etc., to number the cells.

What exactly should one do (presumably using Format > Edit Stylesheet) so as to change that auto-numbering to "1.", "2.", etc.?

I did look at the Private Style Definitions notebook that opens if I use Format > Edit Stylesheet for my notebook. The expression that's the contents of the Reference style cell definition is merely: Cell[StyleData["Reference"]].

Moreover, if I select the Reference cell in the stylesheet, open Option Inspector, search for AutomaticNumbering, and change the option

Formatting Options > Automatic Numbering Options > Counter Display Options > CounterFunction

to Decimal Numbers (in the drop down menu aside this option), it does not change the stylesheet's prototype for this Reference style -- and hence will not change the style of Reference cells in my actual notebook.

$\endgroup$
  • $\begingroup$ This is a good question. I did not notice such a feature before, though I use the JournalArticle a lot. Is it a new Mma 10.0 feature? I recall something of this sort has been discussed about 1/2 to 1 year ago. I did not make any note at that time and cannot find it though. I am also not sure that the discussion I recall answers this question. $\endgroup$ – Alexei Boulbitch Nov 20 '14 at 9:41
  • 1
    $\begingroup$ I think to have outflanked the problem. I just mark the references as EndNotes, make numeration in the list of thee EndNotes by hand, and make then cross-references from the text to the EndNotes, rather than to References. Since I otherwise use no other end notes, this works for automatic cross-references. Since it is not a real solution to the problem, I do not dare to give it as an answer, and still wait eagerly for somebody who might give a real one. $\endgroup$ – Alexei Boulbitch Feb 17 '15 at 14:24
  • $\begingroup$ Indeed reference is numbered numerically in link (obtained with Insert > AutomaticNumbering) but alphabetically in reference cell so there is inconsistency in the first place. The question is not simply a matter of taste. $\endgroup$ – Pierre ALBARÈDE Mar 16 at 11:00
1
$\begingroup$

Let me rephrase as a recipe.

Do Format > Edit style sheet. The private style sheet opens: it is a notebook titled "Private style definitions for [your notebook]".

In this notebook, click on the link Article/JournalArticle.nb. The shared style sheet JournalArticle opens: it is a notebook titled "JournalArticle.nb style definitions".

In this notebook, at the very end, find and copy the cell containing "A. Local definition for style Reference" and paste it into the private style sheet.

In the private style sheet, expand the cell just copied with Cell > Show Expression.

Replace CounterBox["Reference", CounterFunction :> (Part[CharacterRange["A", "Z"], #]& )], "."}] by just CounterBox["Reference"], "."}].

(For not doing wrong, you can copy the shown expression to any notebook input cell, where you benefit from syntax check, edit, copy again and paste back to shown expression.)

Do Cell > Show Expression again, then you should see the updated cell content "1. Local definition for style Reference" with numeric numbering as requested and likewise in your notebook.

Close the two style sheets (no need to save).

It should be possible also with option inspector on style cell.

| improve this answer | |
$\endgroup$
  • $\begingroup$ With Option Inspector (the official method): select reference style cell that was copied to private style sheet, do Format > Option inspector, look for option named CellFrameLabels, modify as already explained, click apply. This should work as well. $\endgroup$ – Pierre ALBARÈDE Mar 16 at 12:50
5
$\begingroup$

Check out the default style for "Reference":

CurrentValue[{StyleDefinitions,"Reference", CellFrameLabels}]

{{Cell[TextData[{CounterBox["Reference", CounterFunction :> (CharacterRange["A", "Z"][[#1]] &)], "."}], "Reference", CellBaseline -> Baseline, TextAlignment -> Right], Inherited}, {Inherited, Inherited}}

The CounterFunction overrides the default number output and converts it to letters. Just eliminate the CounterFunction to have numbers:

SetOptions[
    EvaluationNotebook[],
    StyleDefinitions -> Notebook[
        {
        Cell[StyleData[StyleDefinitions->FrontEnd`FileName[{"Article"}, "JournalArticle.nb"]]],
        Cell[StyleData["Reference"],
            CellFrameLabels->{
                {
                Cell[TextData[{CounterBox["Reference"],"."}],"Reference",CellBaseline->Baseline,TextAlignment->Right],
                Inherited
                },
                {Inherited,Inherited}
            }
        ]
        },
        StyleDefinitions->"PrivateStylesheetFormatting.nb"
    ]
]
| improve this answer | |
$\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.