In another discussion <https://github.com/Jermolene/TiddlyWiki5/issues/3195>, 
@Jermolene wrote:

I'd love to find a suitable, concise wikitext syntax for plain text 
> wikification.



So, taking a more general approach to *formatting output*, I'd like to know 
how y'all feel about these ideas:

We're all familiar with *template transclusion* syntax which, from an end 
users POV, "re-formats the output" to match that of the template.

{{mytransclusion||mytemplate}}

The following proposal extends this {{*||*}} syntax.

The equivalent of "tiddler type" formats could be applied to transcluded 
output, for example text/plain and image/png 

{{mytranscl||/plain}}
{{mytranscl||/png}}

i.e regardless of type in the original *mytranscl* tiddler, the current 
output is in the specified format - an *"output type"*.

Also other output types could be introduced, for example

{{!!title||/link}}

Incidentally, this specific format could spare us from the frequently 
recurring mouthful

<$link to={{!!title}}><$view field="title"/></$link>

The latter is not intuitive and the more intuitive use of {{!!title}} 
instead of the viewwidget risks side effects 
<https://github.com/Jermolene/TiddlyWiki5/issues/1880> that are difficult 
to notice!.


*Style classes* - another "formatting of output" - could be applied using 
equivalent syntax:

{{mytranscl||.myclass}}

Yes, we already have

@@.myclass
{{mytranscl}}
@@


...but, frankly, I'm not very fond of it and it feels like a half measure 
step from

<div class="myclass">
{{mytranscl>>
</div>


For macros and tiddler links?
"Output types" could probably be useful also for macros and tiddler links. 
I have not quite thought this one through)

<<mymacro||/plain>>
<<another "foo"||.mystyle>>

[[mytitle||.mystyle]]
[[mytitle|pretty||.mystyle]]

...

*An optional syntax* instead of {{*||*}} might be  {{*}*} , i.e to declare 
the output type or style inside the last (or first) bracket pair. The 
output types are a limited and predefined set so we'd have a set of closing 
delimiters instead of just the single one. I always felt these "between the 
brackets" positions were under used  in wikitext. We could use these 
positions for arguments or flags or stuff to {do{transclusion}things} or 
[apply[mytitle]stuff] in the middle of the text. 


Thoughts?


<:-)

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/a3e2bf0b-9d28-4399-8958-800f9256aa9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to