groff
[Top][All Lists]
Advanced

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

Re: eqn sqrt and pdf?


From: Ralph Corderoy
Subject: Re: eqn sqrt and pdf?
Date: Fri, 21 Feb 2020 10:04:49 +0000

Hi Marc,

> I try to get a correct rendering for this simple eqn
>
>     .EQ
>     sqrt a over sqrt c
>     .EN

With groff 1.22.4-1 and ghostscript 9.27-1 on Arch Linux, I ran

    printf '%s\n' .EQ 'sqrt a over sqrt c' .EN |
    groff -Tpdf -e >eq.pdf
    printf '%s\n' .EQ 'sqrt a over sqrt c' .EN |
    groff -Tps -e >eq.ps
    ps2pdf eq.ps eq.ps.pdf

All three outputs looks similar and correct.  (I do notice the bar above
the c ends before the bar over the a.)

> first i tried
>
>     eqn -Tpdf|groff -Tpdf
>
> and noticed that the begin of the square root symbol is replaced by a
> rectangle that goes down to the bottom of the symbol.

Sounds like a PDF font problem.

> also i tried
>
>     eqn |groff ; ps2pdf14
>
> the ps rendering is fine but the pdf one got the same issue.

Again, PDF font.

Passing -Z to groff has it print the ditroff instead of using the given
typesetting backend.

    printf '%s\n' .EQ 'sqrt a over sqrt c' .EN |
    groff -Tpdf -eZ

I see, adding line numbers,

     4  x F /usr/share/groff/1.22.4/tmac/eqnrc
    10  x font 11 S
    16  Csqrt
    17  Cradicalex
    19  Cradicalex
    20  x font 38 TI
    24  ta
    28  Csqrt
    29  Cradicalex
    33  tc

Their definitions here in -Tpdf's S font.

    $ egrep 'sqrt|radicalex' /usr/share/groff/1.22.4/font/devpdf/S
    radicalex   500,917,0,590   3       96      radicalex
    sqrt        549,917,38      3       214     radical
    $ 

What OS and distro are you on?  groff version?  Is your document more
complex and you're altering the font?

(Please reply to the list.)

-- 
Cheers, Ralph.



reply via email to

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