groff
[Top][All Lists]
Advanced

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

Re: Re: Why does groff require psutils?


From: Alexis
Subject: Re: Re: Why does groff require psutils?
Date: Sun, 17 Mar 2024 12:59:51 +0100

Hello Branden,

> I'm sorry I let this fall onto the floor.  Picking it up...

That's alright; thanks for picking it up again, much appreciated!

> groff runs it unconditionally if the output device is "html" (or "xhtml"),
> because the "html" device's "DESC" file tells it to.

Ah, that's the piece I was missing, thanks!

> Another way to make sure your code is being exercised is to stick a
> `debug()` call into it.

That's helpful to know. I've done this locally and verified that things
work and seem to produce visually equal results¹ when looking at the
generated html for pic and webpage pages in the doc directory.

Please find attached a patch that, to the best of my knowledge,
replaces psselect with ps2ps in code and documentation.

Note that the documented use of psselect in contrib/momdoc—describing
how to rearrange a table of contents generated at the end of a document
when using the ps output device—is unchanged as I did not find a suitable
replacement.
According to the Ghostscript documentation for the -sPageList option:
"[f]or PostScript or PCL input files, the list of pages must be given in
increasing order, you cannot process pages out of order or repeat pages
and this will generate an error."²

Do let me know if you desire or require further testing or changes, or
if I can be helpful in other ways to drive this change forward.


Best
Alexis

¹ Checking the differences between the generated images using
  https://github.com/x1ddos/imgdiff the reported difference was below
  0.01%

² https://ghostscript.readthedocs.io/en/latest/Use.html

Attachment: grohtml-replace-psselect-with-ps2ps.patch
Description: Text document


reply via email to

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