Topic: Could we get a DText multi-section guide in DText Help?

Posted under e621 Tools and Applications

I've been trying to figure out the section formatting of DText, I'm especially having trouble getting nested sections to work without breaking, such as seen here: topic #1234
It would be great if the DText help covered this with an example, because it only shows how to do single sections.
So far I've succeeded in making deep sections (multiple single-file sections within each other) and accidentally succeeded in making 2 sections within one section, but any attempt to expand or figure out what made it work just breaks down into separate sections or breaks that into a deep stack again. I tried googling for answers but there's nothing anywhere that I could find.
Any help the Help guide could offer would be deeply appreciated.

Not really sure what part you're struggling with, but here's an example of some nested sections. Or maybe you already achieved that?

This section has sections within it.

Stuff here

This section has a name

Even more stuff here

Another section with stuff in it

[section]
    This section has sections within it.
    [section]
        Stuff here
        [section=This section has a name]
            Even more stuff here
        [/section]
    [/section]
    [section]
        Another section with stuff in it
    [/section]
[/section]

Also because most sections being closed by default1 annoys me:

This section is open by default.

This open-by-default section has a name

Whee

[section,expanded]
    This section is open by default.
    [section,expanded=This open-by-default section has a name]
        Whee
    [/section]
[/section]

1 It's fine for sections to be closed by default if they contain stories lasting multiple paragraphs, they actually should be, but too often I've seen them default-closed in a post description that has just a few lines copied from the source description.

Thank you for the examples you've given me, this should help a lot. <3
The problem I've had is that this is the only example displayed in the help documentation.

[section]Pretend this is a really large block of text.[/section]
[section=Some Title]This one has a title.[/section]
[section,expanded=Title]This is expanded by default.[/section]

So when I tried to figure out how to nest that, I only had access to those lines and my own intuition, logic and experimentation. And so I tried to do it this way.

