blob: 50dae88a808c33b11d41094250d19b94592dce31 (
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
|
%%
%% This is file `dblfnote-xetex-bidi.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% bidi.dtx (with options: `table,dblfnote-xetex-bidi.def')
%%
%% __________________________________________________
%% Copyright (c) 2009--2019 Vafa Khalighi
%%
%% It may be distributed and/or modified under the LaTeX Project Public License,
%% version 1.3c or higher (your choice). The latest version of
%% this license is at: http://www.latex-project.org/lppl.txt
%%
%% This work is “author-maintained” (as per LPPL maintenance status)
%% by Vafa Khalighi.
%%
%%
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%% Digits \0\1\2\3\4\5\6\7\8\9
%% Exclamation \! Double quote \" Hash (number) \#
%% Dollar \$ Percent \% Ampersand \&
%% Acute accent \' Left paren \( Right paren \)
%% Asterisk \* Plus \+ Comma \,
%% Minus \- Point \. Solidus \/
%% Colon \: Semicolon \; Less than \<
%% Equals \= Greater than \> Question mark \?
%% Commercial at \@ Left bracket \[ Backslash \\
%% Right bracket \] Circumflex \^ Underscore \_
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
\ProvidesFile{dblfnote-xetex-bidi.def}[2012/12/12 v0.3 bidi adaptations for dblfnote package for XeTeX engine]
\let\autofootnoterule\relax
\let\rightfootnoterule\relax
\let\leftfootnoterule\relax
\let\textwidthfootnoterule\relax
\let\LRfootnoterule\relax
\def\footnoterule{\kern-3\p@
\hrule \@width \DFNcolumnwidth \kern 2.6\p@}%
\AtBeginDocument{\let\dfn@latex@footnotetext\@footnotetext
\let\@footnotetext\dfn@footnotetext}
\long\def\dfn@LTRfootnotetext#1{{\setbox\dfn@boxa\vbox{
\let\insert\dfn@gobble
\columnwidth\DFNcolumnwidth \hbadness\c@DFNsloppiness
\def\@makefnmark{\smash{\dfn@makefnmark}}
\dfn@latex@LTRfootnotetext{#1}\par \boxmaxdepth\dfn@fnmaxdp}%
\dfn@dima\ht\dfn@boxa \advance\dfn@dima\dp\dfn@boxa
\ifdim\dfn@dima>\z@\else
\dfn@dima1sp\relax
\setbox\dfn@boxa\vbox{\vbox to1sp{\unvbox\dfn@boxa\vfil}}\fi
\global\setbox\dfn@ins\vbox{\boxmaxdepth\dfn@fnmaxdp
\ifvoid\dfn@ins\else
\unvbox\dfn@ins \allowbreak \nointerlineskip \fi
\ifdfn@allowcbreak \unvbox \else \box \fi \dfn@boxa}%
\setbox\dfn@boxa\copy\dfn@ins
\dfn@split{.5\ht\dfn@boxa}\dfn@boxa\dfn@boxb\dfn@fnmaxdp\footnotesep
\advance\@tempdima\@tempdimb \@tempdimb\@tempdima
\advance\@tempdima-\dfn@fnht \global\dfn@fnht\@tempdimb
\insert\footins{\floatingpenalty\@MM \vbox to\@tempdima{}}%
\xdef\dfn@list{\dfn@list\@elt{\number\dfn@dima}{\number\@tempdima}}}}
\AtBeginDocument{\let\dfn@latex@LTRfootnotetext\@LTRfootnotetext
\let\@LTRfootnotetext\dfn@LTRfootnotetext}
\long\def\dfn@RTLfootnotetext#1{{\setbox\dfn@boxa\vbox{
\let\insert\dfn@gobble
\columnwidth\DFNcolumnwidth \hbadness\c@DFNsloppiness
\def\@makefnmark{\smash{\dfn@makefnmark}}
\dfn@latex@RTLfootnotetext{#1}\par \boxmaxdepth\dfn@fnmaxdp}%
\dfn@dima\ht\dfn@boxa \advance\dfn@dima\dp\dfn@boxa
\ifdim\dfn@dima>\z@\else
\dfn@dima1sp\relax
\setbox\dfn@boxa\vbox{\vbox to1sp{\unvbox\dfn@boxa\vfil}}\fi
\global\setbox\dfn@ins\vbox{\boxmaxdepth\dfn@fnmaxdp
\ifvoid\dfn@ins\else
\unvbox\dfn@ins \allowbreak \nointerlineskip \fi
\ifdfn@allowcbreak \unvbox \else \box \fi \dfn@boxa}%
\setbox\dfn@boxa\copy\dfn@ins
\dfn@split{.5\ht\dfn@boxa}\dfn@boxa\dfn@boxb\dfn@fnmaxdp\footnotesep
\advance\@tempdima\@tempdimb \@tempdimb\@tempdima
\advance\@tempdima-\dfn@fnht \global\dfn@fnht\@tempdimb
\insert\footins{\floatingpenalty\@MM \vbox to\@tempdima{}}%
\xdef\dfn@list{\dfn@list\@elt{\number\dfn@dima}{\number\@tempdima}}}}
\AtBeginDocument{\let\dfn@latex@RTLfootnotetext\@RTLfootnotetext
\let\@RTLfootnotetext\dfn@RTLfootnotetext}
\def\dfn@RTLmakecol{{\ifvoid\footins\else
\dfn@dima\ht\footins
\@tempcnta\z@ \dfn@countins
\@tempdima\z@ \let\@elt\dfn@elt@getht
\dfn@list\@nil
\ifdim\@tempdima=\z@\else
\dfn@split\@tempdima\dfn@ins\dfn@boxa\z@\z@
\global\setbox\dfn@ins\box\dfn@ins
\@tempswatrue
\ifdfn@trysingle
\setbox\dfn@boxb\vbox{\unvcopy\@cclv}\@tempdima\@colroom
\advance\@tempdima-\ht\dfn@boxb \advance\@tempdima-\dp\dfn@boxb
\advance\@tempdima-\skip\footins
\advance\@tempdima-\ht\dfn@boxa
\ifdim\@tempdima<\z@\else \@tempswafalse
\global\setbox\footins\vbox{\boxmaxdepth\dfn@fnmaxdp
\footnoterule \unvbox\dfn@boxa}\fi\fi
\if@tempswa
\dfn@split{\dfn@dima}\dfn@boxa\dfn@boxb\dfn@fnmaxdp\footnotesep
\global\setbox\footins\vbox{\hbox{%
\hskip \DFNcolumnwidth
\hskip\DFNcolumnsep
\hbox to\DFNcolumnwidth{\vbox to\@tempdima{\footnoterule
\unvbox\dfn@boxb\vss}\hss}
\hskip -\textwidth
\hbox to\DFNcolumnwidth{\ifvoid\dfn@boxa\else
\vbox to\@tempdima{
\setbox\@tempboxa\vbox{\footnoterule}
\ifdfn@ruleboth \unvbox\@tempboxa
\else \@tempdima\ht\@tempboxa
\advance\@tempdima\dp\@tempboxa
\vskip\@tempdima
\prevdepth\dp\@tempboxa \fi
\unvbox\dfn@boxa\vss}\fi\hss}
\hskip \DFNcolumnsep
\hskip \DFNcolumnwidth}}\fi\fi
\global\dfn@fnht\z@
\ifx\dfn@list\@empty\else
\let\@elt\dfn@elt@adjust \dfn@dima\z@ \dfn@dimb\z@
\dfn@list \global\advance\dfn@fnht\dfn@dimb
\let\@elt\relax
\ifdim\dfn@dimb>\z@
\xdef\dfn@list{\@elt{0}{\number\dfn@dimb}\dfn@list}%
\insert\footins{\floatingpenalty\@MM
\vbox to\dfn@dimb{}}\fi
\ifdim\dfn@fnht>\@tempdima
\@tempdimb\@tempdima \advance\@tempdimb-\dfn@fnht
\global\dfn@fnht\@tempdima
\xdef\dfn@list{\dfn@list\@elt{0}{\number\@tempdimb}}%
\xdef\dfn@afteroutput{\insert\footins{
\floatingpenalty\@MM
\vbox to\number\@tempdimb sp{}}%
\global\let\noexpand\dfn@afteroutput\relax}%
\fi\fi
\fi}%
\let\footnoterule\relax \dfn@latex@makecol
\let\footnoterule\dfn@footnoterule}
\def\dfn@LTRmakecol{{\ifvoid\footins\else
\dfn@dima\ht\footins
\@tempcnta\z@ \dfn@countins
\@tempdima\z@ \let\@elt\dfn@elt@getht
\dfn@list\@nil
\ifdim\@tempdima=\z@\else
\dfn@split\@tempdima\dfn@ins\dfn@boxa\z@\z@
\global\setbox\dfn@ins\box\dfn@ins
\@tempswatrue
\ifdfn@trysingle
\setbox\dfn@boxb\vbox{\unvcopy\@cclv}\@tempdima\@colroom
\advance\@tempdima-\ht\dfn@boxb \advance\@tempdima-\dp\dfn@boxb
\advance\@tempdima-\skip\footins
\advance\@tempdima-\ht\dfn@boxa
\ifdim\@tempdima<\z@\else \@tempswafalse
\global\setbox\footins\vbox{\boxmaxdepth\dfn@fnmaxdp
\footnoterule \unvbox\dfn@boxa}\fi\fi
\if@tempswa
\dfn@split{\dfn@dima}\dfn@boxa\dfn@boxb\dfn@fnmaxdp\footnotesep
\global\setbox\footins\vbox{\hbox{%
\hbox to\DFNcolumnwidth{\vbox to\@tempdima{\footnoterule
\unvbox\dfn@boxb\vss}\hss}\hskip\DFNcolumnsep
\hbox to\DFNcolumnwidth{\ifvoid\dfn@boxa\else
\vbox to\@tempdima{
\setbox\@tempboxa\vbox{\footnoterule}
\ifdfn@ruleboth \unvbox\@tempboxa
\else \@tempdima\ht\@tempboxa
\advance\@tempdima\dp\@tempboxa
\vskip\@tempdima
\prevdepth\dp\@tempboxa \fi
\unvbox\dfn@boxa\vss}\fi\hss}}}\fi\fi
\global\dfn@fnht\z@
\ifx\dfn@list\@empty\else
\let\@elt\dfn@elt@adjust \dfn@dima\z@ \dfn@dimb\z@
\dfn@list \global\advance\dfn@fnht\dfn@dimb
\let\@elt\relax
\ifdim\dfn@dimb>\z@
\xdef\dfn@list{\@elt{0}{\number\dfn@dimb}\dfn@list}%
\insert\footins{\floatingpenalty\@MM
\vbox to\dfn@dimb{}}\fi
\ifdim\dfn@fnht>\@tempdima
\@tempdimb\@tempdima \advance\@tempdimb-\dfn@fnht
\global\dfn@fnht\@tempdima
\xdef\dfn@list{\dfn@list\@elt{0}{\number\@tempdimb}}%
\xdef\dfn@afteroutput{\insert\footins{
\floatingpenalty\@MM
\vbox to\number\@tempdimb sp{}}%
\global\let\noexpand\dfn@afteroutput\relax}%
\fi\fi
\fi}%
\let\footnoterule\relax \dfn@latex@makecol
\let\footnoterule\dfn@footnoterule}
\renewcommand{\dfn@makecol}{\if@RTLmain\dfn@RTLmakecol\else\dfn@LTRmakecol\fi}
\newcommand{\RTLdfnmakecol}{\renewcommand{\dfn@makecol}{\dfn@RTLmakecol}}
\newcommand{\LTRdfnmakecol}{\renewcommand{\dfn@makecol}{\dfn@LTRmakecol}}
\DFNalwaysdouble
\endinput
%%
%% End of file `dblfnote-xetex-bidi.def'.
|