HREF Linking Revisited (aka -- Houston, I have a problem.)

201 views
Skip to first unread message

Josiah

unread,
Jan 25, 2017, 2:13:53 PM1/25/17
to TiddlyWiki
Ciao all

I have slowly got me head around the fact that the ONLY targets of HREF links to a TW can be to Tiddler TITLES. As far as I understand it.

Mostly that is fine. But in some important use cases it is NOT good.

Here is a USE CASE for a potential e-pub that brings out the downsides ...
  • Take the novel Great Expectations.

  • Chunk it down so that every paragraph of the novel becomes a Tiddler.

  • For each of the 59 Chapters of the book transclude the paragraphs they contain under a Chapter number. Replicating the book.
RESULT: A basic E-book that looks like its in 59 Chapters (as it should). Yet retaining the ability to add memos, favouriting at Paragraph level, etc.

PROBLEM: IF I HREF link to a SPECIFIC paragraph what the user sees is ONLY that paragraph, a single Tiddler. That is no good. For understanding they need to see that paragraph IN CONTEXT.
       OR I link to the Transcluding Tiddler and leave the user having to scroll manually through the "page/Tiddler" to find what I am referencing that may be 30 paragraphs down. Equally unworkable.

I feel I'm hitting a contradiction between the fine-grained level of Tiddled Chunks and the Gross Level of "we can never see anything in context" if you href it....

Is there ANY WAY to link INSIDE a Transclusion? Has anyone had smart ways round this issue?

Please ask if this is not clear. And feel free to tell me I am an idiot and not understanding something.

Best wishes
Josiah

Jed Carty

unread,
Jan 25, 2017, 2:28:21 PM1/25/17
to TiddlyWiki
There has been lots of discussion about this without much resolution. To my knowledge the only result of these discussions is that it isn't reasonable to make something that lets you navigate to a chunk smaller than a single tiddler because in order to do that you end up making an object that has all the properties of a tiddler and you end up back where you started.

With that said, in specific situations it may be desirable to make different behaviour using a plugin or something.

In the case of books many people (including me) have looked into this a lot and I think that the answer may be to create a story view that displays a set of tiddlers in order to give a chapter-by-chapter or page-by-page view of the book, then to reach the next chapter or page the tiddlers that are displayed are all changed at once. This way you can still navigate to a single paragraph because it will be its own tiddler, but when you navigate to it instead of opening just that tiddler it gives you the full page/chapter that it belongs to.

I don't think that anyone has gone much farther than just describing this. In the book he is working on Eric made a lot of nice tools for presenting a tiddlywiki in book form, but I haven't played with it myself so I don't know if his work applies here. I don't think this is really what he was working on making.

Unfortunately now that I have a job I actually like I spend much less time playing with new tiddlywiki things. I may look at this a bit and see if I can throw together a quick prototype that maybe someone else can polish later tonight since this keeps coming up. Regardless of what form the solution takes, putting together a book is probably going to be a significant amount of work because all of the tiddlers are going to need to be labeled and tagged correctly to make the organisation and ordering fit what is wanted.

Matthew Lauber

unread,
Jan 25, 2017, 2:36:32 PM1/25/17
to TiddlyWiki
Soemthing else that could be work is to create a ViewTemplate that lets you "add context".  When a paragraph tiddler is viewed directly, It displays the preceding paragraph based on the list field of the chapter, or the sort order of the tiddler titles or whatever you're using to transclude all paragraphs into the chapter section.  But when the tiddler is transcluded you wouldn't get that, so your chapters would still work properly.  But you wouldn't be able to scroll back arbitrarily in the book that way, just get the surrounding N paragraphs.  

Matt

Tobias Beer

unread,
Jan 25, 2017, 2:48:01 PM1/25/17
to TiddlyWiki
Hi Josiah,

I think what you need is two things:
  1. a new, custom story view, e.g. a "book view" ...which doesn't show ridiculous titles for "paragraph tiddlers", e.g. CH11-P14
  2. where all chapters and paragraphs of a book are already displayed
  3. and a way to open that story at a given paragraph tiddler
Am I making sense to you?

Best wishes,

Tobias. 

Matthew Lauber

unread,
Jan 25, 2017, 2:49:36 PM1/25/17
to TiddlyWiki
Here's an example of what I mean.
example.html

Josiah

unread,
Jan 25, 2017, 3:43:12 PM1/25/17
to TiddlyWiki
Ciao Tobias

Yeah. Its making some sense. You are right that they would look like this c01pg001pa01 etc. if exposed singularly.

