views:

511

answers:

4

I use a style file that specifies page margins. I cannot understand the style file, but I guess it specifies bottom margins by using commands such as \vspace, \vskip, \vfil.

When I compile the tex document with pdflatex the margins, especially the bottom ones, change. When I compile the document first to ps then to pdf, the margins are good.

Do you have any idea, what the reason might be?

The contents of the style file can be accessed from http://tinypaste.com/c53d1

+3  A: 

Probably because something is defaulting to a page size of 'Letter' and the other path is defaulting to a page size of 'A4' (or vice-versa). You might see if the \documentclass directive in your document allows you to specify page size. If you're using ps2pdf you may also have to specify the output page size. Also, don't forget to specify the destination device (-P IIRC) when using dvips so it renders computer modern fonts correctly in the PDF.

ConcernedOfTunbridgeWells
thank you very much. this solved my problem: \documentclass[12pt,a4paper]{report}
Mert Nuhoglu
*Always* worth specifying you paper size.
dmckee
+1  A: 

Try setting the page size by running texconfig. This sounds like a letter <-> a4 conversion problem to me. (This has annoyed me several times in the past!)

Peter
A: 

I guess it specifies bottom margins by using commands such as \vspace, \vskip, \vfil.

Nope, this is the part that specifies the page design:

\oddsidemargin9.6mm
\evensidemargin9.6mm
\topmargin-7.mm
\headheight20pt
\textwidth155mm
\textheight242mm
\parindent1cm

I think your problem is the page size switching between a4 and letter when you go between LaTeX and pdfLaTeX, although that might seem strange. You should find that loading the geometry package before fbe_tez helps. E.g.,

\usepackage{geometry,fbe_tex}

Geometry sets the physical paper size, which is a relatively modern (cf. setting up the page layout as that style does) feature.

Will Robertson
A: 

My teacher uses this structure:

% Nadefinujeme stranu A5
%
\setlength{\paperwidth}{148mm}
\setlength{\paperheight}{210mm}
% Pro PDFTeX potrebujeme navic definovat \pdfpagewidth
% a \pdfpageheight. Standardni TeX ale tyto registry nezna,
% nemuzeme do nich tedy hned prirazovat. Proto se nejprve
% trikem zeptame, jestli se preklada pomoci PDFTeXu
\ifx\pdfoutput\undefined
\else% Zda se, ze \pdfoutput je definovany, tj. pouziva se PDFTeX
\setlength{\pdfpagewidth}{\paperwidth}
\setlength{\pdfpageheight}{\paperheight}
\fi
%

In the comments there are:

A5 page definition:

For PDFTeX we also need to define \pdfpaperwidth and \pdfpaerheight. But standard TeX doesn't know those registers so we cannot assign them. Thats why we use a trick to ask whther PDFTeX is used.

It seems \pdfoutput is defined so PDFTeX is used.

I hope it should help you with solving the problem.

Crowley