I observed a strange issue if you combine the graphicx package and a41.sty. The page size changes if I compile the document using pdflatex
Disclaimer: I know that using a41.sty is heavily outdated and deprecated. It's not my choice to use it and I'm afraid its beyond my authority to switch to more modern ways to adjust the paper size to A4. I'd just like to understand the interference of these two packages under the given constraints.
Expected behaviour
By using a41.sty the paper size should be changed to A4 and the margins should be adjusted to be rather small. Including the graphicx package should not change anything about the page size.
Observed behaviour
As long as I only include a41.sty the margins look as expected. When I include the graphicx package and use pdflatex to compile the document, the page size becomes significantly smaller and the page number is placed quite close to the border of the page. Using latex, however, both versions (with and without graphicx) produce the same output.
Question
Can anyone explain what exactly is happening here? Is there a way to avoid this problem (besides switching to geometry or typearea)?
Minimal working example
\documentclass[12pt]{article}
\usepackage{a41}
\usepackage{graphicx}
\usepackage{lipsum} % for filler text
\begin{document}
% insert filler text
\lipsum
\end{document}
a41.sty
Since it's not very widespread here is the contents of a41.sty:
% Correction for A4 paper (297x210mm) instead of the american 11x8.5in.
% To be called, for example, in this way:
% \documentstyle[12pt,A4]{article}
\addtolength{\textheight}{154.6pt}
\addtolength{\textwidth}{100pt}
\addtolength{\topmargin}{-92pt}
\addtolength{\topmargin}{0.5cm}
\addtolength{\oddsidemargin}{-52pt}
\addtolength{\oddsidemargin}{-0.2cm}
\addtolength{\evensidemargin}{-52pt}
\addtolength{\evensidemargin}{-0.2cm}
\usepackage[a4paper,textwidth=490.0pt,textheight=703.1pt]{geometry}to keep the exact dimensions of the text area of the a41.sty given above (for compatibility). To find out these values I used\showthe\textwidthand\showthe\textheight(see this question) in the old document while using a41.sty. – arnd Apr 28 '15 at 19:30