I THINK what you mean is that they are NOT transcluded, just strictly ordered, with headings chopped off (aka hidden headings)?

Yes?

Best wishes
Josiah

Tobias Beer

unread,
Jan 25, 2017, 3:50:43 PM1/25/17
to tiddl...@googlegroups.com
Hi Josiah,
 
I THINK what you mean is that they are NOT transcluded, just strictly ordered, with headings chopped off (aka hidden headings)?

Yes?

Precisely, that is what I meant...
  1. a different way to display tiddlers in a story
  2. a way to load certain titles into a story, e.g. defined via filter
In other words, perhaps we may want / need DefaultTiddlers per story view, rather than just globally.

Best wishes,

Tobias.

Josiah

unread,
Jan 25, 2017, 4:08:19 PM1/25/17
to TiddlyWiki
Ciao Matthew

Thank you for taking the time to do that example. Its helpful. Its helping me think freshing about what "context" is.

It prompted me to think that maybe there could be a way that each Paragraph Tiddler (when gone to via an Href, in its singularity, not its embedded appearance in transclusion) might have buttons top and bottom to programmatically Transclude the Next (down) or Previous (up) paragraphs when clicked. I'm not quite sure how to do that but it seems a possible solution? If it works then then one might keep expanding as needed?

Best wishes
Josiah

Jed Carty

unread,
Jan 25, 2017, 4:15:10 PM1/25/17
to TiddlyWiki
The previous and next buttons for each paragraph are easy and I already have what is needed for that for the picture gallery plugin I made. I think that some other people have also made similar things. I am working on making something now that will page between different lists of tiddlers like pages to see if that works. I should have something basic later tonight.

Josiah

unread,
Jan 25, 2017, 4:32:51 PM1/25/17
to TiddlyWiki
Ciao Jed

That sounds great. Thank you.

Just, FYI, I got a lot clearer today about the issue. Its been tough to understand it not myself being a programmer. Its partly thanks to a programmer friend of mine. One of the thoughts (vague ideas) he had was (IF possible) to use Javascript in some way to jump to "Pseudo IDs" like <tw-id="specialchapter05page003para04"></tw-id>.
  1. The href would come in the usual way but IF the standard link did not exist ...
  2. ...it would NOT make a new Tiddler but first look for the Pseudo Ref. If it finds it takes you there (whatever that involves :-).
  3. If it does not exist it would make a new Tiddler.

I explained to him that this is likely difficult because of the core workings of TW. But it intuitively felt like an interesting idea.


Best wishes

Josiah

Jed Carty

unread,
Jan 25, 2017, 6:56:27 PM1/25/17
to TiddlyWiki
Well, there is a very rough version of my idea available http://ooktech.com/jed/ExampleWikis/TiddlyBook

I am sorry if the name tiddlybook is already taken, I am tired and will come up with something better later.

Also, at least half of the time spent making that was taken by trying to figure out how to get around half of the things I needed adding [[ and ]] to names and the other half breaking when names had [[ and ]] around them, or the other way around. It is too late to remember things like that.

Anyway, enjoy, I will hopefully make a better and actually usable version of this sometime.

Mat

unread,
Jan 26, 2017, 6:22:56 AM1/26/17
to TiddlyWiki
@Josiah


One of the thoughts (vague ideas) he had was (IF possible) to use Javascript in some way to jump to "Pseudo IDs" like <tw-id="specialchapter05page003para04"></tw-id>.

I made this hack some time ago

http://intlinks.tiddlyspot.com/

It is not a proper solution.


<:-)

Josiah

unread,
Jan 26, 2017, 8:52:16 AM1/26/17
to TiddlyWiki
Ciao Jed

That is great! Thankyou for finding the time. It gives a skeleton I can play with.

Best wishes Josiah

Josiah

unread,
Jan 26, 2017, 8:59:16 AM1/26/17
to TiddlyWiki
Ciao Mat

It may not be a proper solution but its fantastic to see it. I'm going to do some tests with it to try get clearer whether something like it could be one way to solve the issue. It looks hopefulish.

Thanks!

Jed Carty

unread,
Jan 26, 2017, 5:58:28 PM1/26/17
to TiddlyWiki
I have been working on this a bit more. It is better organised on the backend so there are macros that could be modified for something other than book/chapter/paragraph organisation. I may actually polish this one a bit. I think it may be useful.

I added in the first two chapters of Alice's Adventures In Wonderland as a demo, but the paragraphs aren't in the correct order and I don't feel like ordering them correctly right now.

Reply all
Reply to author
Forward
0 new messages