Query: Smart Quotes?

160 views
Skip to first unread message

TiddlyTweeter

unread,
Feb 24, 2020, 12:12:30 PM2/24/20
to TiddlyWiki
Working with literary texts curly quotes are better.

"This" is not as good as “this” or ‘this’.

Could this not be intelligent in wiki-text? I know I can enter "&quotemarkvariant; but I wonder if we could automate it?

Just a query
TT
Message has been deleted

PMario

unread,
Feb 24, 2020, 12:45:08 PM2/24/20
to TiddlyWiki
On Monday, February 24, 2020 at 6:12:30 PM UTC+1, TiddlyTweeter wrote:
Working with literary texts curly quotes are better.

"This" is not as good as “this” or ‘this’.

You mean: „Es soll so aussehen.“ ... right?

It depends on the language setting, what looks right. see: https://en.wikipedia.org/wiki/Quotation_mark#Summary_table

I would be in favour of implementing this rule in a compatible way.

have fun!
mario

TiddlyTweeter

unread,
Feb 24, 2020, 1:29:40 PM2/24/20
to tiddl...@googlegroups.com
Right. 

My point was exactly "intelligence" in quotes is likely worth the work.

It is precisely real usage of quotes outside code containing that is the issue.

Quotes are variant by (1) context; (2) culture. 

Making it easier to use them through wiki-text would be a big plus for TW.

Best wishes
TT

PMario

unread,
Feb 24, 2020, 1:32:21 PM2/24/20
to TiddlyWiki
Hi,

If you copy paste this into your TW, it should do the right thing. So my English "speaking" FireFox shows the right German quote signs if used at tiddlywiki .com

<q>Firefox 1.0 was released in 2004 and became a big success.</q>

The FireFox help page (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/q) shows the English version. ... So it seems to use a language setting from an element. .. More investigation needed.

-mario

PMario

unread,
Feb 24, 2020, 2:30:16 PM2/24/20
to tiddl...@googlegroups.com
On Monday, February 24, 2020 at 7:29:40 PM UTC+1, TiddlyTweeter wrote:

Quotes are variant by (1) context; (2) culture. 

I think (1) context is the problem. As I wrote, my FF does it right. ...partially... because as an author I want to be able to control it in a simple way.

eg: I'd like to have some rules
  • a) text editing must be simple
  • b) global setting ... for real prose text in 1 language
  • c) per tiddler ... eg: for documentation. It needs to be possible to create English wikitext, that describes German quotes and vice versa
------------ Global setting

The global setting could be done in the ControlPanel : SmartQuotes definition table
 - Double quote start: x
 - Double quote end: y
 - Single ... 
 -

------------- Per Tiddler

The per-tiddler setting could be defined as a pragma \smartquotes de-DE „…“ ‚…‘ »…« ›…‹

The text would use, what's part of the keyboard. ... Different keyboards have different possibilities! eg. my German keyborad setting doesn't offer any of the above characters. So I'd use "text" as wikitext.


------- per input ???

Not sure, how this can be implemented in a sensible way. ... I personally would want an editor-toolbar button, that lists the elements from the \smartquotes setting, so they can be directly used.


just some thoughts
mario

PMario

unread,
Feb 24, 2020, 2:31:41 PM2/24/20
to TiddlyWiki
Hi

<q lang="de">Firefox 1.0 was released in 2004 and became a big success.</q>

<q lang="en">Firefox 1.0 was released in 2004 and became a big success.</q>

does the trick

-m

Suzanne McHale

unread,
Feb 24, 2020, 3:18:26 PM2/24/20
to TiddlyWiki
I would like this feature also, as I use smart quotes a lot! Dashes (-- and ---) are already parsed into Unicode equivalents by TW, so it seems an odd exclusion for quotes not to be also. (I would prefer this to using HTML <q>, which is not consistent across browsers.)

PMario

unread,
Feb 24, 2020, 6:51:28 PM2/24/20
to TiddlyWiki
On Monday, February 24, 2020 at 9:18:26 PM UTC+1, Suzanne McHale wrote:
I would like this feature also, as I use smart quotes a lot! Dashes (-- and ---) are already parsed into Unicode equivalents by TW, so it seems an odd exclusion for quotes not to be also.
 
(I would prefer this to using HTML <q>, which is not consistent across browsers.)

