Bug 50660 - dvips defaults to a4-size paper, even in the US
dvips defaults to a4-size paper, even in the US
Status: CLOSED CANTFIX
Product: Red Hat Linux
Classification: Retired
Component: tetex (Show other bugs)
7.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jindrich Novy
David Lawrence
: FutureFeature
: 51392 86190 123814 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-08-01 18:17 EDT by John Heidemann
Modified: 2014-01-21 17:48 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-10-18 10:16:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
test case for bug 50660 showing default to a4 paper size (9.26 KB, application/octet-stream)
2001-08-07 17:35 EDT, John Heidemann
no flags Details

  None (edit)
Description John Heidemann 2001-08-01 18:17:30 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2) Gecko/20010701

Description of problem:
dvips's default papersize on a freshly installed system is a4.
Unfortunately the US standard paper size is lettersize.
It would be nice if redhat systems that install the tetex 
package could determine if they're in the us (say from /etc/sysconfig/i18n)
and pick the us paper size.

How reproducible:
Always

Steps to Reproduce:
1.install redhat 7.1 (or 7.0 and probably 6.x as well)
2. dvips a file (say "dvips -f 
/usr/share/texmf/doc/help/tds.dvi >tds.ps")
3. print this on a paper with lettersize paper
4. observe that the text starts way too close to the top of the page
	

Actual Results:  The formatted paper (from dvips) starts way too close to
the top of the letter-size paged.

Expected Results:  With a properly configured dvips there should be about a
1" margin at the top.

Additional info:

To manually set the page size
run texconfig as root,
and do dvips > global > lettersize
and save the settings
Comment 1 Tim Waugh 2001-08-07 04:43:44 EDT
By the time we have a DVI file it's a little late to alter the page size isn't 
it?  Really it needs to be done in the TeX file, surely?
Comment 2 Nevin Kapur 2001-08-07 16:19:26 EDT
The default papersize when one creates a LaTeX file is letter. In fact if one
wants to print to A4 paper, one has to use the a4size option. So the current
default of A4 in dvips is not right.

I also wanted to add the xdvi is also broken this way. It defaults to A4 paper
too, which can be fixed by running 'texconfig xdvi us'.
Comment 3 John Heidemann 2001-08-07 17:35:49 EDT
Created attachment 26718 [details]
test case for bug 50660 showing default to a4 paper size
Comment 4 John Heidemann 2001-08-07 17:36:56 EDT
+By the time we have a DVI file it's a little late to alter the page size isn't 
+it?  Really it needs to be done in the TeX file, surely?

It needs to be done in BOTH places.

I will attached a tar with .tex, the .dvi,
and .ps files done on a "pure" system (texconfig never run)
and a system set up for lettersize.
You can diff the ps to see the a4 in the "pure" .ps.

I didn't realize texconfig worked from the CLI (thanks, nevin!).
The command to fix dvips would be
'texconfig dvips paper lettersize',
presumably run at rpm install time on systems
that can somehow determine they're in the us locale.

Comment 5 Tim Waugh 2001-08-10 06:13:45 EDT
*** Bug 51392 has been marked as a duplicate of this bug. ***
Comment 6 Markus Kuhn 2001-09-17 13:06:13 EDT
~94% of the world population use A4 paper. The dvips program needs to know the
output paper format, because this determines where the TeX coordinate origin is.
The TeX coordinate origin is defined by Knuth to be 1 inch from the top and left
paper margin, and since PostScript has its origin in the bottom left corner of
the paper, the paper height must be specified correctly for dvips to establish
the correct TeX/DVI coordinate system on the page. The follow-up that claimed
that "By the time we have a DVI file it's a little late to alter the page size"
is obviously based on a misunderstanding of the issue.

In general, any Linux software should by default be configured for use with ISO
A4 paper, and only if the current locale setting indicates that the user sits in
either the United States or Canada, the paper size should be changed to
usletter. These two countries are the *only* ones who are not yet using the
international standard paper format A4, therefore a default setting to A4 is
perfectly appropriate.

For more background information on A4 and ISO 216:

  http://www.cl.cam.ac.uk/~mgk25/iso-paper.html

Markus Kuhn, University of Cambridge
Comment 7 Tim Waugh 2001-09-17 13:15:55 EDT
Thanks for correcting my misunderstanding, Markus.  It sounds as if the 
solution to this is to have dvips look at LC_PAPER, like our a2ps package now 
does.
Comment 8 Tim Waugh 2001-11-09 10:44:49 EST
Actually I'm now leaning more towards just putting a message in the 
%description for the main tetex package advising people to run texconfig.

Comment 9 Nevin Kapur 2001-11-09 11:06:21 EST
Some advice in the %description is a good start, but IMHO the installation
should be slightly smarter and figure out if the system is a US system and in
that case just run the appropriate texconfig command.  An entire country of
LaTeX users will appreciate this :).  In my department, *none* of the Red Hat
users had a clue as to why all their LaTeX docuements were printing wierldly
till I stumbled upon
this.
Comment 10 Tim Waugh 2001-11-09 11:09:33 EST
The trouble is finding the right place to do this.  There isn't any convenient 
'run this the first time the system is booted after installation' hook that 
this package can use.

