Floating associated content beside main text

PhraseQuoteMacroDemo.json (2.3 KB)
Voilà. Mas beautifull. Only the first phrase of the line appears, if clicked, the number of the active phrase appears.

and a final version with typographic quotes. Final.json (4.6 KB)

It looks nice. I’ll have to investigate soon how you did it. It doesn’t capture everything I was trying to do, but it captures a lot.

Very exciting!

phrase-quote-final.json (5.0 KB)
Sorry for flooding this thread with “last versions” . This last version is better on smartphones and solves the problem of … triple periods and (no real phrase.) brackets.

By the way the name wrappit is due to this: wrappit — . A dropdown that I use in my editor to wrap expressions with macros.

1 Like

@Scott_Sauyet I think from Add Notes and Figures to Tiddlers in View Mode - Tufte Style - #40 by Scott_Sauyet it should be moved to a new thread. Can you split it?

1 Like

OK, Here they are! :slight_smile:

1 Like

A bit persnickety, but… the typographic quotes are rendering backwards — the “close quote” at the beginning, and the “open quote” at the end.

Hi @Springer , you can alter this in the code. But for me it looks completely correct.

The variant of quotation marks depends on the language. For example, in German and Russian one should use two lower nines and two upper sixes, „ “, while in English that would be two upper sixes and two upper nines: “ ”.

Don’t worry; we all know that something like this is never really finished. There’s always “just one more tweak!”

This is very interesting. It’s not quite the layout I was looking for, better in a few ways and in other ways missing features I do want.

I don’t know if the original context of this was clear. The reason for that hard-coded example was to provide a layout that captured the best of two different but both useful versions. (Discussion in a long thread.)

The first version has the verse numbers inline, just preceding the verse text. They are (very small) links to the verse tiddlers themselves. I find them somewhat intrusive when reading the text, and they get included (often unnecessarily, IMHO) when text is copied and pasted. The second version fixes these problems by making the entire verse text highlight on hover and serve as a link—with tooltip—to the verse tiddler. But this doesn’t offer you a quick visual clue of where verses start and stop.

The demo version you were playing with is meant to solve all these problems. You can tell approximately where a verse starts and ends at a glance, and precisely so on hover. The verse numbers are visible but less intrusive.

One of the important things about these designs is that they’re built on Verse tiddlers, which look like this:

book: Genesis
chapter: Genesis 1
para: 2
seq: 5
tags: Verse [[Genesis 1]]
title: Genesis 1:3
verse: 3

And God said, Let there be light: and there was light.

So I probably shouldn’t use auto-generated sequence numbers. For instance, it’s easy enough to imagine a virtual tiddler that takes the title 1 John 4:7-8 and display the two verses 1 John 4:7 and 1 John 4:8, or even more complicated bits that don’t involve sequential verses. I do think we could easily enough adapt your approach to this. But I would also not want to change the method of building Chapters out of Verse tiddlers and Books out of Chapter ones. That’s crucial to the design.

I very much like your smaller verse numbers and more subtle hover changes. I’m not sure what I think of the slight position animation/change on hover.

However, while it’s quite clever and perhaps even elegant, the overlaying of verse numbers is a big miss from my perspective. I really want all the verse numbers to remain visible at all times. I understand that a fully general solution might not be possible: one can imagine a paragraph only a few lines long that still had a dozen or more verses included. There would be no way to squeeze all of those into the margins. But I’m aiming at practicality in my context: a layout of Christian bibles. There I don’t think such would come up.

If I were to consider removing the Verse tiddlers in favor of formatted Chapters like this, there is one improvement I would suggest to this style. The markup looks like this:

<<phrase-quote "Genesis 1" "In the beginning God created the heaven and the earth.And the earth was without form, and void; and darkness was upon the face of the deep.

And the Spirit of God moved upon the face of the waters.
And God said, Let there be light: and there was light.And God saw the light, that it was good: and God divided the light from the darkness. 
And God called the light Day, and the darkness he called Night. And the evening and the morning were the first day." "King James Bible">>

These are split into verses at period/full-stop characters (.). This is altered for three periods representing an ellipsis character, but it doesn’t take into account the possibility of periods used as decimal separators, as used in many languages (pi is about 3.141593, e is about 2.718281828)

And this has several issues when it comes to rendering the verses. Because verses aren’t sentences; it’s possible that a verse spans several sentences or that one sentence includes all or parts of several verses. There actually are such issues in the text included. (Note that the passage includes only five verses, but this period-splitting creates seven.)

I think there is an easy solution. Just use newlines as markers instead of periods. A double newline introduces a paragraph, and a single one introduces a verse. We might skip initial and final ones for readability. Thus:

<<phrase-quote "Genesis 1" """
In the beginning God created the heaven and the earth. 
And the earth was without form, and void; and darkness *was* upon the face of the deep. And the Spirit of God moved upon the face of the waters.

And God said, Let there be light: and there was light. 
And God saw the light, that *it was* good: and God divided the light from the darkness. 
And God called the light Day, and the darkness he called Night. And the evening and the morning were the first day.
"""  "King James Bible">>

And we could then also be explicit about verse numbers if we choose:

<<phrase-quote "Genesis 1" """
1: In the beginning God created the heaven and the earth. 
2: And the earth was without form, and void; and darkness *was* upon the face of the deep. And the Spirit of God moved upon the face of the waters.

3: And God said, Let there be light: and there was light. 
4: And God saw the light, that *it was* good: and God divided the light from the darkness. 
5: And God called the light Day, and the darkness he called Night. And the evening and the morning were the first day.
""" "King James Bible">>

