🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #1312

Question: page size

#1312
From: David Cohen
Date: Tue, 11 Aug 1992 20:41
52 lines
2029 bytes
Hi all,

I've got a question for all the TeXnicians out there.

BRIEF EXPLANATION:
I am interested in displaying TeX-created dvi files in X windows.

I want to know before I display the files exactly how much space
the dvi image will take up (a bounding box).

I can assume that my files will be no longer than one page.  In this case,
the information I'm looking for is stored in the postamble of a dvi
file (it stores the maximum height+plus and maximum width of any page
in the file).

The problem is that what TeX writes for these values is based on
\hsize and \vsize, not the size of the dvi image.  (see footnote below
for slightly more information)


THE PROBLEM:
I want to be able to change \hsize and \vsize based the size of what
I have typeset.  Has anyone else out there dealt with this problem?

One idea I've had is to put the contents of a file into a box, say \box0.
Then I could make \vsize and \hsize reflect the dimensions of that box.
Unfortunately, I can't find any way to get the width and height of a
box (despite a lot of reading in the TeXbook).  Is there a way?  
It seems like there should be.


Thanks in advance for any advice.


David Cohen
Electronic Book Technologies		Phone	401-421-9550
One Richmond Square			Fax	401-421-9551
Providence, RI 02906			email	ebt-inc!dnc@uunet.uu.net




FOOTNOTE:  
Plain.tex by default outputs dvi instructions covering an
entire page.  However,

\output={\shipout\box255}

will cause it to write the minimum dvi to represent the TeX file.  The
problem is, it still tells the dvi file that the pages are 8 1/2 x 11.
I could change this, but I can't change it dynamically, acording to
the true size of my file's image.
Technical Details
Message-ID: <5599@ebt-inc.UUCP>
Path: arc1-ca.pugleaf.net!sparky!uunet!ebt-inc!roddenberry!dnc

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ebt-inc!roddenberry!dnc
From: dnc@roddenberry.uucp (David Cohen)
Newsgroups: comp.text.tex
Subject: Question:  page size
Message-ID: <5599@ebt-inc.UUCP>
Date: 11 Aug 92 20:41:06 GMT
Sender: news@ebt-inc.UUCP
Organization: EBT
Lines: 52
Originator: dnc@roddenberry