I'm talking to the maintainer of the printconf printer configuration GUI/TUI 
programs to see if we can throw up a message like 'now might be a good time to 
run texconfig; would you like me to do that for you?' whenever the paper size 
is changed.
Comment 11 John Heidemann 2001-11-09 12:29:51 EST
I agree with nevin that text in the %description may help some people but it
won't help most people.  WHat people get is bad margins on their output; their
assumption is they have the wrong code in their .tex file.  They won't find
anything in %description.

I'm confused why this needs to be done after reboot after install.  Why can't it
be done in the %post phase?  (Maybe that requires getting texconfig to run in
the install environment, but that ought to be doable I'd think.)
Comment 12 Tim Waugh 2001-11-09 12:47:16 EST
Because /etc/sysconfig/i18n is created by anaconda after package installation.
Comment 13 John Heidemann 2002-09-27 20:44:35 EDT
Since this bug remains outstanding,
I've documented it at the web page
<http://www.isi.edu/~johnh/SOFTWARE/LINUX/REDHAT_DVIPS/index.html>
so folks can be aware at least of the work-around.
Comment 14 Matthew Miller 2003-09-10 11:33:42 EDT
Any action on this? I'm getting complaints. I can make a local "fix", but I'd
rather a RH solution. It's particularly annoying because we've got a lot of
professors and grad students from A4 parts of the world, and they don't realize
that there's going to be trouble until they go to print, at which point the
stupid printers just sits there demanding A4 paper.
Comment 15 Tim Waugh 2003-09-10 11:38:14 EDT
No action yet: it's still not really clear what the correct action to take is.
Comment 16 Seth Vidal 2003-09-10 12:23:37 EDT
if there's a place where you can get the system-wide papersize then it might be
possible to query that and configure it then.

Not pretty, but something like that will need to give.



Comment 17 John Heidemann 2003-09-11 22:24:29 EDT
Hopefully it's clear what the desired result is (i.e., some kind of
autoconfiguration).

Reading the above comments, looks like 3 possible resolutions:

1. configure this at package/system install time
(clearly the system knows the locale because it asks my keyboard and language,
although you say that /etc/sysconfig/i18n doens't exist at this time--maybe
that's a bug?)

2. configure this on first reboot (at this point i18n must exist.  But this
requires changing rc.*.  Many OSes do this (Solaris and MS-Windows, for
example), so if #1 is not possible, this seems feasible.

3. Modify dvips (etc.) to check locale at run-time.  Seems plausible if you
don't like #1 and #2, but seems like more work.

Is there some procedure at RH for evaluating these options (or others), other
than leaving the bugreport open and letting it accumulate more complaints?
Comment 18 Kevin Hall 2004-02-17 09:59:54 EST
I have seen very similar behaviour on RH 9 that I'm running. I create 
a LaTeX doc specifically in A4 as part of the preamble and then run 
it through LaTeX and the resulting DVI still has the top margin too 
small and the bottom margin too large; running exactly the same doc 
through MikTeX on Windows formats the margins correctly --- is this a 
bug unique to RH and if so is it worth installing a version of tetex 
direct from www.tug.org?
Comment 19 Leonard den Ottolander 2004-07-01 11:17:12 EDT
*** Bug 86190 has been marked as a duplicate of this bug. ***
Comment 20 Leonard den Ottolander 2004-07-01 11:33:12 EDT
*** Bug 123814 has been marked as a duplicate of this bug. ***
Comment 21 John Heidemann 2006-04-04 17:20:19 EDT
It's now been almost five years since this bug was filed and a fix identified.
In 2001 there was no boot-time config for redhat (comment #10),
but that has since been added.
Can RH now go back and fix this problem automatically?
Comment 22 Bill Nottingham 2006-08-07 13:13:33 EDT
Red Hat Linux is no longer supported by Red Hat, Inc. If you are still
running Red Hat Linux, you are strongly advised to upgrade to a
current Fedora Core release or Red Hat Enterprise Linux or comparable.
Some information on which option may be right for you is available at
http://www.redhat.com/rhel/migrate/redhatlinux/.

Red Hat apologizes that these issues have not been resolved yet. We do
want to make sure that no important bugs slip through the cracks.
Please check if this issue is still present in a current Fedora Core
release. If so, please change the product and version to match, and
check the box indicating that the requested information has been
provided. Note that any bug still open against Red Hat Linux on will be
closed as 'CANTFIX' on September 30, 2006. Thanks again for your help.
Comment 23 Bill Nottingham 2006-10-18 10:16:32 EDT
Red Hat Linux is no longer supported by Red Hat, Inc. If you are still
running Red Hat Linux, you are strongly advised to upgrade to a
current Fedora Core release or Red Hat Enterprise Linux or comparable.
Some information on which option may be right for you is available at
http://www.redhat.com/rhel/migrate/redhatlinux/.

Closing as CANTFIX.

Note You need to log in before you can comment on or make changes to this bug.