[TW5] Missing WikiText Solutions

338 views
Skip to first unread message

Scott Simmons (Secret-HQ)

unread,
Jan 15, 2016, 8:47:35 PM1/15/16
to tiddl...@googlegroups.com
As I've begun using TiddlyWiki5 for day-to-day operations, it strikes me there are three quirks of its wikitext that may be worth revisiting:
  1. There's no wikitext for an image wrapped in a link.
    Jeremy addressed this in an earlier thread, but it does seem like a glaring omission in TW's wikitext.
    My personal preference is for [img[path/to/image.jpg]link[TiddlerTitle]] / [img[{{ImageTiddler}}]ext[URL]] .
    In the absence of such a solution, I've been eschewing wikitext for images and links and filling my tiddlers with HTML — which sort of defeats the purpose of wikitext, to my way of thinking.

  2. There's no wikitext for highlighting (adding a background-color to text).
    TiddlyWiki Classic used @@a couple of 'at' symbols@@ to accomplish this.
    In its absence, I've been using <span>s — which is fine, but once again, typing out all that HTML feels like I'm not taking advantage of wikitext.

  3. Using three hyphens (---) to denote an <HR> means you can't put an m-dash on its own line.
    Which may not be a problem for anyone else, but I tend to put an m-dash on its own line a fair bit and find myself resorting to keyboard shortcuts when it seems like wikitext should do.
    If it took FOUR hyphens to indicate an <HR>, three would be reserved for an m-dash, and we wouldn't have this conflict.

Matabele

unread,
Jan 15, 2016, 10:07:07 PM1/15/16
to TiddlyWiki
Hi

Point (2):
@@background-color:red;accomplish this@@

-- but might be easier to create a css style for the task (in a stylesheet):
.highlight {
     background
-color:red;
}
-- then:
@@.highlight accomplish this@@

regards

Scott Simmons (Secret-HQ)

unread,
Jan 15, 2016, 11:46:32 PM1/15/16
to TiddlyWiki
Good point!  I'd forgotten

@@.highlight this@@

and had been typing

<span class="highlight">this</span>

every time.

Though neither one is nearly as convenient when you're jotting down notes as

@@this@@

;)

Matabele

unread,
Jan 15, 2016, 11:59:29 PM1/15/16
to TiddlyWiki
Hi

If this is something you use often, a keyboard shortcut could be configured to add the markup around selected text -- and/or the class could be given a shorter name e.g. .ho -- highlight orange, .hr -- highlight red .hg -- highlight green

regards

Jed Carty

unread,
Jan 16, 2016, 5:11:28 AM1/16/16
to TiddlyWiki
For the image link part, I think that there are so many use cases for tiddlywiki that trying to make something special in the core for everything is going to take too much effort for pretty small gains. I think that wikitext macros are the way to go instead of adding more to the basic wikitext syntax.

The decision about what should be added and what shouldn't be is, of course, completely subjective. I have been using the guideline if I can make what I want using what currently exists than I won't try to add something special for the situation. Do you think using <<imgLink "TiddlerTitle" "URL">> instead of [img[path/to/image.jpg]link[TiddlerTitle]] would be a good alternative? Because making a macro to do that wouldn't be hard and would have the same result.

Mat

unread,
Jan 16, 2016, 5:35:46 AM1/16/16
to TiddlyWiki
Scott, 

you might be interested in @Danielos keyboardshortcuts.

  1. There's no wikitext for an image wrapped in a link.
In deed missed. But check out @Tobias' Link Image macro.

For a wikitext solution, I'd prefer soemthing that is as syntactically close to existing img syntax in combo with regular prettylink where the image is the pretty,
thus;

  [img[imgPath|TiddlerTitle]] or [img width=20 [imgPath|TiddlerTitle]]

 

  1. There's no wikitext for highlighting (adding a background-color to text).
So, yes, @@color:red; Foo@@ works in TW5 (notice the space separator). 

However what is lacking, and which worked in TW2, is a quick default @@highlight@@ - I just posted #2228


<:-)

Alex Hough

unread,
Jan 16, 2016, 12:39:33 PM1/16/16
to TiddlyWiki
also, for images and links, look at TW.com: there is a thumbnail macro used there

Alex

--
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+...@googlegroups.com.
To post to this group, send email to tiddl...@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/63517ffb-60f0-4bff-8ac7-a66c1d5e49fc%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Scott Simmons (Secret-HQ)