[section=Some Category] [section=SubCategory * list of something in category. ** sublist of something in category listing. * list of something in category. [/section] [section=SubCategory * list of something in category. ** sublist of something in category listing. * list of something in category. [/section][/section]

That's how I ended up with hugely mixed results.
I tried to do it this way because I found that headers or non-lists between lists of tag links would make the list insets wonky and glitchy. For example a header above a list would make a double* look like it was only a half* appearing in front of the single* it was supposed to be a subset to. Let me see if I can recreate examples using random tags.

Some Category

Ok so the example here somehow escaped the section code, but in the escaped section you should be able to see what I meant by the half* mentioned above.

[section,expanded=Some Category] h6.SubCategory * [[rebekah|Rebekah]] * [[tanjiro_kamado|Tanjiro Kamado]] ** [[clawroline|Clawroline]] * [[caleo_(caleodrahirit)|Caleo Drahirit]] h6.SubCategory * [[rebekah|Rebekah]] * [[tanjiro_kamado|Tanjiro Kamado]] ** [[clawroline|Clawroline]] * [[caleo_(caleodrahirit)|Caleo Drahirit]] [/section]

So lets try using what you've shown me to do this.

Some Category

At this point my best guess is that the list code doesn't like being inside multiple sections in a row, because I can see nothing here that should allow escape from Dtext as far as my understanding goes.

[section,expanded=Some Category] Category description. [section=SubCategory] * [[rebekah|Rebekah]] * [[tanjiro_kamado|Tanjiro Kamado]] ** [[clawroline|Clawroline]] * [[caleo_(caleodrahirit)|Caleo Drahirit]] [/section] [section=SubCategory] * [[rebekah|Rebekah]] * [[tanjiro_kamado|Tanjiro Kamado]] ** [[clawroline|Clawroline]] * [[caleo_(caleodrahirit)|Caleo Drahirit]] [/section] [/section]

So let try without list.

Some Category
[section,expanded=Some Category] Category description. [section=SubCategory] [[rebekah|Rebekah]] [[tanjiro_kamado|Tanjiro Kamado]] - [[clawroline|Clawroline]] [[caleo_(caleodrahirit)|Caleo Drahirit]] [/section] [section=SubCategory] [[rebekah|Rebekah]] [[tanjiro_kamado|Tanjiro Kamado]] - [[clawroline|Clawroline]] [[caleo_(caleodrahirit)|Caleo Drahirit]] [/section] [/section]

Seeing as this works, I can only conclude that lists somehow affect the ability to have multiple sections nested next to each other.
If there is a way to do this, I would love to know. And again thank you all for helping me learn Dtext, I really appreciate it.

watsit said:
Also because most sections being closed by default1 annoys me:

...

1 It's fine for sections to be closed by default if they contain stories lasting multiple paragraphs, they actually should be, but too often I've seen them default-closed in a post description that has just a few lines copied from the source description.

I really agree, it's annoying that sections auto-hide even if there's only a title for the post and a single line of text for a description. Idem's Sourcing Suite defaults to using section tags when generating the descriptions so I just ended up making my own fork that uses a heading tag instead. I was originally just going to make it [section,expanded] but wasn't really sure what the point of being able to collapse 2 lines of text would be.

wilderpuss said:
Seeing as this works, I can only conclude that lists somehow affect the ability to have multiple sections nested next to each other.
If there is a way to do this, I would love to know. And again thank you all for helping me learn Dtext, I really appreciate it.

I played around for it with a little while and yeah, it seems like just having a list inside one of the nested sections breaks it. Looks like it's just a bug with DText.

faucet said:
I really agree, it's annoying that sections auto-hide even if there's only a title for the post and a single line of text for a description. Idem's Sourcing Suite defaults to using section tags when generating the descriptions so I just ended up making my own fork that uses a heading tag instead. I was originally just going to make it [section,expanded] but wasn't really sure what the point of being able to collapse 2 lines of text would be.

I played around for it with a little while and yeah, it seems like just having a list inside one of the nested sections breaks it. Looks like it's just a bug with DText.

Thank you so much for confirming that its not me going insane on my end. <3
I tried using a few other features like quote inside the sections to see if it helped but i couldn't get it to work. I haven't tried table, but I can only assume it just doesn't work.

Re: expanded sections, i'm not sure I agree. Collapsed sections in my subjective opinion are just neater and easier on the casual user's eye. Now... I'd make an exception for nested sections, with the root section being expanded by default, but the nested sub-sections collapsed by default.

faucet said:
I was originally just going to make it [section,expanded] but wasn't really sure what the point of being able to collapse 2 lines of text would be.

Plus the Description box itself is a collapsible section, and there's even an account setting under Advanced for "Description collapsed initially" for users that may want them hidden by default, which makes me scratch my head about why use another [section] to copy the source description into.

wilderpuss said:
Thank you so much for confirming that its not me going insane on my end. <3
I tried using a few other features like quote inside the sections to see if it helped but i couldn't get it to work. I haven't tried table, but I can only assume it just doesn't work.

Oops, 5 month late response because I forgot this thread existed. This is now being tracked at issue #487.

With Earlopain's observations I can see now there's currently a way to do this by adding a newline to the end of the list. Not really the ideal solution, but a workaround until it's patched nonetheless.

[section,expanded=Some Category]
       Category description.
       [section=SubCategory]
*              [[rebekah|Rebekah]]
*              [[tanjiro_kamado|Tanjiro Kamado]]
**              [[clawroline|Clawroline]]
*              [[caleo_(caleodrahirit)|Caleo Drahirit]]

       [/section]
       [section=SubCategory]
*              [[rebekah|Rebekah]]
*              [[tanjiro_kamado|Tanjiro Kamado]]
**              [[clawroline|Clawroline]]
*              [[caleo_(caleodrahirit)|Caleo Drahirit]]

       [/section]
[/section]

Results in:

Some Category

faucet said:
Oops, 5 month late response because I forgot this thread existed. This is now being tracked at issue #487.

With Earlopain's observations I can see now there's currently a way to do this by adding a newline to the end of the list. Not really the ideal solution, but a workaround until it's patched nonetheless.

[section,expanded=Some Category]
       Category description.
       [section=SubCategory]
*              [[rebekah|Rebekah]]
*              [[tanjiro_kamado|Tanjiro Kamado]]
**              [[clawroline|Clawroline]]
*              [[caleo_(caleodrahirit)|Caleo Drahirit]]

       [/section]
       [section=SubCategory]
*              [[rebekah|Rebekah]]
*              [[tanjiro_kamado|Tanjiro Kamado]]
**              [[clawroline|Clawroline]]
*              [[caleo_(caleodrahirit)|Caleo Drahirit]]

       [/section]
[/section]

Results in:

Some Category

Thank you for posting this workaround faucet! I hope it can be reflected in the Dtext help page as its a very handy trick.

watsit said:
Plus the Description box itself is a collapsible section, and there's even an account setting under Advanced for "Description collapsed initially" for users that may want them hidden by default, which makes me scratch my head about why use another [section] to copy the source description into.

Hey, a bit late I know. Seems I wasn't actually subscribed to this thread. (thanks again faucet) The utility of nested sections wouldn't really be that helpful for post descriptions, I agree. But its a godsend in wiki articles and the likes, particularly for the more root-level wiki articles such as a large video game franchise like Mario Bros where it may be desirable to have characters sections separated by "game introduced" for various character or species tags etc. Or corporation "franchise" wiki articles such a Sony or Blizzard.
Hope this sheds some light on why I think this workaround would be handy :3

Updated

  • 1