Specifying the Type attribute for a list

144 views
Skip to first unread message

passingby

unread,
Mar 13, 2019, 5:32:48 PM3/13/19
to TiddlyWiki
Is the a wiki text way to specify the list item type like '1' 'A' 'a' 'I' 'i'  and their start attribute ? or do we have to define and use custom css classes?

PMario

unread,
Mar 13, 2019, 7:56:12 PM3/13/19
to tiddl...@googlegroups.com
On Wednesday, March 13, 2019 at 10:32:48 PM UTC+1, passingby wrote:
Is the a wiki text way to specify the list item type like '1' 'A' 'a' 'I' 'i'  and their start attribute ? or do we have to define and use custom css classes?

S. S.

unread,
Mar 14, 2019, 12:10:06 AM3/14/19
to TiddlyWiki
Search this google group for:
Change bullet list css lower-alpha

Regards

passingby

unread,
Mar 14, 2019, 1:09:38 PM3/14/19
to TiddlyWiki
Thank you. This is just as I thought. I only wanted to make sure I am not missing some tiddlywiki shorthand. Right now I am sometimes in a need of starting a list from a mid value. Like (iv) or something and then sublists with 'a' or 'A'. I am using inline html tag like <ol type="A" start="B">. This is working fine but I wanted to know if there was a shorthand which will reduce the typing. 

passingby

unread,
Mar 14, 2019, 1:14:00 PM3/14/19
to TiddlyWiki
Thank you S. S. 

mervin mecklenburg

unread,
Mar 15, 2019, 12:31:55 PM3/15/19
to TiddlyWiki
If I understand the question, you can also try this.  The Type attribute for HTML can be used with the $list widget as follows:

<ol type="a" start="x">
<$list filter="[tag{!!title}!has[stop]]">
<li><$transclude tiddler={{!!title}} mode="block" /></li>
</$llist>

Also, the list widget can be nested to insert sublists.  For example, I use the following to create a formal outline for my notes:

<ol type="I"><$list filter="[tag{!!title}!has[stop]]">
<li><$link to={{!!title}}><$view field="title"/></$link>
<p></p>

<$transclude tiddler={{!!title}} mode="block" /></li>

<ol type="A"><$list filter="[tag{!!title}!has[stop]]">
<li><$link to={{!!title}}><$view field="title"/></$link>
<p></p>

<$transclude tiddler={{!!title}} mode="block" /></li>

<ol><$list filter="[tag{!!title}!has[stop]]">
<li><$link to={{!!title}}><$view field="title"/></$link>
<p></p>

<$transclude tiddler={{!!title}} mode="block" /></li>

<ol type="a"><$list filter="[tag{!!title}!has[stop]]">
<li><$link to={{!!title}}><$view field="title"/></$link>
<p></p>

<$transclude tiddler={{!!title}} mode="block" /></li>

<ol type="i"><$list filter="[tag{!!title}!has[stop]]">
<li><$link to={{!!title}}><$view field="title"/></$link>
<p></p>

<$transclude tiddler={{!!title}} mode="block" /></li>



</$list></$list></$list>

I hope this is useful.

Merv

passingby

unread,
Mar 15, 2019, 1:15:24 PM3/15/19
to TiddlyWiki
Hello Mervin,

In my use case the lists are just one or two liners items, they do not deserve to go into separate tiddlers of their own. But your use of html tag and list widget is surely useful in other cases.

Thank you

S. S.

unread,
Mar 16, 2019, 7:17:32 AM3/16/19
to TiddlyWiki
passingby,

A little convoluted, but this works:

<style>
.u { list-style-type:upper-alpha; }
.l { list-style-type:lower-alpha; }
.r { list-style-type:upper-roman; }
.n { list-style-type: none;   margin: 0;   padding: 0; }
</style>


*.u How
**.l about
***.r that!
****.n Your
***.r fancy
**.l list
*.u  works


Becomes:
A. How
     a
. about
          I
.  that!
                 
Your
          II
. fancy
     b
. list
B
. works

The WikiText interpretation of a period charachter after the * takes what follows the period as a "class" attribute.

This:
 *.u How
Becomes:
<li class="u">How<ul>

Hope that helps in some way.

Regards

passingby

unread,
Mar 16, 2019, 4:29:31 PM3/16/19
to TiddlyWiki
Its quite handy and short. I definitely use it. Thank you!

PMario

unread,
Mar 17, 2019, 11:03:20 AM3/17/19
to TiddlyWiki
Hi,

If you want to set things globally just create a new stylesheet tiddler with this content

ol li { list-style-type:upper-alpha; }
ol li li  { list-style-type:lower-alpha; }
ol li li li { list-style-type:upper-roman; }


Using with ordered lists

# test 
## asdf
### test

No extra chars needed. Especially if you need to change something later, you don't need to think about it, which class to use

have fun!
mario


Mohammad

unread,
Mar 17, 2019, 12:23:25 PM3/17/19
to TiddlyWiki
Added to TW-Scripts.
Reply all
Reply to author
Forward
0 new messages