Wolfram mathematica 着色“;水平线“;在数学中
在Mathematica中,这些线是否会自动变黑Wolfram mathematica 着色“;水平线“;在数学中,wolfram-mathematica,frontend,Wolfram Mathematica,Frontend,在Mathematica中,这些线是否会自动变黑 这些行的默认样式在$InstallationDirectory的子目录SystemFiles/FrontEnd/TextResources中的文件ContextMenus.tr中定义。如果您在该文件中搜索“CellInsertionPoint”,那么您应该会找到如下内容 "CellInsertionPoint" -> { .... Menu["Insert Ho&rizontal Line", { Men
这些行的默认样式在
$InstallationDirectory
的子目录SystemFiles/FrontEnd/TextResources
中的文件ContextMenus.tr
中定义。如果您在该文件中搜索“CellInsertionPoint”,那么您应该会找到如下内容
"CellInsertionPoint" -> {
....
Menu["Insert Ho&rizontal Line",
{
MenuItem["Thi&n Line", FrontEndExecute[{
FrontEnd`NotebookWrite[FrontEnd`InputNotebook[],
Cell[" ", "Text",
....
CellFrameColor->RGBColor[0,0,1]],
After]
}]],
MenuItem["&Medium Line", FrontEndExecute[{
.....
CellFrameColor->RGBColor[0,0,1]],
After]
}]],
MenuItem["&Thick Line", FrontEndExecute[{
.....
CellFrameColor->RGBColor[0,0,1]],
After]
}]],
....
}
要永久更改水平线的默认颜色,您可以将这三个菜单项的CellFrameColor
设置为您想要的任何颜色(或者如果您想要更多选择,您可以创建额外的菜单项)。请注意,需要重新启动Mathematica才能使更改生效
如果不想更改原始文件,还可以将文件的副本保存到
$BaseDirectory
或$UserBaseDirectory
中的相应子目录中,并对其进行编辑 Heike有答案,但在不太可能的情况下,您不想弄乱那些.tr文件,您也可以执行它们
NotebookPut[
NotebookGet[
SelectedNotebook[]] /. {
Cell[" ", "Text", x___, CellFrameColor -> RGBColor[___], y___] :>
Cell[" ", "Text", x, CellFrameColor -> RGBColor[0, 0, 0], y]},
SelectedNotebook[]];
并将每个单元格框(这些线只是单元格框)变为黑色。尽管它不符合“自动”的标准,但您可以插入默认的蓝色线,然后更改其颜色。由于该行不可选择,您需要单击该行下方,然后按shift键向上移动。然后按Ctrl-Shift-E(显示表达式)查看(粗线)
然后RGB颜色很容易更改。Sjoerd,我会这么做的,我现在不想弄乱那些文件。谢谢你,Heike,我现在将使用Sjoerd解决方案,当我有时间真正了解我们与你一起修改的是什么时,我将实现它!
Cell[" ", "Text",
Editable->False,
Selectable->False,
CellFrame->{{0, 0}, {0, 3}},
ShowCellBracket->False,
CellMargins->{{0, 0}, {1, 1}},
CellElementSpacings->{"CellMinHeight"->1},
CellFrameMargins->0,
CellFrameColor->RGBColor[0, 0, 1],
CellSize->{Inherited, 5}]