On Sunday, August 5, 2018 at 4:04:48 AM UTC-7, @TiddlyTweeter wrote:
>
> That is helpful. It need to absorb it and play a bit to really "get" it. 
> The missing piece for me is still I can't quite grasp what "level" I'm at 
> in each thing. The "bracketing thing" in TW seems unusual. Morphing syntax? 
> I get confused because it almost behaves as if it were* part *of the 
> "code", not just a convention for containing it.
>

That is a good way to describe it.  The bracketing IS part of the code.  It 
tells the parser what *type* of reference it contains:

* square brackets contain literal tiddler title references (creates a link)
* angle brackets contain macro invocations (or variable references)
* curly braces contain tiddler transclusion references

There are two different contexts in which these brackets occur:
* in WikiText ("normal content")
* in filters (i.e., as parameters to widgets or macros)

In WikiText, the brackets are all DOUBLED.  This is to avoid confusion with 
other uses that may occur in normal text.  In particular, single angle 
brackets are used for normal HTML syntax, so macro invocation uses two 
angle brackets.  Similarly, though not as technically required, single 
square brackets and single curly braces are also doubled to avoid mistaken 
parsing of normal text content containing brackets as if they are macros or 
transclusions.

Similar to WikiText, the brackets in filter syntax depend upon the type of 
reference the contain.  However, the brackets do not need to be doubled, 
since within the filter there is no potential conflict with other usage.  
Thus:

* SINGLE square brackets contain literal text values
* SINGLE angle brackets contain macro or variable references
* SINGLE curly braces contain tiddler transclusion references

Note: filters also use a pair of square brackets to contain separate filter 
expressions, for example:
   filter="[tag[foo]] -[tag[bar]]"
specifies TWO filter expressions.  The first filter expression selects all 
tiddlers tagged with "foo".  The second filter expression removes tiddlers 
tagged with "bar" from the results of the first filter (note the "-" 
preceding the expression... it reverses the meaning of the filter).

There's probably some more subtle details that I've left off, but hopefully 
the above explanation will get you past the initial learning curve.

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 [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/44748dd4-8b36-492e-8aaa-0c50e8ba9b94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to