2
$\begingroup$

I am trying to make a custom stylesheet, but I am not able to get rid of the cell frame color from the base stylesheet. In particular, I have:

enter image description here

I have changed the background color of the cell to LightGray. However, an orange frame remains. How do I get rid of this orange frame?

$\endgroup$
  • 1
    $\begingroup$ Add there CellFrame->None or CellFrameColor->None. $\endgroup$ – Kuba Jun 4 '15 at 14:31
  • $\begingroup$ Thanks for you response. I am new to stylesheets, where should I add this? I've been using the Format menu for modifications. $\endgroup$ – JeffDror Jun 4 '15 at 14:37
  • 1
    $\begingroup$ In EditStylesheet.. item. Take a look at tutorial/WorkingWithStylesheets too. $\endgroup$ – Kuba Jun 4 '15 at 14:47
  • $\begingroup$ Okay, I got it to work by using the Notebook command and avoiding the whole EditStylesheet interface. Either I have a bug in my version or its non-trivial to find our where to put this in the EditStylesheet... $\endgroup$ – JeffDror Jun 4 '15 at 15:01
  • $\begingroup$ This is a menu item which you have to click. If you want to do this programatically you have to use SetOtions StyleDefinitions etc. Read this tutorial. It should explain a lot. $\endgroup$ – Kuba Jun 4 '15 at 15:04
3
$\begingroup$

To work with Stylesheets proficiently you need to be able to edit Style Cell code directly, not only make changes via the menus. While in most cases you can perform the same actions via the Option Inspector there is always a layer of abstraction between you and the code.

After opening the editor via Format > Edit Stylesheet ... you should see something like:

enter image description here
If the Style you wish to modify is not present you need to first create a Cell for it. This is done most conveniently using the Choose a style dropdown or by entering the exact Style name without quotation marks in the Enter a style name : field and pressing Return.

Once you have a Style Cell like this: enter image description here
you can click on it and use Cell > Show Expression (Shift+Ctrl+E in Windows) to reveal:

Cell[StyleData["Section"]]

It is that Cell data that you need to edit to take full control of the Style. Options for the Style are given as options for Cell. So for example editing it to read:

Cell[StyleData["Section"],
 CellFrame -> 0
]

will disable the Cell frame present on the Section style of the StandardReport base which we are modifying.

See also: StyleData, MenuSortingValue, MenuCommandKey.

$\endgroup$
  • 1
    $\begingroup$ Ah, fantastic. The part I was really confused about was how to "show expression". I missed that when looking through the tutorial (it should be the focal point of the tutorial!) $\endgroup$ – JeffDror Jun 4 '15 at 15:29
  • $\begingroup$ @JeffDror Glad I could help! :-) $\endgroup$ – Mr.Wizard Jun 4 '15 at 15:31

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.