IMO it will be very similar or the same as: https://tiddlywiki.com/#Styles%20and%20Classes%20in%20WikiText
IMO it will be very similar or the same as: https://tiddlywiki.com/#Styles%20and%20Classes%20in%20WikiTextReally? Do you feel the same about the * and : markup? Might as well do it with @@... instead?
The point is to access ones own look/behaviour as smoothly as with e.g *
One idea would be to use the aforementioned § character. IF a row is prefixed with § and has a subsequent empty row (or end of tiddler) then it is interpreted as a list element. If the row instead is encapsulated with a § and a suffixing § then it is interpreted as a div. For example the first case could be interpreted as <li class="custom-li"> and the second case as <div class="custom-div">....</div>.
<ul>
<li>standard list element</li>
<li class="custom-li">different list text</li>
</ul>
<ul class="custom-class">
<li>element 1</li>
<li>element 2</li>
</ul>The problem is, that we don't have enough unique "indicators" left.
The point is to access ones own look/behaviour as smoothly as with e.g *eg: I'm working on a new plugin that will allow us to style paragraphs. It uses the "accent" aka "Tick"
<div class="custom-div">....</div>
Your second example is
@@.custom-class* element 1* element 2@@
§ So this is a "special" paragraph
§ This one also@@.myclass So this is a "special" paragraph@@
@@.myclass This one also@@
<<mymacro """So this is a "special" paragraph""">>
<<mymacro "This one also">>
<<mymacro "So this is a <<anothermacro special>> paragraph">>§ which was literally created to define paragraphs
Using this code to control formatting would preclude using it as a printable character in legal texts.
Any thoughts on the OP (with the goal of simplifying authoring)?
PMario: The problem is, that we don't have enough unique "indicators" left.
Mat: The point is to access ones own look/behaviour as smoothly as with e.g *
In legal texts, the § symbol can be used as a printable character to *cite* a section of the legal code as in:USC17 §107which is a reference to United States Code, Title 17, Section 107 - Copyright Limitations on exclusive rights: Fair useUsing this code to control formatting would preclude using it as a printable character in legal texts.
Eric Shulman wrote:Using this code to control formatting would preclude using it as a printable character in legal texts.Good then that my proposal is for "custom markup", as defined by the user, and not predefined markup. As noted in the OP, if no styling etc is defined then using the character doesn't "do" anything.
Mat: Any thoughts on the OP (with the goal of simplifying authoring)?
We'd get infinite options if one could use §1, §2, ...
.§ = activate Mat style Custom Wikitext pragma for "§"
.d = activate screenplay Dialogue stylingIt would be useful if TW could work as a custom markup constructor+interpretator.
(Possibly the character should trigger more than mere CSS. I would guess pipe characters, when creating wikitext tables, do this, right? In that case, § could trigger some user defined macro, perhaps titled § ...or §1, §2... to operate on the text snippet in question.)
@TiddlyTweeterI am not the least fond of the pragma route for the reason I hinted in this post, i.e that it breaks the authoring workflow. Imagine if you were forced to add a pragma every time you wanted bullet lists? It is distracting and bad UX, IMO. Pragmas definitely have their place, for instance for macros where the pragma is part of what actually constitutes the thing. Another case is a pragma that implies "this tiddler should have this special functionality" but
... my OP here is for something mundane and comparable to * for bullet lists - it's just that the user himself can make up what the effect should be.
(1) custom style given to blocks like <p>, <li> etc using more Markdown Like method than the @@ ... @@ approach.(2) insert new HTML elements, not covered by extant WikiText, to enhance TW markup vocabulary?(3) permit gizmos (e.g. pipe) to alter what hits render?
<:-)
I think it is worth underlining that you are interested in LINE AWARENESS.That the scope of some(?) of what you want is line (i.e. /^.+\n/gm) NOT the standard paragraph (i.e. /^.*\n\n+/gm)
<space><space>\n will be recognized as a hard linebreak with a second plugin.
»div.classname This is text (Autocloses div at EOL)»p.classname
Multiple lines can use the existing;
@@.classname
1
2
3
@@*.check Items details
*.check Item2 details» : <classnames>i : <classnames>ii : <classnames>asdf : <classnames>
{ margin-left: 6em;}I'm really looking forward to your plugin. Some questions:
As PMario notes, the "indicator" characters are problematic especially the » which doesn't even exist on many keyboards, including mine. So then... how is that simpler than using e.g @@.class ?
Maybe one could make a user modifiable dictionary like so
» : <classnames>i : <classnames>ii : <classnames>asdf : <classnames>
(or even style definitinos directly instead of the classnames)
Also, @Tony did briefly mention a dot classname syntax, i.e:.class My text/nwithout any other prefixing indicator. I didn't quite understand why this is not possible, could someone explain?
<space><space>\n will be recognized as a hard linebreak with a second plugin.When manipulating text in filters, can <space><space> be retained or do I remember right that filters often trim space chars?
I'm thinking about it, but at the moment I didn't have a good idea. The main concern is content "exchangeability" ... A well defined wikitext syntax guaranties readability with federated wikis. .. There is still some hope :)» : <classnames>i : <classnames>ii : <classnames>asdf : <classnames>This would mean I need to create a completely new parser. ... ATM I'm using the default functions, that are already part of the core and battle tested.(or even style definitinos directly instead of the classnames)ONOooooo... style is hardcoded and will always win. So document consistency will be broken completely.
aaa aaaa aaaa
bbb
you can't get the \n to show up anyway
- this tiddler has no $ ":/plugins/wikilabs/tick-text/styles"
- We need to get naming clear
- <tick> ' for turning a line into a div
- <angle quotes> » for paragraphs
- To me The "angle brace" aka Angle quotes: » Alt 0187 just does not sound correct although it is official?
- I have a class defined .cb { color: blue; } /* Text color blue /*
- » .cb does nothing?
- ´.cb does nothing?
- :::.cb.rrr works but for the blue?
I would like a The "angle" will create P element, stops at the first \n newline it finds.
The editor toolbar buttons need the add before the remove, perhaps a simple list-before$:/plugins/wikilabs/tick-text/EditorToolbar/add-newline$:/plugins/wikilabs/tick-text/EditorToolbar/add-tick$:/plugins/wikilabs/tick-text/EditorToolbar/remove-tick$:/plugins/wikilabs/tick-text/EditorToolbar/add-angel$:/plugins/wikilabs/tick-text/EditorToolbar/remove-angel
Could my custom classes not be working because the result is as follows?
- » .cb does nothing?
- ´.cb does nothing?
`<div class="cb wltc-l1 wltc">` and your classes replace the inline provide calls?eg `<div class="wltc-l1 wltc cb">`
Could my custom classes not be working because the result is as follows?
- » .cb does nothing?
- ´.cb does nothing?
I think for your usecase you should always use the "tick" version.
I did publish an EXPERIMENTAL wiki [1] at wikilabs, that contains 3 new wikitext elements.
».aaa 111 (ends with space space newline)
222
<style>
.aaa {background:red; display:inline-block; max-width:133px;}
</style>The "tick" will create a DIV element _and_ stopps at the first \n newline it findsThe "angle" will create P element, stopps at the first \n\n double-newline it finds.
´.r.j.c.cp Some test text
will create<div class="r j c cp wltc-l1 wltc">Some test text </div>
There are 5 new edit-toolbar-buttons: Only 3 have shortcuts atm. You can assign them at the Control Panel
- space-space-newline or- space-space-backslashThere are 2 tiddlers- test-hard-linebreak-and-transclusion- nl-is-hard-linebreakThat test a different way to crate hard linebreaks. NO plugin involved!!
Planned:- test if it's possible to use --- aka HR instead of \n\n as a stop-indicator.
- test if it's possible to use pragmas to use different HTML tags instead of DIV and P
- test if it's possible to use a pragma to define the stop-indicator
- test if it is possible to create a wrapper element and call a macro using the text as the ONLY parameter
PS: Yea I know my page has a typo. I named it "angel bracket" .. and I'm not sure if I'll fix it ;)
\ticktext default end="---"\ticktext name=x tag=p start=´ params=".c.cp" end=eee\ticktext name=y tag=div
...
@MatIMO this will be very close to the OP ?
Mat,you can't get the \n to show up anywayI noticed in the HTML preview tabs are actually displayed, I recall earlier word processes allowing you to display symbols in the page such as tabs, new lines and paragraphs. Perhaps a special preview that did would be useful?
I noticed in the HTML preview tabs are actually displayed, I recall earlier word processes allowing you to display symbols in the page such as tabs, new lines and paragraphs. Perhaps a special preview that did would be useful?
I'm not talking about a visual representation of the end of line character. I meant that neither the angle quote nor the tick results in a rendered line break when the text contains a newline. I.e the angle quote simply disregards a newline just like wikitext normally does and the tick ends from a newline (thus resulting in a visual brake with an empty row). So you can't get a new line by inserting \n (i.e by breaking the line and continue to type on the new row).
PMario wrote:\ticktext default end="---"\ticktext name=x tag=p start=´ params=".c.cp" end=eee\ticktext name=y tag=div...@MatIMO this will be very close to the OP ?If the above is a global setting then it is possibly practical enough, yes.
There's little chance a user will remember this syntax so maybe it would need a little UI to hide the parameter names etc. (Idea, that I did't think through: Maybe local tiddler custom fields could be used somehow, comparable to the class field?)
The global settings are the default settings. ... pragmas are for special usecases and they have to be part of the tiddler, to make export import possible. Otherwise users will always forget, what to export.
The global settings are the default settings. ... pragmas are for special usecases and they have to be part of the tiddler, to make export import possible. Otherwise users will always forget, what to export.OK, so the pragmas will be to add to, or overwrite, the global settings then?
´.i.r.j.c.cp
For tiddly fiddling such as coding or working on a website etc, it is OK with intricate constructions and looking up commands etc.
For note taking or topic-focused authoring it is not reasonable to force the author interrupt his topical flow with "system things". It is this latter case that I'm concerned about.
BUT for user #2 the indicator (´) has to be as easy to type as most other things. I guess tick is OK but having to use a sepate tool for it is IMO a no-go because it totally hijacks your attention.
How about a period AND some other standard character, even a letter or a word, e.g:
.D My text
-or-
.DETAILS My text
This make things very clear both when authoring and when reading the code.
We need to make a distinction between two major use cases:
- tiddly fiddling
- taking notes / authoring
´.i.r.j.c.cp
BUT for user #2 the indicator (´) has to be as easy to type as most other things. I guess tick is OK but having to use a sepate tool for it is IMO a no-go because it totally hijacks your attention. SO what are the options for indicators? I've asked if a single period (.) could work but I take the silence to mean "no". How about a period AND some other standard character, even a letter or a word, e.g:
.D My text-or-.DETAILS My text
This make things very clear both when authoring and when reading the code. It is fairly close to markdown. And the specific indicator can itself bring default styling! In other words, there would be multiple indicators, but one would likely only need very few. One could potentially add actual style classes to it like so:
.DETAILS.red My text
The first period doesn't mean anything by itself.
The second period means the same as the periods in your .c.cp.foo cases. ()
Again, this is very clear and there's minimal hijacking of brain compared to defining pragmas, clicking buttons, or adding multiple classes.
As for breaking at newline vs space-space-linebreak, if it is not already baked into the command, this could also be commanded here:.DETAILS.NEWLINEvs.DETAILS.PARAGRAPH(or some abbreviations)
The user must take care to not define class names that overlap with these "command names". One could argue for using some other prefixing symbol than the period, so to not confuse the commands with the classes BUT, again, an author or note-taker is only likely to use a few such commands and there is less distraction precisely because it uses the very same character, i.e the period. The author should not spend brain power on thinking about such technical distinctions.
You have to start the line with a "tick" or an "angel" quote, except someone comes up with a better character that we don't use already! The parser needs it.
The keyboard definitions are definitely a problem.
New test-version will be uploaded today (hopefully). .. It can do crazy stuff. ... but it also can create RSODs if parameters are missing or wrong :/ ... so some more testing is needed. eg:\ticktext tick="d" tag="details" params=".notop.c.cl" endString="---" mode=block
\ticktext tick="s" tag="summary" params=".-m"
´.d ´.s Details - Summay
line 1
line 2
adsf
---Will give this html code:<details class="notop c cl wltc-l1">
<summary class=" -m wltc-l1 wltc">Details - Summay</summary>
<p>line 1<br>line 2<br>adsf </p>
</details>
`.justify.indent1.right-margin.cbox.cbox-primary your text goes here.
That's pretty close the "Tailwind" approach, that you brought up here in the group. ...
I did probably write it 2 times here. The DOT is _not_ possible. It will clash with tiddlers tagged $:/tags/Stylesheets ... Every class name starts with a dot.
:.q This is a quote
:.q.b This is a quote
.b { font-weight: bold; }
.i { margin-left: 3em;}
.ii { margin-left: 6em;}
.iii { margin-left: 9em;}
.r { margin-right: 3em;}
.rr { margin-right: 6em;}
.rrr { margin-right: 9em;}
.j { text-align: justify; text-justify: auto; }
.u { text-decoration: underline; }
.q { font-style: italic; }
.q::before {
content: "“"; /* Insert content that looks to do */
padding-left: 4px;
}
.q::after {
content: "”"; /* Insert content that looks to do */
padding-right: 4px;
}I can confirm this "chain atomic styles" already works
However note the gap we are addressing here is allowing such cascaded classnames to be placed at the front of any line
[...] My main point, in the latter posts, are that if the "indicator" can be a distinctive string rather than only a single character, then we don't need ticks or angle quotes. My interpretation is that the system can deal with multi-character indicators such as @@.
Possibly relevant is that tags in HTML5 can be arbitrary e.g <pretty> which is then styled like other tags, i.e no prefixing dot, e.g
pretty {background:red}
...and my interpretation is that TW converts e.g an asterisk * into <li> which in turn applies natively defined styling ...so shouldn't it be possible to turn, say, "_P" or "_PRETTY" into <pretty> which can apply other styling? I.e we don't have to adapt to the limited set of predefined HTML tags.
[...] My main point, in the latter posts, are that if the "indicator" can be a distinctive string rather than only a single character, then we don't need ticks or angle quotes. My interpretation is that the system can deal with multi-character indicators such as @@.
The problem is, that "distinctive stings" need to be part of the js code. So they are hardcoded. What if we don't provide the right "distinctive strings" It's not only 10 of them. Users will probably create combinations, we can't even think of.You are right. The parser needs some "standardized" characters, so it can detect special behaviour.
Mat:
... shouldn't it be possible to turn, say, "_P" or "_PRETTY" into <pretty> which can apply other styling? I.e we don't have to adapt to the limited set of predefined HTML tags.
New elements only cause support requests, because nobody knows them. .. eg: Screen readers are probably not aware of them. ...
If you had only one appropriate "escape" character you can code multiple behaviours by what you provide after that. An escape character is more reliable if people cant normally enter it via the keyboard, but a custom shortcut can insert any character and editor toolbar buttons can simplify this.
§htmltag.classname.classname<space>
§<space>Text§.offset.hilite<space>Text§aside.offset<space>Text
# extant Wikitext OL/LI element rendered starting "1"
§ # -- this element's content starts with literal "#"With the insight I got from Tonys earlier reply that our existing indicators can already be concatenated with further classes, I'm starting to wonder if this whole idea/discussion might be unnecessary
;.big.b Data Term:.s-caps Data Definition<dl><dt class="Big b">Data Term</dt><dd class="s-caps">Data Definition</dd></dl>
By the way - of possible interest:
Perhaps one day we could somehow use§a.classname https://tiddlwiki.com tiddlywiki.com to result in <a href="https://tiddlyiki.com">tiddlywiki.com</a>
No. It isn't. :-) Because the thread is also concerned with inserting HTML too. Its the combination of insertion of HTML elements and classes where it really adds to WikiText IMO.
... it was a real surprise to me too, though, when Tony showed behavior already that ... from ...
;.big.b Data Term:.s-caps Data Definition
... makes ...<dl><dt class="Big b">Data Term</dt><dd class="s-caps">Data Definition</dd></dl>
The shock to me was: why I can't find anywhere in standard docs this is documented!Q: is there is any reason it appears UNdocumented? Or I just looked in wrong place?
<<<.myClass.another-classOperating systems are like a brick wall for our minds<<< Nobody<blockquote class="tc-quote myClass another-class"><p>Operating systems are like a brick wall for our minds
</p><cite>Nobody</cite></blockquote>
<<<Alice<blockquote class="tc-quote"><cite>Alice</cite></blockquote>
Mat:
What would additional html elements enable in wikitext that you can't do already?
§section ^h2.sec Answer to Mat^ ---Mat:What would additional html elements enable in wikitext that you can't do already?For example, writing structured articles these elements work well...
Mat:What would additional html elements enable in wikitext that you can't do already?
For example, writing structured articles these elements work well...
Help me understand:If you're going to write HTML-structured articles why would you use wikitext to begin with?
Is the idea to somehow export the text after the wiki markup is converted into html tags? Then why not use the actual html tags?
What you ask for would require one special wikitext indicator per html-tag, right?, but your list is a totally arbitrary fraction of all html tags.
Why does it not make more sense to, as I noted, just use the existing TW markdown and concatenate classes to achieve the styles of "main, article, header, etc"? Possibly introduce indicators for, div and span, but nothing else. Beyond that... why?
Mat wrote:Mat:What would additional html elements enable in wikitext that you can't do already?@TiddlyTweeter wrote:For example, writing structured articles these elements work well...Help me understand:If you're going to write HTML-structured articles why would you use wikitext to begin with?Because its compact to write with. Its far less noisy than HTML. The usual reason.Is the idea to somehow export the text after the wiki markup is converted into html tags? Then why not use the actual html tags?Right. By using the conventions of standard HTML is creates documents that can be transferred well to other contexts.FYI, all I do is capture rendered HTML code. A button press to get it on clipboard and post to a context. The CSS is modularised so that I can inline it for the specific document if needed.What you ask for would require one special wikitext indicator per html-tag, right?, but your list is a totally arbitrary fraction of all html tags.Its just a sub-set illustrating items I'd use for ONE purpose. That is what you asked for. But potential insertion of any HTML tag is what I'd hope for.
NO. Hopefully no need for zillions of special WikiText characters! IF PMario finds TonyM's suggestion usable you'd only need one that could insert any tag (but there is an issue on closing tags that would need thinking through). Remember this is speculative, not yet fully doable. See my comment to TonyM here that illustrates the general idea https://groups.google.com/d/msg/tiddlywiki/GHbwtMIrA3I/eJyRkqyKAQAJ
Why is tick or angle quote better than merely using for example the : i.e a colon, the <dd> element? This particular element is both pretty and totally accessible and only styled by the browser (right?) into:
: prose text that should be in a paragraph
Two things that tick/anglequote nor colon cannot do:1) It doesn't work in the middle of a sentence. The @@ can.
2) Do more than merely styling, like for example the pipe characters do to build tables.
\ticktext tick=table tag=table endString="---" mode=block
\ticktext tick=caption tag=caption
\ticktext tick=row tag=tr mode=block endString="-"
\ticktext tick=th tag=th
\ticktext tick=td tag=td
´.table ´.caption Some caption text
´.row
´.td.text-align-right cell 1 text
´.td cell 2 text
´.td cell 3 text
... misusing the DD element .... can completely mess up screen readers
The "angle quote" will allow you to fix this.
1) It doesn't work in the middle of a sentence. The @@ can.Till now. I was thinking about the possibility to create a "tick-tick" start: ´´and end-marker´´. I think they are much prettier to read in plain text then @@
2) Do more than merely styling, like for example the pipe characters do to build tables.Building tables in wikitext is THE most complicated parser logic in TW. I'm not sure, if the tick definitions can handle it. .. But I'll have a closer look.
´.table ´.caption Some caption text
».row
´.th.text-align-center header 1
´.th.tac header 2
´.th.tac header 3
´.table
...
\n\n
The original project Mario and I was on was to get a dot paragraph.Ie start a sentence with a do and it treats until \n as a paragraph.
And here we are. ... hijacking an other thread ;)
PS: I've updated to V 0.0.7 at: https://wikilabs.github.io/editions/tick-text/ - No docs yet - sorry - I'm starting it now.
Maybe it'll clarify once there are docs but I'm testing the double tick you mentioned, attempting to get ´´.mid sentence styling´´ but I don't succeed in producing any.
My approach feeding of both your ideas.If you had only one appropriate "escape" character you can code multiple behaviours by what you provide after that. An escape character is more reliable if people cant normally enter it via the keyboard, but a custom shortcut can insert any character and editor toolbar buttons can simplify this.
- Perhaps not with the proposed tick and angle brackets, I would like to see the ability to
- escape character, provide html tag name (any name eg; div, p, even PRETTY) then allow a one or more .classnames
- Eg using the aforementioned §
- §htmltag.classname.classname<space>
- Or if no tag is provided default to div (because p is a trivial alternative)
- §.classname.classname<space>
- §<space> would wrap from beginning of line to \n in a div
- §p<space> would wrap from beginning of line to \n in a p
What do you think? #1 or #2?
3 - Is a godsend where you to need switch off pragma because of use case. Why? Example: probably the worst pragma to switch-off is the Block Parse Rule for "list" because it disables ALL forms of list construct (*#:;). Example use case: Wiki concerned with posting to social networks where "#" is used all the time you need to switch of processing of "#". The "WikiText Extension" re-enables list constructs (not as elegantly as the Standard WikiText but a lot more useable than raw HTML). +++
The tick is OK (with my keyboard)... but the anglequote and toolbarbuttons etc... not good IMO...
For my own keyboard I need to compile custom windows settings without "dead" keys to get "ticks", "backticks" and others in a convenient way.
... shortcuts may vary with keyboards and languages ...
` - backtick' - singlequote (straight)’ - singlequote (curled)´ - tick (acute accent)` - backtick' - singlequote (straight)’ - singlequote (curled)´ - tick (acute accent)
Now look at that on a mobile phone :-)
...` - backtick' - singlequote (straight)’ - singlequote (curled)´ - tick (acute accent)
Now look at that on a mobile phone :-)I don't have a big problem zu see the difference. .. There is a double qoute / single qoute combination "' ... which is a no-go on Android.
Honestly PMario for such a great innovation a character that can be differentiated on glance from a puny quote mark is the proper solution.
We need a decent height for it for Android.
I'm still thinking but will comment as soon as I can before this is set forever.