0% found this document useful (0 votes)
48 views4 pages

The Floatpag Package: Vytas Statulevi Cius and Sigitas Tolu Sis Vytas@vtex - LT, Sigitas@vtex - LT v1.1 From 2012/05/29

The floatpag package provides commands to apply different page styles to pages containing full page floats. The \floatpagestyle command applies a specified page style to all full page float pages. The \rotfloatpagestyle command applies a style to sideways floats produced by the rotating package. The \thisfloatpagestyle command applies a style to the page containing a particular float. The package redefines commands from LaTeX and the rotating package to implement these features.

Uploaded by

Ali Baig
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views4 pages

The Floatpag Package: Vytas Statulevi Cius and Sigitas Tolu Sis Vytas@vtex - LT, Sigitas@vtex - LT v1.1 From 2012/05/29

The floatpag package provides commands to apply different page styles to pages containing full page floats. The \floatpagestyle command applies a specified page style to all full page float pages. The \rotfloatpagestyle command applies a style to sideways floats produced by the rotating package. The \thisfloatpagestyle command applies a style to the page containing a particular float. The package redefines commands from LaTeX and the rotating package to implement these features.

Uploaded by

Ali Baig
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

The floatpag package

Vytas Statulevičius and Sigitas Tolušis


[email protected], [email protected]

v1.1 from 2012/05/29

1 Introduction
Provides commands to apply different pagestyles to the full page floats.

2 Usage
\floatpagestyle {hfooi} will apply pagestyle hfooi to all pages occupied by full page floats.
\rotfloatpagestyle {hfooi} will apply pagestyle hfooi to all pages occupied by sideways figures and
tables produced with the help of rotating package (Sebastian Rahtz and Leonor
Barroca).
\thisfloatpagestyle {hfooi} will apply pagestyle hfooi to a page where this command was used
inside figure or table environment.
Default: \floatpagestyle{headings} and \rotfloatpagestyle{plain}.
The following commands from the LaTeX2e kernel were redefined: \@xfloat,
\@vtryfc.
The following command from the rotating.sty was redefined: \@xrotfloat.

3 Implementation
1 \NeedsTeXFormat{LaTeX2e}
2 \ProvidesPackage{floatpag}
3 [1999/04/29
4 FLOAT PAGESTYLE]
\floatpagestyle
5 \def\floatpagestyle#1{\gdef\at@float@page{\thispagestyle{#1}}}

