Problems with define Macros

63 views
Skip to first unread message

Gerald Weis

unread,
Jan 18, 2019, 1:59:33 PM1/18/19
to TiddlyWiki
Hi Guys

I'm using an fresh tiddlywiki 5.19

Now i have declared an Stylsheet-file and an Macrofile

But i have an Problem.
The macro don't started from any tiddler

that is the macrocode

\define Sitzungen (Termin Ort Teilnehmer)
<div class="abgerundet">
Sitzungseinladung
</div>
Termin: <br>
$Termin$<p>
Ort:<br>$Ort$<p>
Teilnehmer:<br> $Teilnehmer$
<div class="abgerundet">
Tagesordnung
</div>
\end

Displayed in the Macrofile-preview is 

\define Macroname
the design in div1
Termin: <br>
$Termin$<p>
Ort:<br>$Ort$<p>
Teilnehmer:<br> $Teilnehmer$
the design in div2
\end

but it don't started from any tiddler

whats wrong?

Mark S.

unread,
Jan 18, 2019, 2:23:18 PM1/18/19
to TiddlyWiki
You are showing two macros, I think.

But you are not showing how they are invoked/called. Perhaps like this? :

<<Macroname "stuff" "zeug">>

The second macro is wrong:

\define Macroname

because it needs parenthesis, like:

\define Macroname()

For macros to be used everywhere, they need to be tagged

$:/tags/Macro

From the upper right hand corner of each tiddler you can click on "export". If you export your tiddlers as JSON and attach them to your next post, it will be easier to see what you are doing and help you.

Good luck
-- Mark

Gerald Weis

unread,
Jan 19, 2019, 3:57:56 AM1/19/19
to tiddl...@googlegroups.com
Hello Mark S.

It is only one Macro what i show

the first one show the definitions.
the second one show what it is doing.

that is the macrocode

\define Sitzungen (Termin Ort Teilnehmer)
<div class="abgerundet">
Sitzungseinladung
</div>
Termin: <br>
$Termin$<p>
Ort:<br>$Ort$<p>
Teilnehmer:<br> $Teilnehmer$
<div class="abgerundet">
Tagesordnung
</div>
\end

if i call the Macro with

<<Sitzungen "Termin" "Ort" "Teilnehmer">> 

the macrocall donothing.
The tag for the Macrofile ist set to $:/tags/Macro

all the same  do  not running the Macro


MAKRO-Datei.json

Eric Shulman

unread,
Jan 19, 2019, 4:51:49 AM1/19/19
to TiddlyWiki
On Saturday, January 19, 2019 at 12:57:56 AM UTC-8, Gerald Weis wrote:
that is the macrocode

\define Sitzungen (Termin Ort Teilnehmer)

The TWCore macro parser expects the parens of the macro parameter list to *immediately* follow the macro name, without any intervening white space.  You have a space between "Sitzungen" and the open parentheses of the parameter list.  This prevents the parser from properly recognizing the macro definition, so it is just being output as if it was normal wiki content in that tiddler.

enjoy,
-e
Eric Shulman
TiddlyTools.com: "Small Tools for Big Ideas!" (tm)
InsideTiddlyWiki: The Missing Manuals

Gerald Weis

unread,
Jan 19, 2019, 5:32:56 AM1/19/19
to TiddlyWiki
thanks

it run
Reply all
Reply to author
Forward
0 new messages