unread,
Jan 16, 2016, 5:39:43 PM1/16/16
to TiddlyWiki
Glad to see this is still a topic of interest to people and not completely calcified now that TW5 has been out of beta for over a year.

I appreciate the alternatives and do love a good personalized solutions — hip-hip-hooray for the ease with which we can create macros in TW5! — but these three seem conspicuously absent from core wikitext.  They're hardly edge cases of usage, and I believe their absence would deter people from adopting TiddlyWiki.

(Well, #s 1 and 2 are missing features; #3 is more of a stumbling block that seems like it could be easily avoided with a minute shift.)

-----------------------------------------------------------------------------------------------------------

On Saturday, January 16, 2016 at 5:35:46 AM UTC-5, Mat wrote:

For a wikitext solution, I'd prefer soemthing that is as syntactically close to existing img syntax in combo with regular prettylink where the image is the pretty,
thus;

  [img[imgPath|TiddlerTitle]] or [img width=20 [imgPath|TiddlerTitle]]

I think I prefer:
[img[imgPath]link[tiddler]]
and:
[img[imgPath]ext[URL]]

... which is something Jeremy suggested here.

Those seem the simplest and most inline with the rest of TiddlyWiki's distinctive wikitext markup.  For specifying sizes and styles (and other extended formatting), I'm content to fall back on longer-form syntax like:

<$link to="tiddler"><img src="image.jpg" style="width:20px;"></$link>

My threshold for inclusion in the core's wikitext spec is a little looser than Jed's and Tobias's — but, I guess, only a little.  ;)

Not that I would be opposed to more functionality in the core wikitext in this regard.  It's just that I feel the ability to display a linking image is fundamental and am less certain about where to draw the line on what sorts of formatting should be available via wikitext.  There's no reason it couldn't support, say:

[img[image.jpg]link[tiddler]style[width:"20px";border:"1px solid #FF0000";float:"right";]]

-----------------------------------------------------------------------------------------------------------

On Saturday, January 16, 2016 at 5:11:28 AM UTC-5, Jed Carty wrote:

For the image link part, I think that there are so many use cases for tiddlywiki that trying to make something special in the core for everything is going to take too much effort for pretty small gains. I think that wikitext macros are the way to go instead of adding more to the basic wikitext syntax.

The decision about what should be added and what shouldn't be is, of course, completely subjective. I have been using the guideline if I can make what I want using what currently exists than I won't try to add something special for the situation

Tobias felt the same when I brought this up in the other thread.  I may be in a minority, but I'm surprised you guys don't find this a basic enough use case to qualify for inclusion in standard wikitext.  For my part, if we're going to bother with wikitext at all, we should include image-linking and a basic highlight.  (Could be that I'm just used to them from using TWC, but they hardly seem quirky or personalized).  It seems especially strange that TW supports [img[this]], [[this|somewhere]], and [ext[this|URL]] but requires us to fall back on <a href="URL" target="_blank"><img src="this" /></a> (or even <a href="URL" target="_blank">[img[this]]</a>).  It makes TW's wikitext feel incomplete.
 
Do you think using <<imgLink "TiddlerTitle" "URL">> instead of [img[path/to/image.jpg]link[TiddlerTitle]] would be a good alternative? Because making a macro to do that wouldn't be hard and would have the same result.

Macros have been my go-to.  (That way, if image-linking is added to the core syntax later, I can just update the macros and not all those tiddlers.  ;)  )  This also allows me to format and position images consistently across a TiddlyWiki.

-----------------------------------------------------------------------------------------------------------

On Saturday, January 16, 2016 at 12:39:33 PM UTC-5, AlexHough wrote:

also, for images and links, look at TW.com: there is a thumbnail macro used there

Thanks!  (That's nicer than my homebaked macros, so they're about to start relying heavy on it!)

----------------------------------------------------------------------------------------------------------- 

On Friday, January 15, 2016 at 11:59:29 PM UTC-5, Matabele wrote:

If this is something you use often, a keyboard shortcut could be configured to add the markup around selected text -- and/or the class could be given a shorter name e.g. .ho -- highlight orange, .hr -- highlight red .hg -- highlight green

 On Saturday, January 16, 2016 at 5:35:46 AM UTC-5, Mat wrote:

