groff
[Top][All Lists]
Advanced

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

RE: [Groff] how to put an equation inside a line of text?


From: Ted Harding
Subject: RE: [Groff] how to put an equation inside a line of text?
Date: Tue, 15 Feb 2000 19:15:45 -0000 (GMT)

On 15-Feb-00 Weiguang Shi wrote:
> Hi, there:
>     How can I put an equation in a line of normal text using me? 
>     When I used ms, I can say "$ x = y $" which puts the equation right
> after the text before it, not in another line. I don't know how to do
> this using me.

It shouldn't make any difference: the $...$ mechanism is independent
of the macro package, and indeed any $...$ blocks are detected and
processed by eqn before they are seen by troff; so it would have
to be independent.

The one essential thing is that the eqn delimiters ($...$ by default)
have to be recognised. To make sure of this, the file
.../groff/tmac/eqnrc (which should be read in every time eqn is run)
ends in the lines

.EQ
delim $$
.EN

Have you actually tried doing inline equations with the 'me' macros,
and failed to get it to work? Or have you not tried it and you are
simply afraid that what worked under 'ms' might need to be done
differently under 'me'? (Don't worry, it doesn't need to be done
differently).

If it failed to work, you might check that your troff call ensures
that eqn is invoked, which requires the '-e' option under groff,
i.e. a command like

  groff -Tps -e -me input_file > output_file

(The '-e' option is also required for any other macro package).

I just checked that the input

  .lp
  This is supposed to be an inline equation:
  $Hypotenuse = sqrt { Side sub 1 sup 2 + Side sub 2 sup 2}$.
  Did it work, using \fBme\fP?

produces a correct result with the above groff command.

Hope this helps,
Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Date: 15-Feb-00                                       Time: 19:15:45
------------------------------ XFMail ------------------------------


reply via email to

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