blob: 9dbc540c484f79fc90ed7d778f34b97166006ae9 (
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
|
%% floatpag.sty
%% Copyright 1999 V. Statulevi\v cius
%% VTeX Ltd., Akademijos 4, Vilnius, Lithuania
%% e-mail vytas@vtex.lt
%% http://www.vtex.lt/tex/download/macros/
%%
% This program can redistributed and/or modified under the terms
% of the LaTeX Project Public License Distributed from CTAN
% archives in directory macros/latex/base/lppl.txt; either
% version 1 of the License, or (at your option) any later version.
%
% PURPOSE: provides commands to apply different pagestyles
% to the full page floats.
%
% USAGE:
% \floatpagestyle{foo} will apply pagestyle 'foo' to all pages
% occupied by full page floats.
%
% \rotfloatpagestyle{foo} will apply pagestyle 'foo' to all pages
% occupied by sideways figures and tables
% produced with the help of 'rotating.sty'
% package (Sebastian Rahtz and Leonor Barroca)
%
% \thisfloatpagestyle{foo} will apply pagestyle 'foo' to a page where
% this command was used inside figure or table
% environment
%
% DEFAULT:
% \floatpagestyle{headings}
% \rotfloatpagestyle{plain}
%
% The macros, developed by Sigitas Tolusis <sigitas@vtex.lt>,
% were used in this package.
%
% The following commands from the LaTeX2e kernel were redefined:
% \@xfloat, \@vtryfc
% The following command from the rotating.sty was redefined:
% \@xrotfloat
%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{floatpag}
[1999/04/29
FLOAT PAGESTYLE]
\def\floatpagestyle#1{\gdef\at@float@page{\thispagestyle{#1}}}
\def\rotfloatpagestyle#1{\gdef\@r@f@pagestyle{#1}\gdef\at@rotfloat@page{\thispagestyle{#1}}}
\floatpagestyle{headings}
\rotfloatpagestyle{plain}
%
\def\thisfloatpagestyle#1{%
\expandafter\expandafter\expandafter\gdef\expandafter
\csname\number\@currbox @float\endcsname{\thispagestyle{#1}}\relax}
%
% Perrabibreziame \x@float - paprasti float'ai
\def\@xfloat #1[#2]{%
\@nodocument
\def \@captype {#1}%
\def \@fps {#2}%
\@onelevel@sanitize \@fps
\def \reserved@b {!}%
\ifx \reserved@b \@fps
\@fpsadddefault
\else
\ifx \@fps \@empty
\@fpsadddefault
\fi
\fi
\ifhmode
\@bsphack
\@floatpenalty -\@Mii
\else
\@floatpenalty-\@Miii
\fi
\ifinner
\@parmoderr\@floatpenalty\z@
\else
\@next\@currbox\@freelist
{%
\@tempcnta \sixt@@n
\expandafter \@tfor \expandafter \reserved@a
\expandafter :\expandafter =\@fps
\do
{%
\if \reserved@a h%
\ifodd \@tempcnta
\else
\advance \@tempcnta \@ne
\fi
\fi
\if \reserved@a t%
\@setfpsbit \tw@
\fi
\if \reserved@a b%
\@setfpsbit 4%
\fi
\if \reserved@a p%
\@setfpsbit 8%
\fi
\if \reserved@a !%
\ifnum \@tempcnta>15
\advance\@tempcnta -\sixt@@n\relax
\fi
\fi
}%
\@tempcntb \csname ftype@\@captype \endcsname
\multiply \@tempcntb \@xxxii
\advance \@tempcnta \@tempcntb
\global \count\@currbox \@tempcnta
\expandafter\expandafter\expandafter\gdef\expandafter
\csname\number\@currbox @float\endcsname{\at@float@page}\relax
}%
\@fltovf
\fi
\global \setbox\@currbox
\color@vbox
\normalcolor
\vbox \bgroup
\hsize\columnwidth
\@parboxrestore
\@floatboxreset
}%
%
% 2e rotating.sty v. 2.10:
\def\e@xrotfloat#1[#2]{%
\@float{#1}[#2]%
\thisfloatpagestyle{\@r@f@pagestyle}%
\begin{lrbox}\rot@float@box
\begin{minipage}\textheight
}
% 2.09 rotating.sty v. 1.6
\def\n@xrotfloat#1[#2]{\ifhmode \@bsphack\@floatpenalty -\@Mii\else
\@floatpenalty-\@Miii\fi\def\@captype{#1}\ifinner
\@parmoderr\@floatpenalty\z@
\else\@next\@currbox\@freelist{\@tempcnta\csname ftype@#1\endcsname
\multiply\@tempcnta\@xxxii\advance\@tempcnta\sixt@@n
\@tfor \@tempa :=#2\do
{\if\@tempa h\advance\@tempcnta \@ne\fi
\if\@tempa t\advance\@tempcnta \tw@\fi
\if\@tempa b\advance\@tempcnta 4\relax\fi
\if\@tempa p\advance\@tempcnta 8\relax\fi
}\global\count\@currbox\@tempcnta}\@fltovf\fi
\expandafter\expandafter\expandafter\gdef\expandafter\csname\number\@currbox
@float\endcsname{\at@rotfloat@page}\relax
\global\setbox\@currbox\vbox\bgroup
\hsize\textheight \@parboxrestore
}%
%
% Tikrinam, kokia rotating versija: 2e ar 209:
% 1999.02.08 Tikriname dokumento pradzioje, t.y. neaisku
% kada rotating stilius buvo pakrautas:
\AtBeginDocument{%
\@ifpackageloaded{rotating}%
{\let\@xrotfloat\e@xrotfloat\let\n@xrotfloat\relax}%
{\let\@xrotfloat\n@xrotfloat\let\e@xrotfloat\relax}}%
%
%% "Kablys" output proceduroje ivykdantis komanda
\def\spec@float #1{\expandafter\csname\number#1@float\endcsname
\expandafter\expandafter\expandafter\gdef\expandafter\csname\number#1@float\endcsname{}}
\def\@vtryfc #1{%
\global\setbox\@outputbox\vbox{}%
\let\@elt\@wtryfc
\@flsucceed
\let\@elt\spec@float
\@flsucceed
\global\setbox\@outputbox \vbox to\@colht{%
\vskip \@fptop
\vskip -\@fpsep
\unvbox \@outputbox
\vskip \@fpbot}%
\let\@elt\relax
\xdef #1{\@failedlist\@flfail}%
\xdef\@freelist{\@freelist\@flsucceed}}
\endinput
|