Message Boards Message Boards

Avoid stylesheet problem concerning CellMargin values?

I've run into a problem with a private stylesheet that I'm struggling to understand and resolve. The issue is that my notebook does not appear to always respect the CellMargins values specified in my style definition for numbered Sections, Subsections, Subsubsections, etc...

To help illustrate the issue, I've attached two notebooks together with a printed PDF for each. The files named "StylesheetProblem01.nb" and "StylesheetProblem01.nb.pdf" show how I intend my numbered section and subsection headings to appear, with the numbers of the subsection heading being left aligning with the text of the preceding Section Heading. For this notebook, my private stylesheet definitions work as intended.

However, when I introduce private style definitions for the standard (un-numbered) Section, Subsection, etc. styles, as is done in the files named "StylesheetProblem02.nb" and "StylesheetProblem02.nb.pdf", the specified left margin of my Numbered Subsection style is no longer respected in the notebook. What appears to happen is that the left margin retains the value of the unnumbered Section style. I can see the value of the cell's left margin in the Options Inspector and changing its value via this route corrects the problem. But that's obviously not a practicable fix.

I suspect the issue may be something to do with option inheritance, but I'm not sure. I also note that the cells in the private stylesheet of my notebook "StylesheetProblem02.nb" appear to have been randomly grouped (see attached file "PrivateStylesheet02.png"). I'm not sure why this happens or whether it's a factor in the behaviour I'm seeing.

As I've hit a wall trying to fix the problem, any suggestions would be much appreciated.

Thanks in anticipation,

Ian

Attachment

POSTED BY: Ian Williams
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract