相关疑难解决方法(0)

自定义Mathematica快捷方式

有没有我可以查看/更改全局快捷方式选项的地方,如Command+ 9(转换为输入样式)?

特别是,我需要一种更快的方法来创建项目符号列表.它是Cell上下文菜单中的"Item"样式,它没有自己的快捷方式.

wolfram-mathematica

31
推荐指数
2
解决办法
1万
查看次数

单个细胞的CounterIncrements

这篇文章源自我的问题,将细胞定义扩展到细胞框架标签.我一直在玩CounterIncrements,我没有得到我所期待的.

正如西蒙在回答我提到的帖子时所做的那样,我们首先要制作一个计数器.

CellPrint[Cell["Setting the counter", "Text", 
  CounterAssignments -> {{"MyCounter", 0}}]]
Run Code Online (Sandbox Code Playgroud)

现在我们打印这个柜台.

CellPrint[Cell[
  TextData[RowBox[{"MyCounter ", CounterBox["MyCounter"]}]], "Text"]]
Run Code Online (Sandbox Code Playgroud)

结果将是:

MyCounter 0
Run Code Online (Sandbox Code Playgroud)

要增加计数器,我们可以使用以下选项CounterIncrements:

CellPrint[Cell[TextData[RowBox[{"MyCounter ", CounterBox["MyCounter"]}]], 
 "Text", CounterIncrements -> "MyCounter"]]
Run Code Online (Sandbox Code Playgroud)

这会给你:

MyCounter 1
Run Code Online (Sandbox Code Playgroud)

您可以根据需要多次输入,您将看到计数器增加.

因为CounterIncrements是一个细胞的选项,我对自己说:"好吧,如果我在一个细胞内制作一个细胞并在那里设置这个选项怎么办?".由于我用这个选项制作一个单元格,我希望计数器能够增加.这会发生吗?

CellPrint[
 Cell[TextData[
   RowBox[{"MyCounter ", CounterBox["MyCounter"], 
    Cell[TextData[RowBox[{"[InlineCell]"}]], "Text", 
  CounterIncrements -> "MyCounter"]}]], "Text"]]
Run Code Online (Sandbox Code Playgroud)

输出是:

MyCounter 1[InlineCell]
Run Code Online (Sandbox Code Playgroud)

我期待输出是MyCounter 2[InlineCell]因为我告诉单元格内的单元格增加计数器,但它没有这样做.

该文件称CounterIncrements"尚未完全融入长期的Mathematica系统,并且可能会发生变化",但我认为信息存在一定的误导性.

我想要的原因是我可以定义一种每次使用时都会增加计数器的样式.但是这种风格将用于另一个细胞内的细胞.有人知道这里发生了什么吗?我在Mac OS X中使用MMA8.

wolfram-mathematica

6
推荐指数
1
解决办法
216
查看次数

如何在Mathematica笔记本样式中填写CellFrameLabels?

我一直在努力获得编号的细胞框架标签,遵循这些其他答案的伟大建议

将单元格定义扩展到CellFrameLabels定义

如何在Mathematica笔记本中自动编号单元格标签?

而我几乎就在那里.我想在Creative/Pastel颜色样式表中为节样式添加节号.我创建了一个新笔记本(这是我的公共Dropbox上的副本)

http://dl.dropbox.com/u/1997638/CellFrameMargins.nb

转到"格式"菜单,选择"样式表\ Creative\PastelColor",然后选择"格式""编辑样式表","选择样式:部分",然后单击样式表编辑对话框顶部的Creative\Pastelcolor.nb .

这打开了另一个样式表编辑器,然后我转到第四个项目"标题和节单元格的样式",然后是"节"中的第二个项目.将鼠标十字准线放在那里然后单击,然后选择"单元格"菜单,"显示表达式"项,其中显示以下表达式:

Cell[StyleData["Section"],
 CellFrame->{{0, 0}, {1, 3}},
 CellFrameColor->RGBColor[1., 0.819608, 0.658824],
 FontFamily->"Helvetica",
 FontSize->18,
 FontWeight->"Bold",
 FontColor->RGBColor[0.882353, 0.419608, 0.0784314],
 Background->RGBColor[1., 0.886275, 0.741176]]
Run Code Online (Sandbox Code Playgroud)

大!显示所有细节,或者我想.特别是,CellFrame项目为我{{0, 0}, {1, 3}}提供了使用Section样式排列我的单元格框架标签所需的信息.好的,回到我的笔记本的steylsheet编辑器对话框,并按照上述答案,我输入

Cell[
 StyleData["Section"],
 CellFrameLabelMargins -> 0,
  CellFrameLabels-> { {
   Cell[
    TextData[{ "§", CounterBox["Section"], ": " }], 
    "SectionLabel",
    CellFrame -> {{0, 0}, {1, 3}},
    CellFrameMargins -> 4
   ] (* left label *),
   Inherited (* right label *) }, 
  {Inherited (* bottom label *), 
   Inherited (* top label *) } } …
Run Code Online (Sandbox Code Playgroud)

wolfram-mathematica mathematica-frontend

5
推荐指数
1
解决办法
416
查看次数