If I use
DEMO: <$text text=<<demo {{!!dico}} {{!!index}}>>/>
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 can't use a widget within a
widget.
As for wikify, I play with it a lot, but I was unable to get what I wanted
in complex situation. Surely a good hint to indicate that trying a new
approach could be the way to go.
Now, I have just devised a way to have a source tiddler to be trancluded as
source and being interpreted: The "code" tiddler has the code AND it is
typed as plain text (this is REQUIRED). I'm doing this:
First, the tiddler where is the text to be seen
--------------------------------
!! source code
<code>
<$text text={{code}}/>
</code>
!! output ({{dictionary!!metal}})
<$wikify text={{code}} name=ex><<ex>></$wikify>
!! here a copycat of the code (hand made, no transclusion)
; value of {{!!index}} to be read in <$link to={{!!dico}}>{{!!dico}}</$link>
: field: (<$transclude tiddler={{!!dico}} field={{!!index}}/>)
: index: (<$transclude tiddler={{!!dico}} index={{!!index}}/>)
-----------------------------
with filelds "dico" set to "dictionary" and "index" to "metal".
now the tiddler with the source code (type: simple text)
------------------------------------
; value of {{!!index}} to be read in <$link to={{!!dico}}>{{!!dico}}</$link>
: field: (<$transclude tiddler={{!!dico}} field={{!!index}}/>)
: index: (<$transclude tiddler={{!!dico}} index={{!!index}}/>)
------------------------------------
But this is not perfect. The wiki interpretation is lacking some levels.
For instance, the transcluded code does net interpret the wiki-style
definition and do not produce a link, but the copycat does. but tghe
fetching of the field and of the index works OK for both codes.
Le mardi 6 avril 2021 à 18:37:26 UTC+2, Mark S. a écrit :
> On Tuesday, April 6, 2021 at 8:57:15 AM UTC-7 [email protected] wrote:
>
>> I tried the text widget thus:
>>
>> * DEMO: <$text text="""<<demo {{!!dico}} {{!!index}}>>"""/>
>> * MACRO: <$text text="""<$macrocall $name=demo {{!!dico}}
>> {{!!index}}/>"""/>
>>
>>>
>>>>
> You wrapped the arguments in strings, so now it interprets your input as
> strings. The only time that wrapping things in strings gets rendered is if
> you use the wikify widget. So you might play with
>
> <$wikify text="""<<demo {{!!dico}} {{!!index}}>>""" name=rendered >
> <$text text=<<rendered>>/>
> </$wikify>
>
> Note that wikify has a lot of options for output. So you might not even
> need the text widget if you render as text.
>
> <$wikify text="""<<demo {{!!dico}} {{!!index}}>>""" name=rendered
> output="text">
> <<rendered>>
> </$wikify>
>
>
>
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/581d5d7b-a6d5-4dff-9137-4ec5c0a96e6dn%40googlegroups.com.