[tw5] Re: Macro

2023-02-05 Thread vinvi...@gmail.com
Thank you Eric Shulman, it works. Op zondag 5 februari 2023 om 17:03:31 UTC+1 schreef Eric Shulman: > Give this a try: > ``` > \define checkbox-list(values,fieldname) > <$list filter="[enlist[$values$]]" variable="thisValue" > > <$checkbox listField="$fieldname$" checked=<>> > <> > > \end >

[tw5] Re: Macro

2023-02-05 Thread Eric Shulman
Give this a try: ``` \define checkbox-list(values,fieldname) <$list filter="[enlist[$values$]]" variable="thisValue" > <$checkbox listField="$fieldname$" checked=<>> <> \end ``` Notes: * If the `values` list has items that contain double quotes or square brackets, those characters will

Re: [tw5] Re: Macro editor for KaTeX plugin

2021-08-05 Thread '8d1h' via TiddlyWiki
Hi, Just for information, I manually updated my local KaTeX to the latest version (simply copy the files to the correct location) and everything seems to work nicely. On Thursday, 5 August 2021 at 18:19:24 UTC+2 Mohammad wrote: > @Mario, > > Is it possible to update KaTex to 0.13.13! I am

Re: [tw5] Re: Macro editor for KaTeX plugin

2021-08-05 Thread Mohammad Rahmani
@Mario, Is it possible to update KaTex to 0.13.13! I am not sure if this PR is affected by the update or not! but TW KaTex needs to be updated from 0.12 (Jul 2020) to 0.13.13 (Jun 2021) Best wishes Mohammad On Thu, Aug 5, 2021 at 8:26 PM PMario wrote: > Hi folks, > > I want to add, that

[tw5] Re: Macro editor for KaTeX plugin

2021-08-05 Thread PMario
Hi folks, I want to add, that this is _NOT PRODUCTION READY_ at the moment. The PR at github looks good, but there is still some discussion going on. So it will be nice to get your feedback here or at github! -mario -- You received this message because you are subscribed to the Google

[tw5] Re: macro variable valuation

2021-04-07 Thread Jean-Pierre Rivière
I've checked the view widget. For tge display, it has the same effect as the text widget today if used with "text" format. And if used with "htmlwikified" format, it gives me the html source of what I want to display. Add a wikify widget, and that's it ! (No need for my "codexe" tiddler). The

[tw5] Re: macro variable valuation

2021-04-06 Thread Jean-Pierre Rivière
I've been able to have the link with my latest idea. But it adds an other tiddler, tgat I call codexe. this tiddler has a tw5 type and just transclude the code tiddler. Then my user tiddler transclude codexe. Some code to make things clearer. * tiddler codexe: <$transclude tiddler=code

[tw5] Re: macro variable valuation

2021-04-06 Thread Jean-Pierre Rivière
If I use DEMO: <$text text=<>/> then I get the body of tho demo macro' with the parameters ($dico$ and $index$) replaced by the expressions sent as arguments (not their evaluation). It could be somewhat handy but it was not what was looked for. for the MACRO line, I can't do anything else. I

[tw5] Re: macro variable valuation

2021-04-06 Thread 'Mark S.' via TiddlyWiki
On Tuesday, April 6, 2021 at 8:57:15 AM UTC-7 jn.pierr...@gmail.com wrote: > I tried the text widget thus: > > * DEMO: <$text text="""<>"""/> > * MACRO: <$text text="""<$macrocall $name=demo {{!!dico}} > {{!!index}}/>"""/> > >> >>> You wrapped the arguments in strings, so now it interprets

[tw5] Re: macro variable valuation

2021-04-06 Thread Jean-Pierre Rivière
I tried the text widget thus: * DEMO: <$text text="""<>"""/> * MACRO: <$text text="""<$macrocall $name=demo {{!!dico}} {{!!index}}/>"""/> and I got: - DEMO: <> - MACRO: <$macrocall $name=demo {{!!dico}} {{!!index}}/> I thought that the macrocall parameter were to interpretated before the

[tw5] Re: macro variable valuation

2021-04-06 Thread Jean-Pierre Rivière
Thank you Mark, this is most clear and straightforward. So I've introduced an auxmacro to be sure what I get is what I want: \define auxdemo(dico, index) <$macrocall $name=spacedemo dico=$dico$ index=$index$/> ÇThat way, it will be easier to write my macro. No more ugly surprise. And yes it

[tw5] Re: macro variable valuation

2021-04-06 Thread 'Mark S.' via TiddlyWiki
Macros with << >> syntax do simple text substitution. They look like "functions", but they are really just text substituters (new word). Sometimes AFTER the substitution things will get rendered. So in your expression !!! space demo for "$index$" in "$dico$" [[$dico$]] (not [[$dico$|$index$]])

[tw5] Re: macro variable valuation

2021-04-06 Thread clutterstack
Hi, You've troubleshot it pretty well yourself, and you've run into a big difference between WikiText and the kind of programming you might be used to. To quote the docs , "Macros are in fact just parameterised variables". Things don't get evaluated everywhere

Re: [tw5] Re: Macro call question

2021-03-26 Thread Jeremy Ruston
Hi Damon By default the wikify widget parses the text using "block" mode, where paragraphs are generated, and block formatting like headings and list are recognised. You can force "inline" mode with the "mode" attribute: https://tiddlywiki.com/#WikifyWidget Best wishes Jeremy -- Jeremy

[tw5] Re: Macro call question

2021-03-25 Thread History Buff
Alright, that seems to do the trick for the most part. I do have a question though. Using the wikify widget with the output set to html puts a leading and trailing around the text I enter. This normally wouldn't be a big deal, but since this is ultimately ending up in a table cell, it causes

[tw5] Re: Macro call question

2021-03-25 Thread History Buff
After a bit of research, I discovered the output parameter of the wikify widget. I hadn't noticed that when I had tried wikify before. If I set the output to html, then I seem to get exactly what I want (at least in the experiment that I did). I will next try it in my mileage macro to make

[tw5] Re: Macro call question

2021-03-25 Thread History Buff
One more thing I should point out is that the above only works if I type in the text in the notes area first and then select from the drop downs. If I do a dropdown first, all of the default text disappears so this really isn't an optimal solution. On Wednesday, March 24, 2021 at 2:34:33 PM

[tw5] Re: Macro: How convert wikified macro output as a "List"

2021-03-03 Thread Mohamed Amin
Thanks a lot Mat for your notes/pointers, I really appreciate it. Regarding the "4 brackets"; actually I got it from this conversation , and it works OK with me, and if I used only 2 brackets, the "enlist" doesn't split the

[tw5] Re: Macro: How convert wikified macro output as a "List"

2021-03-03 Thread Mat
Instead of <$list variable="myList" filter="[enlist]"> Auther of : <> is {{{[get[auther]]}}} you don't need a variable <$list filter="[enlist]"> Auther of :<$link/> or <$view field=title/> is {{!!auther}} <:-) On Wednesday, March 3, 2021 at 10:27:31 AM UTC+1 Mat wrote: > OK this is just

[tw5] Re: Macro: How convert wikified macro output as a "List"

2021-03-03 Thread Mat
OK this is just to give some pointers. I did not test your (nor my) code so maybe you had good reasons for exactly how you did it and my suggestions don't work. \define prepEnlisting(nlst) > $nlst$ > \end > Not sure why you're using all those brackets. You can probably write it in a

[tw5] Re: Macro: How convert wikified macro output as a "List"

2021-03-02 Thread Mohamed Amin
Actually I used the following to keep Macro parameter "locally" \define prepEnlisting(nlst) $nlst$ \end \define myBooks(category lang) <$list filter="[all[tiddlers]tag[$category$]tag[$lang$]]" variable="macO"> <$macrocall $name="prepEnlisting" nlst=<> /> \end <$wikify name="wkfd"

[tw5] Re: Macro: How convert wikified macro output as a "List"

2021-03-02 Thread Mohamed Amin
Ok, I figured it out (Thanks BTC ) \define prepEnlisting(nlst) $(macO)$ \end \define myBooks(category lang) <$list filter="[all[tiddlers]tag[$category$]tag[$lang$]]" variable="macO"> <> \end <$wikify name="wkfd"

[tw5] Re: macro for 'if field exists then A else B else C' ???

2021-01-05 Thread Glenn Dixon
On Tuesday, January 5, 2021 at 5:55:27 PM UTC-5 TW Tones wrote: > Dix, > > Since you mentioned it I had a look at LibraryThing, and started > cataloguing my books found in different locations "Rooms, shelves" since > the ISBN scanner is easy to use. > > Have you exported LibraryThing data?

[tw5] Re: macro for 'if field exists then A else B else C' ???

2021-01-05 Thread TW Tones
Dix, Since you mentioned it I had a look at LibraryThing, and started cataloguing my books found in different locations "Rooms, shelves" since the ISBN scanner is easy to use. Have you exported LibraryThing data? Eventually I may move this data into tiddlywiki. I am, off to our "shack in the

[tw5] Re: macro for 'if field exists then A else B else C' ???

2021-01-04 Thread Glenn Dixon
Thanks, but I've moved my book collection back online to LibraryThings. On Monday, January 4, 2021 at 5:10:46 AM UTC-6 amreus wrote: > Hopefully this is helpful. I also find the syntax arcane and still > struggle with constructing code like the following. > > \define makeimg() > <$vars >

[tw5] Re: macro for 'if field exists then A else B else C' ???

2021-01-04 Thread amreus
Hopefully this is helpful. I also find the syntax arcane and still struggle with constructing code like the following. \define makeimg() <$vars imgurl="http://covers.librarything.com/devkey/dev-key/medium/isbn/; fallback="[[Normal Link|http://google.com]];

[tw5] Re: macro for 'if field exists then A else B else C' ???

2021-01-03 Thread Glenn Dixon
Thank you very much for your help! I guess I need to give up on this particular idea. There are only so many hours I can spend struggling with something like this before I am simply ready to ditch TiddlyWiki altogether. I really struggle with the syntax. Depending on the context, I may need

[tw5] Re: macro for 'if field exists then A else B else C' ???

2021-01-03 Thread Saq Imtiaz
Wrap the image part in a <$list> widget that tests whether isbn is blank. You can use the emptyMessage attribute to show the plain URL instead when there is no isbn. On Sunday, January 3, 2021 at 4:10:44 PM UTC+1 dix...@gmail.com wrote: > Yes, but I need a plain URL, not an image link, so

[tw5] Re: macro for 'if field exists then A else B else C' ???

2021-01-03 Thread Glenn Dixon
Yes, but I need a plain URL, not an image link, so wouldn't be able to use <$image ... On Sunday, January 3, 2021 at 9:08:08 AM UTC-6 saq.i...@gmail.com wrote: > The last example does that, it falls back to an entirely different URL if > no ISBN fields exist. > > On Sunday, January 3, 2021 at

[tw5] Re: macro for 'if field exists then A else B else C' ???

2021-01-03 Thread Saq Imtiaz
The last example does that, it falls back to an entirely different URL if no ISBN fields exist. On Sunday, January 3, 2021 at 3:59:03 PM UTC+1 dix...@gmail.com wrote: > This looks nice! It appears to put all the right code in the right place. > Now if only librarything servers would quit

[tw5] Re: macro for 'if field exists then A else B else C' ???

2021-01-03 Thread Glenn Dixon
This looks nice! It appears to put all the right code in the right place. Now if only librarything servers would quit dying on me... Are there any other widgets with :filter and :else options that I could use to do something similar w/ a link? Specifically, use isbn or isbn13 in link, but if

[tw5] Re: macro for 'if field exists then A else B else C' ???

2021-01-03 Thread Saq Imtiaz
Here is an example on falling back to the generic image if no ISBN fields are defined \define makeimg() <$vars isbn={{{[{!!isbn}!is[blank]else{!!isbn13}]}}}> <$image source={{{ [[http://covers.librarything.com/devkey/dev-key-goes-here/medium/isbn/]addsuffix] :filter[!is[blank]] :else[[generic

[tw5] Re: macro for 'if field exists then A else B else C' ???

2021-01-03 Thread Saq Imtiaz
One option would be to call your macro like this: <$macrocall $name="makeimg" isbn={{{ [{!!isbn}!is[blank]else{!!isbn13}] }}} /> This would be simpler: \define makeimg() <$vars isbn={{{[{!!isbn}!is[blank]else{!!isbn13}]}}}> <$image source={{{

[tw5] Re: macro for 'if field exists then A else B else C' ???

2021-01-03 Thread Glenn Dixon
My brain is obviously incapable of understanding TW documentation. Any way, here is the code \define makeimg(isbn) [img[http://covers.librarything.com/devkey/dev-key-goes-here/medium/isbn/$isbn$]] <$macrocall $name="makeimg" isbn={{!!isbn}} /> I need to basically add options for "if no isbn,

[tw5] Re: macro for 'if field exists then A else B else C' ???

2021-01-03 Thread Saq Imtiaz
Sounds like something I would do either with filters use the else[] operator, or with nested <$view> widgets (where the content of a view widget is only displayed if the target field is absent). https://tiddlywiki.com/#ViewWidget Hard to be more specific without seeing your code. On Sunday,

[tw5] Re: [Macro] datauri macro and svg images

2020-12-14 Thread Joshua Fontany
Interesting... I wonder if this is true for all SVGs or just the core. The core image tiddlers are not actually "type:image/svg+xml", they do not have a type value, and are interpreted as wiki-text when transcluded. Best, Joshua F On Wednesday, December 9, 2020 at 1:33:52 AM UTC-8 Mohammad

[tw5] Re: Macro

2020-12-04 Thread TW Tones
Do explain why you want a macro, Is it for reusable code? I will provide a different solution to yours once I understand more. I did learn by reviewing the core buttons in tiddlywiki, search the shadow tiddlers, they can be simplified further. It seems to me in this case the macro is almost as

[tw5] Re: Macro

2020-12-04 Thread 'Mark S.' via TiddlyWiki
You can't use a parameter with spaces in the name (e.g., you can't use "now format" as a parameter). You also can't create field names with spaces in them. Substituting hyphens for spaces, and a few other changes, this might be closer to what you want: \define NEW-TIDDLER(now-format:"XXX"

[tw5] Re: macro definition

2020-09-17 Thread TW Tones
Also, An empty define of the form \define name() \end or \define name() \end Will cause problems However \define note() Note in macros \define note() Some notes \end Thus redefining, is the best option for in line comments. Also there is now a new tag SystemTag: $:/tags/Macro/View

[tw5] Re: macro definition

2020-09-17 Thread Felicia Crow
Hi, yes as long as all the macros are defined at the beginning of the tiddler. Empty lines to seperate the individual tiddlers work, but everything else in between will trip tiddlywiki up and won't let it recognize the \define following. Regards, Felicia On Thursday, 17 September 2020

[tw5] Re: Macro Call : Passing TiddlerName with quotations

2020-08-25 Thread Rob Hoelz
Hi Mohamed, I think an alternative would be the "Parameters as Variables" syntax described here - with that, your macro would look like this: > \define getWithStatus(myStatus) > <$set name="myStatus" value=<<__myStatus__>> > >

[tw5] Re: Macro Call : Passing TiddlerName with quotations

2020-08-25 Thread PMario
On Tuesday, August 25, 2020 at 1:14:25 PM UTC+2, Mohamed Amin wrote: > > Thanks PMario for your comment, > > Actually the above were not a "real" values, just a way to present my > issue, in real word I'm using True/False or Yes/No (but your suggestion > "ok"/"nok" are very nice too) > yes /

[tw5] Re: Macro Call : Passing TiddlerName with quotations

2020-08-25 Thread Mohamed Amin
Thanks PMario for your comment, Actually the above were not a "real" values, just a way to present my issue, in real word I'm using True/False or Yes/No (but your suggestion "ok"/"nok" are very nice too) Thanks again On Tuesday, August 25, 2020 at 12:33:55 PM UTC+2 PMario wrote: > Hi

[tw5] Re: Macro Call : Passing TiddlerName with quotations

2020-08-25 Thread PMario
Hi Mohammad, I'd use much simpler values for the status eg: OK and NOK or ok and nok, which are fast to type and easy to test. just a thought. mario -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop

[tw5] Re: Macro Call : Passing TiddlerName with quotations

2020-08-24 Thread Mohamed Amin
Thanks a lot Saq and Eric, YES that was the problem, and using the tripled-quotes solved it immediately P.S: I've using TW5 for almost a year now, and every day I know a new (and strange) thing about this AMAZING piece of software. Thanks to all contributions & Community On Monday, August

[tw5] Re: Macro Call : Passing TiddlerName with quotations

2020-08-24 Thread Eric Shulman
On Monday, August 24, 2020 at 1:41:42 PM UTC-7, Mohamed Amin wrote: > > ... I've a simple Macro to get all Tiddler by "status" : > \define getWithStatus(myStatus) > <$list filter="[all[tiddlers]contains:status[$myStatus$]]" /> > \end > As expected, when I run the below macro command: > <> > The

[tw5] Re: Macro Call : Passing TiddlerName with quotations

2020-08-24 Thread Saq Imtiaz
Try triple quotes around the list filter: <$list filter="""[all[tiddlers]contains:status[$myStatus$]]""" /> On Monday, August 24, 2020 at 10:41:42 PM UTC+2 Mohamed Amin wrote: > Hello All, > > Appreciate you help regarding my below issue: > > Suppose that I've a set of Tiddlers called

[tw5] Re: Macro only loading when viewing.

2020-07-23 Thread Jeff W
Just an update. Solution(s) are here if needed in the future. On Sunday, July 19, 2020 at 2:18:00 PM UTC-5, Jeff W wrote: > > Hey folks, > > I've incorporated, into my Noteself usage, the ximg macro located here-> > [External

[tw5] Re: Macro recursion runs out of control without reason

2020-07-20 Thread Mat
Mark Green wrote: > > Thanks! That actually fixed it! I wonder why it was recursing at all with > invalid syntax? > Prolly because <> does also have a closure but it is all the way over here. <:-) -- You received this message because you are subscribed to the Google Groups "TiddlyWiki"

[tw5] Re: Macro recursion runs out of control without reason

2020-07-20 Thread TW Tones
Mark Examples that can be installed and work on tiddlywiki.com or empty.html would help us work with you. See how you go after correcting the current tiddler. In macros the previous current tiddler value is available with $(currentTiddler)$ so you do not have to pass it as a parameter.

[tw5] Re: Macro recursion runs out of control without reason

2020-07-20 Thread Mark Green
Thanks! That actually fixed it! I wonder why it was recursing at all with invalid syntax? -- 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

[tw5] Re: Macro recursion runs out of control without reason

2020-07-20 Thread Eric Shulman
On Monday, July 20, 2020 at 1:17:34 PM UTC-7, Mark Green wrote: > > For those who have been following my efforts with mod- fields, this is the > next chapter - thanks for all the help so far! > The logic in your code is a bit hard to follow. Still... just looking at syntax issues, I note this

[tw5] Re: Macro recursion runs out of control without reason

2020-07-20 Thread 'Mark S.' via TiddlyWiki
This line <> is lacking a closing >> . However, I don't think you can feed a macro to a macro that way. At least I've never been able to. You probably need to use the macrocall widget: <$macrocall $name="innermodifierblock" for=??? /> I have ??? since I don't know what parameters you want

[tw5] Re: Macro for exporting multiple tiddlers as zip file

2020-07-08 Thread TW Tones
Mark, Thanks for sharing. This solution of yours works well, I was playing with the zip function as well, It has a lot of potential. - Its easier to email zips than html etc... - On a read only wiki a user undertakes a survey and on completion presses a button to zip their answers

[tw5] Re: [Macro] cross-list-links-draggable

2020-05-14 Thread Mat
Tony K wrote: > > Macro > https://akhater.github.io/drift/#%24%3A%2Fak%2Fdrift%2Fmacros%2Fcross-list-links-draggable > > example: https://akhater.github.io/drift/#Week > OH! This is super! Detail, the demo it is clearer if you just put it in a table, i.e |<>|<>| <:-) -- You received this

[tw5] Re: [Macro] cross-list-links-draggable

2020-05-14 Thread David Gifford
Added this to the lists section of the toolmap! On Thursday, May 14, 2020 at 12:44:43 AM UTC-5, Tony K wrote: > > I needed a way to be able to drag and drop items across lists while still > be able to re-order items inside the list so I modified the built > in list-links-draggable macro to fit

[tw5] Re: [Macro] Spoiler Text

2020-05-14 Thread David Gifford
I added this to the popus section of the Toolmap, and the Educational aids section. https://dynalist.io/d/zUP-nIWu2FFoXH-oM7L7d9DM On Thursday, May 14, 2020 at 12:48:14 AM UTC-5, Tony K wrote: > > Building something like "flash cards" I needed to hide a text and see if > my kinds can remember

[tw5] Re: [Macro] Spoiler Text

2020-05-14 Thread TonyM
TonyK You did it your own way and that's what is importiant, the diversity of solutions is fantastic and most importantly you demonstrate how someone can have an idea and make it happen. Even I with more than a decade of tiddlywiki experience build my own things forgetting to search how others

[tw5] Re: [Macro] Spoiler Text

2020-05-14 Thread Birthe C
Tony K, I like that you are creating you own thing. For use with Drift it is also important to keep it small and fast. Birthe -- 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,

[tw5] Re: [Macro] Spoiler Text

2020-05-14 Thread Ste Wilson
No worries. Even doing a bit of research is no guarantee as sometimes you don't know you should be looking at that other thing over there :D Dave's list is always worth a search through.. https://dynalist.io/d/zUP-nIWu2FFoXH-oM7L7d9DM -- You received this message because you are subscribed to

[tw5] Re: [Macro] Spoiler Text

2020-05-14 Thread Tony K
@Brithe @TonyM @Ste Wilson nothing new under the sun I guess :) Serves me well for not doing my research good enough Still not bad for learning though Cheers and thank you On Thursday, May 14, 2020 at 8:48:14 AM UTC+3, Tony K wrote: > > Building something like "flash cards" I needed to

[tw5] Re: [Macro] cross-list-links-draggable

2020-05-14 Thread Tony K
Fixed thank you for letting me know On Thursday, May 14, 2020 at 11:09:58 AM UTC+3, Saq Imtiaz wrote: > > I don't have the exact steps to reproduce it, but dragging some items from > list1 to list2 and then re-ordering quite a bit in list2, I have twice > managed to just loose some items.

[tw5] Re: [Macro] Spoiler Text

2020-05-14 Thread Birthe C
Thomas Elmigers Flippy cards Simpler but nice CSS idea from Stephan Hradek http://tw5magick.tiddlyspot.com/ look for Quiz (the tw is before easy permalink) Birthe -- You received this message because you are subscribed to the Google Groups "TiddlyWiki"

[tw5] Re: [Macro] cross-list-links-draggable

2020-05-14 Thread Saq Imtiaz
Yep I can re-create as you described below. I've done some work on improving some of the default drag and drop behaviour a while back. Will try to dig it up and post when I have time as it might be useful to improve other DnD solutions like yours. On Thursday, May 14, 2020 at 10:26:27 AM

[tw5] Re: [Macro] Spoiler Text

2020-05-14 Thread Ste Wilson
also http://stretchtext.tiddlyspot.com/ http://ooktech.com/jed/ExampleWikis/Flashcards/ http://tw5flashcards.tiddlyspot.com/ On Thursday, May 14, 2020 at 7:49:57 AM UTC+1, Tony K wrote: > > Nooo lol :) > > this is so much better than what I did, and I had no idea it existed > although

[tw5] Re: [Macro] cross-list-links-draggable

2020-05-14 Thread Tony K
weird, thank you for letting me know [image: Annotation 2020-05-14 112541.png] it worked for me. I odn't know what I missed but i will test it On Thursday, May 14, 2020 at 11:09:58 AM UTC+3, Saq Imtiaz wrote: > > I don't have the exact steps to reproduce it, but dragging some items from >

[tw5] Re: [Macro] Spoiler Text

2020-05-14 Thread TonyM
There have been a few flash card build on tiddlywiki one I liked had animated click to back of the card. Regards TonyM -- 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

[tw5] Re: [Macro] cross-list-links-draggable

2020-05-14 Thread Saq Imtiaz
I don't have the exact steps to reproduce it, but dragging some items from list1 to list2 and then re-ordering quite a bit in list2, I have twice managed to just loose some items. They just disappear. On Thursday, May 14, 2020 at 7:44:43 AM UTC+2, Tony K wrote: > > I needed a way to be able to

[tw5] Re: [Macro] Spoiler Text

2020-05-14 Thread Tony K
Nooo lol :) this is so much better than what I did, and I had no idea it existed although I did search thank you On Thursday, May 14, 2020 at 9:45:53 AM UTC+3, Birthe C wrote: > > Tony K, > > Nice idea! It also reminded me of > https://tid.li/tw5/hacks.html#TextStretch Did you

[tw5] Re: [Macro] Spoiler Text

2020-05-14 Thread Birthe C
Tony K, Nice idea! It also reminded me of https://tid.li/tw5/hacks.html#TextStretch Did you know that one? Fun stories with telescopic texts are possible. Birthe -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group

[tw5] Re: Macro not working on single word target

2020-05-08 Thread Les Barbott
That’s great, and it does help. Thx ! The only other area I am sometimes struggling with is the need to wrap everything when working with variables, string manipulation and list. It can get quite convoluted ! Is there any good ressources about that ? I wish I could just set a variable by

[tw5] Re: Macro not working on single word target

2020-05-08 Thread Saq Imtiaz
Les: Basically enlist gives you a list/array of words where each member is one title, regardless of spaces, with no brackets. <$list filter="[enlist{mytiddler!!mylist}]"> <$text text=<>/> Might help with understanding as to what is going on and what the value of currentTiddler is for each

[tw5] Re: Macro not working on single word target

2020-05-08 Thread Les Barbott
Le vendredi 8 mai 2020 11:20:13 UTC+1, Saq Imtiaz a écrit : > > <$list filter="[enlist{mytiddler!!Myfield}]"/> > > Will give you a link to each title regardless of whether it has spaces in > the title or not. You can also do something different with each title > inside the list widget. >

[tw5] Re: Macro not working on single word target

2020-05-08 Thread Saq Imtiaz
<$list filter="[enlist{mytiddler!!Myfield}]"/> Will give you a link to each title regardless of whether it has spaces in the title or not. You can also do something different with each title inside the list widget. -- You received this message because you are subscribed to the Google Groups

[tw5] Re: Macro not working on single word target

2020-05-08 Thread Les Barbott
So I went back to studying and spent some more time looking at the Title List, Listops widget and filtering. If I store the data SingleWord [[With space]] HelloThere [[Getting Started]] in the field myField, what would you say is the best syntax to : 1. generate a list of links (so the end goal

[tw5] Re: Macro not working on single word target

2020-05-08 Thread TonyM
Led A quick followup. The list-ops term in tiddlywiki relates to manipulating titles so that handles the square brackets as needed. Regards Tony -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving

[tw5] Re: Macro not working on single word target

2020-05-07 Thread Les Barbott
Thank you very much Saq ! Trying to wrap the names in bracketts before storing them felt like easier to then display, just view the field and you’re done. Thank you very much for your quick answer ! I would never have found myself. -- You received this message because you are subscribed to

[tw5] Re: Macro Resolving Problem

2020-04-29 Thread TonyM
Tony You have discovered the ease of editing one tiddler from another by using a transclude, and how tiddlers and fields can be silently created just by editing them it is quite an elegant solution. Thanks for sharing back I think I may extend your idea. On any tiddler we could have a Today

[tw5] Re: Macro Resolving Problem

2020-04-29 Thread tony
What a cool macro! It's all Klingon to me, but i wrapped the modified version from Eric in a logger tiddler, {{logger}} and typed text is passed to a new journal tiddler in real time. I don't even have to hit ctrl-return to 'save'. Very nice for journaling ! Thank you very much, tony On

[tw5] Re: Macro Resolving Problem

2020-04-29 Thread Lisa Wasserman
That did it. Thank you very much. I'll keep this in mind when using macros. --Lisa -- 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

[tw5] Re: Macro Resolving Problem

2020-04-29 Thread TonyM
Further to my last post; When setting a variable using $set or $vars you may also be using a macro to set a value, eg <$vars when=<> > Once again this macro can only be used as a parameter if we; - Use substitutions in its definition - OR be defined using javascript, as the NOW macro

[tw5] Re: Macro Resolving Problem

2020-04-29 Thread TonyM
Eric, Genius. For the first time you have explicitly stated why I have experienced repeated "fragility" when designing solutions in TiddlyWiki. Please confirm or correct my interpretation below; Macros are text-substitution processors. As such, they only do two things: > > 1) replace

[tw5] Re: Macro Resolving Problem

2020-04-29 Thread Eric Shulman
On Wednesday, April 29, 2020 at 1:42:49 PM UTC-7, Lisa Wasserman wrote: > > \define journalTiddlerName( ) <> $(project)$ > Macros are text-substitution processors. As such, they only do two things: 1) replace parameters -- $paramname$ -- with the values passed to the macro 2) replace variables

[tw5] Re: Macro with variable number of arguments

2020-04-20 Thread TonyM
I will add to mats reference a less known storyTiddler https://tiddlywiki.com/prerelease/#storyTiddler%20Variable Regards Tony On Monday, 20 April 2020 23:47:16 UTC+10, Mat wrote: > > MaxGyver wrote: >> >> Why do you use *currentTiddler* as variable? >> > > See docs >

[tw5] Re: Macro with variable number of arguments

2020-04-20 Thread Mat
MaxGyver wrote: > > Why do you use *currentTiddler* as variable? > See docs . <:-) -- You

[tw5] Re: Macro with variable number of arguments

2020-04-20 Thread TonyM
Max I write as many of my macros I can using current tiddler so they can be used in different ways and depend on less parameters. When you generate a list in a filter they are considered tiddler titles and use current Tiddler unless you set variable=varname. Macros based on current tiddler

[tw5] Re: Macro with variable number of arguments

2020-04-20 Thread TonyM
Max An increasing number know it well, everyone in this thread are arguably experts. Its beauty is its flexibility. In reality macros are a very simple extensions of wiki text and widgets. Although its strength is in filters but these are very powerful and needs new concepts for many. Those

[tw5] Re: Macro with variable number of arguments

2020-04-20 Thread MaxGyver
Thanks, Tony! I'm wondering how many people on earth really understand the TiddlyWiki macro language :-) Why do you use *currentTiddler* as variable? Am Montag, 20. April 2020 04:58:53 UTC+2 schrieb TonyM: > > Updated > > New Macro name and a button one as well > > \define kbd(string delim:" "

[tw5] Re: Macro with variable number of arguments

2020-04-19 Thread Mohammad
Thanks Tony! I make some modification on these normally! On Monday, April 20, 2020 at 8:40:09 AM UTC+4:30, TonyM wrote: > > Mohammad, > > I was thinking of you when writing this, perhaps adding your Shiraz colour > options. Feel free to pillage :) > > Regards > Tony > > On Monday, April 20, 2020

[tw5] Re: Macro with variable number of arguments

2020-04-19 Thread TonyM
Mohammad, I was thinking of you when writing this, perhaps adding your Shiraz colour options. Feel free to pillage :) Regards Tony On Monday, April 20, 2020 at 2:07:36 PM UTC+10, Mohammad wrote: > > Great solution Tony! > Added to TW-Scripts. > > On Monday, April 20, 2020 at 7:28:53 AM

[tw5] Re: Macro with variable number of arguments

2020-04-19 Thread Mohammad
Great solution Tony! Added to TW-Scripts. On Monday, April 20, 2020 at 7:28:53 AM UTC+4:30, TonyM wrote: > > Updated > > New Macro name and a button one as well > > \define kbd(string delim:" " sep:"+") > <$list filter="[[$string$]split[$delim$]first[]]">< >> > <$list

[tw5] Re: Macro with variable number of arguments

2020-04-19 Thread TonyM
Updated New Macro name and a button one as well \define kbd(string delim:" " sep:"+") <$list filter="[[$string$]split[$delim$]first[]]"><> <$list filter="[[$string$]split[$delim$]rest[]]"> $sep$ << currentTiddler>> \end \define dummy-button(string delim:" " sep:" ") <$list

[tw5] Re: Macro with variable number of arguments

2020-04-19 Thread TonyM
Max, Personally I have a different approach to this; and it is more general in use. Paste this onto Tiddlywiki.com - If you are only making use of space delimiters anyway, do it yourself in a single parameter - This below defaults to space delimiter and + separator as you wish - By

[tw5] Re: Macro with variable number of arguments

2020-04-19 Thread MaxGyver
@Mat: Thanks for your reply! Yes, I know that I can pass empty strings as arguments but I don't want to end up with empty keys. And I had no idea how to skip a key if an empty string was given. @Eric: Awesome! This works perfectly. Thank you! Am Sonntag, 19. April 2020 17:24:54 UTC+2 schrieb

[tw5] Re: Macro with variable number of arguments

2020-04-19 Thread Eric Shulman
On Sunday, April 19, 2020 at 8:05:31 AM UTC-7, MaxGyver wrote: > > I often use the *kbd* tag for showing (keyboard) keys in my TiddlyWiki, > like that: > \define combo3(key1: "Ctrl", key2: "Shift", key3: "x") $key1$< > /kbd>+$key2$+$key3$ > So I can write: > <> > Is is possible to create a single

[tw5] Re: Macro with variable number of arguments

2020-04-19 Thread Mat
On Sunday, April 19, 2020 at 5:13:25 PM UTC+2, Mat wrote: > > Macros themselves don't require that all arguments are actually used. If > all are needed depends only on the logic that you create inside the macro. > > \define foo(bar, baz) $bar$ and $baz$ > > <> ---> YO and > > However be

[tw5] Re: Macro with variable number of arguments

2020-04-19 Thread Mat
Macros themselves don't require that all arguments are actually used. If all are needed depends only on the logic that you create inside the macro. \define foo(bar, baz) $bar$ and $baz$ <> ---> YO and However be careful because the first argument that you put in the macrocall is

[tw5] Re: [macro] presenting new icon macro (for icons in text)

2020-03-11 Thread Diego Mesa
Also try to get this into the core! On Wednesday, March 11, 2020 at 10:22:29 AM UTC-5, Mohammad wrote: > > Hi HC Hasse, > Thank you for sharing. Nice stuffs. I also sue a macro doc-svg in Utility > plugin just to set the size and vertical alignment. > Strangely there is no documentation macro

[tw5] Re: [macro] presenting new icon macro (for icons in text)

2020-03-11 Thread Mohammad
Hi HC Hasse, Thank you for sharing. Nice stuffs. I also sue a macro doc-svg in Utility plugin just to set the size and vertical alignment. Strangely there is no documentation macro for this in tiddlywiki.com. Your macro not only set he size and alignment but also create a link and acts as

[tw5] Re: Macro shows conditional contents interactively

2019-09-19 Thread Mohammad
Thanks! Added to TW-Scripts On Thursday, September 19, 2019 at 12:26:27 PM UTC+4:30, PMario wrote: > > On Thursday, September 19, 2019 at 9:49:38 AM UTC+2, Mohammad wrote: >> >> Okay Mario! >> So if we use $:/state/popup/ prefixed state tiddlers then there is no >> need for startup action here

  1   2   >