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

Bug#402994: use new libpaper hook to track system paper size



Stephen Gildea <stepheng+debian-bts@gildea.com> wrote:

> Package: tetex-bin
> Version: 3.0-27
> Tags: patch
>
> The attached patch solves the widely-recognized problem that tetex
> does not obey the system's default paper size.

Thanks for your work.  I think we'll apply it - however I'd like to
point out that there are a couple of wrong assumptions in your
comments. 

> It's a problem when TeX formats documents for the wrong size paper,
> because what's wrong isn't obvious to many users.  Everybody expects
> the tetex programs to obey the system's paper size.
>
> Yes, documents may specify a paper size, so all we're changing here
> is the site default.  The default has to be *something*, so it might
> as well be the paper size that's loaded into the local printer.

texconfig and therefore the paperconfig hook do *not* control the paper
size that is used for typesetting (i.e. when TeX runs and calculates
where to put the characters relative to the paper origin).  It only
takes effect when a PostScript or PDF file is created from the result. 

The positive effect of the patch is that you won't get problems when
printing (like characters not printed, documents scaled by acroread
options, printer error messages).  But this doesn't mean that the result
makes much sense - the text on the page and the corresponding margins
might still occupy the space for letter paper even if configured to
print on a4.

> In the past a problem with proposed solutions was that there was no
> way for tetex to be notified of changes to the system default paper
> size.  But now libpaper, the keeper of the system default paper size,
> has a hook that can notify packages of changes.
>
> I have written and tested a patch using the libpaper hook.  With 
> this patch, texconfig copies the system paper size into tetex on
> installation and whenever the system paper size changes.

That's really an improvement.  But I think we need to do a little more.

First of all, "texconfig paper $PAPER" only allows letter and a4.  So
either we need to change the hook script to check for that - or we patch
texconfig to recognize more paper sizes.

Second, the files that are affected are currently not configuration
files, which is a bug.  But what should we do?  If we make them
conffiles, users will get "configuration file changed by you or a
script" if the file is changed upon upgrade.  Although the statement is
true, it won't help people very much who never looked at that file, in
particular since the right choice would be to accept the new version
from the package - it will be changed again right away by the libpaper
hook. 

One approach would be to separate the papersize setting out of the
existing files, let texconfig paper act on the extracted files (which
would reside in /var, not /etc) and let the programs read both the main
config file and the papersize file.  But I'm not sure whether this can
be done without code changes to dvips/dvipdfm?

Regards, Frank

-- 
Dr. Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX/TeXLive)



Reply to: