I am using a sample to submit a paper to a conference, which is available here.

There are many images in my article, so I am using the graphicx package.

I noticed that when I load the graphicx package, the output page size (or layout) gets smaller.

The code below is the sample with the loading graphicx loaded. It is stated in it that I should not change the \setlength commands. Because of that I am unsure on what to do.

This question is similar, but I don't know how to adapt its solution to my situation.

How can I prevent (or corrrect) this page size alteration that graphicx is causing?

\usepackage{graphicx} %only alteration I've done
\newcommand{\R}{{\rm I}\!{\rm R}} % the set of real numbers
% boldface characters in mathematical formulas
\newcommand{\bff}{\mbox{\boldmath $f$}}
\newcommand{\bfl}{\mbox{\boldmath $l$}}
\newcommand{\bfn}{\mbox{\boldmath $n$}}
\newcommand{\bfu}{\mbox{\boldmath $u$}}
\newcommand{\bfx}{\mbox{\boldmath $x$}}
\newcommand{\bfy}{\mbox{\boldmath $y$}}
\newcommand{\bfzero}{\mbox{\boldmath $0$}}
\newcommand{\bfcurl}{{\bf curl}} % curl of a vector field
\newcommand{\rmdiv}{{\rm div}} % divergence of a vector field
\newcommand{\eop}{\hfill $\sqcap\!\!\!\!\sqcup$} % end of proof
\global\def\refname{{\normalsize \it References:}}
\baselineskip 12.5pt
\title{\LARGE \bf Instructions for Preparation of Manuscripts for
WSEAS Proceedings and Journals by Means of LaTeX}


\begin{minipage}[t]{2.7in} \normalsize \baselineskip 12.5pt
\centerline{JOHN BROWN}
\centerline{Name of the Institution}
\centerline{Department of Applied Mathematics}
\centerline{Long Street 25, 121 35 City}
\end{minipage} \kern 0in
\begin{minipage}[t]{2.7in} \normalsize \baselineskip 12.5pt
\centerline{SECOND AUTHOR}
\centerline{Name of the University}
\centerline{Institute of Mechanical Engineering}
\centerline{47 West Lincoln Avenue, 87 115 City}
% If you are three authors then you can use three mini--pages
% instead of two. Their horizontal size must be less than 2.7in
% indicated above. It can be e.g. 2.3in. However, you must pay
% attention that you do not exceed the total width of the text.
\\ \\ \hspace*{-10pt}
\begin{minipage}[b]{6.9in} \normalsize
\baselineskip 12.5pt {\it Abstract:}
% The text of the abstract follows.
This paper contains brief instructions for authors who wish to
prepare their manuscripts for WSEAS proceedings or journals by
means of LaTeX. You will find the format you have to choose,
fonts, how to type the title of your paper, the titles of
sections, examples of definitions, lemmas, theorems, equations
\\ [4mm] {\it Key--Words:}
% The key-words follow.
Typing manuscripts, \LaTeX


\thispagestyle{empty} \pagestyle{empty}
% numbers of pages are supplemented by the editor
\label{S1} \vspace{-4pt}

Although WSEAS proceedings and journals accept papers in the pdf
or in a ps format, authors of the papers are encouraged to prepare
their manuscripts in LaTeX. This concerns especially papers which
contain many mathematical symbols, formulas, equations and
similar. LaTeX is a very powerful tool specially developed for
preparation of such manuscripts and it represents, together with
Plain TeX and AMS TeX, a very popular and leading text processor
among wide mathematical community.

The package ``times'' (the declaration on line 2 in the source tex
file) is used because it produces fonts which are mostly similar
to the required WSEAS format. You can use the package ``times''
only if you have a LaTeX 2e compiler.

If you do not have the LaTeX 2e compiler then you must replace the
declaration ``documentclass'' on line 1 of the source text by
``documentstyle'' and omit the whole line 2. In that case, your
fonts will slightly differ from the font ``times new roman'' which
is required by WSEAS in another example prepared by means of MS
Word. This concerns especially the title of the paper and the
titles of sections. The same happens if you use ``documentclass''
on line 1, but omit ``usepackage\{times\}'' on line 2.

The author has the experience that the package ``times'' causes
that the dvi file contains some incorrect characters on some LaTeX
installations. Then the dvi viewer for example shows the
connection ``fi'' (even inside a word like ``file'') as the Greek
letter $\Theta$, italic letters look same as roman letters etc.
Consequently, if you create a pdf file from the dvi file, it also
looks bad. However, the perfect pdf file is always produced by
using the PDFLatex.exe instead of Latex.exe compiler (or the
PDFLaTeX command instead of the LaTeX command) and creating the
pdf file directly from the tex file.


When including a subsection, LaTeX automatically produces for its
heading smaller letters as here.

Section \ref{S2} contains a sample of a mathematical text.
Mathematical equations must be numbers as follows: (1), (2),
$\dots$ and not (1.1), (1.2) $\dots$ depending on your sections.
LaTeX does it automatically if you do not change it by a special

\section{Definitions of Function Spaces and Notation}
\label{S2} \vspace{-4pt}

Assume that $\Omega$ is a bounded simply connected domain in
$\R^3$ whose boundary $\partial\Omega$ is a smooth surface. We
shall use the notation:

{\setlength{\topsep 1pt}
\setlength{\itemsep 1pt}
\setlength{\leftmargin 8pt}
\setlength{\labelwidth 6pt}}

$L_{\sigma}^2(\Omega)^3$ is a subspace of $L^2(\Omega)^3$ which
contains functions $\bfu$ whose divergence equals zero in $\Omega$
in the sense of distributions and $(\bfu\cdot\bfn)|_{\partial
\Omega}=0$ in the sense of traces.

$D^1$ is the set of functions $\bfu\in W^{1,2}(\Omega)^3\cap
L_{\sigma}^2(\Omega)^3$ such that $(\bfcurl\, \bfu\cdot
\bfn)|_{\partial\Omega}=0$ in the sense of traces. It is a closed
subspace of $W^{1,2}(\Omega)^3$.

Let $T>0$. We deal with the initial--boundary value problem which
is defined by the equations
\frac{\partial\bfu}{\partial t}+(\bfu\cdot\nabla)\bfu &=& -\nabla
p+\nu\Delta\bfu+\bff \label{5} \\
\rmdiv\, \bfu &=& 0 \label{6}
in $Q_T\equiv\Omega\times(0,T)$, by the initial condition
\bfu(\bfx,0)=\bfu^*(\bfx) \qquad \hbox{for}\ \bfx\in\Omega
and by the generalized impermeability boundary conditions
\bfu\cdot\bfn=0,\ \ \bfcurl\, \bfu\cdot\bfn=0,\ \
\bfcurl^2\bfu\cdot\bfn=0 \label{4}
on $\partial\Omega\times(0,T)$. (These boundary conditions were
introduced in \cite{BNP}.)

\begin{definition} \label{D1}
This is the example of a definition. In order to stress the
defined notion, you can e.g.~\underline{underline} it or type it
by {\bf boldface} letters. \rm Or you can write the whole
definition by roman letters and type just the defined notion by
{\it italics}.

\begin{lemma} \label{L1}
A function $\bfu\in W^{1,2}(\Omega)^3\cap L^2_{\sigma}(\Omega)^3$
sa\-tisfies the homogeneous Dirichlet boundary condition
\bfu(\bfx)=\bfzero \qquad \hbox{for}\ \bfx\in\partial\Omega
if and only if it satisfies
\bfu\cdot\bfn=0, \quad \bfcurl\, \bfu\cdot\bfn=0, \quad
\frac{\partial\bfu}{\partial\bfn}\cdot\bfn=0 \label{2}
on the boundary $\partial\Omega$ of domain $\Omega$.

{\bf Proof:} \ Assume that $\bfu$ is a smooth vector function in
$L^2_{\sigma}(\Omega)^3$ at first.

If $\bfu$ satisfies (\ref{1}) then $\bfu$ and $\bfcurl\, \bfu$
obviously satisfy the first two conditions in (\ref{2}). Let us
verify the third condition. Let $\bfx_0\in\partial\Omega$. The
cartesian system of coordinates can be chosen so that the origin
is at point $\bfx_0$ and $\bfn$ shows the direction of the
$x_3$--axis. Since $u_1=u_2=0$ on $\partial\Omega$ and $\dots$
etc. \eop

