auctex-devel
[Top][All Lists]
Advanced

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

Re: [AUCTeX-devel] [gs-devel] Asking help for preview-latex


From: Ikumi Keita
Subject: Re: [AUCTeX-devel] [gs-devel] Asking help for preview-latex
Date: Wed, 03 Jul 2019 17:30:28 +0900

Hi Chris,

>>>>> Chris Liddell <address@hidden> writes:
> Right, sorry for the delay, as I said, that ended up being a much more
> involved task than I'd anticipated!

Thanks, the proposed fix works well on my side!  The generated image
turns its color as expected.

> First and foremost (and apologies for this), we can't do anything to get
> this working in the 9.27 release. Your options are to use 9.26, use the
> "in-development" code from our repo, or (on Linux systems) convince the
> package maintainer to pick up the commits listed below.

I tested the ghostscript source of 9.27 release with the three patches
associated with the listed commits, on FreeBSD 12.0.  Though there was
one rejection when applying the patches at gs_fonts.ps, I could manually
recover the fail it since it was just straightforward.

> So, in essence, the idea is that you'll remove the stuff using
> GS_PDF_ProcSet entirely. Add the option -dDELAYBIND to your gs command
> line, include a suitable redefinition of initgraphics, then call
> .bindnow, and continue as before.

> The redefinition of initgraphics would look something like:

> /initgraphics {
>   //initgraphics
>   /RG where {
>     pop <R value> <B value> <G value> 3 copy rg RG
>   } if
> } bind def

> So, that first calls the original initgraphics operator. It then checks
> if the name "RG" is known to any dictionary on the dictionary stack
> (which will only be the case when being called from the PDF
> interpreter), and if that is the case, then set fill and stroke colors
> as you require ("R/G/B value" being place holders for the "real" numbers).

> After that, and before running any more Postscript or PDF, you'd call
> the .bindnow operator.

Attached is the change I used for preview-latex, for those who are
interested.

Chris, there is a possibility that we ask you (or the Ghostscript
development team) to agree to transfer the copyright of the above
PostScript code of several lines to Free Software Foundation.  Are you
fine to agree if that really happens?

To project admin of AUCTeX (especially David Kastrup): Could you please
judge whether the PostScript code Chris provided above needs copyright
assignment in order to incorporate into AUCTeX, and if so, provide
instruction for him if he is fine to do so?

(Ah, but now the message from David arrived.  Maybe he writes relevant
PS codes by himself.)

> I can't test all this in the context of your workflow, but I've tested
> it with the example PDF you supplied, and I can change the color of the
> objects.

Thank you again, Chris, we all appreciate your kind cooperation pretty
much.

Best regards,
Ikumi Keita

Attachment: diff-preview-el-in
Description: patch for preview-latex


reply via email to

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