I think this would be both simpler to use and simpler to code accurately. The second version would also handle my partial chapter scenario easily:

<<phrase-quote "1 John 4" """
7: Beloved, let us love one another: for love is of God; and every one that loveth is born of God, and knoweth God.
8: He that loveth not knoweth not God; for God is love. 
""" "King James Bible" >>

Or we can imagine a variant of this where we don’t want lines to be very long and we use double-newlines to represent verses and triple or more ones for paragraph changes:

<<phrase-quote "Genesis 1" """

1: In the beginning God created the heaven and the earth. 

2: And the earth was without form, and void; and darkness 
*was* upon the face of the deep. And the Spirit of God moved
upon the face of the waters.



3: And God said, Let there be light: and there was light. 

4: And God saw the light, that *it was* good: and God 
divided the light from the darkness. 

5: And God called the light Day, and the darkness he called 
Night. And the evening and the morning were the first day. 

"""  "King James Bible">>

Again, this is probably nothing I will use for my Verse-tiddler-based solutions, but it would be useful for marking up chapters or small passages.

And most of all, thank you for the very interesting alternative!

I had no idea, though, that there were so many variants!

Good Point. Maybe I will do a final final Version escaping these.

Don’t you think you will keep running into problems? William Strunk, Jr. and E. B. White would surely agree. (And, Dorothy Parker said, regarding their book, “If you have any young friends who aspire to become writers, the second-greatest favor you can do them is to present them with copies of The Elements of Style. The first-greatest, of course, is to shoot them now, while they’re happy.”)

Let’s try that again:

Don’t you think you will keep running into problems? William Strunk Jr. and E. B. White would surely agree. (And, Dorothy Parker said, regarding their book, "If you have any young friends who aspire to become writers, the second-greatest favor you can do them is to present them with copies of The Elements of Style. The first-greatest, of course, is to shoot them now, while they’re happy.")

I think this is a difficult feat to automate. That’s one of the reasons for my suggestion of using line-breaks instead.

Yup. The Biblical text was deceptively compliant with letting periods serve reliably as end-of-sentence, while ordinary and academic language is full of other uses of the period as noted by Mr. Sauyet… But also (!) we find other things like exclamation points (etc.) that may or may not mark the end of a sentence, right? And three periods in a row may — or may not! — mark the end of a sentence… so…

2 Likes

Abbreviations, Numbers, Numberings, Names…
$__wrappit_Zitat.tid (3.1 KB)
I tried to shoot down the most issues :wink:

? and ! are yet to integrate as selectors

Good Point. I am trying to figure out an indicator for that.

1 Like

I’m impressed that you’re willing to continue trying this. This deals with several of the issues. Of course there are still flaws besides the ? and !. Worst seems to be that it believes the sentence-ending .") now puts its ") as the start of the next sentence.

If you feel like continuing to patch this, I’m willing to continue as your devil’s advocate, suspicious that this can be done in any easily automatable way. I do think it’s an incredibly difficult problem.

TaDa: The ? and ! splitting version:
$__wrappit_Zitat.tid (3.6 KB)

It’s getting better! The following demonstrates some of the remaining gaps:

She knew she should feel sorry for him, but she couldn’t help feeling a bit of shaudenfreude (sp?) over his latest gaffe. Any serious math student who can’t recite pi beyond 3.14 is bound for some shaming, correct? That he could quote long passages from J.R.R. Tolkein, G.R.R. Martin, etc. doesn’t come close to making up for it. Knowing that he had been trying to impress her made it… awkward. Still she wished she hadn’t laughed about it when… None of that! She had nothing to be ashamed of. But should she talk to him about it? Perhaps not. After all “discretion is the better part of valor” were good words to live by. “What are you thinking?” he asked. Flustered, she could only mumble, “Oh, nothing.”

Your code gets these sentences:

  • She knew she should feel sorry for him, but she couldn’t help feeling a bit of shaudenfreude (sp?) over his latest gaffe.
  • Any serious math student who can’t recite pi beyond 3.14 is bound for some shaming, correct?
  • That he could quote long passages from J.
  • R.
  • R. Tolkein, G.
  • R.
  • R. Martin, etc. doesn’t come close to making up for it.
  • Knowing that he had been trying to impress her made it… awkward.
  • Still she wished she hadn’t laughed about it when… None of that!
  • She had nothing to be ashamed of.
  • But should she talk to him about it?
  • Perhaps not.
  • After all “discretion is the better part of valor” were good words to live by.
  • “What are you thinking?” he asked.
  • Flustered, she could only mumble, "Oh, nothing.
  • ".

Where I would expect:

  • She knew she should feel sorry for him, but she couldn’t help feeling a bit of shaudenfreude (sp?) over his latest gaffe.
  • Any serious math student who can’t recite pi beyond 3.14 is bound for some shaming, correct?
  • That he could quote long passages from J.R.R. Tolkein, G.R.R. Martin, etc. doesn’t come close to making up for it.
  • Knowing that he had been trying to impress her made it… awkward.
  • Still she wished she hadn’t laughed about it when…
  • None of that!
  • She had nothing to be ashamed of.
  • But should she talk to him about it?
  • Perhaps not.
  • After all “discretion is the better part of valor” were good words to live by.
  • “What are you thinking?” he asked.
  • Flustered, she could only mumble, “Oh, nothing.”

8 posts were split to a new topic: Writing Supervisor Regex Thingy