Lemma \ref{L1} confirms that the generalized impermeability
boundary conditions (\ref{4}) differ from boundary condition
(\ref{1}) only in the third condition in (\ref{2}).

\begin{theorem} \label{T1}
This is the example of a theorem. Texts of lemmas and theorems are
usually typed by italic or slanted fonts in mathematical texts and
so LaTeX does it automatically, until you do not change it by a
special command.

\label{S3} \vspace{-4pt}

The results explained in the previous sections show that the
generalized impermeability boundary conditions (\ref{4}) represent
an acceptable alternative to (\ref{1}). Their relevance on
boundaries of various smoothness $\dots$ etc.

\vspace{10pt} \noindent
{\bf Acknowledgements:} \ The research was supported by the
University of ABC and in the case of the first author, it was also
supported by the Grant Agency of DEF (grant No. 000/05/ 0000).


H.~Bellout, J.~Neustupa and P.~Penel, On the Navier-Stokes
Equation with Boundary Condi\-tions Based on Vorticity, {\em
Math.~Nachr.} 269--270, 2004, pp.~59--72.

V.~Girault and P.--A.~Raviart, {\em Finite Element Methods for
Navier--Stokes Equations,} Springer --Verlag,
Berlin--Heidelberg--New York--Tokyo 1986

E.~Hopf, \"Uber die Anfangswertaufgabe f\"ur die Hydrodynamischen
Grundgleichungen, {\em Math. Nachr.}~4, 1951, pp.~213--231.

T.~Kato, Non--stationary flows of viscous and ideal fluids in
$\R^3$, {\em J.~Func.~Anal.}~9, 1972, pp. 296--305.

J.~Serrin, On the interior regularity of weak solutions of the
Navier--Stokes equations, {\em Arch.~Rat. Mech.~Anal.}~9, 1962,



Edit: a picture showing the issue

The picture shows what I get with and without loading graphicx.

I should add that I am using MikTex, Windows 10 (64-bit).

Different output side by side

Edit 2: what seems to solve

In a comment, @jon suggested to put a4paper in the document class call. That solved for me:


Though I must still ask: What if it was a non-standard (unusual) paper size?

The paper size would need to be controled exclusively with \setlength (or using a package like geometry)?

The bigger problem is when submitting to a conference or journal. I suppose the paper size must be exact...

  • With your code, I get exactly the same output by visual inspection with/without graphicx. – Werner Oct 20 '16 at 23:41
  • I've added a picture showing what I get. Note also that I am using MikTex under windows 10. – Pedro H. N. Vieira Oct 21 '16 at 1:13
  • I am seeing the O.P. output behavior on MikTex under Win 10. I also saw the same behavior when I moved the graphicx call to the very beginning of the preamble. Interesting?? – R. Schumacher Oct 21 '16 at 1:25
  • What happens when you put the actual papersize in the call to document class? Looks like a4paper.... (This 'template' seems like a lesson in why it is better to use a proper package for setting page dimensions.) – jon Oct 21 '16 at 1:29
  • What happens if you place a blank line before and after and by the generalized impermeability boundary conditions ? – user103221 Oct 21 '16 at 1:30

This is by design.

The actual text block (\textheight, \textwidth) is not changed but the pdf page size as seen by your pdf viewer will match the page size used for the document if graphics (or color or geometry or hyperref) are loaded.

by default TeX has no control over physical page size, it just controls the text block. what size the paper is and how the text block is positioned on that paper was a separate issue concerned with printing the dvi output.

However pdftex added extended primitives \pdfpageheight, \pdfpagewidth to control the page size, and dvips and most other dvi drivers have similar driver specific \special commands.

By default LaTeX doesn't use any driver-specific code, so it always uses a text block designed for US-letter paper, or as specified in the documentclass options, but the pdf page will be your installation default (probably A4 if you are not in the USA).

So if you add graphics, the pdf page size matches the text block being used or conversely if you specify [a4paper] to latex then it uses a text block designed for A4 and sets the pdf page size to A4, which is probably your default size so you see no change in that case.

Recent graphics package releases have a [nosetpagesize] option that suppresses this behaviour.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.