Organizing Tiddlers for speech and lecturing

閲覧: 82 回
最初の未読メッセージにスキップ

Mohammad

未読、
2018/04/26 16:55:002018/04/26
To: TiddlyWiki
One important requirements to use TW for presentation or lecturing is to have tiddlers in order.
There are some ways. My question is here

How one can have a macro or widget to show at the bottom of tiddler a back/next link to move to previous or next tiddler.

The tiddler can be saved in a story.


Best


Diego Mesa

未読、
2018/04/26 17:13:052018/04/26
To: TiddlyWiki
Hey Mohammad, 

I worked on something like this for my anwiki plugin. The following macro establishes a "linked list" of tiddlers, by setting the "next" field of a tiddler to the tiddler next in the chain. It uses Evan's formula plugin (though Im sure someone else can provide a better solution that does not use the formula plugin.)

\define showSelectedCards(subfilter, finalLink:'')
<!-- Creates a linked list to quiz on -->
<!-- for the n many cards, we return n-1 -->
<$formula-vars counter="count([$subfilter$])-1">
   
<!-- iter goes from 0 to n-2  -->
   
<$list filter="[range<counter>butlast[]]" variable="iter">
       
<!-- arrays need to be accessed from 1 to n -->        
       
<$formula-vars current="nth([$subfilter$], <<iter>> + 1)" next="nth([$subfilter$], <<iter>> + 2)">
           
<$action-setfield $tiddler=<<current>> $field="next" $value=<<next>>/>
            <!--<Current: <<current>>, Next: <<next>> <br/
> -->
       
</$formula-vars>
    </
$list>
   
<!-- take last element with no forward link -->
   
<$list filter="[range<counter>last[]]" variable="iter">
       
<$formula-vars current="nth([$subfilter$], <<iter>> + 1)">
           
<$action-setfield $tiddler=<<current>> next=$finalLink$/>
       
</$formula-vars>
    </
$list>
</$formula-vars>
\end

You use it like this:

<$button>
    Quiz!
    <$macrocall $name="showSelectedCards" subfilter="tag[Test]!sort[created]" finalLink='Home'/>
</$button>

And can change the subfilter, and final link in the chain. 

Mohammad

未読、
2018/04/26 17:39:542018/04/26
To: TiddlyWiki
Thank you Diego!
I 'll try it

Thomas Elmiger

未読、
2018/04/26 17:40:082018/04/26
To: TiddlyWiki
Hi Mohammad

I used this for presentations, it is inspired by a solution from Steve SUNY, if I remember right.

Have fun!
Thomas

<span class="slideshow-next">
<$list filter="[all[current]next[$:/StoryList]]">
<$link to={{!!title}} tooltip="next">
{{$:/core/images/down-arrow}}
</$link>
</$list>
</span>
<span class="slideshow-prev">
<$list filter="[all[current]previous[$:/StoryList]]">
<$link to={{!!title}} tooltip="previous">
{{$:/core/images/up-arrow}}
</$link>
</$list>
</span>

Mark S.

未読、
2018/04/26 19:27:432018/04/26
To: TiddlyWiki
If you have a TOC or other set of items driven by a list field, then you can use this code. (In this example, create a tiddler at tiddlywiki.com and tag it $:/tags/ViewTemplate and populate as follows):

<$list filter="[all[current]tag[HelloThere]]">
<$button>
<$action-listops $tiddler="HelloThere" $subfilter="+[move:-1{!!title}]"/>
<< Move back
</$button>

<$button>
<$action-listops $tiddler="HelloThere" $subfilter="+[move:1{!!title}]"/>
Move forward >>
</$button>
</$list>

-- Mark

Mohammad

未読、
2018/04/27 0:44:542018/04/27
To: TiddlyWiki
Thank you all!
I could use the snippet by Thomas and it works.

My next question is How can I bind some keys with these Next/Previous?

I mean in the zoomin story view or TalkyTalky Tiddlywiki I wish ti have
  • PageDown (and arrow down) for Next tiddler in the storyriver
  • PageUp (and arrow up) for previous tiddler in the storyriver

Best
Mohammad

Mohammad

未読、
2018/04/27 0:46:512018/04/27
To: TiddlyWiki
Mark!
I did what you advised nothing happened! Should I download the TW and save and reload it?
全員に返信
投稿者に返信
転送
新着メール 0 件