Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#249466: dvips: Landscape papers handled in an idotic way

2 views
Skip to first unread message

Juhapekka Tolvanen

unread,
May 17, 2004, 1:00:15 PM5/17/04
to

Package: tetex-bin
Version: 2.0.2-14

info page of dvips says:

`-t PAPERTYPE'
To rotate a document whose paper type is not the
default, you can use the `-t' option twice, once for the paper
type, and once for `landscape'.

That is complete bullshit. All I get is an error like this:

dvips: both landscape and papersize specified; ignoring landscape

If I watch it with gv or print it, text is not rotated so that it would
fit to my A4-sheet. It is cropped.

After some struggling I finally found a way to do it right:

dvips -z -Ppdf -Pwww -Pcmz -Pamz -Poutline -Pcm-lgc -Phfbright $CMSUPER
-G0 -j0 -f -D 1200 -Z -T 297mm,210mm -o ${BASENAME}.ps ${BASENAME}.dvi

"-T 297mm,210mm"! How intuitive and easy! - NOT!

Please, come from the stone age: Rest of the universe know, that the proper
way to express landscape-oriented A4-paper is "A4R" or "a4r". Have you
idiots seen for example copier machines? Their paper trays have text "A4"
and "A4R" printed on them. And how about for example a program called
xdvi:

xdvi -paper a4r ovikyltit.dvi

It is so much simpler. And now go and make it possible to use options
like these:

-t a5r
-t a4r
-t a3r
etc.

It just can not be too hard to create options like those. Even maintainers
of xdvi could do it, so hopefully maintainers of dvips can do it, too.


--
Juhapekka "naula" Tolvanen * http colon slash slash iki dot fi slash juhtolv
"kohtalona perinnön on kirjastona roihuta kun lukutaidottomat säikkyy
ensipakkasta ja tuki kanssaihmisten on hyöty täysin ilmainen. vaan mitenpä
käy lempeyslainan palautuksessa?" CMX

Frank Küster

unread,
May 17, 2004, 2:40:18 PM5/17/04
to
retitle 249466 dvips: can't use two -t options when papersize is encoded in dvi
stop


Juhapekka Tolvanen <juh...@cc.jyu.fi> wrote:

> Please, come from the stone age: Rest of the universe know, that the proper
> way to express landscape-oriented A4-paper is "A4R" or "a4r". Have you
> idiots seen for example copier machines?

Thank you for your polite suggestion.

> It is so much simpler. And now go and make it possible to use options
> like these:

And no YOU go and reformulate this in a way so that we can forward it as
a request to the dvips team, without insulting them.

No, don't do it. This is not a problem of dvips. Or if it is, it might
be a problem of a stupid error message, or not of dvips alone. It
depends on dvips' interaction with "clever" packages. Look at the test
document below. As it is, you can run it through LaTeX and then through
dvips with two -t options and get a landscape document (it's rotated by
180 degrees when viewed with gv, but that's not the problem here):

$ dvips -t a4 -t landscape landscape.dvi
This is dvips(k) 5.92b Copyright 2002 Radical Eye Software (www.radicaleye.com)
' TeX output 2004.05.17:1905' -> landscape.ps
<texc.pro><f7b6d320.enc><texps.pro>. <cmr12.pfb>[1] [2]


Only if you remove the comment before the hyperref package, then you get
the error message:

$ dvips -t a4 -t landscape landscape.dvi
This is dvips(k) 5.92b Copyright 2002 Radical Eye Software (www.radicaleye.com)
' TeX output 2004.05.17:1904' -> landscape.ps


dvips: both landscape and papersize specified: ignoring landscape

<texc.pro><f7b6d320.enc><texps.pro><special.pro>. <cmr12.pfb>[1] [2]


It seems the page size information that hyperref writes into the dvi
file is not appropriate for dvips. It might be a bug in hyperref,
because also dvipdfm does not recognize the paper format correctly.

TeX-k team, do you know about this?
--
Frank Küster, Biozentrum der Univ. Basel
Abt. Biophysikalische Chemie

Hilmar Preusse

unread,
May 19, 2004, 9:00:26 AM5/19/04
to
On 17.05.04 Frank Küster (fr...@debian.org) wrote:

Hi all,

> Only if you remove the comment before the hyperref package, then you get
> the error message:
>
> $ dvips -t a4 -t landscape landscape.dvi
> This is dvips(k) 5.92b Copyright 2002 Radical Eye Software (www.radicaleye.com)
> ' TeX output 2004.05.17:1904' -> landscape.ps
> dvips: both landscape and papersize specified: ignoring landscape
> <texc.pro><f7b6d320.enc><texps.pro><special.pro>. <cmr12.pfb>[1] [2]
>

Please, that this is the same phenomenon as in #118563. I've
forwarded that bug to the upstream author of a0poster.

H.
--
sigmentation fault


--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Hilmar Preusse

unread,
May 19, 2004, 2:10:26 PM5/19/04
to
On 17.05.04 Frank Küster (fr...@debian.org) wrote:

Hi *,

> Only if you remove the comment before the hyperref package, then
> you get the error message:
>
> $ dvips -t a4 -t landscape landscape.dvi
> This is dvips(k) 5.92b Copyright 2002 Radical Eye Software (www.radicaleye.com)
> ' TeX output 2004.05.17:1904' -> landscape.ps
> dvips: both landscape and papersize specified: ignoring landscape
> <texc.pro><f7b6d320.enc><texps.pro><special.pro>. <cmr12.pfb>[1] [2]
>

And in this case you can even leave out that -t a4.
drachi:~# dvips -tlandscape hyper.dvi


This is dvips(k) 5.92b Copyright 2002 Radical Eye Software (www.radicaleye.com)

' TeX output 2004.05.19:1307' -> hyper.ps


dvips: both landscape and papersize specified: ignoring landscape

<texc.pro><f7b6d320.enc><texps.pro><special.pro>. <cmr12.pfb>[1] [2] [3]

> It seems the page size information that hyperref writes into the
> dvi file is not appropriate for dvips. It might be a bug in
> hyperref, because also dvipdfm does not recognize the paper format
> correctly.
>

Both, hyperref and a0poster^1 cause dvips to read special.pro. I guess
there is a papersize defined, which can't be overridden by -t landscape.

H.

^1 http://bugs.debian.org/118563

Juhapekka Tolvanen

unread,
May 19, 2004, 7:00:10 PM5/19/04
to

On Wed, 19 May 2004, +22:31:20 EEST (UTC +0300),
Karl Berry <ka...@freefriends.org> pressed some keys:

> that mean that hyperref has the same errors in the postscript code?
>
> Frank, your example document did not use hyperref, only something called
> "typearea". I don't understand?
>
> In any case, this seems to be a mismatch between the specials that some
> packages generate and what dvips understands. Do you see any pattern?
> Are there other packages involved? Do you know what the actual special
> in the DVI file is?
>
> At this point, I'm not exactly sure what the problem really is that's
> being reported, sorry to say!

I propose you'll create two minimal LaTeX-docs: one doc with papersize
specials (mentioned in info-formatted docs of dvips) and without them:

\special{papersize=WIDTH,HEIGHT}

\special{landscape}

Then convert them with dvips with different combinations of -t -flags
and see what happens.

Karl Berry

unread,
May 19, 2004, 7:30:14 PM5/19/04
to
I propose you'll create two minimal LaTeX-docs: one doc with papersize
specials (mentioned in info-formatted docs of dvips) and without them:

It sounds like a good approach, but what the dvips maintainers (I'm not
one) really need to work with are (ideally) the small example documents
(the DVI as well as the source), and a report of what fails, the dvips
command line, and (very important) the expected behavior.

Although I think all the information has been reported in the various
mails to this point, to be honest I simply cannot quickly dig it out.
And the dvips maintainers definitely won't have any time or energy to do so.

I understand if you don't want to bother. In that case, I'll eventually
go through the mail on the subject and try to figure it out ...

Frank Küster

unread,
May 20, 2004, 3:50:07 AM5/20/04
to

Dear Juhapekka,

Juhapekka Tolvanen <juh...@cc.jyu.fi> wrote:

> I propose you'll create two minimal LaTeX-docs: one doc with papersize
> specials (mentioned in info-formatted docs of dvips) and without them:
>
> \special{papersize=WIDTH,HEIGHT}
>
> \special{landscape}
>
> Then convert them with dvips with different combinations of -t -flags
> and see what happens.

It seems that you have investigated this and currently know more about
the problems than we do. I have tried it, and I get the error message,
but in this case dvips behaves (nearly) as it should: It produces a
landscape paper, only upside-down.

Juhapekka, since you are the one who best knows what's going on, and
since you are the one who started calling people names, I would suggest
that _you_ produce a comprehensive description of the problem, with
example documents, and elaborate on your analysis, as far as you have
one yet (it seems so). This would help us all (and all dvips users).

Regards, Frank

Juhapekka Tolvanen

unread,
May 20, 2004, 12:00:14 PM5/20/04
to

On Thu, 20 May 2004, +14:58:32 EEST (UTC +0300),
Frank Küster <fr...@kuesterei.ch> pressed some keys:

Well, this is not extremely minimal LaTeX-doc, but very minimal, though.
It is my original LaTeX-doc I was trying to run through dvips, with and
without \special, converted in different ways with dvips:

http://people.cc.jyu.fi/~juhtolv/tmp/bugreports/dvips/

quality.txt tells you, which files are right and which files are wrong.
It seems that "-t a4" and "-t landscape" just don't mix well as command
line flags. "-t a4 -t landscape", "-t landscape -t a4" and plain "-a4"
causes those portrait-oriented sheets with cropped text.

HTH

P.S: And sorry for calling you names. TeX and its related software is
generally considered really stable and bulletproof software. Hence, it was
really big surprise to be faced with problems like this.

Frank Küster

unread,
May 20, 2004, 12:30:28 PM5/20/04
to
Juhapekka Tolvanen <juh...@cc.jyu.fi> wrote:

> Well, this is not extremely minimal LaTeX-doc, but very minimal, though.

Okay, that helped. This is a minimal _TeX_ document that gives the
error, when converted with "dvips -t a4 -t landscape":

,----
| \special{papersize=297mm,210mm}
| Juhapekka Tolvanen
| \end
`----

