Martin Helmer
2017-10-30 19:16:04 UTC
I'd like to write a directive which ends the current section, and adds it
own section at the same level. (directive name = "my_section")
so
rst =
"""
Section 1
=========
[...]
.. my_section
Section 3
=========
[...]
"""
should generate 3 sections ; all the same level:
|
- Section 1
|
- my_section
|
- Section 3
|
If i
return [nodes.section(...)]
in my directive, the result is that "my_section" becomes a section inside
"Section 1":
|
- Section 1
| |
| - my_section
|
- Section 3
Is there any way to do this?
I'm sure someone wants to know why...
Each section documents a specific business rule. ( mostly human authored
text, end-user friendly, but also several elements which can be
autogenerated.)
The my_section aims to automate most of the writing of these sections, so
once the directive is working, each section will be migrated one-by one to
using the "my_section directive". The section title should be autogerated,
so
the option of doing a directive: my_body
, and then
Section 1
=========
[...]
Section 2
=========
.. my_body
Section 3
=========
[...]
is not ideal.
own section at the same level. (directive name = "my_section")
so
rst =
"""
Section 1
=========
[...]
.. my_section
Section 3
=========
[...]
"""
should generate 3 sections ; all the same level:
|
- Section 1
|
- my_section
|
- Section 3
|
If i
return [nodes.section(...)]
in my directive, the result is that "my_section" becomes a section inside
"Section 1":
|
- Section 1
| |
| - my_section
|
- Section 3
Is there any way to do this?
I'm sure someone wants to know why...
Each section documents a specific business rule. ( mostly human authored
text, end-user friendly, but also several elements which can be
autogenerated.)
The my_section aims to automate most of the writing of these sections, so
once the directive is working, each section will be migrated one-by one to
using the "my_section directive". The section title should be autogerated,
so
the option of doing a directive: my_body
, and then
Section 1
=========
[...]
Section 2
=========
.. my_body
Section 3
=========
[...]
is not ideal.
--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.