groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Macro's for making an exam.


From: Peter Schaffter
Subject: Re: Macro's for making an exam.
Date: Wed, 9 Jun 2021 16:20:53 -0400
User-agent: Mutt/1.9.4 (2018-02-28)

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

[Prev in Thread] Current Thread [Next in Thread]