Custom markup plugin and multiple tiddlers

120 views
Skip to first unread message

Soren Bjornstad

unread,
Feb 27, 2021, 1:40:03 PM2/27/21
to TiddlyWiki
I'm trying out the beta of the custom markup plugin and finding it quite handy. However, I'm seeing a major limitation and want to be sure I'm not just missing something. I can write a pragma like this:

\customize angle=sc _classes="someclass" _mode=block

»sc Here is a paragraph with the someclass style.

This is very convenient! But it appears that I have to write this pragma in every tiddler where I want to use this class, since pragmas can't transclude into another tiddler or be included in a template. This makes the plugin more or less useless for my purposes (adding custom styling for a particular knowledge domain that would be needed in many/most tiddlers). Is there a method I'm missing for defining this markup without using a pragma, or for applying a pragma to multiple tiddlers somehow?

Eric Shulman

unread,
Feb 27, 2021, 2:11:31 PM2/27/21
to TiddlyWiki

(note: I have not use the custom markup plugin myself, so I can't help with any details...)

-e

Soren Bjornstad

unread,
Feb 27, 2021, 2:37:13 PM2/27/21
to TiddlyWiki
Thanks Eric, I didn't see there were any more sections after the first one on defining pragmas!

PMario

unread,
Feb 27, 2021, 3:31:54 PM2/27/21
to TiddlyWiki
On Saturday, February 27, 2021 at 7:40:03 PM UTC+1 Soren Bjornstad wrote:
I'm trying out the beta of the custom markup plugin and finding it quite handy.

Hi Soren,
Nice that you found the plugin.

There is a little bit of a warning! The syntax especially the Glyphs are still in flux. But I can say: "angle" will stay ;)

I didn't introduce the plugin here yet, since it is still somewhat experimental. But today I did discuss with TiddlerTweeter, that it should be more public. ...

There is a "Contents" tab, which you need to read. Starting at Basic. You need to read _all of them and in order_ Otherwise you may get confused.

There are about 80 tiddlers that start with "test-". If you understand how they work, you probably know as much as me about the system ;) They are for debugging atm. But many of them will land in the docs (with much more text :).
 
However, I'm seeing a major limitation and want to be sure I'm not just missing something. I can write a pragma like this:

\customize angle=sc _classes="someclass" _mode=block

»sc Here is a paragraph with the someclass style.

This is very convenient!

That's the way it is supposed to work.
 
But it appears that I have to write this pragma in every tiddler where I want to use this class, since pragmas can't transclude into another tiddler or be included in a template.

 
This makes the plugin more or less useless for my purposes (adding custom styling for a particular knowledge domain that would be needed in many/most tiddlers). Is there a method I'm missing for defining this markup without using a pragma, or for applying a pragma to multiple tiddlers somehow?

Eric's link is OK. .. But please read the docs!

--------------

I'll officially make it "public beta" when I do have some basic videos available, that will explain how it's meant to be used.

have fun!
mario
 

TiddlyTweeter

unread,
Feb 28, 2021, 8:11:33 AM2/28/21
to TiddlyWiki
Soren Bjornstad wrote:
I'm trying out the beta of the custom markup plugin and finding it quite handy. 

It is a very, very useful emerging tool for TiddlyWiki. 

You got links for the docs to understand how to make your "pragma" global from both Eric & PMario.

When PMario launches the next beta, more publicity, it will be worth looking at.
The plugin is immensely flexible. 
I think it will be widely used eventually because it is very, very supportive of no-hassle writing.

Best wishes
TT

TiddlyTweeter

unread,
Mar 1, 2021, 4:19:15 AM3/1/21
to TiddlyWiki
Ciao again Soren Bjornstad   ...
     ... more comment on Custom Markup (CM), as it is very useful ... 
Note that for your OP you do NOT even need a pragma, merely ...

   ».someclass TEXT

This produces the HTML ...

     <p class="someclass wltc-l1 wltc">TEXT</p>

Why?  "»" already is "<p>". And the ".someclass" method in CM will apply a class to it.

TT

TiddlyTweeter

unread,
Mar 1, 2021, 4:40:10 AM3/1/21
to TiddlyWiki
Ciao again Soren Bjornstad   ...

Most HTML block elements are directly actionable in Custom Markup (CM) .
For instance, IF you wanted to change the HTML tag for » to a <pre> and apply class do  ...

      »pre.another-class I AM PRE, CLASSED

This produces in HTML  ...

      <pre class="another-class wltc-l1 wltc">I AM PRE, CLASSED</pre>

CM is rich and flexy :-)
TT
Reply all
Reply to author
Forward
0 new messages