%%
%% This is file `colophon.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% colophon.dtx  (with options: `package')
%% This is a generated file.
%% 
%% This document is copyright 2018 by Donald P. Goodman, and is
%% released publicly under the LaTeX Project Public License.  The
%% distribution and modification of this work is constrained by the
%% conditions of that license.  See
%% http://www.latex-project.org/lppl.txt
%% for the text of the license.  This document is released
%% under version 1.3 of that license, and this work may be distributed
%% or modified under the terms of that license or, at your option, any
%% later version.
%% 
%% This work has the LPPL maintenance status 'maintained'.
%% 
%% The Current Maintainer of this work is Donald P. Goodman
%% (dgoodmaniii@gmail.com).
%% 
%% This work consists of colophon.dtx, colophon.ins, and
%% derived files colophon.sty and colophon.pdf.

\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{colophon}[2018/04/01 v1.1 Support for highly configurable colophons]
\RequirePackage{xkeyval}
\newif\ifclpn@clrpg\clpn@clrpgfalse%
\def\colophonclrpg{\clpn@clrpgtrue}%
\newif\ifclpn@clrdblpg\clpn@clrdblpgtrue%
\def\colophonnoclrblpg{\clpn@clrdblpgfalse}%
\newif\ifclpn@fullpage\clpn@fullpagetrue%
\def\colophonnofullpage{\clpn@fullpagefalse}%
\newif\ifclpn@centertitle\clpn@centertitletrue%
\newif\ifclpn@lefttitle\clpn@lefttitlefalse%
\newif\ifclpn@righttitle\clpn@righttitlefalse%
\def\colophontitlealign#1{%
\ifx#1c%
\clpn@centertitletrue%
\clpn@lefttitlefalse%
\clpn@righttitlefalse%
\fi
\ifx#1l%
\clpn@centertitlefalse%
\clpn@lefttitletrue%
\clpn@righttitlefalse%
\fi
\ifx#1r%
\clpn@centertitlefalse%
\clpn@lefttitlefalse%
\clpn@righttitletrue%
\fi
}%
\newif\ifclpn@nofirstindent\clpn@nofirstindenttrue%
\def\colophonnofirstindent{\clpn@nofirstindentfalse}%
\def\clpn@overspace{0pt}%
\def\colophontopspace#1{\def\clpn@overspace{#1}}%
\def\clpn@underspace{0pt}%
\def\colophonbotspace#1{\def\clpn@underspace{#1}}%
\def\clpn@undertitle{2em}%
\def\colophonmidspace#1{\def\clpn@undertitle{#1}}%
\def\clpn@pagestyle{empty}%
\def\colophonpagestyle#1{\def\clpn@pagestyle{#1}}%
\def\clpn@titleword{Colophon}%
\def\colophontitle#1{\def\clpn@titleword{#1}}%
\def\clpn@titlesty{\scshape}%
\def\colophontitlestyle#1{\def\clpn@titlesty{#1}}%
\def\clpn@titlesize{48pt}%
\def\colophontitlesize#1{\def\clpn@titlesize{#1}}%
\def\clpn@pretitle{}%
\def\colophonpretitlehook#1{\def\clpn@pretitle{#1}}%
\def\clpn@posttitle{}
\def\colophonposttitlehook#1{\def\clpn@posttitle{#1}}%
\def\clpn@parsty{}%
\def\colophonparstyle#1{\def\clpn@parsty{#1}}%
\def\clpn@parsize{15pt}%
\def\colophonparsize#1{\def\clpn@parsize{#1}}%
\def\clpn@parlead{18pt}%
\def\colophonparlead#1{\def\clpn@parlead{#1}}%
\def\clpn@paralign{%
\leftskip=0pt plus.5fil%
\rightskip=0pt plus-.5fil%
\parfillskip=0pt plus1fil%
}%
\def\colophonparalign#1{\def\clpn@paralign{#1}}%
\def\clpn@prepar{}%
\def\colophonpreparhook#1{\def\clpn@prepar{#1}}%
\def\clpn@postpar{}
\def\colophonpostparhook#1{\def\clpn@postpar{#1}}%
\DeclareOptionX{title}{\def\clpn@titleword{#1}}
\DeclareOptionX{titlestyle}{%
\def\clpn@titlesty{\csname#1\endcsname}%
}%
\DeclareOptionX{titlesize}{\def\clpn@titlesize{#1}}
\DeclareOptionX{aftertitle}{\def\clpn@undertitle{#1}}
\DeclareOptionX{titlealign}{\colophontitlealign{#1}}
\DeclareOptionX{parstyle}{%
\def\clpn@parsty{\csname#1\endcsname}%
}%
\DeclareOptionX{parsize}{\def\clpn@parsize{#1}}
\DeclareOptionX{parlead}{\def\clpn@parlead{#1}}
\DeclareOptionX{nofullpage}{\clpn@fullpagefalse}
\DeclareOptionX{noclrdblpg}{\clpn@clrdblpgfalse}
\DeclareOptionX{clrpg}{\clpn@clrpgtrue}
\DeclareOptionX{topspace}{\def\clpn@overspace{#1}}
\DeclareOptionX{botspace}{\def\clpn@underspace{#1}}
\DeclareOptionX{nofirstindent}{\clpn@nofirstindentfalse}
\ProcessOptionsX
\def\colophon{%
\ifclpn@clrdblpg%
\cleardoublepage%
\thispagestyle{\clpn@pagestyle}%
\fi%
\ifclpn@clrpg%
\clearpage%
\thispagestyle{\clpn@pagestyle}%
\fi%
\ifclpn@fullpage%
\vbox to\textheight\bgroup%
\vfil%
\fi%
\vskip\clpn@overspace%
\hbox to\linewidth{%
\ifclpn@centertitle\hfil\fi%
\ifclpn@righttitle\hfil\fi%
\fontsize{\clpn@titlesize}{\clpn@titlesize}\selectfont%
\clpn@titlesty%
\clpn@pretitle%
\clpn@titleword%
\clpn@posttitle%
\ifclpn@lefttitle\hfil\fi%
\ifclpn@centertitle\hfil\fi%
}%
\vskip\clpn@undertitle%
\bgroup%
\clpn@parsty%
\fontsize{\clpn@parsize}{\clpn@parlead}\selectfont%
\clpn@prepar\clpn@paralign%
\ifclpn@nofirstindent%
\@afterindentfalse\@afterheading%
\fi%
}%
\def\endcolophon{%
\clpn@postpar%
\par%
\egroup%
\vskip\clpn@underspace
\ifclpn@fullpage%
\vfil%
\egroup%
\fi
}%
\endinput
%%
%% End of file `colophon.sty'.
