Hi Thomas
That is great you just reinvented slices for TW5...and the best is: For one slice it even works without setting a number! I would like it to set it to standart "inline", because block is easily done with return or <br>.

Thanks so much!
Bye Jan

I'll have to be off for a week to fininsh some professional duties





Am 09.01.2017 um 19:33 schrieb Thomas Elmiger:
Hi Jan

Easy things first. Good idea ;–)

    My current idea is also to use the extract-macro the other way
    round...in order to build a sort of replacemanet for slices. Mark
    a textpart ant then insert it somewhere else by means of the the
    macro.

This is exactly what extact was made for.

    It would be an idea to use the same mark-up for those slices as
    for slides. Somethin like <sli1> text1 </sli> <sli2> text2 </sli>
    To find them it would be nice to have a macro that would look like
    <<slice "Tiddlername" 1>>.

Ah – a simplified meta-macro (I just invented that word) like our ref macro. Of course this works. I made a demo on http://tid.li/tw5/numbers.html, see Chapter 2 Paragraph 1.1.

Code: http://tid.li/tw5/numbers.html#%24%3A%2F_telmiger%2Fslice

|
\define slice(tiddler,nr,mode:"block")
<$macrocall $name="extract"tiddler="""$tiddler$"""start="<sli$nr$>"end="</sli$nr$>"mode="$mode$"class="slice"/>
\end
|

I opted to add the mode parameter so you can change to inline mode if you like.

And I close the tag using the number <sli1>Your slice</sli*1*>. I am not sure yet that this is the final solution, maybe there is a standard HTML tag we could use and a custom param like <section slice="1">Slice content</section>.

By the way, I think I smashed the bug that was preventing you from updating. I guess you have to add class="summary" (or class:"summary") to your existing macro calls.

I hope, this works for you. All the best!
Thomas
--
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 [email protected] <mailto:[email protected]>. To post to this group, send email to [email protected] <mailto:[email protected]>.
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/e2ff2f93-819d-42a1-a24e-c3c611e8950f%40googlegroups.com <https://groups.google.com/d/msgid/tiddlywiki/e2ff2f93-819d-42a1-a24e-c3c611e8950f%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
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 [email protected].
To post to this group, send email to [email protected].
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/58740120.5060901%40googlemail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to