It actually looks like you're getting a good handle on how to use TW. Your 
first questions concern wiki-text. A good place to start with that is 
https://tiddlywiki.com/#WikiText.

But your actual question, in the macro, is really about concatenation. You 
want to "glue" (concatenate) the results of {{!!title}} into the middle of 
a wikitext link [[stuff|ref]]. Both {{}} and [[]] are wikitext, not actual 
widgets or objects. Putting wikitext inside of wikitext doesn't usually 
work except for formatting.

What you need to fix this is a widget. A widget can take a transclusion 
inside of it. The most universal way would be to use the macrocall widget 
and call macro with your transcluded value as a parameter.

So if you rewrite your macro like this:

\define srct(title)
!!{{!!title}}^^[[src|$title$]]^^
\end

Then you can call it like this:

<$macrocall $name="srct" title={{!!title}}/>

And that should get you pretty close.

Or you could use the link widget and rewrite your macro like:

\define srct()
!!{{!!title}}^^<$link to={{!!title}}>src</$link>^^
\end

The point is, that when you want to insert the value of a wikitext 
transclusion into something else, that something else will need to be an 
attribute of widget or of an HTML tag.

Hope I haven't muddied things here too much ;-)

Good luck!
-- Mark





On Monday, December 10, 2018 at 10:15:35 AM UTC-8, Sjaak Adriaanse wrote:
>
>
>
> Hi all,
>
> I keep bumping into the same problem: the characters I use in coding, 
> especially the various kind of brackets (including quotes), are not 
> interpreted the way I think they will be. This keeps confusing me.
>
> Is this documented clearly somewhere? Where (and why) are some brackets 
> interpreted as one thing, and where as another, or not at all as something 
> special?
> To start with: why are double square brackets used for both 1) a link to a 
> tiddler, 2) keeping a string with spaces in it together? On several 
> occasions I used them for the second purpose and saw a link appearing where 
> I did not want one.
>
> I will give a small example here. This is meant to show what confuses me, 
> not a plea to solve this little problem for me.
>
> I have a number of small text tiddlers that are transcluded in larger 
> tiddlers.
> Now I want to start the transcluded version with the title in 2-level 
> header, followed by the text 'src' in superscript, that links to the text 
> tiddler itself (the source, hence 'src'). This makes it easy for me to jump 
> to the source tiddler if I want to change the text. So I defined a macro:
>
> \define srct()
> !!{{!!title}}^^[[src|{{!!title}}]]^^
> \end
>
> and put 
> <<srct>>
>
> as first (non-define) line of the small tiddler. I hope this is all clear.
>
> The macro call produces the title header all right, followed by 'src' in 
> superscript, but the link on 'src' is not interpreted and goes to the 
> string "{{!!title}}". ??????? Why doesn't TW fill in the actual title there?
>
> Confused,
> Sjaak
>
>
>
>

-- 
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/7f2d90a1-10a9-4ee5-b1c3-bd01d562420a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to