And this is an example where it works:

,----
| Juhapekka Tolvanen
| \end
`----

The problem for me now is that I don't know whether
"papersize=297mm,210mm" is a valid entry for a dvi file. Is this
supposed to be PostScript?

Tomas G. Rokicki

unread,
May 20, 2004, 12:30:29 PM5/20/04
to
The papersize specification says, render me with the first parameter
as the horizontal size and the second parameter as the vertical size.
That's a dvips convention and has been in there forever. Combining
this with landscape doesn't make any sense; the papersize specification
is supposed to give that orientation information.

-tom

Hilmar Preusse

unread,
May 20, 2004, 4:30:13 PM5/20/04
to
On 20.05.04 Frank Küster (fr...@kuesterei.ch) wrote:

Hi all,

> Okay, that helped. This is a minimal _TeX_ document that gives the
> error, when converted with "dvips -t a4 -t landscape":
>
> ,----
> | \special{papersize=297mm,210mm}
> | Juhapekka Tolvanen
> | \end
> `----
>

minimal LaTeX:

drachi:~# more hyper1.tex
\documentclass{article}
\usepackage{hyperref}
\begin{document}
text
\end{document}

LaTeX

*File List*
article.cls 2001/04/21 v1.4e Standard LaTeX document class
size10.clo 2001/04/21 v1.4e Standard LaTeX file (size option)
hyperref.sty 2003/01/22 v6.73n Hypertext links for LaTeX
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
pd1enc.def 2003/01/22 v6.73n Hyperref: PDFDocEncoding definition (HO)
hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive and teTeX
url.sty 1999/03/28 ver 1.5x Verb mode for urls, etc.
hdvips.def 2003/01/22 v6.73n Hyperref driver for dvips
pdfmark.def 2003/01/22 v6.73n Hyperref definitions for pdfmark specials
nameref.sty 2001/01/27 v2.19 Cross-referencing by name of section
hyper1.out
hyper1.out

