From 014f5211bd99f07f2bc962adb9edfded92d31b2b Mon Sep 17 00:00:00 2001
From: Mark Wooding <mdw@distorted.org.uk>
Date: Wed, 1 Nov 2006 14:32:34 +0000
Subject: [PATCH] ips.cls: Fix the page size of the PDF output.

At last!
---
 ips.cls | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/ips.cls b/ips.cls
index d25e634..b336a26 100644
--- a/ips.cls
+++ b/ips.cls
@@ -29,15 +29,17 @@
 \RequirePackage[within=section]{exercise}
 \RequirePackage{url}
 
-\ifx\pdfoutput\@@undefined
+\if0\ifx\pdfoutput\@@undefined0\else\the\pdfoutput\fi
   \PassOptionsToPackage{dvips}{xy}
 \else
   \ifarticle
     \pdfpagewidth\paperwidth
     \pdfpageheight\paperheight
   \else
-    \pdfpagewidth\paperheight
-    \pdfpageheight\paperwidth
+    \setslidelength{\pdfpagewidth}{\paperheight}
+    \setslidelength{\pdfpageheight}{\paperwidth}
+    \pdfhorigin=1 true in
+    \pdfvorigin=1 true in
   \fi
 \fi
 \RequirePackage[all]{xy}
-- 
2.11.0

