1
$\begingroup$

In a notebook I have three cells whose format is DisplayFormulaNumbered:

a=1
b=2
c=3

and in a text cell I refer to them respectively as (1) (2) (3), where (1) (2) and (3) have been automatically assigned by Mathematica.

Now, when I add a fourth cell, between the first and second

a=1
d=4
b=2
c=3

the number 2 is assigned to the cell containing d=4 and other numbers are shifted according that. Therefore the corrispondence in my text is destroyed.

How can I fix this problem ? Two hypotheses:

(a) changing the autunumbering criterion from positional to chronological (b) automating cross referencing within the notebook

Thanks in advance !

$\endgroup$
  • 2
    $\begingroup$ You should tag your cell and use the automatic numbering so that it always links back to a specific cell and its counter. There should be examples on here how to do that. If not I'll post something tomorrow if no one else has. $\endgroup$ – Mike Honeychurch Feb 3 '16 at 6:09
  • $\begingroup$ Thanks for your reply !! I will keep constantly a watchful eye on this question. $\endgroup$ – mitochondrial Feb 3 '16 at 7:21
0
$\begingroup$

Here is a method that seems to work for me, which I think is along the lines of what Mike Honeychurch was referring to in his comment:

  1. Tag the cells: Select each formatted cell that contain an equation and add a unique tag to each using Cell -> Cell Tags -> Add/Remove cell tags (or CTRL+J).
  2. Add the links: In the appropriate position within your text cell, insert and automatic numbering link. Navigate to Insert -> Automatic Numbering; select the appropriate counter category from the drop-down menu (e.g. DisplayFormulaNumbered in your case), then select the tag you want to refer back to in the list provided.

You should now have a reference in your text cell that will update to reflect the number assigned to the corresponding formula / equation.

$\endgroup$
  • $\begingroup$ Thanks! It works just as expected. A more little doubt: sometime the counter start from 0, instead from 1; what is this produced by ? Up to now, I haven't been capable to replicate this behavior: it seems happen randomly, but surely it's my fault. $\endgroup$ – mitochondrial Feb 4 '16 at 18:46
  • $\begingroup$ @mitochondrial I suspect it may happen when you select a category that does not contain any items by mistake; then the count will reflect that there are zero objects of that kind in the notebook. $\endgroup$ – MarcoB Feb 4 '16 at 19:58

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.