%%
%% This is file `geometry.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% geometry.dtx  (with options: `package')
%% 
%% File: geometry.dtx Copyright (C) 1996-2002 Hideo Umeki
%%                              (hideo.umeki@toshiba.co.jp)
%%
%% This package may be distributed under the terms of the LaTeX
%% Project Public License, as described in lppl.txt in the base
%% LaTeX distribution, either version 1.2 or (at your option)
%% any later version.
%%
\NeedsTeXFormat{LaTeX2e}%
\ProvidesPackage{geometry}[2002/07/08 v3.2 Page Geometry]
\RequirePackage{keyval}%
\newif\ifGm@verbose
\newif\ifGm@landscape
\newif\ifGm@includehead
\newif\ifGm@includefoot
\newif\ifGm@includemp
\newif\ifGm@hbody
\newif\ifGm@vbody
\newif\ifGm@heightrounded
\newif\ifGm@showframe
\newif\ifGm@compatii
\newif\ifGm@special
\newif\ifGm@sworient\Gm@sworientfalse
\newif\ifGm@pass\Gm@passfalse
\newcount\Gm@cnth
\newcount\Gm@cntv
\newcount\c@Gm@tempcnt
\newdimen\Gm@bindingoffset
\newdimen\Gm@wd@mp
\newdimen\Gm@odd@mp
\newdimen\Gm@even@mp
\newtoks\Gm@dimlist
\def\Gm@warning#1{\PackageWarningNoLine{geometry}{#1}}%
\@onlypreamble\Gm@warning
\def\Gm@Dhratio{1:1}% = left:right default for oneside
\def\Gm@Dhratiotwo{2:3}% = inner:outer default for twoside.
\def\Gm@Dvratio{2:3}% = top:bottom default
\@onlypreamble\Gm@Dhratio
\@onlypreamble\Gm@Dhratiotwo
\@onlypreamble\Gm@Dvratio
\def\Gm@Dhscale{0.7}%
\def\Gm@Dvscale{0.7}%
\@onlypreamble\Gm@Dhscale
\@onlypreamble\Gm@Dvscale
\def\Gm@dvips{dvips}%
\def\Gm@dvipdfm{dvipdfm}%
\def\Gm@pdftex{pdftex}%
\def\Gm@vtex{vtex}%
\@onlypreamble\Gm@dvips
\@onlypreamble\Gm@dvipdfm
\@onlypreamble\Gm@pdftex
\@onlypreamble\Gm@vtex
\def\Gm@true{true}%
\def\Gm@false{false}%
\edef\Gm@dorg{%
  \noexpand\setlength{\paperwidth}{\the\paperwidth}%
  \noexpand\setlength{\paperheight}{\the\paperheight}%
  \noexpand\setlength{\textheight}{\the\textheight}%
  \noexpand\setlength{\textwidth}{\the\textwidth}%
  \noexpand\setlength{\oddsidemargin}{\the\oddsidemargin}%
  \noexpand\setlength{\evensidemargin}{\the\evensidemargin}%
  \noexpand\setlength{\topmargin}{\the\topmargin}%
  \noexpand\setlength{\headsep}{\the\headsep}%
  \noexpand\setlength{\headheight}{\the\headheight}%
  \noexpand\setlength{\footskip}{\the\footskip}%
  \noexpand\setlength{\marginparwidth}{\the\marginparwidth}%
  \noexpand\setlength{\marginparsep}{\the\marginparsep}%
  \noexpand\setlength{\columnsep}{\the\columnsep}%
  \noexpand\setlength{\skip\footins}{\the\skip\footins}%
  \noexpand\setlength{\hoffset}{\the\hoffset}%
  \noexpand\setlength{\voffset}{\the\voffset}%
  \expandafter\noexpand\csname @twocolumn\if@twocolumn
    \Gm@true\else\Gm@false\fi\endcsname
  \expandafter\noexpand\csname @twoside\if@twoside
    \Gm@true\else\Gm@false\fi\endcsname
  \expandafter\noexpand\csname @mparswitch\if@mparswitch
    \Gm@true\else\Gm@false\fi\endcsname
  \expandafter\noexpand\csname @reversemargin\if@reversemargin
    \Gm@true\else\Gm@false\fi\endcsname
  \noexpand\mag=\the\mag}%
\@onlypreamble\Gm@dorg
\def\Gm@init{%
  \Gm@hbodyfalse\Gm@vbodyfalse
  \Gm@includeheadfalse\Gm@includefootfalse\Gm@includempfalse
  \Gm@landscapefalse\Gm@compatiifalse\Gm@heightroundedfalse
  \Gm@verbosefalse\Gm@showframefalse\Gm@specialfalse
  \let\Gm@paper\@undefined
  \let\Gm@width\@undefined\let\Gm@height\@undefined
  \let\Gm@textwidth\@undefined\let\Gm@textheight\@undefined
  \let\Gm@hscale\@undefined\let\Gm@vscale\@undefined
  \let\Gm@hmarginratio\@undefined\let\Gm@vmarginratio\@undefined
  \let\Gm@lmargin\@undefined\let\Gm@rmargin\@undefined
  \let\Gm@tmargin\@undefined\let\Gm@bmargin\@undefined
  \let\Gm@driver\@empty\let\Gm@truedimen\@empty
  \Gm@bindingoffset\z@\Gm@dimlist={}}%
\@onlypreamble\Gm@init
\def\Gm@setdriver#1{%
  \expandafter\let\expandafter\Gm@driver\csname Gm@#1\endcsname}%
\def\Gm@unsetdriver#1{%
  \expandafter\ifx\csname Gm@#1\endcsname\Gm@driver
    \let\Gm@driver\@empty
  \fi}%