My suggestion is, to transfer "test" into <q lang="xx">test</q> ... plus some CSS to be able to use »…« ›…‹ too.

Can you be more precise about browser in-consistencies with the <q> object?

-m

TonyM

unread,
Feb 24, 2020, 11:08:59 PM2/24/20
to TiddlyWiki
There is this from a much earlier version of tiddlywiki


Regards
Tony

TiddlyTweeter

unread,
Feb 25, 2020, 1:17:06 AM2/25/20
to TiddlyWiki
Thanks Tony

I just tested http://skplugins.tiddlyspot.com/#%24%3A%2Fplugins%2Fsk%2FFancyQuotes in 5.1.21 and it works still, though the plugin tiddler does not appear right (broken headings).

Its a pretty neat tool that converts quotes and other typography in selected text in the editor to the correct characters (I.e. actual characters, not entities).

FWIW, looking at the JS in it, it looks possible to extend it to other types of quotes without needing to understand JS. 

I think it will do what I need, so thanks for the pointer!

Best wishes
TT

TiddlyTweeter

unread,
Feb 26, 2020, 4:14:24 AM2/26/20
to TiddlyWiki
Ciao PMario

The sounds like a good approach. Country variants are not infinite, though some can use several different styles in the same text ... https://en.wikipedia.org/wiki/Quotation_mark#Summary_table

This is basically auto search and replace--so changes are hard-coded rather than dynamic on render.

Best wishes
TT

PMario

unread,
Feb 26, 2020, 5:38:15 AM2/26/20
to TiddlyWiki
On Wednesday, February 26, 2020 at 10:14:24 AM UTC+1, TiddlyTweeter wrote:

This is basically auto search and replace--so changes are hard-coded rather than dynamic on render.
 
After some testing, I'm thinking, that this is the better approach.

If I'm writing English text in a German wiki, I still should respect the the language specific quoting rules.

So if I copy paste "some text" from a wiki with global settings English into a wiki with global settings German ... It would change the visual representation of the English text in a way that imo is wrong.

If a tiddler with a \smartquotes pragma, is copied it could be done in the right way. 

But the "per input" option would need to be hardcoded.

So my conclusion atm is, that we should have improved tools like FancyQuotes, that allow us to improve the writing experience and use the rules according to the language which is used.

Using the pragma with "text like this" would still be an option, if you want to keep the existing wikitext, but want "per tiddler" smart quotes.

There is one more problem with "rendered" smart quotes. If you copy paste the rendered text, the quotes are missing.

-mario


TiddlyTweeter

unread,
Feb 26, 2020, 7:05:07 AM2/26/20
to TiddlyWiki
PMario


Even though I can't do JS I was able to edit it and change and add rules. 
Note it has a couple of issues on order. For instance it does ens before ems which is not ideal.

IF you decide to take the approach forward I'm happy to help on anything regex.

Best wishes
TT

PMario

unread,
Feb 26, 2020, 8:29:25 AM2/26/20
to TiddlyWiki
Hi TT

I did just create a new Keyboard Layout DLL for Windows 10, that has „“‚‘»« nicely assigned to CTRL-SHIFT-1 to 6.

It also changes the ` Backtick "dead-key" setting, to be an active key, which is OK for German language.

-------

I'm still in favour of a pragma, editor-button solution. ... similar to "fancyquotes". ... but without the en em replace

I would also want to have an option the does "undo hardcoded quotes" -> wikitext

-mario



TiddlyTweeter

unread,
Feb 26, 2020, 11:25:08 AM2/26/20
to tiddl...@googlegroups.com
Ciao PMario

I think "back-conversion" to wikitext of quotes would be easy since you would not to need to match context I think?

You are right that FancyQuotes includes things that aren't quotes and it would be better to have it dedicated to them.

FYI in my own use I starting using a clone of FQ as a general converter (personal use only to prepare imported texts)

TT

Thomas Elmiger

unread,
Feb 27, 2020, 4:10:39 PM2/27/20
to TiddlyWiki
Hi Mario and TT

I am a bit tired, so I just want to quickly throw in some CSS examples for your information. In my themes I use these to control the display of quotes:

blockquote, q {
    quotes
: "\201C""\201D""\2018""\2019";
}

OR this for Swiss quotes:

blockquote, q {
    quotes
: "\00AB""\00BB""\2039""\203A";
}

Cheers,
Thomas
Reply all
Reply to author
Forward
0 new messages