Am 09.08.2025 um 22:57 schrieb Henning Hraban Ramm:
I’m working on the rendering of directory trees. Before I try a MetaPost drawing, I’d like to use a nested itemization.

What are my options for changing the symbol of some single items (not whole levels)?

  * \sym{} works, but there’s no \startsym … \stopsym and I’d prefer to
    use a complete structure to properly wrap a sub-itemization.
  * \startitem[symbol=1] … \stopitem isn’t possible.

So far I can do:

📂 root folder
    📁 folder (closed)
    📂 folder (open)
       📄 file.tex
       📄 file.mkiv

I guess I’d also manage to do:

📂 root folder
  ┣━📁 folder (closed)
  ┗━📂 folder (open)
     ┣━📄 file.tex
     ┗━📄 file.mkiv

Would it be possible to do the following with an itemization?

▽ 📂 root folder
┆  ▷ 📁 folder (closed)
┆  ▽ 📂 folder (open)
┆  ┆    📄 file.tex
┆  ┆    📄 file.mkiv

Or are items the wrong approach for this?

You don't need/want to use the itemize mechanism but use on of the following methods:

1. Use \leftskip to increment each level by a fixed amount and add the graphics with \llap at the begin of the entry.

2. Add a \hbox with a fixed size at the beginning of each entry for each level.

You should also take a look at Hans dirtree package included in the distribution.

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to