2
$\begingroup$

Bug introduced in 12.0


I'm using "Section" autonumbering in a notebook that contains text and calculations. Normally my "Section" style numbering looks like:

1) 
2) 
3)

After evaluating the notebook the "Section" style numbering looks like:

0)
0)
0)

Nothing I have tried corrects the problem. I have tried stopping and restarting the kernel. I have tried unloading and reloading the style sheet. When I execute:

CurrentValue[{"CounterValue", "Section"}]

the command returns zero even though prior to executing the command I initiated 3 "Section" command. I get the same type of failure if I use the default stylesheet and the "ItemNumbered" style.

If I exit Mathematica and reopen it all the sections are numbered correctly. Also if I open another notebook it autonumbers correctly. The problem is localized to any notebook that has been evaluated with the notebook evaluation command.

This problem doesn't happen with 11.3, only 12.0. Anyone know how to correct the problem in the evaluated notebook?

$\endgroup$
3
  • 1
    $\begingroup$ Maybe you can create a small notebook that exhibits the issue, and then evaluate NotebookGet[EvaluationNotebook[]] and include the output. $\endgroup$
    – Carl Woll
    Commented Oct 7, 2019 at 22:52
  • $\begingroup$ I am seeing a similar problem. I have a series of ItemNumbered cells whose numbers have changed to 0. I cannot change them back with the Options Inspector. I can get correctly numbered cells in a new notebook, but when they are copied into the bad notebook the become all zeros. I have not explicitly done a notebook evaluation although I have evaluated some of the (non ItemNumbered) cells in the notebook. $\endgroup$ Commented Oct 14, 2019 at 11:46
  • $\begingroup$ @CarlWoll The code of problematic Notebook won't help, because the problem disappears after saving and reopening the Notebook. Please see my answer for the steps which allow to reproduce the issue. $\endgroup$ Commented Oct 27, 2019 at 6:24

2 Answers 2

1
$\begingroup$

I have enclosed the output of a notebook that exhibits the problem. The 1 and 2 were generated using "ItemNumbered". After "Evaluation > Evaluate Nootbook", I get 0 everytime I use "ItemNumbered".

enter image description here

$\endgroup$
1
$\begingroup$

UPDATE: the bug is confirmed by WRI tech support, [CASE:4338353].


I reproduce the issue with version 12.0 on Windows 7 x64. Here are the steps:

  1. In a new (empty) Notebook apply the Evaluation ► Evaluate Notebook menu item.

  2. Now create a new "ItemNumbered" cell by applying the Format ► Style ► ItemNumbered menu item.

Here is the result:

screenshot 1

After saving this Notebook and reopening the numbering works correctly:

screenshot 2

Now apply the Evaluation ► Evaluate Notebook menu item again, put the cursor after the first cell, and then apply the Format ► Style ► ItemNumbered menu item. Here is the result:

screenshot 3

With the above method the issue reliably reproduces on my machine with version 12.0. With version 11.3 everything works as expected, so the bug seemingly is introduced in version 12.0.

$\endgroup$

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.