On Wed, Jun 09, 2021, Hans Bezemer wrote:
> .if (\n[s] == 0) .ig ++
> .br
> Text
> .++
> 
> But when I try to put it in a macro it doesn't work:
> .nr s 0
> .de SOLUTION
> .if (\n[s] == 0) .ig ++
> .br
> ..
> .de SOLEND
> .++
> ..

You need to escape the backslash when it's in a macro definition:

  .if \\n[s]=0 .ig ++

Alternatively, disable the escape mechanism:

  .eo
  .if \n[s]=0 .ig ++
  .ec
  
-- 
Peter Schaffter
https://www.schaffter.ca

Reply via email to