adding comments after global macros

115 views
Skip to first unread message

Rustem

unread,
Aug 8, 2016, 9:28:56 PM8/8/16
to TiddlyWiki
Is it ok to have text at the end of a tiddler that has the tag "$:/tags/Macro"?

Also, is there a way to have text that is ignored, other than enclose it as HTML comment?

And while I'm at it, is there a way to have text displayed as is, not wikified and not monospaced?

Thanks!

--R

Mark S.

unread,
Aug 8, 2016, 10:02:28 PM8/8/16
to TiddlyWiki
About #2, maybe you could make a global macro that never gets invoked:

\define comment1() THE PRECEDING MACRO WILL DELETE ALL TIDDLERS ON THURSDAYS

PMario

unread,
Aug 9, 2016, 1:23:42 PM8/9/16
to TiddlyWiki
On Tuesday, August 9, 2016 at 3:28:56 AM UTC+2, Rustem wrote:

And while I'm at it, is there a way to have text displayed as is, not wikified and not monospaced?

PMario

unread,
Aug 9, 2016, 1:28:40 PM8/9/16
to TiddlyWiki
On Tuesday, August 9, 2016 at 3:28:56 AM UTC+2, Rustem wrote:
Is it ok to have text at the end of a tiddler that has the tag "$:/tags/Macro"?

IMO should be no problem, except of size. So if you don't add jpg images, and want to import them into other TWs, you should be fine.

Macros are defined with:

\define xxx()
some text
\end

The rest should be ignored. So it is possible to add some docs if you want. ... If there are problems, it may be a bug.

-m

PMario

unread,
Aug 9, 2016, 1:38:29 PM8/9/16
to TiddlyWiki
On Tuesday, August 9, 2016 at 3:28:56 AM UTC+2, Rustem wrote:
Also, is there a way to have text that is ignored, other than enclose it as HTML comment?

No.

TW WikiText Comment start is: <!--
End is: -->

Everything in-between will be ignored. Coincidentally this is the same as an HTML comment and follows the same rules ;)

-m


PMario

unread,
Aug 9, 2016, 1:41:05 PM8/9/16
to TiddlyWiki
On Tuesday, August 9, 2016 at 7:38:29 PM UTC+2, PMario wrote:
Everything in-between will be ignored. Coincidentally this is the same as an HTML comment and follows the same rules ;)

Wikitext start- and end-markers are very rare. So we should try to save them.
-m

c pa

unread,
Aug 9, 2016, 6:46:59 PM8/9/16
to TiddlyWiki
I create all of my ready to be reused macros this way: (With documentation after the macro definition) Works just fine

\define macroname(param1, param2, param3)
<!-- macroname($param1$, $param2$, $param3$) -->
do stuff here
\end

`<<macroname "param1" "param2" "param3" >>`

<<macroname "param1" "param2" "param3" >>
Reply all
Reply to author
Forward
0 new messages