TiddlyWiki / TiddlyWiki5

A self-contained JavaScript wiki for the browser, Node.js, AWS Lambda etc.
https://tiddlywiki.com/
Other
7.97k stars 1.18k forks source link

strikethrough - mdash rendering inconsistency #12

Closed pmario closed 12 years ago

pmario commented 12 years ago

Hi Jeremy, I did get an email today in reply to an old TW group post [1] about disabling the strikethrough rendering.

Thank you for this! To the TW dev(s): There should be some way to address this within TW (I was going to suggest ---, and I see I'm not the first). I use emdashes often in my prose, and I'm not willing to learn a different convention just for those times when I'm using a particular program--even a truly great program like TW! :-)

I thought it would be worth a ticket for TW5, because imo it is a problem, from a writers point of view. Using: text -- test seems to be wrong [2] too because a the spaces. So may be the "Compose Key" like notation, mentioned at Wikipedia [3] would be an option.

endash:  --.
emdash:  ---

It shouldn't interfer with existing rules and or plugins. At least I don't know any :)

or changing the strikethrough behaviour a bit. eg: space--space ... start/end of strike and text--test ... emdash

-m

[1] http://groups.google.com/group/tiddlywiki/msg/61930389d6c6b170 [2] http://www.grammarbook.com/punctuation/dashes.asp [3] http://en.wikipedia.org/wiki/Emdash#Em_dash

Jermolene commented 12 years ago

Hmm I'd forgotten about this, but, yes, it's a bit of a mess, and something needs to be done.

I note that Wiki Creole doesn't support strikethrough, and so can't guide us.

Given that strikethrough is fairly rare in normal written text, I wonder about:

-- for n-dash --- (3 dashes) for m-dash ----text---- (4 dashes) for strike through

I'm increasingly of the opinion that we need to be ready to make breaking changes to the wikisyntax. I hope to make TW5 at least 100 times more popular than classic TW, and so don't want to saddle the new users with too much archaic crankiness. TW5's plugin mechanism means that it will remain possible for people to customise things back to the classic behaviour if they need to.

pmario commented 12 years ago

-- for n-dash --- (3 dashes) for m-dash

Since it is same as in TeX and scientific writes may be familiar with it, I think it would be a choice.

---- (4 dashes) is used to create a <hr>, but it needs to be terminated by \n, so would be possible too.

I'm increasingly of the opinion that we need to be ready to make breaking changes to the wikisyntax.

Yup, there are several syntax issues, that I would want to have improved. Most are even non breaking, but fallback related. (I could post a feature request here?)

Especially measures should be taken, to enable <p> paragraph recognition.

Jermolene commented 12 years ago

It'll probably be a few weeks before I work on the wikitext parser, so it's a good time to discuss changes

pmario commented 12 years ago

I did post some thoughts at my tiddlyspace [1], because refining it there is easier.

[1] http://pmario.tiddlyspace.com/#TW5SyntaxThoughts

Jermolene commented 12 years ago

Thanks Mario.

The new paragraph handling will use double line breaks to signify paragraph breaks, and single line breaks will be just treated as whitespace. This will mean that macros on consecutive lines will not have line breaks inserted between them. As you note, this will make raw wikitext much more readable.

One other changes planned for the wikifier are to accept HTML tags, which is why it makes sense for the templates to be wikitext; one will just be able to write HTML in there.

In terms of the clash between {{{.js and the code markup for spans, could you very kindly remind me what the problem was with the current $$$.js syntax?

Cheers

jeremy

pmario commented 12 years ago
$$$.js  + some more params till the end of the line
if (a > b) {
    c = 3; // some litte code snippet.
}
$$$

For me $$$.less is intrusive. /*{{{.less*/ is intrusive too, but it is existing syntax. Copy / pasting the tiddler source into 3rd party software works well.

The new markers can't be used eg: inside a javascript tiddler, because it will cause a syntax error. //{{{.json is a valid js comment and can indicate which syntax highlighting should be used. /*{{{.less*/ is a valid css comment <!--{{{.svg--> html comment.

The new marker can only be used for exactly one behavior inside TW text tiddler. The "extended vanilla" markers could be used in plain text tiddlers and in "evaluated" tiddlers, without breaking there syntax.

Jermolene commented 12 years ago

I think the syntax for typed blocks needs to be quite obtrusive; it's a big conceptual shift to move to a different form of markup. I selected $$ following MathJax and Latex.

In terms of using these markers inside a JavaScript tiddler, don't forget that now JavaScript tiddlers are parsed and pretty printed as syntax coloured JavaScript. Wikitext is currently used for JavaScript comments, and it's OK to use the $$ notation inside there if required.

pmario commented 12 years ago

I think the syntax for typed blocks needs to be quite obtrusive; it's a big conceptual shift to move to a different form of markup. I selected $$ following MathJax and Latex.

OK. Seeing $$$ in the context of MathJax ($..$, \(..\), \[..\], or $$..$$) and Latex I can live with that. And its also easy to explain now :)

--Quoted from the math-template space [2]--

In MathJax, all commands need to be enclosed in $...$, (...), [...], or $$...$$. This includes environments like \begin{align}...\end{align} and macro definitions such as \def\union{\cup}


In terms of using these markers inside a JavaScript tiddler, don't forget that now JavaScript tiddlers are parsed and pretty printed as syntax coloured JavaScript.

Right. But as soon, as the TW5 API has stabilized, I want to have pretty editing for every language used with TW [1][3]. The benefit of the new js parser is, that it can do realtime parsing, to point out syntax errors. I'd love to have this feature.


I still think, that extending the existing block syntax would make sense. I'll add my reasoning in a new post here.

[1] http://codemirror.net/mode/tiddlywiki/index.html [2] http://math-template.tiddlyspace.com/#[[Latex%20and%20MathJax]] [3] http://codemirror.tiddlyspace.com/