I just created a "count" filter which WOULD help with this, but your idea 
is not well thought through. Imagine I have a 3 counts: 1, 10 and 100. The 
resulting sizes would be: "1.1em", "1.10em" and "1.100em". Would you be 
able to tell the difference? ;)

For completeness sake, this is the source of my count filter:

/*\
title: $:/core/modules/filters/count.js
type: application/javascript
module-type: filteroperator

Filter operator that gives the counts the current list's members

\*/
(function(){

/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";

/*
Export our filter function
*/
exports.count = function(source,operator,options) {
        // count the source if it's not an array
        var count = 0;
        if(!$tw.utils.isArray(source)) {
                $tw.utils.each(source,function(element,title) {
                        ++count;
                });
                return [ "" + count ];
        }
        // return array's length        
        return [ "" + source.length ];
};

})();



used like this (using your request)

\define mySize()
"font-size:$(cnt)$em"
\end

<$list filter="[tags[]!is[system]sort[title]]">
  <$set name="title" value={{!!title}}>
    <$list filter="[is[current]tagging[]count[]]">
      <$set name="cnt" value={{!!title}}>
        <span style=<<mySize>>>
          <$tiddler tiddler=<<title>>>
            <$transclude tiddler="$:/core/ui/TagTemplate"/>
          </$tiddler>
        </span>
      </$set>
    </$list>
  </$set>
</$list>



I'm not sure yet, whether to make it a plugin. Comments welcome.


-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to