Auto header level adjustement

Use case or problem

  1. I have a note A with # Header1 and ## Header2.
  2. I have a second note B with # Header1 and ## Header2 also.
  3. I want to transclude note B to noteA#Header1 or noteA#Header2 but with header levels adjusted. I mean, If I transclude to noteA#Header1, the noteB#Header1 should have a ## header level and noteB#Header2 should have a ### header level. And If I transclude into noteA#Header2 the noteB#Header1 should have a ### header level and noteB#Header2 should have a #### header level.

Proposed solution

Increment the header level of the transcluded headers by adding the level of the current block where it is transcluded.

Related feature requests (optional)

Maybe this feature should have an additional option to choose if the name of the transcluded note should count as a level or not. In my case, I didn’t use H1 for notes but the note name, but I would like that the note name should be the highest level of the transcluded note and the HX of it should be the HX+1 into the transcluded note.

Summary, if we have:

Note A
Note B

Note B is transcluded into Header X (HX) of Note A.

HY of Note B in Note A = HX + HY + optional 1

5 Likes

I like the idea, but I wouldn’t want this to be the only behavior. I’m not sure how it would distinguish between me wanting to transclude a sub-section, or transclude a new sister-section.

1 Like