> I haven't played with AliasPlugin yet, but I am pretty sure this has
> come up before. . .

> Could be a nice script / transclusion / plugin - that could identify a
> marker, and display alternate text in it's place without actually
> replacing the marker. . .

In it's *simplest* usage, AliasPlugin does exactly what you suggest.

First, we need to define the desired "marker" without using a sequence
of characters that will be treated as special TW wiki-syntax, or
unwanted formatting could occur, rather than replacing the marker with
it's alternate text.  For example, simple letter/number combinations
(e.g,. "A1") are treated as tiddler links by the TW core's rendering
engine, so something more easily differentiated is needed.

AliasPlugin addresses this problem by using the existing *macro*
syntax as delimiters around the marker text, so that it can always be
unambigously recognized when embedded in your content.

First, you define the alias like this:
   <<alias A1 "alternate text">>

and then you *invoke* it elsewhere in your content like this:
   <<A1>>

Note: The marker text is actually being used as a macro name (e.g.,
<<A1>>).  Thus, it must not contain any spaces, and you should also
avoid using any special punctuation that is otherwise used in macro
processing (i.e., quotes, square brackets, curly braces, etc.).  As a
general rule-of-thumb, stick with letter/number combinations for
reliable usage.

Also note that a defined alias is available for use in ANY tiddler,
not just the one in which it is defined.  Typically, the <<alias
marker "alt text">> definitions are placed into a tiddler that is
always rendered at startup (e.g., MainMenu), so that they are then
usable throughout your document.

However, it is also possible to define aliases directly in the
specific tiddler in which they are to be used.  If you then *re-
define* those aliases in another tiddler, the most recent definition
will be applied in that tiddler.  Thus, you could embed the same alias
definition in each tiddler (with different "alt text", of course), so
that it's use within a given tiddler would be specific to that
tiddler.

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.

Reply via email to