groff
[Top][All Lists]
Advanced

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

Re: Auto-resize paper size during document run?


From: Larry Kollar
Subject: Re: Auto-resize paper size during document run?
Date: Fri, 28 May 2021 23:02:06 -0400

James K. Lowden <jklowden@schemamania.org> wrote:
> 
>> Of course, I can typeset the table separately and assemble the pdf
>> pages by hand, but a solution totally controlled from within the
>> groff file would be great.
> 
> Not an answer, but in ancient times, your output would have gone a
> printer, which might have had different paper in different trays.  It
> woudn't be unusual to use legal-size paper in landscape mode for tables
> with 30 or more columns, with no opportunity to use pstricks.

Another, more robust (in several ways) solution would be to refactor the table.
There are situations where that isn’t possible, but they’re not as common as
one might think. The thing is, tables are a big chunk of non-reflowable content
inserted into content (text) that otherwise flows really well because it’s 
*roff.

One way to go about it is to ask, “What information is this trying to impart? Is
there a different way to go about it?” I’ve reduced several huge, complex tables
to a far simpler format that way (and did the same for a co-worker, who saw
the benefits immediately). Tables are often abused as a special form of list, 
and
that means many tables can be restructured as lists.

> I've often wished for a groff cookbook of odd tricks, such as how to
> print envelopes. A quick glance at Adobe's Postcript reference manual
> turns up "setpagedevice", which looks to be its ioctl: it seems to be a
> set of device-specific name-value pairs for doing things like selecting
> paper trays and telling the printer to stop while the envelope is
> inserted.  
> 
> No problem for groff; that's what  \X'ps: exec code' is for. Sadly, in
> 2021, I have no idea where to obtain the Postscript device-specific
> features for any printer, or whether such information is even published
> anymore.

That was my second thought, after “get rid of the table[1],” to use \X’ps:etc’
to rotate it. Another possibility is to split it across a two page spread, if it
really *has* to be a table. Find a good halfway point in the columns, and split
it vertically. Use the absolute space request (for example, .sp |2i) in front of
both halves so they line up across the pages.

— Larry

[1] Over a loooooong tech writing career, I’ve come to despise tables. I
recently had an article published in the Center for Information Development
Management (CIDM) newsletter called “Tables Must Die!” Full disclosure of
bias has been delivered. :-P





reply via email to

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