TW5 Global macro leave

78 views
Skip to first unread message

magev958

unread,
Apr 3, 2016, 5:26:02 AM4/3/16
to TiddlyWiki
I made a global macro:

\define counting()

<$count filter="[tag{!!caption}] -[tag[genus]]"/>

\end

and call it with <<counting>> and it works perfectly. But the text does not continue on the same line after the number but starts a new line. Any idea why?
countings.jpg

Eric Shulman

unread,
Apr 3, 2016, 5:32:42 AM4/3/16
to TiddlyWiki
Omit the blank lines from within the macro definition, like this:
\define counting()
<$count filter="[tag{!!caption}] -[tag[genus]]"/>
\end

In fact, you could write this as single-line macro definition, like this:
\define counting() <$count filter="[tag{!!caption}] -[tag[genus]]"/>

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios
InsideTiddlyWiki: The Missing Manuals

PMario

unread,
Apr 3, 2016, 5:37:29 AM4/3/16
to TiddlyWiki
Try this:

\define counting() <$count filter="[tag{!!caption}] -[tag[genus]]"/>

or


\define counting()
<$count filter="[tag{!!caption}] -[tag[genus]]"/>
\end

So no new lines, because in wikitext this means to render the text as a new paragraph.

-m

PMario

unread,
Apr 3, 2016, 5:41:36 AM4/3/16
to TiddlyWiki
You where faster :) .... but the funny thing is. If I test the code of the OP with tiddlywiki.com it works just fine. ... So there may be something else involved too?
-m

magev958

unread,
Apr 5, 2016, 2:30:19 AM4/5/16
to TiddlyWiki
Thanks :)
The one-line does not work, but the other one does. I may have put some interfering css i a stylesheet somewhere, but now it works and I'm happy :)
Reply all
Reply to author
Forward
0 new messages