[tw5] Re: Create a list of numbers

2018-06-27 Thread Mohammad
Thank you Mark and Diego!
I enjoyed the help from all of you. Each showed a different way to produce 
these numbers.

Cheers
Mohammad

On Wednesday, June 27, 2018 at 7:17:21 PM UTC+4:30, Diego Mesa wrote:
>
> Mohammad,
>
> If you dont want the *full* formula plugin, you can also just use Evan' 
> range operator directly:
>
>
> http://evanbalster.com/tiddlywiki/formulas.html#%24%3A%2Fplugins%2Febalster%2Fformula%2Ffilters%2Frange.js
>
> Diego
>
> On Wednesday, June 27, 2018 at 8:06:23 AM UTC-5, Mohammad wrote:
>>
>> Jed, BTC
>> Thank you very much! Both code works for me!
>> I am learning a lot for this forum!
>>
>> I use your code with the *concatenate* macro from Tobias Beer and now I 
>> can create any number of tiddlers (slides) by one click
>> in my Tiddlyshow application with names like Lec01-slide01, 
>> Lec01-slide02, Lec01-slide03, . Lec01-slide99, ...
>>
>> Thank you again!
>>
>> I would be great if these solution could be documented / stored somewhere 
>> for future use.
>>
>> Best
>> Mohammad
>>
>> On Wednesday, June 27, 2018 at 4:43:32 PM UTC+4:30, BurningTreeC wrote:
>>>
>>> Hi Mohammad,
>>>
>>> I just add how I create such lists:
>>>
>>> Look at this tiddler 
>>> 
>>>  ... 
>>> it stores all integer numbers from 1 to  in its list field
>>>
>>> I just do:
>>>
>>> <$list filter="[list[mynumbertiddler]limit[mylimit]]">
>>> do something
>>> 
>>>
>>> There's also Evan Balster's formula plugin which allows creating ranges!
>>>
>>> <$list filter="[range[99]]">
>>> do something
>>> 
>>>
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/974d1181-4941-483a-aa3d-d082c85dd8cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Create a list of numbers

2018-06-27 Thread 'Mark S.' via TiddlyWiki
Adding to what everyone else has said, if you use a large list of numbers, 
the "nth" operator, and an upper limit, then you can roll your own range 
operator.

e.g. <> would give numbers 27 through 36. One problem is 
that you couldn't use "0" since "nth" is 1-based.

There was another thread from probably a year ago, where it was discussed 
how to generate a huge list of numbers by using nested list widgets.

-- Mark

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/0b20b57d-9dc8-4dfd-853c-cbaaad1653e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Create a list of numbers

2018-06-27 Thread Diego Mesa
Mohammad,

If you dont want the *full* formula plugin, you can also just use Evan' 
range operator directly:

http://evanbalster.com/tiddlywiki/formulas.html#%24%3A%2Fplugins%2Febalster%2Fformula%2Ffilters%2Frange.js

Diego

On Wednesday, June 27, 2018 at 8:06:23 AM UTC-5, Mohammad wrote:
>
> Jed, BTC
> Thank you very much! Both code works for me!
> I am learning a lot for this forum!
>
> I use your code with the *concatenate* macro from Tobias Beer and now I 
> can create any number of tiddlers (slides) by one click
> in my Tiddlyshow application with names like Lec01-slide01, Lec01-slide02, 
> Lec01-slide03, . Lec01-slide99, ...
>
> Thank you again!
>
> I would be great if these solution could be documented / stored somewhere 
> for future use.
>
> Best
> Mohammad
>
> On Wednesday, June 27, 2018 at 4:43:32 PM UTC+4:30, BurningTreeC wrote:
>>
>> Hi Mohammad,
>>
>> I just add how I create such lists:
>>
>> Look at this tiddler 
>> 
>>  ... 
>> it stores all integer numbers from 1 to  in its list field
>>
>> I just do:
>>
>> <$list filter="[list[mynumbertiddler]limit[mylimit]]">
>> do something
>> 
>>
>> There's also Evan Balster's formula plugin which allows creating ranges!
>>
>> <$list filter="[range[99]]">
>> do something
>> 
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/7525e87d-cbaa-47d9-aa0b-c162fb83139d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Create a list of numbers

2018-06-27 Thread Mohammad
Jed, BTC
Thank you very much! Both code works for me!
I am learning a lot for this forum!

I use your code with the *concatenate* macro from Tobias Beer and now I can 
create any number of tiddlers (slides) by one click
in my Tiddlyshow application with names like Lec01-slide01, Lec01-slide02, 
Lec01-slide03, . Lec01-slide99, ...

