Follow-up Comment #4, bug #66835 (group groff): I have had a go at integrating this into the ms macros for -Tpdf, to get a feel for how difficult this might be. The result is a small patch to s.tmac (ms-paper.patch), and a little demo program (ms-paper-demo.ms). It shows that Headers/Footers and footnotes seem to take account of the changed paper size.
I implemented the functionality in a macro called "papr", I could not decide what would be the most appropriate name so currently it is in the demo program, but should be incorporated into s.tmac when it has a suitable name. In order for header/footers to work properly, you need to call .papr (with width and height) just before issuing a .bp (so technically the .bp could belong at the end of .papr since you can't change paper size without starting a new page). The changes to s.tmac mean that the changes to .pl and LL occur at the end of the BT macro and the papersize change is sent to the output driver at the start of .PT. The patch adds the functionality to both pdf and dvi output. Note that okular and evince don't show the page size changes very well, but xdvi does, and if you convert the dvi with dvipdfm to a pdf the pdf viewers show it well, if you set to a fixed zoom. There may be a way to get grops to mix media sizes, I believe there is:- %%BeginSetup << /PageSize [595 842] >> setpagedevice %%EndSetup And the DSC command:- %%PageBoundingBox: 0 0 595 842 But Tadziu knows a lot more about postscript than me. (file #56962, file #56963) _______________________________________________________ Additional Item Attachment: File name: ms-paper.patch Size: 1KiB <https://file.savannah.gnu.org/file/ms-paper.patch?file_id=56962> File name: ms-paper-demo.ms Size: 3KiB <https://file.savannah.gnu.org/file/ms-paper-demo.ms?file_id=56963> AGPL NOTICE These attachments are served by Savane. You can download the corresponding source code of Savane at https://savannah.gnu.org/source/savane-513955078e56c124c506c834d031bbe09cbf4040.tar.gz _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?66835> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
signature.asc
Description: PGP signature