Nested List from a customized list

76 views
Skip to first unread message

Stephen Kimmel

unread,
Feb 14, 2021, 6:01:56 PM2/14/21
to TiddlyWiki

This will probably strike some of you as ridiculously simple ... I'm working with a wiki that contains several tiddlers that have names in Greek letters. I want to create a list rather like the sidebar type list with the heading being the first letter of the tiddler name followed by a list of tiddler titles that start with that Greek letter. So my list would look something like:

α
  αγαπε
  ἄγω
  ἀναβαίνω
β
  βάλλω
  βλέπω

I want to exclude any tiddler that doesn't begin with a Greek letter so I'm assuming that I would have to supply a list of starting characters.

I would appreciate it if someone could point me in the right direction on this.

Eric Shulman

unread,
Feb 14, 2021, 6:58:13 PM2/14/21
to TiddlyWiki
On Sunday, February 14, 2021 at 3:01:56 PM UTC-8 Stephen Kimmel wrote:
several tiddlers that have names in Greek letters. I want to create a list rather like the sidebar type list with the heading being the first letter of the tiddler name followed by a list of tiddler titles that start with that Greek letter.

Using this list of greek letters: (48 symbols, upper and lower case for each)
Α α Β β Γ γ Δ δ Ε ε Ζ ζ Η η Θ θ Ι ι Κ κ Λ λ Μ μ Ν ν Ξ ξ Ο ο Π π Ρ ρ Σ σ Τ τ Υ υ Φ φ Χ χ Ψ ψ Ω ω

NOTE: A, B, E, H, K, M, N, O, P, T, Y, and X are NOT standard ASCII characters, but are actual greek characters, copied and pasted directly from the first paragraph of this page:

<$list filter="[enlist[Α α Β β Γ γ Δ δ Ε ε Ζ ζ Η η Θ θ Ι ι Κ κ Λ λ Μ μ Ν ν Ξ ξ Ο ο Π π Ρ ρ Σ σ Τ τ Υ υ Φ φ Χ χ Ψ ψ Ω ω]]" variable="letter">
   <$list filter="[all[]prefix<letter>count[]!match[0]]">
      <<letter>><br>
      <$list filter="[all[]prefix<letter>]">
         &nbsp;<$link /><br>
      </$list>
   </$list>
</$list>

Notes:
* the first $list sets the "letter" variable to each of the 48 symbols, one at a time
* the second $list checks to see if there are any tiddlers that start with the current letter
* the letter is displayed on a line by itself
* the third $list finds each tiddler that starts with the current letter
* a link to each matching tiddler is displayed, indented by a space, on a line by itself

enjoy,
-e

Stephen Kimmel

unread,
Feb 14, 2021, 10:10:24 PM2/14/21
to TiddlyWiki
That is extremely close to what I need but there is one wrinkle that isn't obvious. If you look at my example, you'll see that the second and third have accent marks on the leading letter, α (alpha).  It would be nice, if it is possible, for the routine to ignore the accent and breath mark and group them as simply alpha. In the system I'm working in there are something six combinations of accents that can go on the first character but the accents should be ignored for this purpose. Is that possible? If not I can always go to my alternate plan of adding a field that would contain the character I want to use.
Reply all
Reply to author
Forward
0 new messages