[tw] Re: How to macro > var > macro ??
It works with <$wikify> widget. Thanks everyone! On Tuesday, July 25, 2017 at 1:20:52 AM UTC-7, Eric Shulman wrote: > > On Monday, July 24, 2017 at 6:57:39 PM UTC-7, Rustem wrote: >> >> I have these macros defined >> > ... > >> It works if I specify the color directly >> <$vars _c=red><> >> >> But how do I specify the color using a macro? This doesn't work: >> <$vars _c=<>><> >> >> > The problem with using the <> macro as a parameter value in the > <$vars> widget is that the macro doesn't return a color value directly. > Instead, it returns transclusion widgets that, if subsequently rendered, > results in a color value. Here's the core definitions (from > $:/core/macros/CSS): > > \define colour(name) > <$transclude tiddler={{$:/palette}} index="$name$"><$transclude > tiddler="$:/palettes/Vanilla" index="$name$"/> > \end > > \define color(name) > <> > \end > > To retrieve the actual color *value*, you can use the <$wikify> widget, > which "captures" the rendered output from the macro and stores that in a > variable, like this: > > <$wikify name="_c" text=<>><> > > Note: in this example, "tiddler-background" produces "invisible" text, > since the foreground text color is the same as the background tiddler > color. I assume that was your intention. > > Let me know how it goes. > > enjoy, > -e > Eric Shulman > TiddlyTools.com: "Small Tools for Big Ideas!" (tm) > InsideTiddlyWiki: The Missing Manuals > -- 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/21fd2f65-f95c-493f-9fe6-b45b428be612%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[tw] Re: How to macro > var > macro ??
On Monday, July 24, 2017 at 6:57:39 PM UTC-7, Rustem wrote: > > I have these macros defined > ... > It works if I specify the color directly > <$vars _c=red><> > > But how do I specify the color using a macro? This doesn't work: > <$vars _c=<>><> > > The problem with using the <> macro as a parameter value in the <$vars> widget is that the macro doesn't return a color value directly. Instead, it returns transclusion widgets that, if subsequently rendered, results in a color value. Here's the core definitions (from $:/core/macros/CSS): \define colour(name) <$transclude tiddler={{$:/palette}} index="$name$"><$transclude tiddler="$:/ palettes/Vanilla" index="$name$"/> \end \define color(name) <> \end To retrieve the actual color *value*, you can use the <$wikify> widget, which "captures" the rendered output from the macro and stores that in a variable, like this: <$wikify name="_c" text=<>><> Note: in this example, "tiddler-background" produces "invisible" text, since the foreground text color is the same as the background tiddler color. I assume that was your intention. Let me know how it goes. enjoy, -e Eric Shulman TiddlyTools.com: "Small Tools for Big Ideas!" (tm) InsideTiddlyWiki: The Missing Manuals -- 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/d542d1c4-762a-4c3c-a23f-1919d86a0a33%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [tw] Re: How to macro > var > macro ??
Hi Rustem, Try this: \define colorize() color:$(_c)$; \define cn() >> some text \end Specifying a color directly: <$vars _c=red><> Specifying a color using a macro: <$wikify name="_c" text="<>"> <> Best wishes Jeremy. > On 25 Jul 2017, at 08:12, Danielo RodrÃguez wrote: > > Try enclosing the macro call on quotes <$set value="<>"> > > -- > 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/85b2e5b9-4874-45a6-af6c-aa3db6ce3ddd%40googlegroups.com. > 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 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/B58E53CD-719A-44A8-8B7C-4493E0E60AEF%40gmail.com. For more options, visit https://groups.google.com/d/optout.
[tw] Re: How to macro > var > macro ??
Try enclosing the macro call on quotes <$set value="<>"> -- 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/85b2e5b9-4874-45a6-af6c-aa3db6ce3ddd%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[tw] Re: How to macro > var > macro ??
Tried with set widget, same, didn't work. On Monday, July 24, 2017 at 8:02:33 PM UTC-7, Mat wrote: > > Try with the setwidget, or perhaps wikifywidget instead. The varswidget is > not as powerful and I don't think it can handle macrocalls as arguments. > Not sure. > > <:-) > -- 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/38cca27a-3980-4f34-b1c8-bb09c34c753f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[tw] Re: How to macro > var > macro ??
Try with the setwidget, or perhaps wikifywidget instead. The varswidget is not as powerful and I don't think it can handle macrocalls as arguments. Not sure. <:-) -- 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/a6907bd2-74fd-4298-8c41-6c6a0ede3544%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.