you might be interested in @Danielos keyboardshortcuts.

 Neat-o.  I haven't played around with keyboard shortcuts, but I will.  Didn't realize Danielo had done so much work there.  :)

-----------------------------------------------------------------------------------------------------------

On Saturday, January 16, 2016 at 5:35:46 AM UTC-5, Mat wrote:

In deed missed. But check out @Tobias' Link Image macro.

Definitely!  That one's in my orbit for building image galleries, since I'm experimenting with using TiddlyWiki to organize wallpapers and screenshots now.

 -----------------------------------------------------------------------------------------------------------

On Saturday, January 16, 2016 at 5:35:46 AM UTC-5, Mat wrote:

what is lacking, and which worked in TW2, is a quick default @@highlight@@ - I just posted #2228

Also on the to-do list:  Learn my way around GitHub, since that seems to be the best place to post, discuss, and track requests, especially when it comes to proposing changes to the core.  I've mastered "gittin' stuff" from there, but that's about it.  :D

Scott Simmons (Secret-HQ)

unread,
Jan 24, 2016, 9:00:14 AM1/24/16
to TiddlyWiki
Lots of nice comments on (1) and (2), but none, I noticed, on (3):

Using three hyphens (---) to denote an <HR> means you can't put an m-dash on its own line.
Which may not be a problem for anyone else, but I tend to put an m-dash on its own line a fair bit and find myself resorting to keyboard shortcuts when it seems like wikitext should do.
If it took FOUR hyphens to indicate an <HR>, three would be reserved for an m-dash, and we wouldn't have this conflict.

Am I the only one who runs across this issue?  :) 

PMario

unread,
Jan 25, 2016, 8:55:24 AM1/25/16
to TiddlyWiki

try this

---
 
---

first one will create hr
second one will create mdash ... be aware of the the trailing space in the second line.

have fun!
-mario

PMario

unread,
Jan 25, 2016, 9:03:59 AM1/25/16
to TiddlyWiki
On Sunday, January 24, 2016 at 3:00:14 PM UTC+1, Scott Simmons (Secret-HQ) wrote:

If it took FOUR hyphens to indicate an <HR>, three would be reserved for an m-dash, and we wouldn't have this conflict.
 
This can be a feature request with a github issue. ... but you need to be aware, that it will result in a backwards incompatible change. ... So it will be very hard to convince Jeremy.

There have been some discussions as the rules where implemented. https://github.com/Jermolene/TiddlyWiki5/issues?q=is%3Aissue+mdash+is%3Aclosed

-m

Tobias Beer

unread,
Jan 25, 2016, 10:48:27 AM1/25/16
to TiddlyWiki
Hi Scott,
 
Am I the only one who runs across this issue?  :) 

Quite possibly. ;-)

You could also do:

&zwj;---

Best wishes,

Tobias.

Scott Simmons (Secret-HQ)

unread,
Jan 25, 2016, 3:21:54 PM1/25/16
to tiddl...@googlegroups.com
On Monday, January 25, 2016 at 9:03:59 AM UTC-5, PMario wrote:
 
This can be a feature request with a github issue. ... but you need to be aware, that it will result in a backwards incompatible change. ... So it will be very hard to convince Jeremy.

There have been some discussions as the rules where implemented. https://github.com/Jermolene/TiddlyWiki5/issues?q=is%3Aissue+mdash+is%3Aclosed

Backward-compatibility IS a real consideration.

Still — I can't help wondering if it's much more of a consideration than my syntactical hangup about --- having two different meanings.  ARE there that many existing TiddlyWikis out there with three-hyphen <hr/>s that would suddenly become m-dashes?  (I have no idea, but maybe folks will show up testifying to how much of a pain it would be for their TWs.)  The worst-case scenario seems to be limited inconvenience, with the long-term result that TiddlyWiki would have exclusive syntax for <hr/> (----) and for (---).

The upgrader might even be able to handle a replacement as simple as ^-{3}$ => ---- as part of the upgrade process.  (Of course, suggesting that could be throwing wide the doors to all sorts of user-code cleanup Jeremy wants no truck with.)

Food for thought, certainly.  I definitely appreciated your insights in the GitHub threads you linked to, Mario.  (Thanks!)

