blob: f477eede84c4db200370d8150768c6d44ce04453 (
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
159
160
161
|
%%
%% This is file `genmpage.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% genmpage.dtx (with options: `package')
%%
%% IMPORTANT NOTICE:
%%
%% For the copyright see the source file.
%%
%% Any modified versions of this file must be renamed
%% with new filenames distinct from genmpage.sty.
%%
%% For distribution of the original source see the terms
%% for copying and modification in the file genmpage.dtx.
%%
%% This generated file may be distributed as long as the
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%%
%%
%% Copyright (C) 2001-2006 Thomas Lotze
%%
%% This file 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.3c or, at your option, any later
%% version.
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{genmpage}[2006/09/16 Generalized minipage environment (Thomas Lotze)]
\RequirePackage{keyval}
\newlength\@GenMPparindent
\def\@iiiminipage#1#2[#3]#4{%
\@ifnextchar[%
{\@ivminipage{#1}{#2}{#3}{#4}}
{\@ivminipage{#1}{#2}{#3}{#4}[]}}
\def\@ivminipage#1#2#3#4[#5]{%
\setkeys{GenMP}{plain,#5}%
\if@GenMPwidth\else\@GenMPwidth#4\fi
\if@GenMPheight\else
\def\@GenMPtempa{#2}\def\@GenMPtempb{\relax}%
\ifx\@GenMPtempa\@GenMPtempb%
\let\@GenMPheight=\relax
\else
\def\@GenMPheight{#2}%
\fi
\fi
\if@GenMPouter\else\def\@GenMPouter{#1}\fi%
\if@GenMPinner\else\def\@GenMPinner{#3}\fi%
\@GenMPparindent\parindent
\leavevmode
\@pboxswfalse
\@tempdima\@GenMPwidth
\def\@mpargs{{\@GenMPouter}{\@GenMPheight}[\@GenMPinner]{\@GenMPwidth}}%
\setbox\@tempboxa\vbox\bgroup
\color@begingroup
\hsize\@tempdima
\textwidth\hsize \columnwidth\hsize
\@parboxrestore
\def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@
\let\@footnotetext\@mpfootnotetext
\let\@listdepth\@mplistdepth \@mplistdepth\z@
\@minipagerestore
\@setminipage}
\def\@setminipage{%
\@minipagetrue
\@GenMPtop
\@GenMPflush
\@GenMPresetfont
\@GenMPffamily\@GenMPfseries\@GenMPfshape\selectfont
\@GenMPfsize
\@GenMPsetpi
\everypar{\@minipagefalse\everypar{}}}
\let\@GenMPendminipage\endminipage
\def\endminipage{%
\@GenMPbottom
\@GenMPendminipage}
\let\@GenMPflush=\relax
\define@key{GenMP}{flush}[]{\let\@GenMPflush=\relax}
\define@key{GenMP}{raggedright}[]{\let\@GenMPflush=\raggedright}
\define@key{GenMP}{RaggedRight}[]{\let\@GenMPflush=\RaggedRight}
\define@key{GenMP}{raggedleft}[]{\let\@GenMPflush=\raggedleft}
\define@key{GenMP}{center}[]{\let\@GenMPflush=\centering}
\let\@GenMPffamily=\relax
\let\@GenMPfseries=\relax
\let\@GenMPfshape=\relax
\let\@GenMPresetfont=\relax
\let\@GenMPfsize=\relax
\define@key{GenMP}{ffamily}{\def\@GenMPffamily{\fontfamily{#1}}}
\define@key{GenMP}{fseries}{\def\@GenMPfseries{\fontseries{#1}}}
\define@key{GenMP}{fshape}{\def\@GenMPfshape{\fontshape{#1}}}
\define@key{GenMP}{resetfont}[true]{%
\def\@GenMPread{#1}\def\@GenMPtempa{true}%
\ifx\@GenMPread\@GenMPtempa%
\let\@GenMPresetfont=\normalfont
\else
\let\@GenMPresetfont=\relax
\fi}
\define@key{GenMP}{fsize}{\def\@GenMPfsize{\csname #1\endcsname}}
\let\@GenMPsetpi=\relax
\define@key{GenMP}{keepparindent}[true]{%
\def\@GenMPread{#1}\def\@GenMPtempa{true}%
\ifx\@GenMPread\@GenMPtempa%
\def\@GenMPsetpi{\parindent\@GenMPparindent}%
\fi}
\define@key{GenMP}{parindent}{\def\@GenMPsetpi{\parindent#1}}
\newlength\@GenMPwidth
\newif\if@GenMPwidth
\let\if@GenMPwidth\iffalse
\define@key{GenMP}{width}{\let\if@GenMPwidth\iftrue\@GenMPwidth#1}
\define@key{GenMP}{widtharg}[]{\let\if@GenMPwidth\iffalse}
\newif\if@GenMPheight
\let\if@GenMPheight\iffalse
\define@key{GenMP}{height}{\let\if@GenMPheight\iftrue\def\@GenMPheight{#1}}
\define@key{GenMP}{heightarg}[]{\let\if@GenMPheight\iffalse}
\newif\if@GenMPouter
\let\if@GenMPouter\iffalse
\let\@GenMPtop=\relax
\let\@GenMPbottom=\relax
\define@key{GenMP}{outer}{%
\def\@GenMPread{#1}\def\@GenMPtempa{T}%
\ifx\@GenMPread\@GenMPtempa%
\def\@GenMPtop{\vspace{0pt}}%
\def\@GenMPouter{t}%
\else
\def\@GenMPtempa{B}%
\ifx\@GenMPread\@GenMPtempa%
\def\@GenMPbottom{\vspace{0pt}}%
\def\@GenMPouter{b}%
\else
\def\@GenMPouter{#1}%
\fi
\fi
\let\if@GenMPouter\iftrue
}
\define@key{GenMP}{outerarg}[]{\let\if@GenMPouter\iffalse}
\newif\if@GenMPinner
\let\if@GenMPinner\iffalse
\define@key{GenMP}{inner}{\let\if@GenMPinner\iftrue\def\@GenMPinner{#1}}
\define@key{GenMP}{innerarg}[]{\let\if@GenMPinner\iffalse}
\def\defineMPstyle#1#2{%
\define@key{GenMP}{#1}[]{\setkeys{GenMP}{#2}}}
\defineMPstyle{plain}{}
\endinput
%%
%% End of file `genmpage.sty'.
|