I was kind of waiting for the question ;-) It might be better to look at the documentation for substitution. Everything you saw on that page gave examples of transclusion. Substitution occurs *inside* macros using either $var$ or $(var)$ (environmental variables). In the example
<$text text=<<myMacro>>/> The *results* of a macro are being transcluded as the value passed to the text attribute. Substitution would only occur if you called a macro with parameters (or used environmental variable markers) \define myMacro() $(currentTiddler)$ is my favorite tiddler If you were then inside the tiddler, CatTiddler the results of the above text widget would be: CatTiddler is my favorite tiddler The value of <<myMacro>> would be transcluded to the text attribute, but the substitution would occur inside the macro. The main thing to get out of this is, whenever you need to join 2 pieces of text, you are probably going to need a macro and it's text-substituting ability. It's probably best not to get hung up on the terminology at the start. Try a few examples of your own for transclusions and maybe even defining/using your own macros. Good luck, Mark On Wednesday, September 20, 2017 at 3:29:29 PM UTC-7, TiddlyNoob wrote: > > Hey guys, > > I'm a software developer and just started learning TiddlyWiki a few days > ago. I'm trying to grasp the fundamentals before delving too deep in the > complicated stuff. > > Transclusion seems like an important concept to grasp, and I could get by > with the general understanding that it's simply including the contents of a > macro, variable, or tiddler field in some context, whether it be in the > body of a tiddler, or as the value of an HTML attribute, but I can't help > but question the ambiguity in the documentation, especially when it > compares transclusion to substitution. > > The definition <http://tiddlywiki.com/#Transclusion>of transclusion in > the documentation describes it as a process of including the contents of > one tiddler into another tiddler. > > The Transclusion and Substitution > <http://tiddlywiki.com/#Transclusion%20and%20Substitution> documentation > basically describes every type of substitution as an example of > transclusion, whether it's a tiddler field, macro, or variable you are > referencing, and whether or not you are doing it in the body of a tiddler, > or in a filter, or as the value of an attribute. It then goes on to say > that the key distinction between transclusion and substitution is that > substitution happens before WikiText processing, so it's just a simple > substitution of text without WikiText processing. Transclusion, however, > includes WikiText processing. > > But the example it gives for transclusion of a macro in an attribute: > > <$text text=<<myMacro>>/> > > ..seems to be just regular substitution, since there is no WikiText > processing. > > This confusion seems apparent in other places in the documentation as > well, such as in HTML in WikiText > <http://tiddlywiki.com/#HTML%20in%20WikiText>, where it describes > examples that use tiddler fields attr={{tiddler}} as using transclusion, > but then the macro examples <div title=<<MyMacro "Brian">>> do not > mention transclusion at all. > -- 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 tiddlywiki+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@googlegroups.com. 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/ac221443-0f7e-4a98-a770-aa42218ab4af%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.