I remember some of the early discussions about strikethrough, but I wandered off for a long while and missed -- and --- being incorporated (and parsed better in TW5 than they had been in TWC).  I bring it up here, in part, because I feel a little guilty for missing the chance to fight for the oddball outlying use case of --- on its own line back when the new wikitext syntax was taking shape.

(Wasn't there a suggestion at one point to use some number of = characters to build an <hr/>?  Or am I misremembering that?  It could be that was suggested as a possible strikethrough syntax at some point.)

On Monday, January 25, 2016 at 10:48:27 AM UTC-5, Tobias Beer wrote:
Hi Scott,
 
Am I the only one who runs across this issue?  :) 

Quite possibly. ;-)

Wouldn't be the first time!  :-D

I realize I probably sound a tad crazy fretting over this one, and I very much appreciate the feedback.  I'd love to hear from others who've tripped over the current syntax or whose TWs would take a hit from making such a nitpicky change this late in the game.

PMario

unread,
Feb 4, 2016, 9:11:57 AM2/4/16
to tiddl...@googlegroups.com
Hi Scott,

Didn't you see my proposal, using: ---space which works perfectly fine and seems to be consistent too.

If I read the dash wikipedia page at: see: https://en.wikipedia.org/wiki/Dash, I have to say: "You are using it wrong". ... The mdash is not meant to be used as a short <hr>. So why change the TW syntax to add an edge case, as default behaviour.

If you need a hr, but want it short and consistent you can use a custom style.
eg:

hr {
    width: 3em;
    margin: 0;
}


In your OP your wrote:


  1. Using three hyphens (---) to denote an <HR> means you can't put an m-dash on its own line.
    Which may not be a problem for anyone else, but I tend to put an m-dash on its own line a fair bit and find myself resorting to keyboard shortcuts when it seems like wikitext should do.
    If it took FOUR hyphens to indicate an <HR>, three would be reserved for an m-dash, and we wouldn't have this conflict.

As I've shown above, it is possible to exactly do this. You have to use ---space  and everything works out of the box, imo in a consistent way.

Or you can style your <hr> element, which would be consistent too.

have fun!
mario

Scott Simmons (Secret-HQ)

unread,
Feb 6, 2016, 5:41:39 PM2/6/16
to tiddl...@googlegroups.com
Thanks for chiming in, Mario.  Sorry I didn't get a chance to respond the other day, but here's what I'm thinking:

On Thursday, February 4, 2016 at 9:11:57 AM UTC-5, PMario wrote:

Didn't you see my proposal, using: ---space which works perfectly fine and seems to be consistent too.

It's definitely a good workaround, as is the idea of a custom <hr />.  The inconsistency isn't slowing me personally down in my use of TiddlyWiki; I just think it's worth discussing whether the reuse of the string --- to accomplish two wholly different aims in TiddlyWiki ( and <hr/>) adds an unnecessary layer of potential confusion for new users.  It seems like a very manageable, though completely unnecessary, quirk of TW's wikitext.
 
If I read the dash wikipedia page at: see: https://en.wikipedia.org/wiki/Dash, I have to say: "You are using it wrong". ... The mdash is not meant to be used as a short <hr>. So why change the TW syntax to add an edge case, as default behaviour.

I'd argue the replacement syntax I'm suggesting is logically better, with --- wikified uniformly regardless of the context in which it's used.

While its true the m-dash isn't intended as a demarcator, we should reasonably expect end users to engage some non-standard behavior.  Programmers use all sorts of punctuation marks "wrong," for example.  ;)

I see two opportunities for consensus or disagreement here:
  1. Whether using two different strings (--- and ----) as wikitext shorthand for  and <hr/> is better than using one string (---) dependent on context (on its own line or not).
    • I'm a firm yes on this one.  If Jeremy were only now sussing out the spec for TW wikitext, I could campaign on this point with no hesitation.  (I hate I missed the chance earlier in TW5's development.)
  2. Whether it's worth risking backward-compatibility problems at this late date to refactor the existing behavior of --- in TW's wikitext.
    • I reside comfortably in maybe territory here, weighing the potential confusion and surprise of future users against the expectations and existing use cases of current users.  (My gut feeling is that the discrepancy will cause confusion for future users, while I'm uncertain how vested current users are in the current syntax.)
It's possible we disagree on point #1, but I suspect the bulk of my disagreement with others rests on the thornier point #2.
Reply all
Reply to author
Forward
0 new messages