and dvips:

drachi:~# dvips -t landscape hyper1.dvi


This is dvips(k) 5.92b Copyright 2002 Radical Eye Software (www.radicaleye.com)

' TeX output 2004.05.20:1950' -> hyper1.ps


dvips: both landscape and papersize specified: ignoring landscape

<texc.pro><f7b6d320.enc><texps.pro><special.pro>. <cmr10.pfb>[1]

I don't deal with the paper dimensions at all and nevertheless get
the message. I guess this is that, what we're speaking about.

H.
--
sigmentation fault

Tomas G. Rokicki

unread,
May 20, 2004, 4:40:11 PM5/20/04
to
Yep, one of those files must be defining a paper size.

-tom

Frank Küster

unread,
May 21, 2004, 4:40:10 AM5/21/04
to
Hilmar Preusse <hil...@web.de> schrieb:

> On 20.05.04 Frank Küster (fr...@kuesterei.ch) wrote:
>
> Hi all,
>
>> Okay, that helped. This is a minimal _TeX_ document that gives the
>> error, when converted with "dvips -t a4 -t landscape":
>>
>> ,----
>> | \special{papersize=297mm,210mm}
>> | Juhapekka Tolvanen
>> | \end
>> `----

However, this file is not a problem: dvips test.dvi gives a landscape
Postscript file, no problem (the upside down orientation is a problem of
gv, gs displays is rotated by 90 degrees...). So the call

"dvips -t a4 -t landscape test.dvi"

is simply wrong here, it is not needed.

> minimal LaTeX:
>
> drachi:~# more hyper1.tex
> \documentclass{article}
> \usepackage{hyperref}
> \begin{document}
> text
> \end{document}

[...]


> and dvips:
>
> drachi:~# dvips -t landscape hyper1.dvi
> This is dvips(k) 5.92b Copyright 2002 Radical Eye Software (www.radicaleye.com)
> ' TeX output 2004.05.20:1950' -> hyper1.ps
> dvips: both landscape and papersize specified: ignoring landscape
> <texc.pro><f7b6d320.enc><texps.pro><special.pro>. <cmr10.pfb>[1]
>
> I don't deal with the paper dimensions at all and nevertheless get
> the message. I guess this is that, what we're speaking about.

But here the problem is only because you do _not_ deal with paper
dimensions in the LaTeX file. LaTeX does not typeset a landscape
document, but a portrait document. Then we use hyperref which writes the
papersize to the dvi file, and the papersize is portrait letter. Then
we instruct dvips to process the dvi file as landscape - no wonder that
this makes problems. The error message is confusing, of course.

If you change the minimal document to

\documentclass[landscape]{article}


\usepackage{hyperref}
\begin{document}
text
\end{document}

we are again in the same situation as with my TeX document: No problem
at all, no -t options needed. The same is true for Juhapekka's example
document, as far as I can see: no -t options are needed at all, the
Postscript file comes out als landscape in A4. Well, gv says "BBox",
obviously because no paper name is specified, but the BBox dimensions
are in fact A4, the PS file contains:

%%Orientation: Landscape
%%BoundingBox: 0 0 596 842

Dividing the number by 72 (there's 72 Postscript points to one inch) and
multiplying by 2.54 gives 0cm 0cm 21.0cm 29.7cm, which is A4.

Juhapekka, is there still a problem for you? Does simply omitting the -t
options help you?

In this case we should just document this, with a sentence like

"If you specify the paper dimensions in the dvi file, e.g. by using
\special commands or hyperref.sty, this option should not be used and
will have strange results."

Frank Küster

unread,
May 21, 2004, 9:00:13 AM5/21/04
to
Juhapekka Tolvanen <juh...@cc.jyu.fi> schrieb:

> On Fri, 21 May 2004, +12:57:14 EEST (UTC +0300),
> Frank Küster <fr...@debian.org> pressed some keys:


>
>> Juhapekka, is there still a problem for you? Does simply omitting the -t
>> options help you?
>

> According to quality.txt I gave, omitting -t options does help:
>
> ovikyltit.without_special.ps
>
> ovikyltit.with_special.ps

O.k., so this is settled as a non-bug? Then would you be so kind and
close it, by sending mail to 24946...@bugs.debian.org?

> BTW Should I file a bugreport on gv?

You mean because it shows the document updside-down? Probably
yes. ghostscript itself shows it rotated by 90 degrees (because it has
no information that it could be landscape, and just assumes it
isn't). gv could know this and turn it in the right direction. At least
perhaps.

Hilmar Preusse

unread,
Jan 4, 2005, 7:40:13 AM1/4/05
to
tags 249466 + fixed-upstream
stop

On 21.05.04 Frank Küster (fr...@debian.org) wrote:
> Hilmar Preusse <hil...@web.de> schrieb:

Hi all,

As of tetex 2.96.4 dvips.texi documents that some packages deal with
the paper dimensions (e.g. hyperref), and that they should not be
used together with -t options of dvips. I guess that is sufficient.
Tagging.

Hilmar

0 new messages