Open nedbat opened 1 month ago
I think this is reasonable, but it would mean that include
directives have unique rules w.r.t. tags.
Thoughts @chrisjsewell @picnixz?
A
The request sounds reasonable.
it would mean that
include
directives have unique rules w.r.t. tags.
Yes, include
must influence the tags one way or the other.
Thoughts on the implementation: Tags are currently a constant global setting. Obviously, that has to be changed. There are fundamentally two ways:
make tags non-constant: i.e. temporarly override the global value (think: context manager) while processing the include.
make tags document-local: Tags are currently stored in the app / builder. We could attach the tags to the document instead.
I would like to have a common file that will be included in multiple places in my docs. I want to be able to use
.. only::
directives in that common file, and have tags set differently by different.. include:
directives so that the content is customize for each place it is included.For example (with invented
:tags:
syntax):