\def\Gm@setbool{\@dblarg\Gm@@setbool}%
\def\Gm@setboolrev{\@dblarg\Gm@@setboolrev}%
\def\Gm@@setbool[#1]#2#3{\Gm@doif{#1}{#3}{\csname Gm@#2\Gm@bool\endcsname}}%
\def\Gm@@setboolrev[#1]#2#3{\Gm@doifelse{#1}{#3}%
  {\csname Gm@#2\Gm@false\endcsname}{\csname Gm@#2\Gm@true\endcsname}}%
\@onlypreamble\Gm@setbool
\@onlypreamble\Gm@setboolrev
\@onlypreamble\Gm@@setbool
\@onlypreamble\Gm@@setboolrev
\def\Gm@doif#1#2#3{%
  \lowercase{\def\Gm@bool{#2}}%
  \ifx\Gm@bool\@empty
    \let\Gm@bool\Gm@true
  \fi
  \ifx\Gm@bool\Gm@true
  \else
    \ifx\Gm@bool\Gm@false
    \else
      \let\Gm@bool\relax
    \fi
  \fi
  \ifx\Gm@bool\relax
    \Gm@warning{`#1' should be set to `true' or `false'}%
  \else
    #3
  \fi}%
\def\Gm@doifelse#1#2#3#4{%
  \Gm@doif{#1}{#2}{\ifx\Gm@bool\Gm@true #3\else #4\fi}}%
\@onlypreamble\Gm@doif
\@onlypreamble\Gm@doifelse
\def\Gm@reverse#1{%
  \csname ifGm@#1\endcsname
  \csname Gm@#1false\endcsname\else\csname Gm@#1true\endcsname\fi}%
\@onlypreamble\Gm@reverse
\def\Gm@checkbool#1{#1: \csname ifGm@#1\endcsname true\else --\fi^^J}%
\@onlypreamble\Gm@checkbool
\def\Gm@defbylen#1#2{%
  \setlength\@tempdima{#2}%
  \expandafter\edef\csname Gm@#1\endcsname{\the\@tempdima}}%
\def\Gm@defbycnt#1#2{%
  \setcounter{Gm@tempcnt}{#2}%
  \expandafter\edef\csname Gm@#1\endcsname{\the\value{Gm@tempcnt}}}%
\@onlypreamble\Gm@defbylen
\@onlypreamble\Gm@defbycnt
\def\Gm@sep@ratio#1:#2{\@tempcnta=#1\@tempcntb=#2}%
\@onlypreamble\Gm@set@ratio
\def\Gm@setbyratio[#1]#2#3#4{% determine #4 by ratio
  \expandafter\Gm@sep@ratio\Gm@mratio\relax
  \if#1b
    \edef\@@tempa{\the\@tempcnta}%
    \@tempcnta=\@tempcntb
    \@tempcntb=\@@tempa\relax
  \fi
  \expandafter\setlength\expandafter\@tempdimb\expandafter
    {\csname Gm@#3\endcsname}%
  \ifnum\@tempcntb>\z@
    \multiply\@tempdimb\@tempcnta
    \divide\@tempdimb\@tempcntb
  \fi
  \expandafter\edef\csname Gm@#4\endcsname{\the\@tempdimb}}%
\@onlypreamble\Gm@setbyratio
\def\Gm@detiv#1#2#3#4{% determine #4.
  \expandafter\setlength\expandafter\@tempdima\expandafter
    {\csname paper#1\endcsname}%
  \expandafter\setlength\expandafter\@tempdimb\expandafter
    {\csname Gm@#2\endcsname}%
  \addtolength\@tempdima{-\@tempdimb}%
  \expandafter\setlength\expandafter\@tempdimb\expandafter
    {\csname Gm@#3\endcsname}%
  \addtolength\@tempdima{-\@tempdimb}%
  \ifdim\@tempdima<\z@
    \Gm@warning{`#4' results in NEGATIVE (\the\@tempdima).%
    ^^J\@spaces `#2' or `#3' should be shortened in length}%
  \fi
  \expandafter\edef\csname Gm@#4\endcsname{\the\@tempdima}}%
\@onlypreamble\Gm@detiv
\def\Gm@detiiandiii#1#2#3{% determine #2 and #3.
  \expandafter\setlength\expandafter\@tempdima\expandafter
    {\csname paper#1\endcsname}%
  \expandafter\setlength\expandafter\@tempdimb\expandafter
    {\csname Gm@#1\endcsname}%
  \addtolength\@tempdima{-\@tempdimb}%
  \ifdim\@tempdima<\z@
    \Gm@warning{`#2' and `#3' result in NEGATIVE (\the\@tempdima).%
                  ^^J\@spaces `#1' should be shortened in length}%
  \fi
  \ifx\Gm@mratio\@undefined
    \divide\@tempdima\tw@
    \@tempdimb=\@tempdima
  \else
    \@tempdimb=\@tempdima
    \expandafter\Gm@sep@ratio\Gm@mratio\relax
    \advance\@tempcntb\@tempcnta
    \ifnum\@tempcntb>\z@
      \divide\@tempdima\@tempcntb
      \multiply\@tempdima\@tempcnta
      \advance\@tempdimb-\@tempdima
    \else
      \divide\@tempdima\tw@
      \@tempdimb=\@tempdima
    \fi
  \fi
  \expandafter\edef\csname Gm@#2\endcsname{\the\@tempdima}%
  \expandafter\edef\csname Gm@#3\endcsname{\the\@tempdimb}}%
\@onlypreamble\Gm@detiiandiii
\def\Gm@detall#1#2#3#4{%
  \@tempcnta\z@
  \edef\Gm@mratio{\@nameuse{Gm@#1marginratio}}%
  \if#1h
    \ifx\Gm@lmargin\@undefined\else\advance\@tempcnta4\relax\fi
    \ifGm@hbody\advance\@tempcnta2\relax\fi
    \ifx\Gm@rmargin\@undefined\else\advance\@tempcnta1\relax\fi
    \Gm@cnth\@tempcnta
  \else
    \ifx\Gm@tmargin\@undefined\else\advance\@tempcnta4\relax\fi
    \ifGm@vbody\advance\@tempcnta2\relax\fi
    \ifx\Gm@bmargin\@undefined\else\advance\@tempcnta1\relax\fi
    \Gm@cntv\@tempcnta
  \fi
  \ifcase\@tempcnta
    \if#1h
      \edef\Gm@width{\Gm@Dhscale\paperwidth}%
    \else
      \edef\Gm@height{\Gm@Dvscale\paperheight}%
    \fi
    \Gm@detiiandiii{#2}{#3}{#4}%
  \or\Gm@setbyratio[f]{#1}{#4}{#3}\Gm@detiv{#2}{#3}{#4}{#2}%
  \or\Gm@detiiandiii{#2}{#3}{#4}%
  \or\Gm@detiv{#2}{#2}{#4}{#3}%
  \or\Gm@setbyratio[b]{#1}{#3}{#4}\Gm@detiv{#2}{#3}{#4}{#2}%
  \or\Gm@detiv{#2}{#3}{#4}{#2}%
  \or\Gm@detiv{#2}{#2}{#3}{#4}%
  \or\Gm@warning{Over-specification in `#1'-direction.%
                  ^^J\@spaces `#2' (\@nameuse{Gm@#2}) is ignored}%
    \Gm@detiv{#2}{#3}{#4}{#2}%
  \else\fi}%
\@onlypreamble\Gm@detall
\def\Gm@clean{%
  \ifnum\Gm@cnth<4\let\Gm@lmargin\@undefined\fi
  \ifodd\Gm@cnth\else\let\Gm@rmargin\@undefined\fi
  \ifnum\Gm@cntv<4\let\Gm@tmargin\@undefined\fi
  \ifodd\Gm@cntv\else\let\Gm@bmargin\@undefined\fi
  \ifGm@hbody\else
    \let\Gm@hscale\@undefined
    \let\Gm@width\@undefined
    \let\Gm@textwidth\@undefined
  \fi
  \ifGm@vbody\else
    \let\Gm@vscale\@undefined
    \let\Gm@height\@undefined
    \let\Gm@textheight\@undefined
  \fi
  \if@twoside
    \ifx\Gm@hmarginratio\Gm@Dhratiotwo
      \let\Gm@hmarginratio\@undefined
    \fi
  \else
    \ifx\Gm@hmarginratio\Gm@Dhratio
      \let\Gm@hmarginratio\@undefined
    \fi
  \fi}%
\@onlypreamble\Gm@clean
\def\Gm@parse@divide#1#2#3#4{%
  \def\Gm@star{*}%
  \@tempcnta\z@
  \@for\Gm@tmp:=#1\do{%
    \expandafter\KV@@sp@def\expandafter\Gm@frag\expandafter{\Gm@tmp}%
    \edef\Gm@value{\Gm@frag}%
    \ifcase\@tempcnta\relax\edef\Gm@key{#2}%
      \or\edef\Gm@key{#3}%
      \else\edef\Gm@key{#4}%
    \fi
    \@nameuse{Gm@set\Gm@key false}%
    \ifx\empty\Gm@value\else
    \ifx\Gm@star\Gm@value\else
      \setkeys{Gm}{\Gm@key=\Gm@value}%
    \fi\fi
    \advance\@tempcnta\@ne}%
  \let\Gm@star\relax}%
\@onlypreamble\Gm@parse@divide
\def\Gm@branch#1#2#3{%
  \@tempcnta\z@
  \@for\Gm@tmp:=#1\do{%
    \KV@@sp@def\Gm@frag{\Gm@tmp}%
    \edef\Gm@value{\Gm@frag}%
    \ifcase\@tempcnta\relax% cnta == 0
      \setkeys{Gm}{#2=\Gm@value}%
    \or% cnta == 1
      \setkeys{Gm}{#3=\Gm@value}%
    \else\fi
    \advance\@tempcnta\@ne}%
  \ifnum\@tempcnta=\@ne
    \setkeys{Gm}{#3=\Gm@value}%
  \fi}%
\@onlypreamble\Gm@branch
\def\Gm@magtooffset{%
  \@tempdima=\mag\Gm@truedimen sp%
  \@tempdimb=1\Gm@truedimen in%
  \divide\@tempdimb\@tempdima
  \multiply\@tempdimb\@m
  \addtolength{\hoffset}{1\Gm@truedimen in}%
  \addtolength{\voffset}{1\Gm@truedimen in}%
  \addtolength{\hoffset}{-\the\@tempdimb}%
  \addtolength{\voffset}{-\the\@tempdimb}}%
\@onlypreamble\Gm@magtooffset
\def\Gm@setafter#1#2{%
  \let\Gm@len=\relax\let\Gm@td=\relax
  \edef\addtolist{\noexpand\Gm@dimlist=%
  {\the\Gm@dimlist \Gm@len{#1}{#2}}}\addtolist}%
\@onlypreamble\Gm@setafter
\def\Gm@processdimlist{%
  \def\Gm@td{\Gm@truedimen}%
  \def\Gm@len##1##2{\setlength{##1}{##2}}%
  \the\Gm@dimlist}%
\@onlypreamble\Gm@processdimlist
\def\Gm@setpaper(#1,#2)#3{%
  \let\Gm@td\relax
  \Gm@setafter\paperwidth{#1\Gm@td #3}%
  \Gm@setafter\paperheight{#2\Gm@td #3}%
  \ifGm@landscape\Gm@sworienttrue\else\Gm@sworientfalse\fi}%
\@onlypreamble\Gm@setpaper
\def\Gm@chpaper{\@nameuse{Gm@\Gm@paper}}%
\@onlypreamble\Gm@chpaper
\@namedef{Gm@a0paper}{\Gm@setpaper(841,1189){mm}}%
\@namedef{Gm@a1paper}{\Gm@setpaper(595,841){mm}}%
\@namedef{Gm@a2paper}{\Gm@setpaper(420,595){mm}}%
\@namedef{Gm@a3paper}{\Gm@setpaper(297,420){mm}}%
\@namedef{Gm@a4paper}{\Gm@setpaper(210,297){mm}}%
\@namedef{Gm@a5paper}{\Gm@setpaper(149,210){mm}}%
\@namedef{Gm@a6paper}{\Gm@setpaper(105,149){mm}}%
\@namedef{Gm@b0paper}{\Gm@setpaper(1000,1414){mm}}%
\@namedef{Gm@b1paper}{\Gm@setpaper(707,1000){mm}}%
\@namedef{Gm@b2paper}{\Gm@setpaper(500,707){mm}}%
\@namedef{Gm@b3paper}{\Gm@setpaper(353,500){mm}}%
\@namedef{Gm@b4paper}{\Gm@setpaper(250,353){mm}}%
\@namedef{Gm@b5paper}{\Gm@setpaper(176,250){mm}}%
\@namedef{Gm@b6paper}{\Gm@setpaper(125,176){mm}}%
\@namedef{Gm@letterpaper}{\Gm@setpaper(8.5,11){in}}%
\@namedef{Gm@legalpaper}{\Gm@setpaper(8.5,14){in}}%
\@namedef{Gm@executivepaper}{\Gm@setpaper(7.25,10.5){in}}%
\@namedef{Gm@screen}{\Gm@setpaper(225,180){mm}}%
\define@key{Gm}{paper}{\setkeys{Gm}{#1}}%
\let\KV@Gm@papername\KV@Gm@paper
\define@key{Gm}{a0paper}[true]{\def\Gm@paper{a0paper}\Gm@chpaper}%
\define@key{Gm}{a1paper}[true]{\def\Gm@paper{a1paper}\Gm@chpaper}%
\define@key{Gm}{a2paper}[true]{\def\Gm@paper{a2paper}\Gm@chpaper}%
\define@key{Gm}{a3paper}[true]{\def\Gm@paper{a3paper}\Gm@chpaper}%
\define@key{Gm}{a4paper}[true]{\def\Gm@paper{a4paper}\Gm@chpaper}%
\define@key{Gm}{a5paper}[true]{\def\Gm@paper{a5paper}\Gm@chpaper}%
\define@key{Gm}{a6paper}[true]{\def\Gm@paper{a6paper}\Gm@chpaper}%
\define@key{Gm}{b0paper}[true]{\def\Gm@paper{b0paper}\Gm@chpaper}%
\define@key{Gm}{b1paper}[true]{\def\Gm@paper{b1paper}\Gm@chpaper}%
\define@key{Gm}{b2paper}[true]{\def\Gm@paper{b2paper}\Gm@chpaper}%
\define@key{Gm}{b3paper}[true]{\def\Gm@paper{b3paper}\Gm@chpaper}%
\define@key{Gm}{b4paper}[true]{\def\Gm@paper{b4paper}\Gm@chpaper}%
\define@key{Gm}{b5paper}[true]{\def\Gm@paper{b5paper}\Gm@chpaper}%
\define@key{Gm}{b6paper}[true]{\def\Gm@paper{b6paper}\Gm@chpaper}%
\define@key{Gm}{letterpaper}[true]{\def\Gm@paper{letterpaper}\Gm@chpaper}%
\define@key{Gm}{legalpaper}[true]{\def\Gm@paper{legalpaper}\Gm@chpaper}%
\define@key{Gm}{executivepaper}[true]{\def\Gm@paper{executivepaper}%
  \Gm@chpaper}%
\define@key{Gm}{screen}[true]{\def\Gm@paper{screen}\Gm@chpaper}%
\define@key{Gm}{paperwidth}{%
  \Gm@setafter\paperwidth{#1}\def\Gm@paper{user defined}}%
\define@key{Gm}{paperheight}{%
  \Gm@setafter\paperheight{#1}\def\Gm@paper{user defined}}%
\define@key{Gm}{papersize}{\Gm@branch{#1}{paperwidth}{paperheight}}%
\define@key{Gm}{landscape}[true]{\Gm@doifelse{landscape}{#1}%
  {\ifGm@landscape\else\Gm@landscapetrue\Gm@reverse{sworient}\fi}%
  {\ifGm@landscape\Gm@landscapefalse\Gm@reverse{sworient}\fi}}%
\define@key{Gm}{portrait}[true]{\Gm@doifelse{portrait}{#1}%
  {\ifGm@landscape\Gm@landscapefalse\Gm@reverse{sworient}\fi}%
  {\ifGm@landscape\else\Gm@landscapetrue\Gm@reverse{sworient}\fi}}%
\define@key{Gm}{hscale}{\Gm@hbodytrue\edef\Gm@hscale{#1}}%
\define@key{Gm}{vscale}{\Gm@vbodytrue\edef\Gm@vscale{#1}}%
\define@key{Gm}{scale}{\Gm@branch{#1}{hscale}{vscale}}%
\define@key{Gm}{width}{\Gm@hbodytrue\Gm@defbylen{width}{#1}}%
\define@key{Gm}{height}{\Gm@vbodytrue\Gm@defbylen{height}{#1}}%
\define@key{Gm}{total}{\Gm@branch{#1}{width}{height}}%
\let\KV@Gm@totalwidth\KV@Gm@width
\let\KV@Gm@totalheight\KV@Gm@height
\define@key{Gm}{textwidth}{\Gm@hbodytrue\Gm@defbylen{textwidth}{#1}}%
\define@key{Gm}{textheight}{\Gm@vbodytrue\Gm@defbylen{textheight}{#1}}%
\define@key{Gm}{text}{\Gm@branch{#1}{textwidth}{textheight}}%
\let\KV@Gm@body\KV@Gm@text
\define@key{Gm}{lines}{\Gm@vbodytrue\Gm@defbycnt{lines}{#1}}%
\define@key{Gm}{includehead}[true]{\Gm@setbool{includehead}{#1}}%
\define@key{Gm}{includefoot}[true]{\Gm@setbool{includefoot}{#1}}%
\define@key{Gm}{includeheadfoot}[true]{\Gm@doifelse{includeheadfoot}{#1}%
  {\Gm@includeheadtrue\Gm@includefoottrue}%
  {\Gm@includeheadfalse\Gm@includefootfalse}}%
\define@key{Gm}{includemp}[true]{\Gm@setbool{includemp}{#1}}%
\define@key{Gm}{includeall}[true]{\Gm@doifelse{includeall}{#1}%
  {\Gm@includeheadtrue\Gm@includefoottrue\Gm@includemptrue}%
  {\Gm@includeheadfalse\Gm@includefootfalse\Gm@includempfalse}}%
\define@key{Gm}{ignorehead}[true]{%
  \Gm@setboolrev[ignorehead]{includehead}{#1}}%
\define@key{Gm}{ignorefoot}[true]{%
  \Gm@setboolrev[ignorefoot]{includefoot}{#1}}%
\define@key{Gm}{ignoreheadfoot}[true]{\Gm@doifelse{ignoreheadfoot}{#1}%
  {\Gm@includeheadfalse\Gm@includefootfalse}%
  {\Gm@includeheadtrue\Gm@includefoottrue}}%
\define@key{Gm}{ignoremp}[true]{%
  \Gm@setboolrev[ignoremp]{includemp}{#1}}%
\define@key{Gm}{ignoreall}[true]{\Gm@doifelse{ignoreall}{#1}%
  {\Gm@includeheadfalse\Gm@includefootfalse\Gm@includempfalse}%
  {\Gm@includeheadtrue\Gm@includefoottrue\Gm@includemptrue}}%
\define@key{Gm}{heightrounded}[true]{\Gm@setbool{heightrounded}{#1}}%
\define@key{Gm}{hdivide}{\Gm@parse@divide{#1}{lmargin}{width}{rmargin}}%
\define@key{Gm}{vdivide}{\Gm@parse@divide{#1}{tmargin}{height}{bmargin}}%
\define@key{Gm}{divide}{\Gm@parse@divide{#1}{lmargin}{width}{rmargin}%
  \Gm@parse@divide{#1}{tmargin}{height}{bmargin}}%
\define@key{Gm}{lmargin}{\Gm@defbylen{lmargin}{#1}}%
\define@key{Gm}{rmargin}{\Gm@defbylen{rmargin}{#1}}%
\let\KV@Gm@left\KV@Gm@lmargin
\let\KV@Gm@inner\KV@Gm@lmargin
\let\KV@Gm@innermargin\KV@Gm@lmargin
\let\KV@Gm@right\KV@Gm@rmargin
\let\KV@Gm@outer\KV@Gm@rmargin
\let\KV@Gm@outermargin\KV@Gm@rmargin
\define@key{Gm}{tmargin}{\Gm@defbylen{tmargin}{#1}}%
\define@key{Gm}{bmargin}{\Gm@defbylen{bmargin}{#1}}%
\let\KV@Gm@top\KV@Gm@tmargin
\let\KV@Gm@bottom\KV@Gm@bmargin
\define@key{Gm}{hmargin}{\Gm@branch{#1}{lmargin}{rmargin}}%
\define@key{Gm}{vmargin}{\Gm@branch{#1}{tmargin}{bmargin}}%
\define@key{Gm}{margin}{\Gm@branch{#1}{lmargin}{tmargin}%
  \Gm@branch{#1}{rmargin}{bmargin}}%
\define@key{Gm}{hmarginratio}{\edef\Gm@hmarginratio{#1}}%
\define@key{Gm}{vmarginratio}{\edef\Gm@vmarginratio{#1}}%
\define@key{Gm}{marginratio}{\Gm@branch{#1}{hmarginratio}{vmarginratio}}%
\let\KV@Gm@hratio\KV@Gm@hmarginratio
\let\KV@Gm@vratio\KV@Gm@vmarginratio
\let\KV@Gm@ratio\KV@Gm@marginratio
\define@key{Gm}{hcentering}[true]{\Gm@doifelse{hcentering}{#1}%
  {\def\Gm@hmarginratio{1:1}}{}}%
\define@key{Gm}{vcentering}[true]{\Gm@doifelse{vcentering}{#1}%
  {\def\Gm@vmarginratio{1:1}}{}}%
\define@key{Gm}{centering}[true]{\Gm@doifelse{centering}{#1}%
  {\def\Gm@hmarginratio{1:1}\def\Gm@vmarginratio{1:1}}{}}%
\define@key{Gm}{twoside}[true]{\Gm@doifelse{twoside}{#1}%
  {\@twosidetrue\@mparswitchtrue}{\@twosidefalse\@mparswitchfalse}}%
\define@key{Gm}{asymmetric}[true]{\Gm@doifelse{asymmetric}{#1}%
  {\@twosidetrue\@mparswitchfalse}{}}%
\define@key{Gm}{bindingoffset}{\Gm@setafter\Gm@bindingoffset{#1}}%
\define@key{Gm}{headheight}{\Gm@setafter\headheight{#1}}%
\define@key{Gm}{headsep}{\Gm@setafter\headsep{#1}}%
\define@key{Gm}{footskip}{\Gm@setafter\footskip{#1}}%
\let\KV@Gm@head\KV@Gm@headheight
\let\KV@Gm@foot\KV@Gm@footskip
\define@key{Gm}{nohead}[true]{\Gm@doifelse{nohead}{#1}%
  {\Gm@setafter\headheight\z@\Gm@setafter\headsep\z@}{}}%
\define@key{Gm}{nofoot}[true]{\Gm@doifelse{nofoot}{#1}%
  {\Gm@setafter\footskip\z@}{}}%
\define@key{Gm}{noheadfoot}[true]{\Gm@doifelse{noheadfoot}{#1}%
  {\Gm@setafter\headheight\z@\Gm@setafter\headsep
  \z@\Gm@setafter\footskip\z@}{}}%
\define@key{Gm}{footnotesep}{\Gm@setafter{\skip\footins}{#1}}%
\define@key{Gm}{marginparwidth}{\ifGm@compatii\Gm@includemptrue\fi
  \Gm@setafter\marginparwidth{#1}}%
\let\KV@Gm@marginpar\KV@Gm@marginparwidth
\define@key{Gm}{marginparsep}{\ifGm@compatii\Gm@includemptrue\fi
  \Gm@setafter\marginparsep{#1}}%
\define@key{Gm}{nomarginpar}[true]{\Gm@doifelse{nomarginpar}{#1}%
  {\Gm@setafter\marginparwidth\z@\Gm@setafter\marginparsep\z@}{}}%
\define@key{Gm}{columnsep}{\Gm@setafter\columnsep{#1}}%
\define@key{Gm}{hoffset}{\Gm@setafter\hoffset{#1}}%
\define@key{Gm}{voffset}{\Gm@setafter\voffset{#1}}%
\define@key{Gm}{offset}{\Gm@branch{#1}{hoffset}{voffset}}%
\define@key{Gm}{twocolumn}[true]{%
  \Gm@doif{twocolumn}{#1}{\csname @twocolumn\Gm@bool\endcsname}}%
\define@key{Gm}{reversemp}[true]{%
  \Gm@doif{reversemp}{#1}{\csname @reversemargin\Gm@bool\endcsname}}%
\define@key{Gm}{reversemarginpar}[true]{%
  \Gm@doif{reversemarginpar}{#1}{\csname @reversemargin\Gm@bool\endcsname}}%
\define@key{Gm}{driver}{\edef\@@tempa{#1}%
  \ifx\@@tempa\@empty\let\Gm@driver\@empty\else\setkeys{Gm}{#1}\fi}%
\define@key{Gm}{dvips}[true]{%
  \Gm@doifelse{dvips}{#1}{\Gm@setdriver{dvips}}{\Gm@unsetdriver{dvips}}}%
\define@key{Gm}{dvipdfm}[true]{%
  \Gm@doifelse{dvipdfm}{#1}{\Gm@setdriver{dvipdfm}}{\Gm@unsetdriver{dvipdfm}}}%
\define@key{Gm}{pdftex}[true]{%
  \Gm@doifelse{pdftex}{#1}{\Gm@setdriver{pdftex}}{\Gm@unsetdriver{pdftex}}}%
\define@key{Gm}{vtex}[true]{%
  \Gm@doifelse{vtex}{#1}{\Gm@setdriver{vtex}}{\Gm@unsetdriver{vtex}}}%
\define@key{Gm}{verbose}[true]{\Gm@setbool{verbose}{#1}}%
\define@key{Gm}{reset}[true]{\Gm@doifelse{reset}{#1}%
  {\Gm@init\Gm@dorg\ProcessOptionsKV[c]{Gm}\Gm@setdefaultpaper}{}}%
\define@key{Gm}{mag}{\mag=#1}%
\define@key{Gm}{truedimen}[true]{\Gm@doifelse{truedimen}{#1}%
  {\let\Gm@truedimen\Gm@true}{\let\Gm@truedimen\@empty}}%
\define@key{Gm}{pass}[true]{\Gm@setbool{pass}{#1}}%
\define@key{Gm}{showframe}[true]{\Gm@setbool{showframe}{#1}}%
\define@key{Gm}{compat2}[true]{%
  \Gm@doifelse{compat2}{#1}{\Gm@compatiitrue
  \setkeys{Gm}{scale={0.8,0.9},centering,includeheadfoot}}{}}%
\define@key{Gm}{twosideshift}{%
  \ifGm@compatii\@twosidetrue\@mparswitchtrue\Gm@defbylen{twosideshift}{#1}%
  \else\Gm@warning{`twosideshift' is obsolete}%
  \fi}%
\def\Gm@setdefaultpaper{%
  \ifx\Gm@paper\@undefined
    \Gm@setpaper(\strip@pt\paperwidth,\strip@pt\paperheight){pt}%
    \Gm@sworientfalse
  \fi}%
\@onlypreamble\Gm@setdefaultpaper
\def\Gm@checkpaper{%
  \ifdim\paperwidth>\p@\else
    \PackageError{geometry}{%
    You must set \string\paperwidth\space properly}{%
    Set your paper type (e.g., `a4paper' for A4) as a class option^^J%
    or as a geometry package option.}%
  \fi
  \ifdim\paperheight>\p@\else
    \PackageError{geometry}{%
    You must set \string\paperheight\space properly}{%
    Set your paper type (e.g., `a4paper' for A4) as a class option^^J%
    or as a geometry package option.}%
  \fi}%
\def\Gm@checkmp{%
  \ifGm@includemp\else
    \@tempcnta\z@\@tempcntb\@ne
    \if@twocolumn
      \@tempcnta\@ne
    \else
      \if@reversemargin
        \@tempcnta\@ne\@tempcntb\z@
      \fi
    \fi
    \@tempdima\marginparwidth
    \advance\@tempdima\marginparsep
    \ifnum\@tempcnta=\@ne
      \@tempdimc\@tempdima
      \setlength\@tempdimb{\Gm@lmargin}%
      \advance\@tempdimc-\@tempdimb
      \ifdim\@tempdimc>\z@
        \Gm@warning{The marginal notes would fall off the page.^^J
           \@spaces Add \the\@tempdimc\space and more to the left margin}%
      \fi
    \fi
    \ifnum\@tempcntb=\@ne
      \@tempdimc\@tempdima
      \setlength\@tempdimb{\Gm@rmargin}%
      \advance\@tempdimc-\@tempdimb
      \ifdim\@tempdimc>\z@
        \Gm@warning{The marginal notes would fall off the page.^^J
           \@spaces Add \the\@tempdimc\space and more to the right margin}%
      \fi
    \fi
  \fi}%
\@onlypreamble\Gm@checkmp
\def\Gm@checkdrivers{%
  \ifx\pdfpagewidth\@undefined\else
    \ifnum\pdfoutput=\@ne
      \Gm@setdriver{pdftex}%
    \fi
  \fi
  \ifx\VTeXversion\@undefined\else
    \ifnum\OpMode=\@ne
      \Gm@setdriver{vtex}%
    \else
      \ifnum\OpMode=\tw@
        \Gm@setdriver{vtex}%
      \fi
    \fi
  \fi
  \ifx\Gm@driver\Gm@dvips
    \Gm@specialtrue
  \else
    \ifx\Gm@driver\Gm@dvipdfm
       \Gm@specialtrue
    \fi
  \fi}%
\@onlypreamble\Gm@checkdrivers
\def\Gm@mpfix{%
  \@tempdimb\marginparwidth
  \advance\@tempdimb\marginparsep
  \Gm@wd@mp\@tempdimb
  \Gm@odd@mp\z@
  \Gm@even@mp\z@
  \if@twocolumn
    \Gm@wd@mp2\@tempdimb
    \Gm@odd@mp\@tempdimb
    \Gm@even@mp\@tempdimb
  \else
    \if@reversemargin
      \Gm@odd@mp\@tempdimb
      \if@mparswitch\else
        \Gm@even@mp\@tempdimb
      \fi
    \else
      \if@mparswitch
        \Gm@even@mp\@tempdimb
      \fi
    \fi
  \fi}%
\@onlypreamble\Gm@mpfix
\def\Gm@process{%
 \ifGm@pass
  \Gm@dorg
 \else
  \Gm@processdimlist
  \ifx\Gm@hmarginratio\@undefined
    \if@twoside
      \edef\Gm@hmarginratio{\Gm@Dhratiotwo}%
    \else
      \edef\Gm@hmarginratio{\Gm@Dhratio}%
    \fi
  \fi
  \ifx\Gm@vmarginratio\@undefined
    \edef\Gm@vmarginratio{\Gm@Dvratio}%
  \fi
  \Gm@checkpaper
  \ifGm@sworient
    \setlength\@tempdima{\paperwidth}%
    \setlength\paperwidth{\paperheight}%
    \setlength\paperheight{\@tempdima}%
    \Gm@setpaper(\strip@pt\paperwidth,\strip@pt\paperheight){pt}%
    \Gm@sworientfalse
  \fi
  \addtolength\paperwidth{-\Gm@bindingoffset}%
  \ifGm@includemp
    \Gm@mpfix
  \fi
  \ifGm@hbody
    \ifx\Gm@width\@undefined
      \ifx\Gm@hscale\@undefined
        \edef\Gm@width{\Gm@Dhscale\paperwidth}%
      \else
        \edef\Gm@width{\Gm@hscale\paperwidth}%
      \fi
    \fi
    \ifx\Gm@textwidth\@undefined\else
      \setlength\@tempdima{\Gm@textwidth}%
      \ifGm@includemp
        \advance\@tempdima\Gm@wd@mp
      \fi
      \edef\Gm@width{\the\@tempdima}%
    \fi
  \fi
  \ifGm@vbody
    \ifx\Gm@height\@undefined
      \ifx\Gm@vscale\@undefined
        \edef\Gm@height{\Gm@Dvscale\paperheight}%
      \else
        \edef\Gm@height{\Gm@vscale\paperheight}%
      \fi
    \fi
    \ifx\Gm@lines\@undefined\else
      \setlength\@tempdima{\baselineskip}%
      \multiply\@tempdima\Gm@lines
      \addtolength\@tempdima{\topskip}%
      \addtolength\@tempdima{-\baselineskip}%
      \edef\Gm@textheight{\the\@tempdima}%
    \fi
    \ifx\Gm@textheight\@undefined\else
      \setlength\@tempdima{\Gm@textheight}%
      \ifGm@includehead
        \addtolength\@tempdima{\headheight}%
        \addtolength\@tempdima{\headsep}%
      \fi
      \ifGm@includefoot
        \addtolength\@tempdima{\footskip}%
      \fi
      \edef\Gm@height{\the\@tempdima}%
    \fi
  \fi
  \Gm@detall{h}{width}{lmargin}{rmargin}%
  \Gm@detall{v}{height}{tmargin}{bmargin}%
  \setlength\textwidth{\Gm@width}%
  \setlength\textheight{\Gm@height}%
  \setlength\topmargin{\Gm@tmargin}%
  \setlength\oddsidemargin{\Gm@lmargin}%
  \addtolength\oddsidemargin{-1\Gm@truedimen in}%
  \ifGm@includemp
    \advance\textwidth-\Gm@wd@mp
    \advance\oddsidemargin\Gm@odd@mp
  \fi
  \if@mparswitch
    \setlength\evensidemargin{\Gm@rmargin}%
    \addtolength\evensidemargin{-1\Gm@truedimen in}%
    \ifGm@includemp
      \advance\evensidemargin\Gm@even@mp
    \fi
    \ifGm@compatii
      \ifx\Gm@twosideshift\@undefined
        \def\Gm@twosideshift{20\Gm@truedimen pt}%
      \fi
      \addtolength\oddsidemargin{\Gm@twosideshift}%
      \addtolength\evensidemargin{-\Gm@twosideshift}%
    \fi
  \else
    \evensidemargin\oddsidemargin
  \fi
  \advance\oddsidemargin\Gm@bindingoffset
  \addtolength\topmargin{-1\Gm@truedimen in}%
  \ifGm@includehead
    \addtolength\textheight{-\headheight}%
    \addtolength\textheight{-\headsep}%
  \else
    \addtolength\topmargin{-\headheight}%
    \addtolength\topmargin{-\headsep}%
  \fi
  \ifGm@includefoot
    \addtolength\textheight{-\footskip}%
  \fi
  \ifGm@heightrounded
    \setlength\@tempdima{\textheight}%
    \addtolength\@tempdima{-\topskip}%
    \@tempcnta\@tempdima
    \@tempcntb\baselineskip
    \divide\@tempcnta\@tempcntb
    \setlength\@tempdimb{\baselineskip}%
    \multiply\@tempdimb\@tempcnta
    \advance\@tempdima-\@tempdimb
    \multiply\@tempdima\tw@
    \ifdim\@tempdima>\baselineskip
      \addtolength\@tempdimb{\baselineskip}%
    \fi
    \addtolength\@tempdimb{\topskip}%
    \textheight\@tempdimb
  \fi
  \addtolength\paperwidth{\Gm@bindingoffset}%
 \fi}%
\@onlypreamble\Gm@process
\def\Gm@showparams{%
  -------------------- Geometry parameters^^J%
  \ifGm@pass
  'pass' is specified!! (disables the geometry layouter)^^J%
  \else
  paper: \ifx\Gm@paper\@undefined class default\else\Gm@paper\fi^^J%
  \Gm@checkbool{landscape}%
  twocolumn: \if@twocolumn\Gm@true\else--\fi^^J%
  twoside: \if@twoside\Gm@true\else--\fi^^J%
  asymmetric: \if@mparswitch --\else\if@twoside\Gm@true\else --\fi\fi^^J%
  h-parts: \Gm@lmargin, \Gm@width, \Gm@rmargin%
  \ifnum\Gm@cnth=\z@\space(default)\fi^^J%
  v-parts: \Gm@tmargin, \Gm@height, \Gm@bmargin%
  \ifnum\Gm@cntv=\z@\space(default)\fi^^J%
  hmarginratio: \ifnum\Gm@cnth<5 \ifnum\Gm@cnth=3--\else%
    \Gm@hmarginratio\fi\else--\fi^^J%
  vmarginratio: \ifnum\Gm@cntv<5 \ifnum\Gm@cntv=3--\else%
    \Gm@vmarginratio\fi\else--\fi^^J%
  lines: \@ifundefined{Gm@lines}{--}{\Gm@lines}^^J%
  \Gm@checkbool{heightrounded}%
  bindingoffset: \the\Gm@bindingoffset^^J%
  truedimen: \ifx\Gm@truedimen\@empty --\else\Gm@true\fi^^J%
  \Gm@checkbool{includehead}%
  \Gm@checkbool{includefoot}%
  \Gm@checkbool{includemp}%
  driver: \Gm@driver^^J%
  \fi
  -------------------- Page layout dimensions and switches^^J%
  \string\paperwidth\space\space\the\paperwidth^^J%
  \string\paperheight\space\the\paperheight^^J%
  \string\textwidth\space\space\the\textwidth^^J%
  \string\textheight\space\the\textheight^^J%
  \string\oddsidemargin\space\space\the\oddsidemargin^^J%
  \string\evensidemargin\space\the\evensidemargin^^J%
  \string\topmargin\space\space\the\topmargin^^J%
  \string\headheight\space\the\headheight^^J%
  \string\headsep\@spaces\the\headsep^^J%
  \string\footskip\space\space\space\the\footskip^^J%
  \string\marginparwidth\space\the\marginparwidth^^J%
  \string\marginparsep\space\space\space\the\marginparsep^^J%
  \string\columnsep\space\space\the\columnsep^^J%
  \string\skip\string\footins\space\space\the\skip\footins^^J%
  \string\hoffset\space\the\hoffset^^J%
  \string\voffset\space\the\voffset^^J%
  \string\mag\space\the\mag^^J%
  \if@twocolumn\string\@twocolumntrue\space\fi%
  \if@twoside\string\@twosidetrue\space\fi%
  \if@mparswitch\string\@mparswitchtrue\space\fi%
  \if@reversemargin\string\@reversemargintrue\space\fi^^J%
  (1in=72.27pt, 1cm=28.45pt)^^J%
  -----------------------}%
\@onlypreamble\Gm@showparams
\def\ProcessOptionsKV{\@ifnextchar[%]
  {\@ProcessOptionsKV}{\@ProcessOptionsKV[]}}%
\def\@ProcessOptionsKV[#1]#2{%
  \let\@tempa\@empty
  \@tempcnta\z@
  \if#1p\@tempcnta\@ne\else\if#1c\@tempcnta\tw@\fi\fi
  \ifodd\@tempcnta
   \edef\@tempa{\@ptionlist{\@currname.\@currext}}%
  \else
    \@for\CurrentOption:=\@classoptionslist\do{%
      \@ifundefined{KV@#2@\CurrentOption}%
      {}{\edef\@tempa{\@tempa,\CurrentOption,}}}%
    \ifnum\@tempcnta=\z@
      \edef\@tempa{\@tempa,\@ptionlist{\@currname.\@currext}}%
    \fi
  \fi
  \edef\@tempa{\noexpand\setkeys{#2}{\@tempa}}%
  \@tempa
  \AtEndOfPackage{\let\@unprocessedoptions\relax}}%
\@onlypreamble\ProcessOptionsKV
\@onlypreamble\@ProcessOptionsKV
\Gm@init
\ProcessOptionsKV[c]{Gm}%
\Gm@setdefaultpaper
\def\Gm@setkeys{\setkeys{Gm}}%
\@onlypreamble\Gm@setkeys
\let\Gm@origExecuteOptions\ExecuteOptions
\let\ExecuteOptions\Gm@setkeys
\InputIfFileExists{geometry.cfg}{}{}%
\let\ExecuteOptions\Gm@origExecuteOptions
\ProcessOptionsKV[p]{Gm}%
\Gm@process
\AtBeginDocument{%
  \edef\Gm@orgw{\the\paperwidth}%
  \edef\Gm@orgh{\the\paperheight}%
  \ifGm@pass\else
    \ifnum\mag=\@m\else
      \Gm@magtooffset
      \divide\paperwidth\@m
      \multiply\paperwidth\the\mag
      \divide\paperheight\@m
      \multiply\paperheight\the\mag
    \fi
  \fi
  \Gm@checkdrivers
  \ifx\Gm@driver\Gm@pdftex
    \ifx\pdfpagewidth\@undefined
      \Gm@warning{`pdftex' option is invalid in this environment}%
    \else
      \setlength\pdfpagewidth{\Gm@orgw}%
      \setlength\pdfpageheight{\Gm@orgh}%
      \ifnum\mag=\@m\else\ifx\Gm@truedimen\Gm@true
        \setlength\paperwidth{\Gm@orgw}%
        \setlength\paperheight{\Gm@orgh}%
      \fi\fi
    \fi
  \fi
  \ifx\Gm@driver\Gm@vtex
    \ifx\VTeXversion\@undefined
      \Gm@warning{`vtex' option is invalid in this environment}%
    \else
      \mediawidth=\paperwidth
      \mediaheight=\paperheight
    \fi
  \fi
  \ifGm@special
    \AtBeginDvi{\special{papersize=\the\paperwidth,\the\paperheight}}%
    \ifx\Gm@driver\Gm@dvips\ifGm@landscape
      \AtBeginDvi{\special{! /landplus90 true store}}%
    \fi\fi
  \fi
  \ifGm@showframe
    \AtBeginDvi{%
      \moveright\@themargin%
      \vbox to\z@{\baselineskip\z@skip\lineskip\z@skip\lineskiplimit\z@%
      \vskip\topmargin\vbox to\z@{\vss\hrule width\textwidth}%
      \vskip\headheight\vbox to\z@{\vss\hrule width\textwidth}%
      \vskip\headsep\vbox to\z@{\vss\hrule width\textwidth}%
      \hbox to\textwidth{\llap{\vrule height\textheight}\hfil%
      \vrule height\textheight}%
      \vbox to\z@{\vss\hrule width\textwidth}%
      \vskip\footskip\vbox to\z@{\vss\hrule width\textwidth}%
      \vss}}%
    \AtBeginDvi{%
      \vbox to\z@{\baselineskip\z@skip\lineskip\z@skip\lineskiplimit\z@%
      \vskip-1\Gm@truedimen in\rlap{\hskip-1\Gm@truedimen in%
      \vbox to\z@{\vbox to\z@{\vss\hrule width\paperwidth}%
      \hbox to \paperwidth{\llap{\vrule height\paperheight}\hfil%
      \vrule height\paperheight}%
      \vbox to\z@{\vss\hrule width\paperwidth}%
      \vss}}\vss}}%
  \fi
  \ifGm@verbose\ifGm@pass\else\Gm@checkmp\fi\fi
  \ifGm@verbose\expandafter\typeout\else\expandafter\wlog\fi
  {\Gm@showparams}%
  \let\Gm@cnth\relax
  \let\Gm@cntv\relax
  \let\c@Gm@tempcnt\relax
  \let\Gm@bindingoffset\relax
  \let\Gm@wd@mp\relax
  \let\Gm@odd@mp\relax
  \let\Gm@even@mp\relax
  \let\Gm@orgw\relax
  \let\Gm@orgh\relax
  \let\Gm@dimlist\relax}%
\def\geometry#1{%
  \Gm@clean
  \setkeys{Gm}{#1}%
  \Gm@process}%
\@onlypreamble\geometry
\endinput
%%
%% End of file `geometry.sty'.

