
ulalume3@11: %%% Copyright   Ulf A. Lindgren
ulalume3@11: %%%
ulalume3@11: %%% Note        Premission is granted to modify this file under
ulalume3@11: %%%             the condition that it is saved using another
ulalume3@11: %%%             file and package name.
ulalume3@11: %%%
ulalume3@11: %%% Revision    1.1 (1997)
ulalume3@11: %%%
ulalume3@11: %%%             Jan. 8th Modified package name base date option
ulalume3@11: %%%             Jan. 22th Modified FmN and FmTi for error in book.cls
ulalume3@11: %%%                  \MakeUppercase{#}->{\MakeUppercase#}
ulalume3@11: %%%             Apr. 6th Modified Lenny option to prevent undesired 
ulalume3@11: %%%                  skip of line.
ulalume3@11: %%%             Nov. 8th Fixed \@chapapp for AMS
ulalume3@11: %%%
ulalume3@11: %%% Revision    1.2 (1998)
ulalume3@11: %%%
ulalume3@11: %%%             Feb. 11th Fixed appendix problem related to Bjarne
ulalume3@11: %%%             Aug. 11th Fixed problem related to 11pt and 12pt 
ulalume3@11: %%%                  suggested by Tomas Lundberg. THANKS!
ulalume3@11: %%%
ulalume3@11: %%% Revision    1.3 (2004)
ulalume3@11: %%%             Sep. 20th problem with frontmatter, mainmatter and
ulalume3@11: %%%                  backmatter, pointed out by Lapo Mori
ulalume3@11: %%%
ulalume3@11: %%% Revision    1.31 (2004)
ulalume3@11: %%%             Sep. 21th problem with the Rejne definition streched text
ulalume3@11: %%%                  caused ugly gaps in the vrule aligned with the title
ulalume3@11: %%%                  text. Kindly pointed out to me by Hendri Adriaens
ulalume3@11: %%%
ulalume3@11: %%% Revision    1.32 (2005)
ulalume3@11: %%%             Jun. 23th compatibility problem with the KOMA class 'scrbook.cls'
ulalume3@11: %%%                  a remedy is a redefinition of '\@schapter' in
ulalume3@11: %%%                  line with that used in KOMA. The problem was pointed
ulalume3@11: %%%                  out to me by Mikkel Holm Olsen
ulalume3@11: %%%
ulalume3@11: %%% Revision    1.33 (2005)
ulalume3@11: %%%             Aug. 9th misspelled ``TWELV'' corrected, the error was pointed
ulalume3@11: %%%                  out to me by George Pearson
ulalume3@11: %%%
ulalume3@11: %%% Revision    1.34 (2007)
ulalume3@11: %%%             Added an alternative to Lenny provided by Peter
ulalume3@11: %%%             Osborne (2005-11-28)
ulalume3@11: %%%             Corrected front, main and back matter, based on input
ulalume3@11: %%%             from Bas van Gils (2006-04-24)
ulalume3@11: %%%             Jul. 30th Added Bjornstrup option provided by Jean-Marc
ulalume3@11: %%%             Francois (2007-01-05).
ulalume3@11: %%%             Reverted to \MakeUppercase{#} see rev 1.1, solved
ulalume3@11: %%%             problem with MakeUppercase and MakeLowercase pointed
ulalume3@11: %%%             out by Marco Feuerstein  (2007-06-06) 
ulalume3@11: 
ulalume3@11: 
ulalume3@11: %%% Last modified   Jul. 2007
ulalume3@11: 
ulalume3@11: \NeedsTeXFormat{LaTeX2e}[1995/12/01]
ulalume3@11: \ProvidesPackage{fncychap}
ulalume3@11:              [2007/07/30 v1.34
ulalume3@11:                  LaTeX package (Revised chapters)]
ulalume3@11: 
ulalume3@11: %%%% For conditional inclusion of color
ulalume3@11: \newif\ifusecolor
ulalume3@11: \usecolorfalse
ulalume3@11: 
ulalume3@11: 
ulalume3@11: 
ulalume3@11: %%%% DEFINITION OF Chapapp variables
ulalume3@11: \newcommand{\CNV}{\huge\bfseries}
ulalume3@11: \newcommand{\ChNameVar}[1]{\renewcommand{\CNV}{#1}}
ulalume3@11: 
ulalume3@11: 
ulalume3@11: %%%% DEFINITION OF TheChapter variables
ulalume3@11: \newcommand{\CNoV}{\huge\bfseries}
ulalume3@11: \newcommand{\ChNumVar}[1]{\renewcommand{\CNoV}{#1}}
ulalume3@11: 
ulalume3@11: \newif\ifUCN
ulalume3@11: \UCNfalse
ulalume3@11: \newif\ifLCN
ulalume3@11: \LCNfalse
ulalume3@11: \def\ChNameLowerCase{\LCNtrue\UCNfalse}
ulalume3@11: \def\ChNameUpperCase{\UCNtrue\LCNfalse}
ulalume3@11: \def\ChNameAsIs{\UCNfalse\LCNfalse}
ulalume3@11: 
ulalume3@11: %%%%% Fix for AMSBook 971008
ulalume3@11: 
ulalume3@11: \@ifundefined{@chapapp}{\let\@chapapp\chaptername}{}
ulalume3@11: 
ulalume3@11: 
ulalume3@11: %%%%% Fix for Bjarne and appendix 980211
ulalume3@11: 
ulalume3@11: \newif\ifinapp
ulalume3@11: \inappfalse
ulalume3@11: \renewcommand\appendix{\par
ulalume3@11:   \setcounter{chapter}{0}%
ulalume3@11:   \setcounter{section}{0}%
ulalume3@11:   \inapptrue%
ulalume3@11:   \renewcommand\@chapapp{\appendixname}%
ulalume3@11:   \renewcommand\thechapter{\@Alph\c@chapter}}
ulalume3@11: 
ulalume3@11: %%%%% Fix for frontmatter, mainmatter, and backmatter 040920
ulalume3@11: 
ulalume3@11: \@ifundefined{@mainmatter}{\newif\if@mainmatter \@mainmattertrue}{}
ulalume3@11: 
ulalume3@11: %%%%%
ulalume3@11: 
ulalume3@11: 
ulalume3@11: 
ulalume3@11: \newcommand{\FmN}[1]{%
ulalume3@11: \ifUCN
ulalume3@11:    {\MakeUppercase{#1}}\LCNfalse
ulalume3@11: \else
ulalume3@11:    \ifLCN
ulalume3@11:       {\MakeLowercase{#1}}\UCNfalse
ulalume3@11:    \else #1
ulalume3@11:    \fi
ulalume3@11: \fi}
ulalume3@11: 
ulalume3@11: 
ulalume3@11: %%%% DEFINITION OF Title variables
ulalume3@11: \newcommand{\CTV}{\Huge\bfseries}
ulalume3@11: \newcommand{\ChTitleVar}[1]{\renewcommand{\CTV}{#1}}
ulalume3@11: 
ulalume3@11: %%%% DEFINITION OF the basic rule width
ulalume3@11: \newlength{\RW}
ulalume3@11: \setlength{\RW}{1pt}
ulalume3@11: \newcommand{\ChRuleWidth}[1]{\setlength{\RW}{#1}}
ulalume3@11: 
ulalume3@11: \newif\ifUCT
ulalume3@11: \UCTfalse
ulalume3@11: \newif\ifLCT
ulalume3@11: \LCTfalse
ulalume3@11: \def\ChTitleLowerCase{\LCTtrue\UCTfalse}
ulalume3@11: \def\ChTitleUpperCase{\UCTtrue\LCTfalse}
ulalume3@11: \def\ChTitleAsIs{\UCTfalse\LCTfalse}
ulalume3@11: \newcommand{\FmTi}[1]{%
ulalume3@11: \ifUCT
ulalume3@11:    {\MakeUppercase{#1}}\LCTfalse
ulalume3@11: \else
ulalume3@11:    \ifLCT
ulalume3@11:       {\MakeLowercase{#1}}\UCTfalse
ulalume3@11:    \else {#1}
ulalume3@11:    \fi
ulalume3@11: \fi}
ulalume3@11: 
ulalume3@11: 
ulalume3@11: 
ulalume3@11: \newlength{\mylen}
ulalume3@11: \newlength{\myhi}
ulalume3@11: \newlength{\px}
ulalume3@11: \newlength{\py}
ulalume3@11: \newlength{\pyy}
ulalume3@11: \newlength{\pxx}
ulalume3@11: 
ulalume3@11: 
ulalume3@11: \def\mghrulefill#1{\leavevmode\leaders\hrule\@height #1\hfill\kern\z@}
ulalume3@11: 
ulalume3@11: \newcommand{\DOCH}{%
ulalume3@11:   \CNV\FmN{\@chapapp}\space \CNoV\thechapter
ulalume3@11:   \par\nobreak
ulalume3@11:   \vskip 20\p@
ulalume3@11:   }
ulalume3@11: \newcommand{\DOTI}[1]{%
ulalume3@11:     \CTV\FmTi{#1}\par\nobreak
ulalume3@11:     \vskip 40\p@
ulalume3@11:     }
ulalume3@11: \newcommand{\DOTIS}[1]{%
ulalume3@11:     \CTV\FmTi{#1}\par\nobreak
ulalume3@11:     \vskip 40\p@
ulalume3@11:     }
ulalume3@11: 
ulalume3@11: %%%%%% SONNY DEF
ulalume3@11: 
ulalume3@11: \DeclareOption{Sonny}{%
ulalume3@11:   \ChNameVar{\Large\sf}
ulalume3@11:   \ChNumVar{\Huge}
ulalume3@11:   \ChTitleVar{\Large\sf}
ulalume3@11:   \ChRuleWidth{0.5pt}
ulalume3@11:   \ChNameUpperCase
ulalume3@11:   \renewcommand{\DOCH}{%
ulalume3@11:     \raggedleft
ulalume3@11:     \CNV\FmN{\@chapapp}\space \CNoV\thechapter
ulalume3@11:     \par\nobreak
ulalume3@11:     \vskip 40\p@}
ulalume3@11:   \renewcommand{\DOTI}[1]{%
ulalume3@11:     \CTV\raggedleft\mghrulefill{\RW}\par\nobreak
ulalume3@11:     \vskip 5\p@
ulalume3@11:     \CTV\FmTi{#1}\par\nobreak
ulalume3@11:     \mghrulefill{\RW}\par\nobreak
ulalume3@11:     \vskip 40\p@}
ulalume3@11:   \renewcommand{\DOTIS}[1]{%
ulalume3@11:     \CTV\raggedleft\mghrulefill{\RW}\par\nobreak
ulalume3@11:     \vskip 5\p@
ulalume3@11:     \CTV\FmTi{#1}\par\nobreak
ulalume3@11:     \mghrulefill{\RW}\par\nobreak
ulalume3@11:     \vskip 40\p@}
ulalume3@11: }
ulalume3@11: 
ulalume3@11: %%%%%% LENNY DEF
ulalume3@11: 
ulalume3@11: \DeclareOption{Lenny}{%
ulalume3@11: 
ulalume3@11:   \ChNameVar{\fontsize{14}{16}\usefont{OT1}{phv}{m}{n}\selectfont}
ulalume3@11:   \ChNumVar{\fontsize{60}{62}\usefont{OT1}{ptm}{m}{n}\selectfont}
ulalume3@11:   \ChTitleVar{\Huge\bfseries\rm}
ulalume3@11:   \ChRuleWidth{1pt}
ulalume3@11:   \renewcommand{\DOCH}{%
ulalume3@11:     \settowidth{\px}{\CNV\FmN{\@chapapp}}
ulalume3@11:     \addtolength{\px}{2pt}
ulalume3@11:     \settoheight{\py}{\CNV\FmN{\@chapapp}}
ulalume3@11:     \addtolength{\py}{1pt}
ulalume3@11: 
ulalume3@11:     \settowidth{\mylen}{\CNV\FmN{\@chapapp}\space\CNoV\thechapter}
ulalume3@11:     \addtolength{\mylen}{1pt}
ulalume3@11:     \settowidth{\pxx}{\CNoV\thechapter}
ulalume3@11:     \addtolength{\pxx}{-1pt}
ulalume3@11: 
ulalume3@11:     \settoheight{\pyy}{\CNoV\thechapter}
ulalume3@11:     \addtolength{\pyy}{-2pt}
ulalume3@11:     \setlength{\myhi}{\pyy}
ulalume3@11:     \addtolength{\myhi}{-1\py}
ulalume3@11:     \par
ulalume3@11:     \parbox[b]{\textwidth}{%
ulalume3@11:     \rule[\py]{\RW}{\myhi}%
ulalume3@11:     \hskip -\RW%
ulalume3@11:     \rule[\pyy]{\px}{\RW}%
ulalume3@11:     \hskip -\px%
ulalume3@11:     \raggedright%
ulalume3@11:     \CNV\FmN{\@chapapp}\space\CNoV\thechapter%
ulalume3@11:     \hskip1pt%
ulalume3@11:     \mghrulefill{\RW}%
ulalume3@11:     \rule{\RW}{\pyy}\par\nobreak%
ulalume3@11:     \vskip -\baselineskip%
ulalume3@11:     \vskip -\pyy%
ulalume3@11:     \hskip \mylen%
ulalume3@11:     \mghrulefill{\RW}\par\nobreak%
ulalume3@11:     \vskip \pyy}%
ulalume3@11:     \vskip 20\p@}
ulalume3@11:  
ulalume3@11: 
ulalume3@11:   \renewcommand{\DOTI}[1]{%
ulalume3@11:     \raggedright
ulalume3@11:     \CTV\FmTi{#1}\par\nobreak
ulalume3@11:     \vskip 40\p@}
ulalume3@11: 
ulalume3@11:   \renewcommand{\DOTIS}[1]{%
ulalume3@11:     \raggedright
ulalume3@11:     \CTV\FmTi{#1}\par\nobreak
ulalume3@11:     \vskip 40\p@}
ulalume3@11:  }
ulalume3@11: 
ulalume3@11: %%%%%% Peter Osbornes' version of LENNY DEF
ulalume3@11: 
ulalume3@11: \DeclareOption{PetersLenny}{%
ulalume3@11: 
ulalume3@11: % five new lengths 
ulalume3@11: \newlength{\bl}                           %  bottom left   : orig \space
ulalume3@11: \setlength{\bl}{6pt}
ulalume3@11: \newcommand{\BL}[1]{\setlength{\bl}{#1}}
ulalume3@11: \newlength{\br}                           %  bottom right  : orig 1pt
ulalume3@11: \setlength{\br}{1pt}
ulalume3@11: \newcommand{\BR}[1]{\setlength{\br}{#1}}
ulalume3@11: \newlength{\tl}                           %  top left      : orig 2pt
ulalume3@11: \setlength{\tl}{2pt}
ulalume3@11: \newcommand{\TL}[1]{\setlength{\tl}{#1}}
ulalume3@11: \newlength{\trr}                           %  top right      :orig 1pt 
ulalume3@11: \setlength{\trr}{1pt}
ulalume3@11: \newcommand{\TR}[1]{\setlength{\trr}{#1}}
ulalume3@11: \newlength{\blrule}                           %  top right      :orig 1pt 
ulalume3@11: \setlength{\trr}{0pt}
ulalume3@11: \newcommand{\BLrule}[1]{\setlength{\blrule}{#1}}
ulalume3@11: 
ulalume3@11: 
ulalume3@11:   \ChNameVar{\fontsize{14}{16}\usefont{OT1}{phv}{m}{n}\selectfont}
ulalume3@11:   \ChNumVar{\fontsize{60}{62}\usefont{OT1}{ptm}{m}{n}\selectfont}
ulalume3@11:   \ChTitleVar{\Huge\bfseries\rm}
ulalume3@11:   \ChRuleWidth{1pt}
ulalume3@11: \renewcommand{\DOCH}{%
ulalume3@11: 
ulalume3@11: 
ulalume3@11: %%%%%%%                                   tweaks for 1--9 and A--Z
ulalume3@11: \ifcase\c@chapter\relax%
ulalume3@11: \or\BL{-3pt}\TL{-4pt}\BR{0pt}\TR{-6pt}%1
ulalume3@11: \or\BL{0pt}\TL{-4pt}\BR{2pt}\TR{-4pt}%2
ulalume3@11: \or\BL{0pt}\TL{-4pt}\BR{2pt}\TR{-4pt}%3
ulalume3@11: \or\BL{0pt}\TL{5pt}\BR{2pt}\TR{-4pt}%4
ulalume3@11: \or\BL{0pt}\TL{3pt}\BR{2pt}\TR{-4pt}%5
ulalume3@11: \or\BL{-1pt}\TL{0pt}\BR{2pt}\TR{-2pt}%6
ulalume3@11: \or\BL{0pt}\TL{-3pt}\BR{2pt}\TR{-2pt}%7
ulalume3@11: \or\BL{0pt}\TL{-3pt}\BR{2pt}\TR{-2pt}%8
ulalume3@11: \or\BL{0pt}\TL{-3pt}\BR{-4pt}\TR{-2pt}%9
ulalume3@11: \or\BL{-3pt}\TL{-3pt}\BR{2pt}\TR{-7pt}%10
ulalume3@11: \or\BL{-6pt}\TL{-6pt}\BR{0pt}\TR{-9pt}%11
ulalume3@11: \or\BL{-6pt}\TL{-6pt}\BR{2pt}\TR{-7pt}%12
ulalume3@11: \or\BL{-5pt}\TL{-5pt}\BR{0pt}\TR{-9pt}%13
ulalume3@11: \or\BL{-6pt}\TL{-6pt}\BR{0pt}\TR{-9pt}%14
ulalume3@11: \or\BL{-3pt}\TL{-3pt}\BR{3pt}\TR{-6pt}%15
ulalume3@11: \or\BL{-3pt}\TL{-3pt}\BR{3pt}\TR{-6pt}%16
ulalume3@11: \or\BL{-5pt}\TL{-3pt}\BR{-8pt}\TR{-6pt}%17
ulalume3@11: \or\BL{-5pt}\TL{-5pt}\BR{0pt}\TR{-9pt}%18
ulalume3@11: \or\BL{-3pt}\TL{-3pt}\BR{-6pt}\TR{-9pt}%19
ulalume3@11: \or\BL{0pt}\TL{0pt}\BR{0pt}\TR{-5pt}%20
ulalume3@11: \fi
ulalume3@11: 
ulalume3@11: \ifinapp\ifcase\c@chapter\relax%
ulalume3@11: \or\BL{0pt}\TL{14pt}\BR{5pt}\TR{-19pt}%A
ulalume3@11: \or\BL{0pt}\TL{-5pt}\BR{-3pt}\TR{-8pt}%B
ulalume3@11: \or\BL{-3pt}\TL{-2pt}\BR{1pt}\TR{-6pt}\BLrule{0pt}%C
ulalume3@11: \or\BL{0pt}\TL{-5pt}\BR{-3pt}\TR{-8pt}\BLrule{0pt}%D
ulalume3@11: \or\BL{0pt}\TL{-5pt}\BR{2pt}\TR{-3pt}%E
ulalume3@11: \or\BL{0pt}\TL{-5pt}\BR{-10pt}\TR{-1pt}%F
ulalume3@11: \or\BL{-3pt}\TL{0pt}\BR{0pt}\TR{-7pt}%G
ulalume3@11: \or\BL{0pt}\TL{-5pt}\BR{3pt}\TR{-1pt}%H
ulalume3@11: \or\BL{0pt}\TL{-5pt}\BR{3pt}\TR{-1pt}%I
ulalume3@11: \or\BL{2pt}\TL{0pt}\BR{-3pt}\TR{1pt}%J
ulalume3@11: \or\BL{0pt}\TL{-5pt}\BR{3pt}\TR{-1pt}%K
ulalume3@11: \or\BL{0pt}\TL{-5pt}\BR{2pt}\TR{-19pt}%L
ulalume3@11: \or\BL{0pt}\TL{-5pt}\BR{3pt}\TR{-1pt}%M
ulalume3@11: \or\BL{0pt}\TL{-5pt}\BR{-2pt}\TR{-1pt}%N
ulalume3@11: \or\BL{-3pt}\TL{-2pt}\BR{-3pt}\TR{-11pt}%O
ulalume3@11: \or\BL{0pt}\TL{-5pt}\BR{-9pt}\TR{-3pt}%P
ulalume3@11: \or\BL{-3pt}\TL{-2pt}\BR{-3pt}\TR{-11pt}%Q
ulalume3@11: \or\BL{0pt}\TL{-5pt}\BR{4pt}\TR{-8pt}%R
ulalume3@11: \or\BL{-2pt}\TL{-2pt}\BR{-2pt}\TR{-7pt}%S
ulalume3@11: \or\BL{-3pt}\TL{0pt}\BR{-5pt}\TR{4pt}\BLrule{8pt}%T
ulalume3@11: \or\BL{-7pt}\TL{-11pt}\BR{-5pt}\TR{-7pt}\BLrule{0pt}%U
ulalume3@11: \or\BL{-14pt}\TL{-5pt}\BR{-14pt}\TR{-1pt}\BLrule{14pt}%V
ulalume3@11: \or\BL{-10pt}\TL{-9pt}\BR{-13pt}\TR{-3pt}\BLrule{7pt}%W
ulalume3@11: \or\BL{0pt}\TL{-5pt}\BR{3pt}\TR{-1pt}\BLrule{0pt}%X
ulalume3@11: \or\BL{-6pt}\TL{-4pt}\BR{-7pt}\TR{1pt}\BLrule{7pt}%Y
ulalume3@11: \or\BL{0pt}\TL{-5pt}\BR{3pt}\TR{-1pt}\BLrule{0pt}%Z
ulalume3@11: \fi\fi
ulalume3@11: %%%%%%%
ulalume3@11:     \settowidth{\px}{\CNV\FmN{\@chapapp}}
ulalume3@11:     \addtolength{\px}{\tl}        %MOD change 2pt to \tl
ulalume3@11:     \settoheight{\py}{\CNV\FmN{\@chapapp}}
ulalume3@11:     \addtolength{\py}{1pt}
ulalume3@11: 
ulalume3@11:     \settowidth{\mylen}{\CNV\FmN{\@chapapp}\space\CNoV\thechapter}
ulalume3@11:     \addtolength{\mylen}{\trr}% MOD change 1pt to \tr
ulalume3@11:     \settowidth{\pxx}{\CNoV\thechapter}
ulalume3@11:     \addtolength{\pxx}{-1pt}
ulalume3@11: 
ulalume3@11:     \settoheight{\pyy}{\CNoV\thechapter}
ulalume3@11:     \addtolength{\pyy}{-2pt}
ulalume3@11:     \setlength{\myhi}{\pyy}
ulalume3@11:     \addtolength{\myhi}{-1\py}
ulalume3@11:     \par
ulalume3@11:     \parbox[b]{\textwidth}{%
ulalume3@11:     \rule[\py]{\RW}{\myhi}%
ulalume3@11:     \hskip -\RW%
ulalume3@11:     \rule[\pyy]{\px}{\RW}% 
ulalume3@11:     \hskip -\px%
ulalume3@11:     \raggedright%
ulalume3@11:     \CNV\FmN{\@chapapp}\rule{\blrule}{\RW}\hskip\bl\CNoV\thechapter%MOD 
ulalume3@11: %    \CNV\FmN{\@chapapp}\space\CNoV\thechapter                     %ORIGINAL
ulalume3@11:     \hskip\br%                           %MOD 1pt to \br
ulalume3@11:     \mghrulefill{\RW}% 
ulalume3@11:     \rule{\RW}{\pyy}\par\nobreak% 
ulalume3@11:     \vskip -\baselineskip%
ulalume3@11:     \vskip -\pyy%
ulalume3@11:     \hskip \mylen%
ulalume3@11:     \mghrulefill{\RW}\par\nobreak%
ulalume3@11:     \vskip \pyy}%
ulalume3@11:     \vskip 20\p@}
ulalume3@11:  
ulalume3@11: 
ulalume3@11:   \renewcommand{\DOTI}[1]{%
ulalume3@11:     \raggedright
ulalume3@11:     \CTV\FmTi{#1}\par\nobreak
ulalume3@11:     \vskip 40\p@}
ulalume3@11: 
ulalume3@11:   \renewcommand{\DOTIS}[1]{%
ulalume3@11:     \raggedright
ulalume3@11:     \CTV\FmTi{#1}\par\nobreak
ulalume3@11:     \vskip 40\p@}
ulalume3@11:  }
ulalume3@11: 
ulalume3@11: 
ulalume3@11: %
ulalume3@11: 
ulalume3@11: 
ulalume3@11: %%%%%% BJORNSTRUP DEF
ulalume3@11: 
ulalume3@11: \DeclareOption{Bjornstrup}{%
ulalume3@11:   \usecolortrue
ulalume3@11:   % pzc (Zapf Chancelery) is nice.  ppl (Palatino) is cool too.
ulalume3@11:   \ChNumVar{\fontsize{76}{80}\usefont{OT1}{pzc}{m}{n}\selectfont}
ulalume3@11:   \ChTitleVar{\raggedleft\Large\sffamily\bfseries}
ulalume3@11: 
ulalume3@11:   \setlength{\myhi}{10pt}         % Space between grey box border and text
ulalume3@11:   \setlength{\mylen}{\textwidth}
ulalume3@11:   \addtolength{\mylen}{-2\myhi}
ulalume3@11:   \renewcommand{\DOCH}{%
ulalume3@11:     \settowidth{\py}{\CNoV\thechapter}
ulalume3@11:     \addtolength{\py}{-10pt}      % Amount of space by which the
ulalume3@11: %                                  % number is shifted right
ulalume3@11:     \fboxsep=0pt%
ulalume3@11:     \colorbox[gray]{.85}{\rule{0pt}{40pt}\parbox[b]{\textwidth}{\hfill}}%
ulalume3@11:     \kern-\py\raise20pt%
ulalume3@11:     \hbox{\color[gray]{.5}\CNoV\thechapter}\\%
ulalume3@11:   }
ulalume3@11:   
ulalume3@11:   \renewcommand{\DOTI}[1]{%
ulalume3@11:     \nointerlineskip\raggedright%
ulalume3@11:     \fboxsep=\myhi%
ulalume3@11:     \vskip-1ex%
ulalume3@11:     \colorbox[gray]{.85}{\parbox[t]{\mylen}{\CTV\FmTi{#1}}}\par\nobreak%
ulalume3@11:     \vskip 40\p@%
ulalume3@11:   }
ulalume3@11: 
ulalume3@11:   \renewcommand{\DOTIS}[1]{%
ulalume3@11:     \fboxsep=0pt
ulalume3@11:     \colorbox[gray]{.85}{\rule{0pt}{40pt}\parbox[b]{\textwidth}{\hfill}}\\%
ulalume3@11:     \nointerlineskip\raggedright%
ulalume3@11:     \fboxsep=\myhi%
ulalume3@11:     \colorbox[gray]{.85}{\parbox[t]{\mylen}{\CTV\FmTi{#1}}}\par\nobreak%
ulalume3@11:     \vskip 40\p@%
ulalume3@11:   }
ulalume3@11: }
ulalume3@11: 
ulalume3@11: 
ulalume3@11: %%%%%%% GLENN DEF
ulalume3@11: 
ulalume3@11: 
ulalume3@11: \DeclareOption{Glenn}{%
ulalume3@11:   \ChNameVar{\bfseries\Large\sf}
ulalume3@11:   \ChNumVar{\Huge}
ulalume3@11:   \ChTitleVar{\bfseries\Large\rm}
ulalume3@11:   \ChRuleWidth{1pt}
ulalume3@11:   \ChNameUpperCase
ulalume3@11:   \ChTitleUpperCase
ulalume3@11:   \renewcommand{\DOCH}{%
ulalume3@11:     \settoheight{\myhi}{\CTV\FmTi{Test}}
ulalume3@11:     \setlength{\py}{\baselineskip}
ulalume3@11:     \addtolength{\py}{\RW}
ulalume3@11:     \addtolength{\py}{\myhi}
ulalume3@11:     \setlength{\pyy}{\py}
ulalume3@11:     \addtolength{\pyy}{-1\RW}
ulalume3@11:      
ulalume3@11:     \raggedright
ulalume3@11:     \CNV\FmN{\@chapapp}\space\CNoV\thechapter
ulalume3@11:     \hskip 3pt\mghrulefill{\RW}\rule[-1\pyy]{2\RW}{\py}\par\nobreak}
ulalume3@11: 
ulalume3@11:   \renewcommand{\DOTI}[1]{%
ulalume3@11:     \addtolength{\pyy}{-4pt}
ulalume3@11:     \settoheight{\myhi}{\CTV\FmTi{#1}}
ulalume3@11:     \addtolength{\myhi}{\py}
ulalume3@11:     \addtolength{\myhi}{-1\RW}
ulalume3@11:     \vskip -1\pyy
ulalume3@11:     \rule{2\RW}{\myhi}\mghrulefill{\RW}\hskip 2pt
ulalume3@11:     \raggedleft\CTV\FmTi{#1}\par\nobreak
ulalume3@11:     \vskip 80\p@}
ulalume3@11: 
ulalume3@11: \newlength{\backskip}
ulalume3@11:   \renewcommand{\DOTIS}[1]{%
ulalume3@11: %    \setlength{\py}{10pt}
ulalume3@11: %    \setlength{\pyy}{\py}
ulalume3@11: %    \addtolength{\pyy}{\RW}
ulalume3@11: %    \setlength{\myhi}{\baselineskip}
ulalume3@11: %    \addtolength{\myhi}{\pyy}
ulalume3@11: %    \mghrulefill{\RW}\rule[-1\py]{2\RW}{\pyy}\par\nobreak
ulalume3@11: %    \addtolength{}{}
ulalume3@11: %\vskip -1\baselineskip
ulalume3@11: %    \rule{2\RW}{\myhi}\mghrulefill{\RW}\hskip 2pt
ulalume3@11: %    \raggedleft\CTV\FmTi{#1}\par\nobreak
ulalume3@11: %    \vskip 60\p@}
ulalume3@11: %% Fix suggested by Tomas Lundberg
ulalume3@11:     \setlength{\py}{25pt}  % eller vad man vill
ulalume3@11:     \setlength{\pyy}{\py}
ulalume3@11:     \setlength{\backskip}{\py}
ulalume3@11:     \addtolength{\backskip}{2pt}
ulalume3@11:     \addtolength{\pyy}{\RW}
ulalume3@11:     \setlength{\myhi}{\baselineskip}
ulalume3@11:     \addtolength{\myhi}{\pyy}
ulalume3@11:     \mghrulefill{\RW}\rule[-1\py]{2\RW}{\pyy}\par\nobreak
ulalume3@11:     \vskip -1\backskip
ulalume3@11:     \rule{2\RW}{\myhi}\mghrulefill{\RW}\hskip 3pt %
ulalume3@11:     \raggedleft\CTV\FmTi{#1}\par\nobreak
ulalume3@11:     \vskip 40\p@}
ulalume3@11:  }
ulalume3@11: 
ulalume3@11: %%%%%%% CONNY DEF
ulalume3@11: 
ulalume3@11: \DeclareOption{Conny}{%
ulalume3@11:   \ChNameUpperCase
ulalume3@11:   \ChTitleUpperCase  
ulalume3@11:   \ChNameVar{\centering\Huge\rm\bfseries}
ulalume3@11:   \ChNumVar{\Huge}
ulalume3@11:   \ChTitleVar{\centering\Huge\rm}
ulalume3@11:   \ChRuleWidth{2pt}
ulalume3@11: 
ulalume3@11:   \renewcommand{\DOCH}{%
ulalume3@11:     \mghrulefill{3\RW}\par\nobreak
ulalume3@11:     \vskip -0.5\baselineskip
ulalume3@11:     \mghrulefill{\RW}\par\nobreak
ulalume3@11:     \CNV\FmN{\@chapapp}\space \CNoV\thechapter
ulalume3@11:     \par\nobreak
ulalume3@11:     \vskip -0.5\baselineskip
ulalume3@11:    }
ulalume3@11:   \renewcommand{\DOTI}[1]{%
ulalume3@11:     \mghrulefill{\RW}\par\nobreak
ulalume3@11:     \CTV\FmTi{#1}\par\nobreak
ulalume3@11:     \vskip 60\p@
ulalume3@11:     }
ulalume3@11:   \renewcommand{\DOTIS}[1]{%
ulalume3@11:     \mghrulefill{\RW}\par\nobreak
ulalume3@11:     \CTV\FmTi{#1}\par\nobreak
ulalume3@11:     \vskip 60\p@
ulalume3@11:     }
ulalume3@11:   }
ulalume3@11: 
ulalume3@11: %%%%%%% REJNE DEF
ulalume3@11: 
ulalume3@11: \DeclareOption{Rejne}{%
ulalume3@11: 
ulalume3@11:   \ChNameUpperCase
ulalume3@11:   \ChTitleUpperCase  
ulalume3@11:   \ChNameVar{\centering\Large\rm}
ulalume3@11:   \ChNumVar{\Huge}
ulalume3@11:   \ChTitleVar{\centering\Huge\rm}
ulalume3@11:   \ChRuleWidth{1pt}
ulalume3@11:   \renewcommand{\DOCH}{%
ulalume3@11:     \settoheight{\py}{\CNoV\thechapter}
ulalume3@11:     \parskip=0pt plus 1pt % Set parskip to default, just in case v1.31
ulalume3@11:     \addtolength{\py}{-1pt}
ulalume3@11:     \CNV\FmN{\@chapapp}\par\nobreak
ulalume3@11:     \vskip 20\p@
ulalume3@11:     \setlength{\myhi}{2\baselineskip}
ulalume3@11:     \setlength{\px}{\myhi}
ulalume3@11:     \addtolength{\px}{-1\RW}
ulalume3@11:     \rule[-1\px]{\RW}{\myhi}\mghrulefill{\RW}\hskip
ulalume3@11:     10pt\raisebox{-0.5\py}{\CNoV\thechapter}\hskip 10pt\mghrulefill{\RW}\rule[-1\px]{\RW}{\myhi}\par\nobreak
ulalume3@11:      \vskip -3\p@% Added -2pt vskip to correct for streched text v1.31
ulalume3@11:     }
ulalume3@11:   \renewcommand{\DOTI}[1]{%
ulalume3@11:     \setlength{\mylen}{\textwidth}
ulalume3@11:     \parskip=0pt plus 1pt % Set parskip to default, just in case v1.31
ulalume3@11:     \addtolength{\mylen}{-2\RW}
ulalume3@11:     {\vrule width\RW}\parbox{\mylen}{\CTV\FmTi{#1}}{\vrule width\RW}\par\nobreak%
ulalume3@11:     \vskip -3pt\rule{\RW}{2\baselineskip}\mghrulefill{\RW}\rule{\RW}{2\baselineskip}%
ulalume3@11:     \vskip 60\p@% Added -2pt in vskip to correct for streched text v1.31
ulalume3@11:     }
ulalume3@11:   \renewcommand{\DOTIS}[1]{%
ulalume3@11:     \setlength{\py}{\fboxrule}
ulalume3@11:     \setlength{\fboxrule}{\RW}
ulalume3@11:     \setlength{\mylen}{\textwidth}
ulalume3@11:     \addtolength{\mylen}{-2\RW}
ulalume3@11:     \fbox{\parbox{\mylen}{\vskip 2\baselineskip\CTV\FmTi{#1}\par\nobreak\vskip \baselineskip}} 
ulalume3@11:     \setlength{\fboxrule}{\py}
ulalume3@11:     \vskip 60\p@
ulalume3@11:     }
ulalume3@11:   }
ulalume3@11: 
ulalume3@11: 
ulalume3@11: %%%%%%% BJARNE DEF
ulalume3@11: 
ulalume3@11: \DeclareOption{Bjarne}{%
ulalume3@11:   \ChNameUpperCase
ulalume3@11:   \ChTitleUpperCase  
ulalume3@11:   \ChNameVar{\raggedleft\normalsize\rm}
ulalume3@11:   \ChNumVar{\raggedleft \bfseries\Large}
ulalume3@11:   \ChTitleVar{\raggedleft \Large\rm}
ulalume3@11:   \ChRuleWidth{1pt}
ulalume3@11: 
ulalume3@11: 
ulalume3@11: %% Note thechapter -> c@chapter fix appendix bug
ulalume3@11: %% Fixed misspelled 12
ulalume3@11: 
ulalume3@11:   \newcounter{AlphaCnt}
ulalume3@11:   \newcounter{AlphaDecCnt}
ulalume3@11:   \newcommand{\AlphaNo}{%
ulalume3@11:     \ifcase\number\theAlphaCnt
ulalume3@11:       \ifnum\c@chapter=0
ulalume3@11:         ZERO\else{}\fi
ulalume3@11:     \or ONE\or TWO\or THREE\or FOUR\or FIVE
ulalume3@11:     \or SIX\or SEVEN\or EIGHT\or NINE\or TEN
ulalume3@11:     \or ELEVEN\or TWELVE\or THIRTEEN\or FOURTEEN\or FIFTEEN
ulalume3@11:     \or SIXTEEN\or SEVENTEEN\or EIGHTEEN\or NINETEEN\fi
ulalume3@11: }
ulalume3@11: 
ulalume3@11:   \newcommand{\AlphaDecNo}{%
ulalume3@11:     \setcounter{AlphaDecCnt}{0}
ulalume3@11:     \@whilenum\number\theAlphaCnt>0\do
ulalume3@11:       {\addtocounter{AlphaCnt}{-10}
ulalume3@11:        \addtocounter{AlphaDecCnt}{1}}
ulalume3@11:      \ifnum\number\theAlphaCnt=0
ulalume3@11:      \else
ulalume3@11:        \addtocounter{AlphaDecCnt}{-1}
ulalume3@11:        \addtocounter{AlphaCnt}{10}
ulalume3@11:      \fi
ulalume3@11:      
ulalume3@11:      
ulalume3@11:     \ifcase\number\theAlphaDecCnt\or TEN\or TWENTY\or THIRTY\or
ulalume3@11:     FORTY\or FIFTY\or SIXTY\or SEVENTY\or EIGHTY\or NINETY\fi
ulalume3@11:     }
ulalume3@11:   \newcommand{\TheAlphaChapter}{%
ulalume3@11:     
ulalume3@11:     \ifinapp 
ulalume3@11:       \thechapter
ulalume3@11:     \else
ulalume3@11:       \setcounter{AlphaCnt}{\c@chapter}
ulalume3@11:       \ifnum\c@chapter<20
ulalume3@11:         \AlphaNo
ulalume3@11:       \else
ulalume3@11:         \AlphaDecNo\AlphaNo
ulalume3@11:       \fi
ulalume3@11:     \fi
ulalume3@11:     }  
ulalume3@11:   \renewcommand{\DOCH}{%
ulalume3@11:     \mghrulefill{\RW}\par\nobreak
ulalume3@11:     \CNV\FmN{\@chapapp}\par\nobreak 
ulalume3@11:     \CNoV\TheAlphaChapter\par\nobreak
ulalume3@11:     \vskip -1\baselineskip\vskip 5pt\mghrulefill{\RW}\par\nobreak
ulalume3@11:     \vskip 20\p@
ulalume3@11:     }
ulalume3@11:   \renewcommand{\DOTI}[1]{%
ulalume3@11:     \CTV\FmTi{#1}\par\nobreak
ulalume3@11:     \vskip 40\p@
ulalume3@11:     }
ulalume3@11:   \renewcommand{\DOTIS}[1]{%
ulalume3@11:     \CTV\FmTi{#1}\par\nobreak
ulalume3@11:     \vskip 40\p@
ulalume3@11:     }
ulalume3@11: }
ulalume3@11: 
ulalume3@11: \DeclareOption*{%
ulalume3@11:   \PackageWarning{fancychapter}{unknown style option}
ulalume3@11:   }
ulalume3@11: 
ulalume3@11: \ProcessOptions* \relax
ulalume3@11: 
ulalume3@11: \ifusecolor
ulalume3@11:   \RequirePackage{color} 
ulalume3@11: \fi
ulalume3@11: \def\@makechapterhead#1{%
ulalume3@11:   \vspace*{50\p@}%
ulalume3@11:   {\parindent \z@ \raggedright \normalfont
ulalume3@11:     \ifnum \c@secnumdepth >\m@ne
ulalume3@11:       \if@mainmatter%%%%% Fix for frontmatter, mainmatter, and backmatter 040920
ulalume3@11:         \DOCH
ulalume3@11:       \fi
ulalume3@11:     \fi
ulalume3@11:     \interlinepenalty\@M
ulalume3@11:     \if@mainmatter%%%%% Fix for frontmatter, mainmatter, and backmatter 060424
ulalume3@11:       \DOTI{#1}%
ulalume3@11:     \else%
ulalume3@11:       \DOTIS{#1}%
ulalume3@11:     \fi
ulalume3@11:   }}
ulalume3@11: 
ulalume3@11: 
ulalume3@11: %%% Begin: To avoid problem with scrbook.cls (fncychap version 1.32)
ulalume3@11: 
ulalume3@11: %%OUT:
ulalume3@11: %\def\@schapter#1{\if@twocolumn
ulalume3@11: %                   \@topnewpage[\@makeschapterhead{#1}]%
ulalume3@11: %                 \else
ulalume3@11: %                   \@makeschapterhead{#1}%
ulalume3@11: %                   \@afterheading
ulalume3@11: %                 \fi}
ulalume3@11: 
ulalume3@11: %%IN:
ulalume3@11: \def\@schapter#1{%
ulalume3@11: \if@twocolumn%
ulalume3@11:   \@makeschapterhead{#1}%
ulalume3@11: \else%
ulalume3@11:   \@makeschapterhead{#1}%
ulalume3@11:   \@afterheading%
ulalume3@11: \fi}
ulalume3@11: 
ulalume3@11: %%% End: To avoid problem with scrbook.cls (fncychap version 1.32)
ulalume3@11: 
ulalume3@11: \def\@makeschapterhead#1{%
ulalume3@11:   \vspace*{50\p@}%
ulalume3@11:   {\parindent \z@ \raggedright
ulalume3@11:     \normalfont
ulalume3@11:     \interlinepenalty\@M
ulalume3@11:     \DOTIS{#1}
ulalume3@11:     \vskip 40\p@
ulalume3@11:   }}
ulalume3@11: 
ulalume3@11: \endinput
ulalume3@11: 
ulalume3@11: 