\rotfloatpagestyle
6 \def\rotfloatpagestyle#1{%
7 \gdef\@r@f@pagestyle{#1}%
8 \gdef\at@rotfloat@page{\thispagestyle{#1}}%
9 }

1
10 \floatpagestyle{headings}
11 \rotfloatpagestyle{plain}

\thisfloatpagestyle
12 \def\thisfloatpagestyle#1{%
13 \expandafter\expandafter\expandafter\gdef\expandafter
14 \csname\number\@currbox @float\endcsname{\thispagestyle{#1}}\relax
15 }

\@xfloat Modify \x@float - ordinary floats


16 \def\@xfloat #1[#2]{%
17 \@nodocument
18 \def \@captype {#1}%
19 \def \@fps {#2}%
20 \@onelevel@sanitize \@fps
21 \def \reserved@b {!}%
22 \ifx \reserved@b \@fps
23 \@fpsadddefault
24 \else
25 \ifx \@fps \@empty
26 \@fpsadddefault
27 \fi
28 \fi
29 \ifhmode
30 \@bsphack
31 \@floatpenalty -\@Mii
32 \else
33 \@floatpenalty-\@Miii
34 \fi
35 \ifinner
36 \@parmoderr\@floatpenalty\z@
37 \else
38 \@next\@currbox\@freelist
39 {%
40 \@tempcnta \sixt@@n
41 \expandafter \@tfor \expandafter \reserved@a
42 \expandafter :\expandafter =\@fps
43 \do
44 {%
45 \if \reserved@a h%
46 \ifodd \@tempcnta
47 \else
48 \advance \@tempcnta \@ne
49 \fi
50 \fi
51 \if \reserved@a t%
52 \@setfpsbit \tw@
53 \fi
54 \if \reserved@a b%

2
55 \@setfpsbit 4%
56 \fi
57 \if \reserved@a p%
58 \@setfpsbit 8%
59 \fi
60 \if \reserved@a !%
61 \ifnum \@tempcnta>15
62 \advance\@tempcnta -\sixt@@n\relax
63 \fi
64 \fi
65 }%
66 \@tempcntb \csname ftype@\@captype \endcsname
67 \multiply \@tempcntb \@xxxii
68 \advance \@tempcnta \@tempcntb
69 \global \count\@currbox \@tempcnta
70 \expandafter\expandafter\expandafter\gdef\expandafter
71 \csname\number\@currbox @float\endcsname{\at@float@page}\relax
72 }%
73 \@fltovf
74 \fi
75 \global \setbox\@currbox
76 \color@vbox
77 \normalcolor
78 \vbox \bgroup
79 \hsize\columnwidth
80 \@parboxrestore
81 \@floatboxreset
82 }

\e@xrotfloat 2e rotating.sty v. 2.10:


83 \def\e@xrotfloat#1[#2]{%
84 \@float{#1}[#2]%
85 \thisfloatpagestyle{\@r@f@pagestyle}%
86 \begin{lrbox}\rot@float@box
87 \begin{minipage}\textheight
88 }

\n@xrotfloat 2.09 rotating.sty v. 1.6


89 \def\n@xrotfloat#1[#2]{%
90 \ifhmode
91 \@bsphack
92 \@floatpenalty -\@Mii
93 \else
94 \@floatpenalty-\@Miii
95 \fi
96 \def\@captype{#1}%
97 \ifinner
98 \@parmoderr\@floatpenalty\z@
99 \else
100 \@next\@currbox\@freelist{\@tempcnta\csname ftype@#1\endcsname

3
101 \multiply\@tempcnta\@xxxii\advance\@tempcnta\sixt@@n
102 \@tfor \@tempa :=#2\do{%
103 \if\@tempa h\advance\@tempcnta \@ne\fi
104 \if\@tempa t\advance\@tempcnta \tw@\fi
105 \if\@tempa b\advance\@tempcnta 4\relax\fi
106 \if\@tempa p\advance\@tempcnta 8\relax\fi
107 }%
108 \global\count\@currbox\@tempcnta
109 }%
110 \@fltovf
111 \fi
112 \expandafter\expandafter\expandafter\gdef\expandafter
113 \csname\number\@currbox @float\endcsname{\at@rotfloat@page}\relax
114 \global\setbox\@currbox\vbox\bgroup
115 \hsize\textheight
116 \@parboxrestore
117 }
Check for rotating version: 2e ar 209: 1999.02.08 To be sure check at begin
document.
118 \AtBeginDocument{%
119 \@ifpackageloaded{rotating}%
120 {\let\@xrotfloat\e@xrotfloat\let\n@xrotfloat\relax}%
121 {\let\@xrotfloat\n@xrotfloat\let\e@xrotfloat\relax}}%

\spec@float ”Hook” in the output procedure.


122 \def\spec@float#1{\expandafter\csname\number#1@float\endcsname
123 \expandafter\expandafter\expandafter\gdef\expandafter\csname\number#1@float\endcsname{}%
124 }

\@vtryfc
125 \def\@vtryfc#1{%
126 \global\setbox\@outputbox\vbox{}%
127 \let\@elt\@wtryfc
128 \@flsucceed
129 \let\@elt\spec@float
130 \@flsucceed
131 \global\setbox\@outputbox \vbox to\@colht{%
132 \vskip \@fptop
133 \vskip -\@fpsep
134 \unvbox \@outputbox
135 \vskip \@fpbot
136 }%
137 \let\@elt\relax
138 \xdef#1{\@failedlist\@flfail}%
139 \xdef\@freelist{\@freelist\@flsucceed}%
140 }

141 %\endinput

You might also like