Re: [twdev] TiddlyWiki5: Suggestion - Deprecate img, use transclusion.

689 views
Skip to first unread message

Jeremy Ruston

unread,
Jul 29, 2012, 4:30:21 AM7/29/12
to tiddly...@googlegroups.com
Hi John

Thanks for the feedback, and I'm glad you like the new transclusion syntax.

My plan is to retain the old syntax for images but to extend it to allow the size of the image to be set, which currently has to be done via an HTML tag.

The plan is indeed to incorporate a full SVG editor. I've looked at svg-edit but it would need quite a lot of surgery to make it integrate deeply; it has it's own framework for dialogue boxes and other UI elements which isn't a great fit for TW.

To add tooltips and links to transclusions will be done by wrapping the transclusion in a separate tooltip or link macro.

Best wishes

Jeremy



--
Jeremy Ruston


On 29 Jul 2012, at 03:02, John Hind <john.hin...@gmail.com> wrote:

I just spent some time exploring the state-of-the-art with TW after using version 2 happily for a year or so without doing any development work. TW5 is looking stunning and the SVG graphics support (which I assume will get an editor at a later stage - maybe http://code.google.com/p/svg-edit/) will open up whole new areas of use for me.

As an experiment I tried:
((Motovun Jack.jpg))
After all he's just a tiddler (and a cute one at that) so transclusion should work as for any other tiddler, right? And, sure enough, it does work.

So why not remove (or deprecate if you want backward compatibility) the:
[img[Motovun Jack.jpg]]
syntax?

The tooltip and link parameters could usefuly be added to the standard transclusion syntax as they might be useful on other types of transclusion. Otherwise, the transclusion syntax is much more powerful and would open all kinds of extra possibilities for image selection and rendering.

Greatly looking forward to further developments!
John

--
You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/tiddlywikidev/-/nk0gLQ69s2UJ.
To post to this group, send email to tiddly...@googlegroups.com.
To unsubscribe from this group, send email to tiddlywikide...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/tiddlywikidev?hl=en.

John Hind

unread,
Jul 29, 2012, 6:51:07 AM7/29/12
to tiddly...@googlegroups.com
Hi Jeremy

The TOOLTIP and LINK macros sound good, but those would work equally well for images rendering the IMG macro as currently scoped redundant. Surely it would be more flexible, consistent and minimalist to deprecate the IMG macro in favour of adding any further new features to the transclusion syntax?

For example, a template syntax for sizing images:

((Motovun Jack.jpg) <<image 120x60>>)

The big gain here would be the ability to use the full power of filters, so for a thumbnail gallery:

((([tag[pictures]])) <<image 60x60>>)

Best regards

John.

Jeremy Ruston

unread,
Jul 29, 2012, 9:38:20 AM7/29/12
to tiddly...@googlegroups.com
Yes, thats the idea. All we need to do this is a way for the image macro to reference the current context tiddler, just as the view macro does at present. So, your example might come out as:

((([tag[pictures]])) <<link>< <<image width:60 height:60>> >)

Here the idea is that omitting the target for the link and the image would reference the current context tiddler.

Best wishes

Jeremy



Best regards

John.

--
You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/tiddlywikidev/-/aCnvkv978Y8J.

John Hind

unread,
Jul 30, 2012, 5:33:54 PM7/30/12
to tiddly...@googlegroups.com
I see, yes that is good.

However there is now way to much redundancy for my taste. All the following seem to be equivalent:

1. ((Motovun Jack.jpg))
2. ((Motovun Jack.jpg) <<image>>)
3. [img[Motovun Jack.jpg]]
4. <<image [[Motovun Jack.jpg]]>>
5. <<tiddler [[Motovun Jack.jpg]]>>

And there are two different syntaxes for attaching links and tooltips to images, with confusingly different scoping models.

I would advocate removing syntax 3 altogether, removing the ability to specify the tiddler directly in 4 and 5 relying on transclusion context, remove the ability to specify the link and the tooltip from the image macro. For 2.x compatibility, there can be an optional package using the extensibility features to add some of these deprecated features back in again. This way, 5.0 can be clean and efficient for new users and people willing to migrate.

John.

PMario

unread,
Jul 31, 2012, 7:34:17 PM7/31/12
to TiddlyWikiDev
On Jul 30, 11:33 pm, John Hind <john.hind.trol...@gmail.com> wrote:
> However there is now way to much redundancy for my taste. All the following
> seem to be equivalent:
>
> 1. ((Motovun Jack.jpg))
@jeremy
I'm not 100% sure, but I think, the ((...)) starts it's live as a
replacement for the <<inclusion ...>> macro, that was used inside
template tiddlers. It just did include text from a tiddler, without
any <div> or <span> wrapper into the template. right?
So the usecase is totally different to a <<tiddler>> transclusion.

> 4. <<image [[Motovun Jack.jpg]]>>
> 5. <<tiddler [[Motovun Jack.jpg]]>>
For me this are 2 totally different macros. That both of them display
the x.jpg tiddler as a picture is a coincidence. If I change the
"type" field of x.jpg to "text/plain" I want <<tiddler [[Motovun
Jack.jpg]] "className">> to display the tiddler content as text. With
jpg, it would only make sense for debugging but anyway. With svg it
makes sense .....

<<image [[anypic]] width:111 height:111 other image specific params to
come >> ... should display a tiddlers content as a picture, no matter
what type the tiddler is.

-m

Iskie Isketerol

unread,
Jun 24, 2013, 1:18:18 PM6/24/13
to tiddly...@googlegroups.com
Hello:

  It seems that it;s still not possible to display images from an http:// reference as it was in the previous TiddlyWIKI.  I have been rolling out a solution based on use of "img" links and was hoping to how how much nicer TiddyWIKI5 is to look at.  We keep a load of screenshots as files on a external system - without these links working my solution does not either.

  Any chance that you're secretly holding back this feature?

  Thanks.

kjc

Jeremy Ruston

unread,
Jun 26, 2013, 7:38:36 AM6/26/13
to TiddlyWikiDev
  It seems that it;s still not possible to display images from an http:// reference as it was in the previous TiddlyWIKI.

That is correct - as things stand, it is only possible to display external images via an inline <img src="blah"> tag. I have thought that the old [img[URL]] syntax could be re-introduced as a shortcut for the <img> tag.
 
I have been rolling out a solution based on use of "img" links and was hoping to how how much nicer TiddyWIKI5 is to look at.  We keep a load of screenshots as files on a external system - without these links working my solution does not either.

You can use image links in TW5 like this:

<$link to="TiddlerTitle"><img src="myimage.jpeg></$link>

It can be simplified by using a macro definition at the top of a tiddler. For example:

\define linkimage(title,url)
<$link to="$title$"><img src="$url$"></$link>
\end

Here is an image: <<linkimage MyTiddler myimage.jpeg>>
 

  Any chance that you're secretly holding back this feature?

Ha! I'm just a poor documentarian.

Best wishes

Jeremy
 

--
You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikide...@googlegroups.com.

To post to this group, send email to tiddly...@googlegroups.com.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

Iskie Isketerol

unread,
Jun 28, 2013, 10:03:51 AM6/28/13
to tiddly...@googlegroups.com, jeremy...@gmail.com
Here's what I tried, using your example

\define linkimage(title,url)
<$link to="$title$"><img src="$http:\\orbit/livelink/llisapi.dll/open/5270759$"></$link>

\end

Here is an image: <<linkimage MyTiddler myimage.jpeg>>


Nothing displayed - I should have seen the JPG image which the URL referenced.  Am I missing something obvious?

kjc

Jeremy Ruston

unread,
Jun 28, 2013, 10:42:58 AM6/28/13
to Iskie Isketerol, TiddlyWikiDev
Try this:

\define linkimage(title,url)
<$link to="$title$"><img src="$url$"></$link>

\end

Here is an image: <<linkimage MyTiddler "http://orbit/livelink/llisapi.dll/open/5270759">>

Best wishes

Jeremy

Tobias Beer

unread,
Aug 18, 2013, 12:02:51 PM8/18/13
to tiddly...@googlegroups.com, Iskie Isketerol, jeremy...@gmail.com
Hi everyone,

I am a bit confused about all this.

Right now, all I see are loads of options to define stuff and seemingly too few standards.

Don't get me wrong, I enjoy flexibility. But what I don't see is users going about to define custom linkimage macros. 
o.O

As for the OP, I certainly don't see how transclusion caters as the standard way of rendering images.

At some point your markup or tiddlers need to say "this is an image" and be able to parse some url in one way or another.

I certainly don't want or need extra tiddlers for every image that I want to display. All I want is good ol' image markup. If using enhanced image features means to rather employ an enhanced image macro, fine. But the basic stuff, including placement, css-class and size should be core markup, not some macro that extends on that.

What I find more important than what is being used in terms of markup is the ability to have a globally defined path to some image or file host and then be able to reference that in the urls for the resources I want to pull, e.g.

<img src="img:folder/image.jpg">

Whereas the renderer is smart enough to replace 'img:' with a 
a globally defined variable of sorts.

Cheers, Tobias.

Jeremy Ruston

unread,
Aug 19, 2013, 6:00:06 AM8/19/13
to Tobias Beer, TiddlyWikiDev, Iskie Isketerol
Hi Tobias
 
I am a bit confused about all this.

TW5 is under active development, with lots of discussion like this that are influencing and shaping it. It will get less confusing when it settles down.

Right now, all I see are loads of options to define stuff and seemingly too few standards.

Don't get me wrong, I enjoy flexibility. But what I don't see is users going about to define custom linkimage macros. 
o.O

As for the OP, I certainly don't see how transclusion caters as the standard way of rendering images.

At some point your markup or tiddlers need to say "this is an image" and be able to parse some url in one way or another.


I certainly don't want or need extra tiddlers for every image that I want to display. All I want is good ol' image markup. If using enhanced image features means to rather employ an enhanced image macro, fine. But the basic stuff, including placement, css-class and size should be core markup, not some macro that extends on that.

The idea of proxy tiddlers for external images wouldn't be the only way to handle images, just one of the options.
 

What I find more important than what is being used in terms of markup is the ability to have a globally defined path to some image or file host and then be able to reference that in the urls for the resources I want to pull, e.g.

<img src="img:folder/image.jpg">

Whereas the renderer is smart enough to replace 'img:' with a 
a globally defined variable of sorts.

You can do this with a macro:

\define myImageUrl(partialUrl)
\end

...
<img src=<<myImageUrl "folder/image.jpg">> />

Best wishes

Jeremy

Tobias Beer

unread,
Aug 19, 2013, 9:25:33 PM8/19/13
to tiddly...@googlegroups.com, Tobias Beer, Iskie Isketerol, jeremy...@gmail.com
Hi Jeremy,

On Monday, 19 August 2013 12:00:06 UTC+2, Jeremy Ruston wrote:
Hi Tobias,
 
I am a bit confused about all this.

TW5 is under active development, with lots of discussion like this that are influencing and shaping it. It will get less confusing when it settles down.

The idea of proxy tiddlers for external images wouldn't be the only way to handle images, just one of the options. 
 
Thanks for the clarification.

What I find more important than what is being used in terms of markup is the ability to have a globally defined path to some image or file host and then be able to reference that in the urls for the resources I want to pull, e.g.

<img src="img:folder/image.jpg">

Whereas the renderer is smart enough to replace 'img:' with a 
a globally defined variable of sorts.

You can do this with a macro:

\define myImageUrl(partialUrl)
\end

...
<img src=<<myImageUrl "folder/image.jpg">> />

That's great! Haven't really been playing a lot with TW5 yet. So, sorry, still kind of a noob in that regard.

Cheers, Tobias.

Charles Anderson

unread,
Jun 19, 2014, 10:35:59 PM6/19/14
to tiddly...@googlegroups.com
This thread is kind of old so I won't be surprised if no one replies, but I've been a TW Classic user for more than 7 years and am slowly moving over to TW5.  I've grown quite accustomed to the way images were handled before, but I absolutely love the way they are done now in TW5.  My only problem is that through the years I've maintained a directory of image files I pull from when I want to include one in a tiddler.  This has the benefit of my main index file not being very large though I've filled it with lots of data.  The very first thing I noticed with the new way of image handling was it increases the size of the index file greatly.  I'm not a programmer and other than the syntax I've learned from using TW for these number of years, and some bash scripting, and I don't write code, but don't larger index files take longer to load in the browser?

In addition, I'm sharing this file (with directory of images) over ownCloud between three of my own computers.  The larger the file size, the more my ownCloud client has to upload to the central server.  With all of this in mind, I'm glad to have some of the old TW functionality available.

PMario

unread,
Jun 20, 2014, 11:10:54 AM6/20/14
to tiddly...@googlegroups.com
External images will be part of the next beta 5.0.13, which should be out soon.
see: https://www.youtube.com/watch?feature=player_detailpage&v=FdNDuF4UnlA#t=1358
-m


Reply all
Reply to author
Forward
0 new messages