summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/colophon/colophon.sty
blob: 07d545970540570cf0f62c67b5a62370a5eb1ecf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
%%
%% 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'.