Drop your new ideas into the Writing.Com Suggestion Box! |
12,345 GPs were sent to Princess Zelda with this post.
This is now done! I was going to post this whole thing as a note in my notebook but it got too long... Here's the full post... and I'm going to make a mini-post about it in my notebook. So I was sitting here more or less having a seemingly endless internal fight about the best way to continue with some WDC code I'm working on when I note "Automatic Numbering ML?" . It was just what the muse ordered for a diversion! I remember SMs requesting something like this as she was begrudgingly creating the outline in "Writing.Com 101" ... I checked 101 to make sure we didn't create it for that and then just forgot to release it! Anyway... A basic numberer just wouldn't do, so I bring you a beta release of the just-born multifaceted: {list} ML tag. Of course, you can do the simple "list"... {list} first And get:{list} second {list} third 1 first 2 second 3 third But, you can also do... {A-list} first And get this:{A-list} second {A-list} third A first B second C third Or, you can also do... {a-list} first And get this:{a-list} second {a-list} third a first b second c third You can even mix-n-match and do this... {A1-list} first And get this:{A1-list} second {A1-list} third A1 first A2 second A3 third Or start from anywhere... {119-list} first And get this:{119-list} second {119-list} third 119 first 120 second 121 third Or try this... {Y-list} first And get this:{Y-list} second {Y-list} third Y first Z second AA third Then it gets more interesting. You can have multiple lists in the same WritingML area by "naming" them by adding the : to the tag. For example, {list:this} counts separate from {list:that} and {list:thensome}. They can be different sub-types (1, a, A) or the same. {list:THIS} first {indent}{a-list:THAT}) sub-first {indent}{a-list:THAT}) sub-second {indent}{a-list:THAT}) sub-third {list:THIS} second {list:THIS} third And get this: 1 first a) sub-first b) sub-second c) sub-third 2 second 3 third You can have many different lists in one WritingML area... This post is a perfect example of that as each example is it's own list. But here's one more example: {list:List1} first {list:List2} first {list:List1} second {list:List2} second {list:List1} third {list:List2} third And get this... 1 first 1 first 2 second 2 second 3 third 3 third Well... that's the gist of {list} for now. Again, this is fresh out of the box beta-ness. I think it works pretty well, though. Thanks for the muse-ness! ~~SM [EDIT: Appending the other additions so the docs are in one place for now...] Basically within the brace, the whole tag can be as simple as this: { list } or as complete as this: { type-list:name:optional-format } Quick demo of the optional formatting, then lights out for me! 1) xxxx 2) xxx 3) xxx It carries through once set for a given list (tracked by list name). You can change the formatting at any point... 4. xxxx 5. xxx 6. xxx Use % to indicate where the "list" data should go and get crazy... <--< 7. >--> xxxx <--< 8. >--> xxx <--< 9. >--> xxx [[10.]] xxx [[11.]] xxxx [[12.]] xxxx [[13-13.]] xxx [[14-14.]] xxxx [[15-15.]] xxxx Raw code: {list:MyList:)} xxxx {list:MyList} xxx {list:MyList} xxx It carries through once set for a given list (tracked by list name). You can change the formatting at any point... {list:MyList:.} xxxx {list:MyList} xxx {list:MyList} xxx Use {b}%{/b} to indicate where the "list" data should go and get crazy... {list:MyList:<--< %. >-->} xxxx {list:MyList} xxx {list:MyList} xxx {list:MyList:[[%.]]} xxx {list:MyList} xxxx {list:MyList} xxxx {list:MyList:[[%-%.]]} xxx {list:MyList} xxxx {list:MyList} xxxx {b}Animals that are cool:{/b} {100-list:animals:%--> } Cats Cows Sheep Horses Monkeys Elephants Hippos{/100-list} Animals that are cool: 100--> Cats 101--> Cows 102--> Sheep 103--> Horses 104--> Monkeys 105--> Elephants 106--> Hippos |