On Thursday, July 27, 2017 at 7:43:27 PM UTC-7, TonyM wrote:
\define fulltitle() $(currentTiddler)$-$(currentTab)$
The difference between the first and second example is that the first syntax simply "returns" the macro content AS IS, with the expectation that further parsing will be performed to evaluate <<currentTiddler>> and <<currentTab>> values. This is typically used if the macro output is to be *rendered* (displayed) directly as wiki content.
In contrast, the second syntax using $(...variablename...)$ actually evaluates the variable reference and substitutes the current values before "returning" the result to the calling syntax. Thus, the second syntax does not depend upon any further parsing to get the actual values. This is typically used when the macro output is to be used as a parameter value for another macro or widget
Example:
Suppose that the currentTiddler value is "SomeTiddler" and the currentTab value is "SomeTab".
The output of the first macro is literally, "<<currentTiddler>> - <<currentTab>>", leaving any evaluation and replacement to be done later, while the output of the second macro is literally "SomeTiddler - SomeTab" (i.e., the macro processing does the evaluation and replacement immediately and the result is then used as the value of the parameter in the <$tiddler> widget.
I hope this makes sense.
enjoy,
-e
Eric Shulman
TiddlyTools.com: "Small Tools for Big Ideas" (tm)
InsideTiddlyWiki: The Missing Manuals