Thank you again!

I would be great if these solution could be documented / stored somewhere 
for future use.

Best
Mohammad

On Wednesday, June 27, 2018 at 4:43:32 PM UTC+4:30, BurningTreeC wrote:
>
> Hi Mohammad,
>
> I just add how I create such lists:
>
> Look at this tiddler 
> 
>  ... 
> it stores all integer numbers from 1 to  in its list field
>
> I just do:
>
> <$list filter="[list[mynumbertiddler]limit[mylimit]]">
> do something
> 
>
> There's also Evan Balster's formula plugin which allows creating ranges!
>
> <$list filter="[range[99]]">
> do something
> 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/91550aeb-272f-46ad-9eee-9a80e8820cd8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Create a list of numbers

2018-06-27 Thread BurningTreeC
Hi Mohammad,

I just add how I create such lists:

Look at this tiddler 

 ... 
it stores all integer numbers from 1 to  in its list field

I just do:

<$list filter="[list[mynumbertiddler]limit[mylimit]]">
do something


There's also Evan Balster's formula plugin which allows creating ranges!

<$list filter="[range[99]]">
do something



-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/fefa3942-43d5-461b-ac6b-e88779275e03%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Create a list of numbers

2018-06-27 Thread Jed Carty
If you know what a maximum n would be you can do something like this:

title: $:/macro/numb
tags: $:/tags/Macro
list: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 
27 28 29 30

\define numb(n:10 format:"<> ") <$list filter=
'[enlist{$:/macro/numb!!list}first[$n$]]'>$format$


(that means set the title to $:/macro/numb, give it the tag $:/tags/Macro, 
set the list field to the list etc.)

if you need to go above 30 than you continue the list in the list field 
past 30. you can give it a format input that gives the template used to 
list the numbers, so you could use:

<""">>

to get a list that counts from 0 to 9 saying 'This number is 0,' etc.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/567431fa-f5d0-4d16-bcd3-702abfc1e75a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Create a list of numbers

2018-06-27 Thread Mohammad
Thank you Tony!
Most of the time n is unknown in advance so, the question is how write a 
macro or a code to generate <> 0, 1, 2, 3, , n

/Mohammad

On Wednesday, June 27, 2018 at 10:20:41 AM UTC+4:30, TonyM wrote:
>
> Mohammad,
>
> In many cases the following may be enough?
>
> <$list filter="0 1 2 3 4 5 6 7 8 9" variable="units">
> <>
> 
>
> or
>
>
> <$list filter="1 2 3 4 5 6 7 8 9 10 11 12" variable="set">
> <>
> 
>
> or
>
> <$list filter="0 1 2 3 4 5 6 7 8 9" variable="tens">
> <$list filter="0 1 2 3 4 5 6 7 8 9" variable="units">
> <><>
> 
> 
>
>
>
> Regards
> Tony
>
> On Wednesday, June 27, 2018 at 2:39:48 PM UTC+10, Mohammad wrote:
>>
>> Is it possible to create a list of numbers say from 0 to n?
>> For example having a macro like *numb* and then
>>
>> <> 
>>
>> creates
>> 0 1 2 3 4 5 6 7 8 9 10
>>
>>
>>
>> or
>>
>> <> 
>>
>> produces
>> 0 1 2 3 4
>>
>>
>>
>> Thank you
>> Mohammad
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/70b5ca3b-207b-4aa7-a27a-e6410a1a5385%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Create a list of numbers

2018-06-26 Thread TonyM
Mohammad,

In many cases the following may be enough?

<$list filter="0 1 2 3 4 5 6 7 8 9" variable="units">
<>


or


<$list filter="1 2 3 4 5 6 7 8 9 10 11 12" variable="set">
<>


or

<$list filter="0 1 2 3 4 5 6 7 8 9" variable="tens">
<$list filter="0 1 2 3 4 5 6 7 8 9" variable="units">
<><>





Regards
Tony

On Wednesday, June 27, 2018 at 2:39:48 PM UTC+10, Mohammad wrote:
>
> Is it possible to create a list of numbers say from 0 to n?
> For example having a macro like *numb* and then
>
> <> 
>
> creates
> 0 1 2 3 4 5 6 7 8 9 10
>
>
>
> or
>
> <> 
>
> produces
> 0 1 2 3 4
>
>
>
> Thank you
> Mohammad
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/9b5025f5-2d1e-46d1-a04a-4c2f678e20ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.