My actual scheme for rendering the SVG path is a bit more complicated -- my 
example code is meant to be as simple as possible for purposes of 
explaining the problem.  (I'm making a timeline display system for a story 
wiki.)

I'll look into the FlexiType tool; it looks like it could be well-suited to 
this use-case.  (Re-parsing is an interesting way to solve the problem! 
 How well does it deal with automatic updates?)


On Tuesday, 15 September 2015 16:19:40 UTC-5, BJ wrote:
>
> This is one of the things that I need to do as well. I think that it would 
> be better to put the data in to json tiddlers - they can contain ordered 
> lists (arrays), and then have some widgets like the ractive.js templates 
> (see http://mlarocca.github.io/01-22-2014/pathsjs_ractive.html for an 
> example) that can handle json tiddlers.
>
> On Saturday, September 12, 2015 at 5:52:24 PM UTC+1, Evan Balster wrote:
>>
>> Use Case:
>>
>> Suppose within my TiddlyWiki I'm rendering an infographic as SVG.  The 
>> SVG contains a path, which is defined by a string containing a list of 
>> vertices.  Suppose further I want to use an operation with at least one 
>> <$list> widget to populate this path, as below.  Because the path is an 
>> attribute string, any transclusion into it will not be wikified.  I can 
>> paste transclusions together using macros, but that isn't practical for 
>> lists.  So is there a way to *force* wikification?
>>
>> Obviously any HTML would be undesirable in the output, so I would need to 
>> be able to use a render mode like the one which applies in this typed block:
>>
>> $$$*text/vnd.tiddlywiki>text/plain*
>> <$list filter="[tag[Vertex]first[]]">M {{!!x}} {{!!y}}
>> </$list>
>> <$list filter="[tag[Vertex]rest[]]">L {{!!x}} {{!!y}}
>> </$list>
>> $$$
>>
>> (I ran into this problem a few months ago while creating a graphical 
>> timeline generator and never managed to solve it.  I know this is possible, 
>> because TiddlyWiki does something very similar to support customized 
>> stylesheets with basic parsing rules -- but I've investigated how it's 
>> done, and the mechanism uses calls to the rendering engine in core code 
>> rather than any accessible macro.  The discussion I started at that time 
>> did not lead anywhere.)
>>
>> As far as I can tell, all that would be necessary would be a macro to the 
>> effect of:
>>
>> <<*parse_and_render* {{MySVGCode}} text/vnd.tiddlywiki>text/plain>>
>>
>> Which makes the appropriate calls into core code.  Would this be 
>> reasonable to request as a core feature?  If not, is there a plug-in?
>>
>>
>> (I anticipate someone will mention that this is possible by way of 
>> storing data to a temporary tiddler and then transcluding it.  If so, I 
>> *would* love to know how -- but I also point out that such is a 
>> significant deviation from TiddlyWiki's "normal" way of rendering things 
>> and makes unnecessary use of long-term storage.  I'd also rather avoid 
>> "refresh" trigger buttons.)
>>
>

-- 
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 http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/1290db5b-836c-4045-80e4-c77b44f86ae6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to