I can't figure out, why the following macro definition \gcmarknode does not work:



\newcommand[1]{\gcmarknode}{ \node[left] at ($(#1.north east)!0.5!(#1.south east)$) {\gcmark}; } % does not work!

        minimum width = 5cm, minimum height = 2cm, text width = 4cm,
        draw = black, thick, align = center, font = \footnotesize\bf]



\node[baseBlock] (Y2) {Hello}; \node[left] at ($(Y2.north east)!0.5!(Y2.south east)$) {\cmark}; % works!
\node[baseBlock] (X2) {Hello}; \gcmarknode{X2} % does not work!



What am I doing wrong? The macro code itself works.

1 Answer 1


Macros with arguments are defined as

\newcommand{<macro>}[<number of arguments>][<default value of optional arg>]{<definition>}

You have the [<number of arguments>] in the wrong place,

\newcommand{\gcmarknode}[1]{ \node[left] at ($(#1.north east)!0.5!(#1.south east)$) {\gcmark}; }


Incidentally, why not use #1.east?

  • this is embarrassing, bloody deadlines :D east works for this case, sure, but I intended to vary the 0.5 Commented Nov 3, 2017 at 13:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .