[ I added auctex-devel to Cc:]

Hi Ken,

>>>>> Ken Sharp <ken.sh...@artifex.com> writes:
> Hi Ikumi,
> On 16/03/2025 14:48, Ikumi Keita wrote:

>> We heard that pdf2dsc was removed from Ghostscript release[1]. However,
>> our preview-latex[2], subsystem of AUCTeX, relies on pdf2dsc utility, so
>> preview-latex stopped working since Ghostscript 10.05. We hope that you
>> would restore it in the next release[3] so that our users can continue
>> to use preview-latex.

> To the best of my knowledge, and I did test it before removal, pdf2dsc
> had stopped working anyway, because it required access to the file
> system, and had to be run with -dNOSAFER. Which is something we wish
> to discourage.

> In addition, the name is somewhat misleading, since the file isn't
> really DSC-conformant, because it only works by using
> Ghostscript-specific extensions to the PostScript language.

> Those extensions rely on PostScript functions which have, in some
> cases, been deprecated or removed since we moved from a PDF
> interpreter written in PostScript to one written instead in C.

> Rather than reinstate a dangerous utility, I'd prefer to discuss how
> we could achieve your requirements using the current implementation,
> in preference to the undocumented remnants of the previous
> implementation.

> We can have a discussion here, or in private if you'd prefer, by email
> or on our Discord server.

> This isn't me saying 'no', but before we agree to reinstate pdf2dsc I
> would like to understand the current usage, and attempt to persuade
> you to use something more up to date (and ideally that doesn't use
> misleading terminology!).

Thank you for your kind reply. To tell the truth, none of us AUCTeX
developers, except David Kastrup, understands the detail of the usage of
Ghostscript and PDF2DSC, and David isn't willing to maintain the
interaction between Ghostscript (including PDF2DSC) and preview-latex
anymore. I am very sorry to tell that all I can do is to provide
(1) sample pdf file
(2) the command line with which we invoke pdf2dsc
(3) the command line with which we invoke gs and the contents we inject
    as standard input to the invoked gs process, in order to generate
    pieces of png files from the pdf file.
, if we are to follow your suggestion. Is that acceptable? I admit that
such process will be very awkward and much tedious for your side because
of my lack of understanding.

Here is a quote from what David wrote:
,----[ https://lists.gnu.org/r/bug-auctex/2025-03/msg00017.html ]
| It is comparatively easy to trigger Ghostscript to render individual PDF
| pages, so technologically there is no justification for what
| preview-latex does here.
| 
| The problem is that it would need to go back under the operating table
| and get a separate communication module for talking with Ghostscript
| about PDF files: right now it just talks about the pseudo PostScript
| wrapper produced by pdf2dsc.
| 
| Exacerbating this is that last time I looked there really was no
| dependable API or documentation for this feat which is obviously not a
| part of the PDF document standard itself (which details nothing about
| _how_ to trigger rendering of PDF with a particular engine, let alone
| interactively and out of order).
| 
| In comparison, pdf2dsc has been remarkably stable and reliable as an
| interface into page-wise rendering, and part of the reason is that the
| Ghostscript maintainers themselves were responsible for keeping it
| working for its limited purposes.
`----

Best regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW

Reply via email to