groff
[Top][All Lists]
Advanced

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

Re: [Groff] Multiple Lines Equation


From: Tadziu Hoffmann
Subject: Re: [Groff] Multiple Lines Equation
Date: Fri, 25 Oct 2013 18:51:04 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

> BTW, you need a .br on a line between your first .EQ and the
> second .EN.  Otherwise the two equations will be run together.

Not necessarily.  It depends on how your EQ/EN macros are defined.
In the simplest case you can define

  .de EQ
  .sp .5
  .ce 1
  ..
  .de EN
  .sp .5
  ..

For something more fancy, try

  .de EQ
  .br
  .nr xx \\n(.n
  .nr EQ +1
  .di XX
  ..
  .de EN
  .br
  .di
  .nr =^ \\n(.l-\\n(.i
  .ie \w'\\*(10'<(\\n(.l-\\n(.i-(2*\\n(xx)-2m) \{\
  .ne \\n(dnu
  .\}
  .el \{\
  .ne \\n(dnu+.5v
  .sp .5v
  .\}
  .ta \\n(.lu/2uC \\n(.luR
  \t\\*(10\t(\\n(EQ)
  .sp .5v
  .ns
  ..

which gives you automatic equation numbering
(and also makes the spacing nicer).





reply via email to

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