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

paper size in latex

10 views
Skip to first unread message

Daniel Hernandez

unread,
Jul 2, 2004, 10:39:35 PM7/2/04
to
Hello,
I write the next code

\documentclass[a5paper]{article}
\begin{document}
Many text, many text, many text, many text, many text,
many text, many text, many text, many text, many text,
many text, many text, many text, many text, many text,
many text, many text, many text, many text, many text.
\end{document}

and then I compile it with:

$ latex size.tex

but with xdvi the document don't look fine. The text size
is like A5 but the paper is A4. The I comvert the file
to PostScript with:

$ dvips -f size.tex > size.ps

and view the postscript code. There are the lines

%%BoundingBox: 0 0 596 842

and

%%PaperSize: A4

Then I think that's wrong and I change it for:

%%BoundingBox: 0 246 421 842
%%PaperSize: A5

And then I see with gv that with the change the document it's OK.

Why? I read a latex manual that say this is the way for setting
the paper size.

I'm using tetex in debian (woody).

--
Daniel Hernandez
Santiago,
Chile

José Carlos Santos

unread,
Jul 3, 2004, 3:09:08 AM7/3/04
to
Daniel Hernandez wrote:

> I write the next code
>
> \documentclass[a5paper]{article}
> \begin{document}
> Many text, many text, many text, many text, many text,
> many text, many text, many text, many text, many text,
> many text, many text, many text, many text, many text,
> many text, many text, many text, many text, many text.
> \end{document}
>
> and then I compile it with:
>
> $ latex size.tex
>
> but with xdvi the document don't look fine. The text size
> is like A5 but the paper is A4.

No; a DVI file has no information concerning the papersize. See the FAQ:

http://www.tex.ac.uk/cgi-bin/texfaq2html?label=papersize

> The I comvert the file
> to PostScript with:
>
> $ dvips -f size.tex > size.ps
>
> and view the postscript code. There are the lines
>
> %%BoundingBox: 0 0 596 842
>
> and
>
> %%PaperSize: A4
>
> Then I think that's wrong and I change it for:
>
> %%BoundingBox: 0 246 421 842
> %%PaperSize: A5
>
> And then I see with gv that with the change the document it's OK.
>
> Why? I read a latex manual that say this is the way for setting
> the paper size.

Which manual says that? Do

dvips -t a5 -o size.ps size.tex

Best regards,

Jose Carlos Santos

Saravanan,M.

unread,
Jul 3, 2004, 3:23:47 AM7/3/04
to
Have a look at "dvipsone" files

Regards
Saravanan,M.

Daniel Hernandez <dher...@ing.uchile.cl> wrote in message news:<2kmkj5F...@uni-berlin.de>...

Saravanan,M.

unread,
Jul 3, 2004, 3:24:14 AM7/3/04
to
Have a look at "dvipsone" files

Regards
Saravanan,M.
India

Daniel Hernandez <dher...@ing.uchile.cl> wrote in message news:<2kmkj5F...@uni-berlin.de>...

Robin Fairbairns

unread,
Jul 3, 2004, 7:33:24 AM7/3/04
to
Daniel Hernandez <dher...@ing.uchile.cl> writes:
>I write the next code
>
>\documentclass[a5paper]{article}
>\begin{document}
>Many text, many text, many text, many text, many text,
>many text, many text, many text, many text, many text,
>many text, many text, many text, many text, many text,
>many text, many text, many text, many text, many text.
>\end{document}
>
>and then I compile it with:
>
>$ latex size.tex
>
>but with xdvi the document don't look fine. The text size
>is like A5 but the paper is A4. The I comvert the file
>to PostScript with:

xdvi -paper a5

tells xdvi about what you're doing.

>$ dvips -f size.tex > size.ps
>
>and view the postscript code. There are the lines
>
>%%BoundingBox: 0 0 596 842
>
>and
>
>%%PaperSize: A4

slightly older dvips than mine. if you say

dvips -t a5 -o test.ps test

to my dvips, you get

%%BoundingBox: 0 0 420 596
%%DocumentFonts: CMR10
%%DocumentPaperSizes: a5

and it behaves properly in the viewer.

the problems are twofold. first, as has already been remarked, there
is no "language" for specifying paper sizes in the dvi format, so
latex doesn't even try (and you have to tell the dvi processors some
other way).

one good way to reduce the stress is the geometry package:

\usepackage[a5paper,dvips]{article}

talks to dvips through a \special command in the dvi format.

sadly, afaict, xdvi (which does well with other dvips-special
commands) doesn't manage paper size ones, so you still need the
"-paper a5" switch.
--
Robin (http://www.tex.ac.uk/faq) Fairbairns, Cambridge

Stefan Ulrich

unread,
Jul 3, 2004, 8:16:24 AM7/3/04
to
Robin Fairbairns <r...@cl.cam.ac.uk> writes:

> one good way to reduce the stress is the geometry package:

> \usepackage[a5paper,dvips]{article}

> talks to dvips through a \special command in the dvi format.

> sadly, afaict, xdvi (which does well with other dvips-special
> commands) doesn't manage paper size ones

Should work with versions >= xdvi-22.66 or xdvik-22.71.

--
Stefan Ulrich

Javier Bezos

unread,
Jul 4, 2004, 4:05:05 AM7/4/04
to
Hi,

> the problems are twofold. first, as has already been remarked, there
> is no "language" for specifying paper sizes in the dvi format, so
> latex doesn't even try (and you have to tell the dvi processors some
> other way).
>
> one good way to reduce the stress is the geometry package:
>
> \usepackage[a5paper,dvips]{article}

A typo:

\usepackage[a5paper,dvips]{geometry}

BTW, this question has been posted to another group
(and answered). I would like to note to the original
poster that's not polite. Please, don't do it again
--first wait for an answer and if you haven't one then
ask in another group.

Javier

_______________________________________________________________
Javier Bezos | TeX y tipografía
jbezos arroba wanadoo punto es | http://perso.wanadoo.es/jbezos
...............................|...............................
CervanTeX | http://www.cervantex.org

0 new messages