[tw] Re: [TW5] parse and style a tiddler content

2017-07-14 Thread paolo b
Hi  Tony

your suggestion is spot on, in fact I'm using a modified version of Tobias' 
approach.

The only remark I have is that the sort operator in


<$list filter="[indexes[]sort[title]]">

appears to be superfluous, since

$:/core/modules/filters/indexes.js

already forces sorting according to the titles.

This was also a problem for me, since I wanted to list the data tiddler in 
its original order.
I've solved my problem by simply commenting

results.sort();  

at the bottom of  

$:/core/modules/filters/indexes.js 

On a different front, I've also managed to programmatically change the type 
of the tiddler, so that it is temporarily set to data.
So I'm pretty happy now.

Regards

Paolo

On Friday, July 14, 2017 at 11:15:49 AM UTC+2, TonyM wrote:
>
> Paolo,
>
> I may be off track but if you are trying to deal with what are effectively 
> data tiddlers with content in the form
> word: definition
>
> Then Tobias mentions how to Iterate DataTiddler Indexes
> https://tobibeer.github.io/tb5/#Iterate%20DataTiddler%20Indexes
>
> That may contain some useful code
>
> Regards
> Tony
>
>
> On Wednesday, 12 July 2017 00:00:33 UTC+10, paolo b wrote:
>>
>> yes Mark, it did help - thanks.
>>
>> I also defined a tooltip stylesheet so that I can style it as I like with:
>>
>>
>> <$wikify name="answer"  text=<> >
>>> class="tooltip"> > title="">//<>//
>>
>>
>> As a side effect, however, my original tiddler (now converted into data 
>> type) has lost its previous formatting. 
>>
>> Is there a way to avoid this, e.g. with a smarter transclusion, so that I 
>> can keep the original format??
>>
>> Paolo
>>
>>
>> On Saturday, July 8, 2017 at 9:11:55 PM UTC+2, Mark S. wrote:
>>>
>>> I didn't use any stylesheet stuff with this, though I imagine there are 
>>> ways to approach it that would. I created the "tip" with *span 
>>> title="stuff"*
>>>
>>> If you create a data tiddler (be sure to mark it's type at the bottom of 
>>> the tiddler) with this data and call it, for example, Quiz1 :
>>>
>>> tiddler: the smallest semantic unit
>>> field:  a semantic unit smaller than a tiddler
>>>
>>> And then set up these macros (perhaps globally):
>>>
>>> \define getanswer() {{$(tiddler)$##$(question)$}}
>>> \define makequiz(quiz) 
>>> <$vars tiddler="$quiz$">
>>> <$list filter="[[$quiz$]] +[indexes[]]" variable="question">
>>>
>>> <$wikify name="answer"  text=<> >
>>> ''Term'': >>//<>//
>>>
>>> 
>>> 
>>> 
>>> \end
>>>
>>>
>>>
>>> Then you can create a list of terms based on Quiz1 by invoking like this:
>>>
>>>
>>> <>
>>>
>>> When you hover over a term, it's definition will pop up.
>>>
>>> HTH
>>> 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/33e64e02-8e03-4a5d-aec8-95de1fa22abe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] parse and style a tiddler content

2017-07-14 Thread TonyM
Paolo,

I may be off track but if you are trying to deal with what are effectively 
data tiddlers with content in the form
word: definition

Then Tobias mentions how to Iterate DataTiddler Indexes
https://tobibeer.github.io/tb5/#Iterate%20DataTiddler%20Indexes

That may contain some useful code

Regards
Tony


On Wednesday, 12 July 2017 00:00:33 UTC+10, paolo b wrote:
>
> yes Mark, it did help - thanks.
>
> I also defined a tooltip stylesheet so that I can style it as I like with:
>
>
> <$wikify name="answer"  text=<> >
>> class="tooltip">  title="">//<>//
>
>
> As a side effect, however, my original tiddler (now converted into data 
> type) has lost its previous formatting. 
>
> Is there a way to avoid this, e.g. with a smarter transclusion, so that I 
> can keep the original format??
>
> Paolo
>
>
> On Saturday, July 8, 2017 at 9:11:55 PM UTC+2, Mark S. wrote:
>>
>> I didn't use any stylesheet stuff with this, though I imagine there are 
>> ways to approach it that would. I created the "tip" with *span 
>> title="stuff"*
>>
>> If you create a data tiddler (be sure to mark it's type at the bottom of 
>> the tiddler) with this data and call it, for example, Quiz1 :
>>
>> tiddler: the smallest semantic unit
>> field:  a semantic unit smaller than a tiddler
>>
>> And then set up these macros (perhaps globally):
>>
>> \define getanswer() {{$(tiddler)$##$(question)$}}
>> \define makequiz(quiz) 
>> <$vars tiddler="$quiz$">
>> <$list filter="[[$quiz$]] +[indexes[]]" variable="question">
>>
>> <$wikify name="answer"  text=<> >
>> ''Term'': >>//<>//
>>
>> 
>> 
>> 
>> \end
>>
>>
>>
>> Then you can create a list of terms based on Quiz1 by invoking like this:
>>
>>
>> <>
>>
>> When you hover over a term, it's definition will pop up.
>>
>> HTH
>> 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/c687076d-9900-49a8-9883-509f5cb0fceb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] parse and style a tiddler content

2017-07-11 Thread paolo b
yes Mark, it did help - thanks.

I also defined a tooltip stylesheet so that I can style it as I like with:


<$wikify name="answer"  text=<> >
   > class="tooltip"> //<>//


As a side effect, however, my original tiddler (now converted into data 
type) has lost its previous formatting. 

Is there a way to avoid this, e.g. with a smarter transclusion, so that I 
can keep the original format??

Paolo


On Saturday, July 8, 2017 at 9:11:55 PM UTC+2, Mark S. wrote:
>
> I didn't use any stylesheet stuff with this, though I imagine there are 
> ways to approach it that would. I created the "tip" with *span 
> title="stuff"*
>
> If you create a data tiddler (be sure to mark it's type at the bottom of 
> the tiddler) with this data and call it, for example, Quiz1 :
>
> tiddler: the smallest semantic unit
> field:  a semantic unit smaller than a tiddler
>
> And then set up these macros (perhaps globally):
>
> \define getanswer() {{$(tiddler)$##$(question)$}}
> \define makequiz(quiz) 
> <$vars tiddler="$quiz$">
> <$list filter="[[$quiz$]] +[indexes[]]" variable="question">
>
> <$wikify name="answer"  text=<> >
> ''Term'': >>//<>//
>
> 
> 
> 
> \end
>
>
>
> Then you can create a list of terms based on Quiz1 by invoking like this:
>
>
> <>
>
> When you hover over a term, it's definition will pop up.
>
> HTH
> 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/1c496236-8cfb-491f-a34e-6c2a8294d4ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] parse and style a tiddler content

2017-07-08 Thread 'Mark S.' via TiddlyWiki
I didn't use any stylesheet stuff with this, though I imagine there are 
ways to approach it that would. I created the "tip" with *span 
title="stuff"*

If you create a data tiddler (be sure to mark it's type at the bottom of 
the tiddler) with this data and call it, for example, Quiz1 :

tiddler: the smallest semantic unit
field:  a semantic unit smaller than a tiddler

And then set up these macros (perhaps globally):

\define getanswer() {{$(tiddler)$##$(question)$}}
\define makequiz(quiz) 
<$vars tiddler="$quiz$">
<$list filter="[[$quiz$]] +[indexes[]]" variable="question">

<$wikify name="answer"  text=<> >
''Term'': >>//<>//
   



\end



Then you can create a list of terms based on Quiz1 by invoking like this:


<>

When you hover over a term, it's definition will pop up.

HTH
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/b81ccd3a-4058-4e3f-9051-ced09ad8b96b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] parse and style a tiddler content

2017-07-08 Thread 'Mark S.' via TiddlyWiki
For some reason, Google isn't let me post my response.

-- 
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/05ae72cb-3223-49bf-bda4-66d35f0ee8d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.