-
|
I want to turn off numbering in all sections within a specific chapter: I am having a hard time to understand matchers in the style sheet. I tried: But this does not work. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
This is form memory, so I hope this works.. You need to select the Heading inside the Section and give the style a unique name. You probably also want this style to inherit from the generic level 2 heading style you defined: # level 2 header customizations specific to this chapter
[document history heading level 2 : Section(id='document-history') / Section / Heading]
base = heading level 2
number_format = none
page_break = noneThe style log can help you build the correct selector. This example shows that a heading is a Heading node which is a direct child of a Section node. |
Beta Was this translation helpful? Give feedback.
-
Hmm, this was quite surprising to me, so I looked into it. Sphinx assigns multiple IDs to sections: It would be better if
This is also not yet covered in the documentation. You can match on classes using has_class and has_classes. For example: [document history heading level 2 : Section(has_class='testclass') / Section / Heading]
...
[document history heading level 2 alt : Section(has_classes=['testclass', 'anotherclass']) / Section / Heading]
... |
Beta Was this translation helpful? Give feedback.
This is form memory, so I hope this works..
You need to select the Heading inside the Section and give the style a unique name. You probably also want this style to inherit from the generic level 2 heading style you defined:
The style log can help you build the correct selector. This example shows that a heading is a Heading node which is a direct child of a Section node.