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 mode=block/>
* tiddler user (modified bits):
<$wikify text={{codexe}} name=ex>
<<ex>>
</$wikify>
Le mardi 6 avril 2021 à 20:59:14 UTC+2, Jean-Pierre Rivière a écrit :
> 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/b8e71c23-26be-4100-afdc-85ed7cf6fe28n%40googlegroups.com.