Hi Sjaak
There is some confusion from the fact that the various brackets we use tend to
serve more than one purpose, just as punctuation like periods might serve
several different purposes within a conventional programming language.
Further, as you've discovered, while one can write <a href={{blah}}> or <a
href=<<blah>>>, you can't write <a href={{<<blah>>}}/>. The brackets in that
situation are special string delimiters, rather than operators as one might
expect.
Each type of bracket is associated with a different phenomenon:
* Double square brackets are used to delimit tiddler titles in lists that
contain spaces
* Double square brackets are also used to indicate links
* Double curly braces are used to delimit a tiddler title (aka text reference)
whose content is to be transcluded
* Triple curly braces are used to delimit a filter expression whose content is
to be transcluded
* Double angle brackets are used to delimit a variable name whose content is to
be transcluded
Generally, TiddlyWiki's wikitext has two layers:
* At a high level there are a multitude of special wikitext constructions made
from symbols. For example, the link construction [[text|link]], ''bold'', or *
for bullet lists. These constructions are designed to be concise and memorable,
and favour simple syntax over flexibility.
* At a low level, there is a generic HTML element syntax that is also used for
widgets, the special custom elements that give TW5 its interactive behaviours.
All of those high level constructions are actually just shortcuts for a longer
formulation expressed as raw widgets. For example, one can link with [[Hello
There]] or <$link to="Hello There">Hello There</$link>. The element/widget
syntax is designed to be generic, consistent and flexible.
Best wishes
Jeremy
--
Jeremy Ruston
[email protected]
https://jermolene.com
> On 10 Dec 2018, at 18:15, Sjaak Adriaanse <[email protected]> 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/1b4be154-10b6-4d7e-9fc7-bc3259d662b3%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 [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/9A547369-0D66-4FA1-85B0-11A55928A771%40gmail.com.
For more options, visit https://groups.google.com/d/optout.