Is there anyway to have those lines automatically Black in Mathematica ?
The default style of those lines is defined in the file ContextMenus.tr
located in the subdirectory SystemFiles/FrontEnd/TextResources
of $InstallationDirectory
. If you search for "CellInsertionPoint" in that file then you should find something like
"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]
}]],
....
}
To permanently change the default colour of the horizontal lines you could set CellFrameColor
of these three MenuItems to whatever colour you want (or you could create extra MenuItems if you want more choice). Note that you need to restart Mathematica for the changes to take effect.
If you don't want to change the original file you can also save a copy of the file to the appropriate subdirectory in either $BaseDirectory
or $UserBaseDirectory
and edit that.
Heike has the answer, but in the unlikely case you don't want to mess with those .tr files you could also execute
NotebookPut[
NotebookGet[
SelectedNotebook[]] /. {
Cell[" ", "Text", x___, CellFrameColor -> RGBColor[___], y___] :>
Cell[" ", "Text", x, CellFrameColor -> RGBColor[0, 0, 0], y]},
SelectedNotebook[]];
and turn every cell frame (the lines are just cell frames) black.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With