我尝试按照 Mathematica-8 笔记本中的自动编号单元格的说明进行操作,此处
http://reference.wolfram.com/mathematica/tutorial/AutomaticNumbering.html
我创建了一个带有四个文本单元的小笔记本
foo
qux
blancmange
bar
将光标放在前面foo
,然后我用了Insert
menu, Automatic numbering
项目,给我Create Automatic Numbering Object
对话框。我选择在Counter
下拉然后项目Text
,点击This counter object
单选按钮,万岁!之前得到的数字是 1foo
,大概指的是类型的第一个单元格Text
在笔记本中。我现在看到
1foo
qux
blancmange
bar
我插入我自己的dot space
1之后得到一个好看的
1. foo
qux
blancmange
bar
我也这样做bar
并看到预期的
1. foo
qux
blancmange
4. bar
because bar
是该类型的第四个单元格Text
。伟大的。现在我想为单元格创建一个独立的编号系统qux
and blancmange
。我用Cell
menu, Cell Tags...
, Add/Remove Cell tags...
项目并放置标签test
在细胞上qux
and blancmange
. I use Cell
menu, Cell Tags...
, Show cell tags
项目以确保它们在那里,并且,果然,它们出现在笔记本中(我不会尝试模仿显示,这里,但在 Dropbox 公共文件夹底部有一个指向我的笔记本的链接如果你想看看这个问题)。然后我将光标定位在之前qux
并使用Insert
menu, Automatic numbering
项目,这次选择Use the counter value corresponding to the location of:
, then The first cell with the tag:
, then test
,我的用户创建的标签,OK,我得到了零!之前同上blancmange
。用我自己的口红给猪涂上一点口红后,我的最终(糟糕)结果dot
and space
, 好像
1. foo
0. qux
0. blancmange
4. bar
如果尝试引用一个不存在的标签,我得到
1. foo
XXXqux
XXXblancmange
4. bar
所以 Mathematica 识别出了一些东西,但不是我期望或需要的。
我还需要说我尝试过Item Numbered
中的项目Format
项目,但我有两个问题:(1)我不知道如何从 1 重新开始编号,所以每个块Item Numbered
单元格属于相同的编号项目序列。我在这里得到 1, 2, 3,然后是 4, 5, 6,稍后,以及 7, 8, 9,甚至更晚,等等。我真的需要独立编号的项目块:这里是 1, 2, 3,1, 2 、 3 稍后,以及 1、2、3 甚至更晚,等等。 (2) 我需要对各种不同类型的单元格进行编号,因此我确实需要创建自己的标签并控制对它们的跟踪。
我将非常感谢任何建议。
这是我的小笔记本的链接。
CellTags自动编号.nb