summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex3/xor/xo-here.sty
blob: 9bfb9cd39ca1214887e37efee4d17b1d2db6064e (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
%%
%% This is file `xo-here.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% xo-here.dtx  (with options: `package,progress')
%% 
%% Not for distribution
%% 
%% (C) Copyright 1999-2000 Frank Mittelbach, David Carlisle, Chris Rowley
%% All rights reserved.
%% 
%% Not for general distribution. In its present form it is not allowed
%% to put this package onto CD or an archive without consulting the
%% the authors.
%%
%% (C) Copyright 1999-2000 Frank Mittelbach, David Carlisle, Chris Rowley
%% All rights reserved.
%%
%% Not for general distribution. In its present form it is not allowed
%% to put this package onto CD or an archive without consulting the
%% the authors.
%%
\def\@tempa#1: #2.dtx,v #3 #4 #5 #6 #7${
  \ProvidesPackage{#2}[#4 #3 #5 #6]}
\@tempa$Id: xo-here.dtx,v 1.12 2000/08/11 07:14:21 latex3 Exp $
\IgnoreWhiteSpace
\def\requirespace #1 {
  \ifhmode
    \@bsphack
  \fi
  \@next\@currbox\@freelist{}{}
  \global\toks\@currbox{{}{}
                        {}
                        {}
                        {}
                        {rspace}
                        {}
   }
  \here@point\@currbox{#1}
  \@ignorefalse
  \@esphack
}
\def\marginpar #1 {
  \ifhmode
    \@bsphack
  \fi
  \@next\@currbox\@freelist{}{}
  \@savemarbox\@currbox{#1}
  \global\toks\@currbox{{}{}
                        {}
                        {}
                        {}
                        {mpar}
                        {}
   }
  \@tempdima\ht\@currbox
  \advance\@tempdima\dp\@currbox
  \advance\@tempdima -\baselineskip   % allow to run long
  \ifdim\@tempdima< \z@ \@tempdima\z@ \fi
  \here@point\@currbox{\the\@tempdima}
  \@ignorefalse
  \@esphack
}
\def \typeset@a@marginpar{
 \kern-\pagedepth
 \vtop to\pagedepth{\baselineskip\pagedepth
     \lineskip\z@
     \vss
     \dimen@\dp\@currbox
  \ifnum \curr@col@count = \@ne
     \llap{\copy\@currbox\kern\marginparsep}
  \else
     \ifnum \curr@col@count = \col@count
       \rlap{\kern\columnwidth\kern\marginparsep\copy\@currbox}
     \else
       \ERROR-NOT-SUPPORTED
     \fi
  \fi
  \kern-\dimen@
  \null}
}
\def\check@and@typeset@a@here@float{
  \ifrun@with@floats
    \ifx\here@class\this@class
      \ifnum \this@sequence@number > \here@sequence@number \relax
        \calculate@target@fl@column
        \ifnum \count@ > \curr@col@count
        \else
          \ifnum \count@ = \curr@col@count
            \if t \this@area@type
              \@failtrue
            \fi
          \else
            \@failtrue
          \fi
        \fi
      \fi
    \fi
  \fi
  \if@fail
    \progress@failed{\this@area\space before~here~float~
                 (\here@type\space \here@sequence@number)~
                 in~ column~ \the\curr@col@count}
    \global\curr@col@count\col@count
  \else
    \typeset@a@here@float
  \fi
}
\def \typeset@a@here@float{
 \append@here@caption@to@float
 \ifdim \pagesetup@grid@point@sep = \z@
   \@tempskipa\pagesetup@float@inline@sep
 \else
   \@tempdima\ht\this@captioned@float
   \advance\@tempdima\dp\this@captioned@float
   \advance\@tempdima\tw@\pagesetup@float@inline@sep
   \snap@to@grid \@tempdima  \pagesetup@grid@point@sep
   \ifdim \returned@lower@delta@size < \returned@delta@size \relax
     \ifdim \returned@lower@delta@size < 2\pagesetup@float@inline@shrink
       \xdef \returned@delta@size {-\returned@lower@delta@size }
     \fi
   \fi
   \@tempskipa \returned@delta@size \relax
   \divide  \@tempskipa \tw@
   \advance \@tempskipa \pagesetup@float@inline@sep
 \fi
 \vskip\@tempskipa
 \box\this@captioned@float
 \vskip\@tempskipa
}
\def \setup@here@float {
 \@tempskipa 2\pagesetup@float@inline@sep   %FMi arbitrary value TMP
 \advance\@tempskipa\ht\@currbox      %FMi arbitrary value TMP
 \advance\@tempskipa\dp\@currbox      %FMi arbitrary value TMP
 \advance\@tempskipa5\baselineskip    %FMi arbitrary value TMP
 \here@point\@currbox{\the\@tempskipa}
}
\endinput
%%
%% End of file `xo-here.sty'.