| 1 |
%RCS: $Id: //TEI/web/Software/passivetex/fotex.sty#29 $, $Date: 2002/06/26 $ |
| 2 |
% |
| 3 |
% Copyright 2002 Sebastian Rahtz/Oxford University |
| 4 |
% <[email protected]> |
| 5 |
% |
| 6 |
% Permission is hereby granted, free of charge, to any person obtaining |
| 7 |
% a copy of this software and any associated documentation files (the |
| 8 |
% ``Software''), to deal in the Software without restriction, including |
| 9 |
% without limitation the rights to use, copy, modify, merge, publish, |
| 10 |
% distribute, sublicense, and/or sell copies of the Software, and to |
| 11 |
% permit persons to whom the Software is furnished to do so, subject to |
| 12 |
% the following conditions: |
| 13 |
% |
| 14 |
% The above copyright notice and this permission notice shall be included |
| 15 |
% in all copies or substantial portions of the Software. |
| 16 |
% |
| 17 |
% Includes fixes from Tomas Bures <[email protected]> |
| 18 |
% |
| 19 |
\ProvidesPackage{fotex}[2002/06/25: version 1.17. support for XSL formatting, S Rahtz] |
| 20 |
\RequirePackage{graphicx} |
| 21 |
\IfFileExists{multicol.sty} |
| 22 |
{\RequirePackage{multicol}[1997/12/16]} |
| 23 |
{\newenvironment{multicols}[1]% |
| 24 |
{\typeout{Warning, at line \the\inputlineno, multicol package not available}}{}% |
| 25 |
} |
| 26 |
\RequirePackage{rotating} |
| 27 |
\RequirePackage{array} |
| 28 |
\gdef\arraybackslash{\let\\=\@arraycr} |
| 29 |
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}} |
| 30 |
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}} |
| 31 |
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}} |
| 32 |
\newcolumntype{P}[1]{>{\arraybackslash}p{#1}} |
| 33 |
\RequirePackage{amsmath} |
| 34 |
\let\Vec\undefined |
| 35 |
\RequirePackage{longtable} |
| 36 |
\RequirePackage{url} |
| 37 |
\RequirePackage[normalem]{ulem} |
| 38 |
\RequirePackage{color} |
| 39 |
\RequirePackage{times} |
| 40 |
\RequirePackage{mlnames} |
| 41 |
\RequirePackage{unicode} |
| 42 |
\RequirePackage{marvosym} |
| 43 |
\RequirePackage{ucharacters} |
| 44 |
%\usepackage{ucs}\usepackage[utf8]{inputenc} |
| 45 |
\RequirePackage{nameref} |
| 46 |
\RequirePackage[colorlinks=false,plainpages=true,hypertexnames=false,pdfborder={1 0 0}]{hyperref}[1999/08/1] |
| 47 |
%------------------------------------------- |
| 48 |
\newcount\FOListBlocks |
| 49 |
\newcount\FOTableNesting |
| 50 |
\newcount\FOinList |
| 51 |
\newcount\FOinTable |
| 52 |
\newcount\NCols |
| 53 |
\newcount\RowCount |
| 54 |
\newdimen\CurrentCellWidth |
| 55 |
\newdimen\FObalancespace |
| 56 |
\newdimen\FOspaceleft |
| 57 |
\newdimen\MasterBottomMargin |
| 58 |
\newdimen\MasterLeftMargin |
| 59 |
\newdimen\MasterRightMargin |
| 60 |
\newdimen\MasterTopMargin |
| 61 |
\newdimen\NoTableCellHeight |
| 62 |
\newdimen\TableWidth |
| 63 |
\newdimen\XFOendindent |
| 64 |
\newdimen\XFOstartindent |
| 65 |
\newdimen\bottommargin |
| 66 |
\newdimen\FOtempdim |
| 67 |
\newif\ifFOBlockGrab |
| 68 |
\newif\ifFODebug |
| 69 |
\newif\ifFODefiningPage |
| 70 |
\newif\ifFOFirstCell |
| 71 |
\newif\ifFOListBody |
| 72 |
\newif\ifFOListInnerPar |
| 73 |
\newif\ifFOSub |
| 74 |
\newif\ifFOSuper |
| 75 |
\newif\ifFOinLayout |
| 76 |
\newif\ifFOinOutput |
| 77 |
\newif\ifMulticolPending |
| 78 |
\newif\ifNoTableCheckHeight |
| 79 |
\newif\ifStartWithOmit |
| 80 |
\newsavebox\BlockBox |
| 81 |
\newsavebox\CellBox |
| 82 |
\newsavebox\FOBOX |
| 83 |
\newsavebox\ItemBox |
| 84 |
\newtoks\ColSpecs |
| 85 |
% |
| 86 |
\FODebugfalse |
| 87 |
\FOBlockGrabfalse |
| 88 |
\FODefiningPagefalse |
| 89 |
\FOListBodyfalse |
| 90 |
\FOListInnerParfalse |
| 91 |
\FOinLayoutfalse |
| 92 |
\FOinList0 |
| 93 |
\FOinOutputfalse |
| 94 |
\FOTableNesting0 |
| 95 |
\FOinTable0 |
| 96 |
\MasterBottomMargin\z@ |
| 97 |
\MasterLeftMargin\z@ |
| 98 |
\MasterRightMargin\z@ |
| 99 |
\MasterTopMargin\z@ |
| 100 |
\MulticolPendingfalse |
| 101 |
\StartWithOmitfalse |
| 102 |
\def\DEBUG#1{% |
| 103 |
\ifFODebug |
| 104 |
\typeout{#1, at \the\inputlineno}% |
| 105 |
\fi |
| 106 |
} |
| 107 |
\def\expandFont#1 #2 #3\\{% |
| 108 |
\typeout{FONT expanding to #1 / #2 / #3}% |
| 109 |
} |
| 110 |
\def\expandBorder#1 #2 #3\\{% |
| 111 |
\def\FOborderstartcolor{#3}% |
| 112 |
\def\FOborderendcolor{#3}% |
| 113 |
\def\FOborderbeforecolor{#3}% |
| 114 |
\def\FOborderaftercolor{#3}% |
| 115 |
\def\FOborderstartwidth{#1}% |
| 116 |
\def\FOborderendwidth{#1}% |
| 117 |
\def\FOborderbeforewidth{#1}% |
| 118 |
\def\FOborderafterwidth{#1}% |
| 119 |
\def\FOborderstartstyle{#2}% |
| 120 |
\def\FOborderendstyle{#2}% |
| 121 |
\def\FOborderbeforestyle{#2}% |
| 122 |
\def\FOborderafterstyle{#2}% |
| 123 |
} |
| 124 |
\def\FOexpandattributes{% |
| 125 |
% |
| 126 |
% links |
| 127 |
\ifx\FObordertopstyle\LINK\else\let\FOborderbeforestyle\FObordertopstyle\fi |
| 128 |
\ifx\FOborderbottomstyle\LINK\else\let\FOborderafterstyle\FOborderbottomstyle\fi |
| 129 |
\ifx\FOborderrightstyle\LINK\else\let\FOborderendstyle\FOborderrightstyle\fi |
| 130 |
\ifx\FOborderleftstyle\LINK\else\let\FOborderstartstyle\FOborderleftstyle\fi |
| 131 |
\ifx\FObordertopwidth\LINK\else\let\FOborderbeforewidth\FObordertopwidth\fi |
| 132 |
\ifx\FOborderbottomwidth\LINK\else\let\FOborderafterwidth\FOborderbottomwidth\fi |
| 133 |
\ifx\FOborderrightwidth\LINK\else\let\FOborderendwidth\FOborderrightwidth\fi |
| 134 |
\ifx\FOborderleftwidth\LINK\else\let\FOborderstartwidth\FOborderleftwidth\fi |
| 135 |
\ifx\FObordertopcolor\LINK\else\let\FOborderbeforecolor\FObordertopcolor\fi |
| 136 |
\ifx\FOborderbottomcolor\LINK\else\let\FOborderaftercolor\FOborderbottomcolor\fi |
| 137 |
\ifx\FOborderrightcolor\LINK\else\let\FOborderendcolor\FOborderrightcolor\fi |
| 138 |
\ifx\FOborderleftcolor\LINK\else\let\FOborderstartcolor\FOborderleftcolor\fi |
| 139 |
% shortcuts |
| 140 |
\ifx\FObordercolor\att@black |
| 141 |
\else |
| 142 |
\let\FOborderstartcolor\FObordercolor |
| 143 |
\let\FOborderendcolor\FObordercolor |
| 144 |
\let\FOborderbeforecolor\FObordercolor |
| 145 |
\let\FOborderaftercolor\FObordercolor |
| 146 |
\fi |
| 147 |
\ifx\FOborderwidth\@empty |
| 148 |
\else |
| 149 |
\let\FOborderstartwidth\FOborderwidth |
| 150 |
\let\FOborderendwidth\FOborderwidth |
| 151 |
\let\FOborderbeforewidth\FOborderwidth |
| 152 |
\let\FOborderafterwidth\FOborderwidth |
| 153 |
\fi |
| 154 |
\ifx\FOborderstyle\@empty |
| 155 |
\else |
| 156 |
\let\FOborderstartstyle\FOborderstyle |
| 157 |
\let\FOborderendstyle\FOborderstyle |
| 158 |
\let\FOborderbeforestyle\FOborderstyle |
| 159 |
\let\FOborderafterstyle\FOborderstyle |
| 160 |
\fi |
| 161 |
\ifx\FOborder\@empty |
| 162 |
\else |
| 163 |
\expandafter\expandBorder\FOborder\\{}% |
| 164 |
\fi |
| 165 |
% \ifx\FOfont\@empty |
| 166 |
% \else |
| 167 |
% \expandafter\expandFont\FOfont\relax \\{}% |
| 168 |
% \fi |
| 169 |
\ifdim\FOpadding>\z@ |
| 170 |
\let\FOpaddingstart\FOpadding |
| 171 |
\let\FOpaddingend\FOpadding |
| 172 |
\let\FOpaddingbefore\FOpadding |
| 173 |
\let\FOpaddingafter\FOpadding |
| 174 |
\fi |
| 175 |
\ifx\FOmargin\@empty |
| 176 |
\else |
| 177 |
\let\tmpmargin\FOmargin |
| 178 |
\let\FOmarginleft\tmpmargin |
| 179 |
\let\FOmarginright\tmpmargin |
| 180 |
\let\FOmargintop\tmpmargin |
| 181 |
\let\FOmarginbottom\tmpmargin |
| 182 |
\fi |
| 183 |
% end of shortcuts |
| 184 |
\ifx\FOborderendstyle\att@solid |
| 185 |
\ifx\FOborderendwidth\att@thin\def\FOborderendwidth{0.4pt}\fi |
| 186 |
\ifx\FOborderendwidth\att@medium\def\FOborderendwidth{0.8pt}\fi |
| 187 |
\ifx\FOborderendwidth\att@thick\def\FOborderendwidth{1.2pt}\fi |
| 188 |
\FOBlockGrabtrue |
| 189 |
\else |
| 190 |
\def\FOborderendwidth{\z@}% |
| 191 |
\fi |
| 192 |
\ifx\FOborderstartstyle\att@solid |
| 193 |
\ifx\FOborderstartwidth\att@thin\def\FOborderstartwidth{0.4pt}\fi |
| 194 |
\ifx\FOborderstartwidth\att@medium\def\FOborderstartwidth{0.8pt}\fi |
| 195 |
\ifx\FOborderstartwidth\att@thick\def\FOborderstartwidth{1.2pt}\fi |
| 196 |
\FOBlockGrabtrue |
| 197 |
\else |
| 198 |
\def\FOborderstartwidth{\z@}% |
| 199 |
\fi |
| 200 |
\ifx\FOborderafterstyle\att@solid |
| 201 |
\ifx\FOborderafterwidth\att@thin\def\FOborderafterwidth{0.4pt}\fi |
| 202 |
\ifx\FOborderafterwidth\att@medium\def\FOborderafterwidth{0.8pt}\fi |
| 203 |
\ifx\FOborderafterwidth\att@thick\def\FOborderafterwidth{1.2pt}\fi |
| 204 |
\else |
| 205 |
\def\FOborderafterwidth{\z@}% |
| 206 |
\fi |
| 207 |
\ifx\FOborderbeforestyle\att@solid |
| 208 |
\ifx\FOborderbeforewidth\att@thin\def\FOborderbeforewidth{0.4pt}\fi |
| 209 |
\ifx\FOborderbeforewidth\att@medium\def\FOborderbeforewidth{0.8pt}\fi |
| 210 |
\ifx\FOborderbeforewidth\att@thick\def\FOborderbeforewidth{1.2pt}\fi |
| 211 |
\FOBlockGrabtrue |
| 212 |
\else |
| 213 |
\def\FOborderbeforewidth{\z@}% |
| 214 |
\fi |
| 215 |
} |
| 216 |
%------------------------------------------- |
| 217 |
% |
| 218 |
% NoTable. Making tables using fixed width cells. |
| 219 |
% From ideas and code by C V Radhakrishnan. |
| 220 |
% |
| 221 |
\newcount\AbsoluteTableCount |
| 222 |
\newcount\CellCount |
| 223 |
\newcount\arraylength |
| 224 |
\newcounter{ArrayIndex}% |
| 225 |
\newcounter{zeroCtr}% |
| 226 |
\def\DeclareArray#1{% |
| 227 |
\Array{#1}[0]{}% |
| 228 |
\expandafter\gdef\csname #1\endcsname[##1]{\csname #1##1\endcsname}% |
| 229 |
} |
| 230 |
\def\Array#1[#2]#3{% |
| 231 |
\expandafter\xdef\csname #1#2\endcsname{#3}% |
| 232 |
} |
| 233 |
|
| 234 |
% |
| 235 |
\def\getArraylength#1{% |
| 236 |
\arraylength0 |
| 237 |
\loop\expandafter\ifx\csname #1\the\arraylength\endcsname\relax% |
| 238 |
\else\advance\arraylength by1\repeat}% |
| 239 |
% |
| 240 |
\def\addToArray#1#2{\arraylength0% |
| 241 |
\loop\expandafter\ifx\csname #1\the\arraylength\endcsname\relax% |
| 242 |
\else\advance\arraylength by 1\repeat% |
| 243 |
\Array{#1}[\the\arraylength]{#2}}% |
| 244 |
% |
| 245 |
\def\clearArray#1{\getArraylength{#1}% |
| 246 |
\loop\ifnum\arraylength >0% |
| 247 |
\global\expandafter\let\csname #1\the\arraylength\endcsname\relax% |
| 248 |
\advance\arraylength by-1\repeat}% |
| 249 |
% |
| 250 |
\long\def\ArrayIterator#1#2{% |
| 251 |
\setcounter{ArrayIndex}{1}\getArraylength{#1}% |
| 252 |
\setcounter{zeroCtr}{\c@arraylength}% |
| 253 |
\loop\ifnum\c@ArrayIndex<\c@zeroCtr{#2}% |
| 254 |
\stepcounter{ArrayIndex}\repeat% |
| 255 |
}% |
| 256 |
|
| 257 |
\def\NoTableSetup{% |
| 258 |
\global\advance\AbsoluteTableCount by 1 |
| 259 |
\DeclareArray{fotable\the\AbsoluteTableCount:}% |
| 260 |
\global\CellCount0 |
| 261 |
} |
| 262 |
|
| 263 |
\def\NoTableStart#1{#1} |
| 264 |
|
| 265 |
\def\NoTableEnd{\clearArray{fotable\the\AbsoluteTableCount:}} |
| 266 |
|
| 267 |
\def\NoTableColumn{% |
| 268 |
\ifx\@empty\FOcolumnnumber |
| 269 |
\global\advance\NCols by 1 |
| 270 |
\else |
| 271 |
\global\NCols\FOcolumnnumber |
| 272 |
\fi |
| 273 |
\ifx\prop@width\FOcolumnwidth\def\FOcolumnwidth{1in}\fi |
| 274 |
\ifx\@empty\FOcolumnwidth\def\FOcolumnwidth{1in}\fi |
| 275 |
\TablePercentToDimen{\FOcolumnwidth}% |
| 276 |
\addToArray{fotable\the\AbsoluteTableCount:}{\the\@tempdima}% |
| 277 |
\DEBUG{Table Column \the\NCols, in Table \the\AbsoluteTableCount, |
| 278 |
\FOcolumnwidth, = \the\@tempdima}% |
| 279 |
} |
| 280 |
\def\NoTableRow#1{% |
| 281 |
\setbox0=\vbox{\strut They}% |
| 282 |
\NoTableCellHeight=\ht0 |
| 283 |
\advance\NoTableCellHeight by \dp0 |
| 284 |
\global\CellCount0 |
| 285 |
\NoTableCheckHeightfalse |
| 286 |
\setbox0=\hbox{#1}% |
| 287 |
\@tempdima=\ht0 |
| 288 |
\advance\@tempdima by \dp0 |
| 289 |
\FOspaceleft=\pagegoal |
| 290 |
\advance\FOspaceleft by -\pagetotal |
| 291 |
% \DEBUG{Space check for \the\@tempdima, [\the\FOspaceleft] PageTotal [\the\pagetotal/\the\pagegoal] l.\the\inputlineno}% |
| 292 |
\ifdim\FOspaceleft<\@tempdima |
| 293 |
\DEBUG{ .. page in table break fires, l. \the\inputlineno... }% |
| 294 |
\clearpage |
| 295 |
\fi |
| 296 |
\ifdim\@tempdima>\NoTableCellHeight |
| 297 |
%\typeout{row pass 2 at \the\inputlineno, as [\the\@tempdima] > [\the\NoTableCellHeight]}% |
| 298 |
\global\CellCount0 |
| 299 |
\NoTableCellHeight=\@tempdima |
| 300 |
\NoTableCheckHeighttrue |
| 301 |
\vbox{\hbox{#1}}% |
| 302 |
\else |
| 303 |
\box0\relax |
| 304 |
\fi |
| 305 |
\vskip-\lineskip |
| 306 |
} |
| 307 |
|
| 308 |
\def\NoTableCell#1{% |
| 309 |
\ifx\FOstartsrow\att@true |
| 310 |
\vskip-\lineskip |
| 311 |
\global\CellCount1 |
| 312 |
\else |
| 313 |
\global\advance\CellCount by 1 |
| 314 |
\fi |
| 315 |
\ifnum\NCols<1 |
| 316 |
\CurrentCellWidth\z@ |
| 317 |
\setbox0=\hbox{#1}% |
| 318 |
\CurrentCellWidth=\wd0 |
| 319 |
\DEBUG{report \the\CurrentCellWidth}% |
| 320 |
\else |
| 321 |
\CurrentCellWidth=\csname fotable\the\AbsoluteTableCount:\the\CellCount\endcsname |
| 322 |
\fi |
| 323 |
\advance\CurrentCellWidth by -\FOpaddingstart |
| 324 |
\advance\CurrentCellWidth by -\FOpaddingend |
| 325 |
\ifx\FOborderstartstyle\att@solid\advance\CurrentCellWidth by -\FOborderstartwidth\fi |
| 326 |
\ifx\FOborderendstyle\att@solid\advance\CurrentCellWidth by -\FOborderendwidth\fi |
| 327 |
\advance\CurrentCellWidth by -\FOmarginright |
| 328 |
\advance\CurrentCellWidth by -\FOmarginleft |
| 329 |
\ifnum\FOnumbercolumnsspanned>1 |
| 330 |
\@tempcnta1 |
| 331 |
\loop\ifnum\@tempcnta<\FOnumbercolumnsspanned |
| 332 |
\advance\@tempcnta by 1 |
| 333 |
\global\advance\CellCount by 1 |
| 334 |
\advance\CurrentCellWidth\csname fotable\the\AbsoluteTableCount:\the\CellCount\endcsname |
| 335 |
% \typeout{add extra column \the\@tempcnta, to reach \FOnumbercolumnsspanned: \the\CurrentCellWidth}% |
| 336 |
\repeat |
| 337 |
\fi |
| 338 |
\ifx\XML@parent\FOTableRow |
| 339 |
\FOTableCellBlock#1\FOEndTableCellBlock |
| 340 |
\else |
| 341 |
\leavevmode\hbox{\FOTableCellBlock#1\FOEndTableCellBlock}% |
| 342 |
\fi |
| 343 |
\ifx\FOendsrow\att@true |
| 344 |
\vskip-\lineskip |
| 345 |
\global\CellCount0 |
| 346 |
\fi |
| 347 |
} |
| 348 |
|
| 349 |
\def\FOTableCellBlock{% |
| 350 |
\begin{lrbox}{\CellBox}% |
| 351 |
\vbox\bgroup |
| 352 |
\hsize\the\CurrentCellWidth |
| 353 |
\color@begingroup |
| 354 |
\FOSetFont{tablecellblock}% |
| 355 |
\ifx\FOwhitespace\att@pre\obeyspaces\obeylines\fi |
| 356 |
\ifx\FOwhitespacecollapse\att@false\obeyspaces\fi |
| 357 |
\ifx\FOwrapoption\att@nowrap\obeylines\fi |
| 358 |
\ifx\TOverticalalign\att@bottom\vfill\fi |
| 359 |
} |
| 360 |
|
| 361 |
\def\FOEndTableCellBlock{% |
| 362 |
\ifx\TOverticalalign\att@top\vfill\fi |
| 363 |
\color@endgroup |
| 364 |
\egroup |
| 365 |
\end{lrbox}% |
| 366 |
\@tempdima\FOmargintop |
| 367 |
\advance\@tempdima\FOpaddingbefore |
| 368 |
\ifx\FOborderbeforestyle\att@solid\advance\@tempdima\FOborderbeforewidth\fi |
| 369 |
% \advance\@tempdima\dp\CellBox |
| 370 |
%\typeout{CELL to height \the\NoTableCellHeight. Padding \FOpaddingbefore,\FOpaddingafter,\FOpaddingstart,\FOpaddingend; Border \FOborderbeforewidth,\FOborderafterwidth,\FOborderstartwidth,\FOborderendwidth; lower by \the\@tempdima; Margin \FOmargintop,\FOmarginbottom,\FOmarginleft,\FOmarginright}% |
| 371 |
\@tempdimb\wd\CellBox |
| 372 |
\advance\@tempdimb by \FOpaddingstart |
| 373 |
\advance\@tempdimb by \FOpaddingend |
| 374 |
\hbox{% |
| 375 |
\lower\@tempdima |
| 376 |
\hbox{% |
| 377 |
\hskip\FOmarginleft |
| 378 |
\vbox{% |
| 379 |
\vskip\FOmargintop |
| 380 |
\vbox{% |
| 381 |
\ifx\FOborderbeforestyle\att@solid |
| 382 |
{\color{\FOborderbeforecolor}\hrule\@height\FOborderbeforewidth}% |
| 383 |
\fi |
| 384 |
\hbox{% |
| 385 |
\ifx\FOborderstartstyle\att@solid |
| 386 |
{\color{\FOborderstartcolor}\vrule\@width\FOborderstartwidth}% |
| 387 |
\fi |
| 388 |
\ifx\FObackgroundcolor\att@transparent |
| 389 |
\else |
| 390 |
{\color{\FObackgroundcolor}\vrule\@width\@tempdimb\kern-\@tempdimb}% |
| 391 |
\fi |
| 392 |
\ifNoTableCheckHeight |
| 393 |
% According to FOdisplayalign property, we put glue |
| 394 |
% before and/or after the cell contents |
| 395 |
\vtop to \NoTableCellHeight{% |
| 396 |
\vskip\FOpaddingbefore |
| 397 |
\ifx\FOdisplayalign\att@auto |
| 398 |
\else\ifx\FOdisplayalign\att@after |
| 399 |
\else\ifx\FOdisplayalign\att@before\vfil |
| 400 |
\else\ifx\FOdisplayalign\att@centered\vfil\fi |
| 401 |
\fi |
| 402 |
\fi |
| 403 |
\fi |
| 404 |
\hbox{\kern\FOpaddingstart\box\CellBox\kern\FOpaddingend}% |
| 405 |
\ifx\FOdisplayalign\att@auto\vfil |
| 406 |
\else\ifx\FOdisplayalign\att@after\vfil |
| 407 |
\else\ifx\FOdisplayalign\att@before |
| 408 |
\else\ifx\FOdisplayalign\att@centered\vfil\fi |
| 409 |
\fi |
| 410 |
\fi |
| 411 |
\fi |
| 412 |
\vskip\FOpaddingafter |
| 413 |
}% |
| 414 |
\else |
| 415 |
\vbox{% |
| 416 |
\vskip\FOpaddingbefore |
| 417 |
\hbox{\kern\FOpaddingstart\box\CellBox\kern\FOpaddingend}% |
| 418 |
\vskip\FOpaddingafter |
| 419 |
}% |
| 420 |
\fi |
| 421 |
\ifx\FOborderendstyle\att@solid |
| 422 |
{\color{\FOborderendcolor}\vrule\@width\FOborderendwidth}% |
| 423 |
\fi |
| 424 |
}% |
| 425 |
\ifx\FOborderafterstyle\att@solid |
| 426 |
{\color{\FOborderaftercolor}\hrule\@height\FOborderafterwidth}\fi |
| 427 |
}% |
| 428 |
\vskip\FOmarginbottom |
| 429 |
}% |
| 430 |
\hskip\FOmarginright |
| 431 |
}% |
| 432 |
}% |
| 433 |
} |
| 434 |
|
| 435 |
\def\FOBoxedBlock#1{% |
| 436 |
\ifdim\@tempdimb=\z@ |
| 437 |
\setbox0=\hbox{#1}\@tempdimb\wd0 |
| 438 |
%\typeout{report \the\CurrentCellWidth}% |
| 439 |
\else |
| 440 |
\@tempdimb#1% |
| 441 |
\fi |
| 442 |
\advance\@tempdimb by -\FOpaddingstart |
| 443 |
\advance\@tempdimb by -\FOpaddingend |
| 444 |
\ifx\FOborderstartstyle\att@solid\advance\@tempdimb by -\FOborderstartwidth\fi |
| 445 |
\ifx\FOborderendstyle\att@solid\advance\@tempdimb by -\FOborderendwidth\fi |
| 446 |
\advance\@tempdimb by -\FOmarginright |
| 447 |
\advance\@tempdimb by -\FOmarginleft |
| 448 |
\begin{lrbox}{\BlockBox}% |
| 449 |
\vbox\bgroup |
| 450 |
\hsize\the\@tempdimb |
| 451 |
\FOSetFont{tableblock}% |
| 452 |
\color@begingroup |
| 453 |
\ifx\FOwhitespace\att@pre\obeyspaces\obeylines\fi |
| 454 |
\ifx\FOwhitespacecollapse\att@false\obeyspaces\fi |
| 455 |
\ifx\FOwrapoption\att@nowrap\obeylines\fi |
| 456 |
\parindent\FOtextindent |
| 457 |
\Quadding |
| 458 |
\strut |
| 459 |
} |
| 460 |
|
| 461 |
\def\FOEndBoxedBlock{% |
| 462 |
\par |
| 463 |
\color@endgroup |
| 464 |
\egroup |
| 465 |
\end{lrbox}% |
| 466 |
\@tempdimb\FOmargintop |
| 467 |
\advance\@tempdimb\FOpaddingbefore |
| 468 |
\ifx\FOborderbeforestyle\att@solid\advance\@tempdimb\FOborderbeforewidth\fi |
| 469 |
% \advance\@tempdimb by \dp\BlockBox |
| 470 |
%\typeout{BLOCK. Padding \FOpaddingbefore,\FOpaddingafter,\FOpaddingstart,\FOpaddingend; Border \FOborderbeforewidth,\FOborderafterwidth,\FOborderstartwidth,\FOborderendwidth; lower by \the\@tempdimb, margin \FOmargintop,\FOmarginbottom,\FOmarginleft,\FOmarginright}% |
| 471 |
\@tempdimc\wd\BlockBox |
| 472 |
\advance\@tempdimc by \FOpaddingstart |
| 473 |
\advance\@tempdimc by \FOpaddingend |
| 474 |
\FOtempdim\FOmarginleft |
| 475 |
\advance\FOtempdim by \FOtextindent |
| 476 |
\hbox{% |
| 477 |
\lower\@tempdimb |
| 478 |
\hbox{% |
| 479 |
\kern\FOtempdim |
| 480 |
\vbox{% |
| 481 |
\vskip\FOmargintop |
| 482 |
\vbox{% |
| 483 |
\ifx\FOborderbeforestyle\att@solid |
| 484 |
{\color{\FOborderbeforecolor}\hrule\@height\FOborderbeforewidth}% |
| 485 |
\fi |
| 486 |
\hbox{% |
| 487 |
\ifx\FOborderstartstyle\att@solid |
| 488 |
{\color{\FOborderstartcolor}\vrule\@width\FOborderstartwidth}\fi |
| 489 |
\ifx\FObackgroundcolor\att@transparent |
| 490 |
\else |
| 491 |
{\color{\FObackgroundcolor}\vrule\@width\@tempdimc\kern-\@tempdimc}% |
| 492 |
\fi |
| 493 |
\vbox{% |
| 494 |
\vskip\FOpaddingbefore |
| 495 |
\hbox{\kern\FOpaddingstart\box\BlockBox\kern\FOpaddingend}% |
| 496 |
\vskip\FOpaddingafter |
| 497 |
}% |
| 498 |
\ifx\FOborderendstyle\att@solid |
| 499 |
{\color{\FOborderendcolor}\vrule\@width\FOborderendwidth}\fi |
| 500 |
}% |
| 501 |
\ifx\FOborderafterstyle\att@solid |
| 502 |
{\color{\FOborderaftercolor}\hrule\@height\FOborderafterwidth}\fi |
| 503 |
}% |
| 504 |
\vskip\FOmarginbottom |
| 505 |
}% |
| 506 |
\kern\FOmarginright |
| 507 |
}% |
| 508 |
}% |
| 509 |
} |
| 510 |
|
| 511 |
\def\OldTableCell#1{% |
| 512 |
\ifx\FOendsrow\att@true |
| 513 |
\gdef\w@@t{\\}% |
| 514 |
\else |
| 515 |
\gdef\w@@t{\tabcellsep}% |
| 516 |
\fi |
| 517 |
\ifx\FOstartsrow\att@true |
| 518 |
\gdef\w@@@t{\\}% |
| 519 |
\else |
| 520 |
\gdef\w@@@t{}% |
| 521 |
\fi |
| 522 |
\xdef\MyRows{\FOnumberrowsspanned}% |
| 523 |
\xdef\MyCols{\FOnumbercolumnsspanned}% |
| 524 |
\ifnum\MyCols>1 |
| 525 |
\gdef\w@t{\multicolumn{\MyCols}{l}{#1}\w@@t}% |
| 526 |
\else |
| 527 |
\ifnum\MyRows>1 |
| 528 |
\gdef\w@t{\sbox{\FOBOX}{\hbox{#1}}% |
| 529 |
\@tempdima\ht\FOBOX |
| 530 |
\advance\@tempdima by -\baselineskip |
| 531 |
\raisebox{-\@tempdima}[\z@][\z@]{\usebox{\FOBOX}}\w@@t}% |
| 532 |
\else |
| 533 |
\gdef\w@t{\w@@@t#1\w@@t}% |
| 534 |
\fi |
| 535 |
\fi |
| 536 |
\aftergroup\w@t |
| 537 |
} |
| 538 |
%------------------------------------------- |
| 539 |
% utility macros |
| 540 |
\def\protectCS#1{% |
| 541 |
\begingroup |
| 542 |
\utfeight@protect@chars |
| 543 |
\xdef\FOtempCS{#1}% |
| 544 |
\endgroup |
| 545 |
\let#1\FOtempCS}% |
| 546 |
\def\GrabFileName#1:#2\@nil{% |
| 547 |
\DEBUG{Graphic #1 + #2}% |
| 548 |
\xdef\FOsrcname{#1}% |
| 549 |
} |
| 550 |
\def\NColumns{1} |
| 551 |
\def\Pass#1\\{\expandafter\@Pass#1} |
| 552 |
\def\@Pass#1|#2|#3|#4|{% |
| 553 |
\columnsep=#1 |
| 554 |
\def\NColumns{#2}% |
| 555 |
\def\Marginbottom{#3}% |
| 556 |
\def\Margintop{#4}% |
| 557 |
} |
| 558 |
\def\FOfiletest#1#2#3#4#5#6#7#8\@{% |
| 559 |
\def\@tempa{#1#2#3#4#5#6#7}% |
| 560 |
\def\@tempb{#1#2#3#4#5}% |
| 561 |
\def\@tempc{#1#2#3#4}% |
| 562 |
\ifx\@tempa\file@prefix |
| 563 |
\xdef\FOsrcname{#8}% |
| 564 |
\else |
| 565 |
\ifx\@tempb\file@shortprefix |
| 566 |
\xdef\FOsrcname{#6#7#8}% |
| 567 |
\else |
| 568 |
\ifx\@tempc\file@urlprefix |
| 569 |
\expandafter\FOurlfiletest#5#6#7#8\@empty\@empty\@empty\@empty\@empty\@empty\@empty\@empty\@empty\@empty |
| 570 |
\else |
| 571 |
\xdef\FOsrcname{#1#2#3#4#5#6#7#8}% |
| 572 |
\fi |
| 573 |
\fi |
| 574 |
\fi} |
| 575 |
|
| 576 |
\def\FOurlfiletest#1#2#3#4#5#6#7#8){% |
| 577 |
\def\@tempa{#1#2#3#4#5#6#7}% |
| 578 |
\def\@tempb{#1#2#3#4#5}% |
| 579 |
\ifx\file@prefix\@tempa |
| 580 |
\xdef\FOsrcname{#8}% |
| 581 |
\else |
| 582 |
\ifx\@tempb\file@shortprefix |
| 583 |
\xdef\FOsrcname{#6#7#8}% |
| 584 |
\else |
| 585 |
\xdef\FOsrcname{#1#2#3#4#5#6#7#8}% |
| 586 |
\fi |
| 587 |
\fi} |
| 588 |
{\catcode`\%=13 |
| 589 |
\gdef\percenttest#1%#2#3\@{\ifx#2\relax\def\percentval{#1}\expandafter\@firstoftwo |
| 590 |
\else |
| 591 |
\expandafter\@secondoftwo |
| 592 |
\fi} |
| 593 |
\gdef\TablePercentToDimen#1{\expandafter\percenttest#1\relax%.\@ |
| 594 |
{\@tempdimb\percentval pt\relax\divide\@tempdimb by 100 |
| 595 |
\edef\SCALE{\strip@pt\@tempdimb}\global\@tempdima=\SCALE\TableWidth}{\global\@tempdima#1} |
| 596 |
} |
| 597 |
\gdef\PercentToDimen#1{\expandafter\percenttest#1\relax%.\@ |
| 598 |
{\@tempdimb\percentval pt\relax\divide\@tempdimb by 100 |
| 599 |
\edef\SCALE{\strip@pt\@tempdimb}\global\@tempdima=\SCALE\hsize}{\global\@tempdima#1} |
| 600 |
} |
| 601 |
\gdef\FOSetGWidth{\expandafter\percenttest\FOcontentwidth\relax%.\@ |
| 602 |
{\@tempdima\percentval pt\relax\divide\@tempdima by 100 |
| 603 |
\edef\WSCALE{\strip@pt\@tempdima}\setkeys{Gin}{width=\WSCALE\Gin@nat@width}}{\setkeys{Gin}{width=\FOcontentwidth}}} |
| 604 |
|
| 605 |
\gdef\FOSetGHeight{\expandafter\percenttest\FOcontentheight\relax%.\@ |
| 606 |
{\@tempdima\percentval pt\relax\divide\@tempdima by 100 |
| 607 |
\edef\HSCALE{\strip@pt\@tempdima}\setkeys{Gin}{height=\HSCALE\Gin@nat@height}}{\setkeys{Gin}{height=\FOcontentheight}}} |
| 608 |
|
| 609 |
\gdef\PlayWithFSize#1{\@default\f@size pt |
| 610 |
\expandafter\percenttest#1\relax%.\@ |
| 611 |
{\[email protected]\@default |
| 612 |
\multiply\dimen@\percentval\relax}{\dimen@#1}\edef\FOfontsizefinal{\the\dimen@}} |
| 613 |
\gdef\PlayWithShift{\expandafter\percenttest\FOverticalalign\relax%.\@ |
| 614 |
{\[email protected]\baselineskip\multiply\dimen@\percentval\relax}{\dimen@\FOverticalalign}} |
| 615 |
} |
| 616 |
\def\strip@pt@and@otherjunk#1{\expandafter\rem@ptetc\the#1!} |
| 617 |
\begingroup |
| 618 |
\catcode`P=12 |
| 619 |
\catcode`T=12 |
| 620 |
\lowercase{\endgroup |
| 621 |
\gdef\rem@ptetc#1.#2PT#3!{#1\ifnum#2>\z@.#2\fi}% |
| 622 |
} |
| 623 |
\catcode`\/\active |
| 624 |
|
| 625 |
\def\@basiclink#1//#2\@nil#3\@nil#4\@nil{% |
| 626 |
{% |
| 627 |
\ifx\\#2\\% |
| 628 |
\href{#4}{\FO@inlinesequence{#1}}% |
| 629 |
\else |
| 630 |
\href{#4}{\FO@inlinesequence{\XURL{#3}}}% |
| 631 |
\fi |
| 632 |
}% |
| 633 |
} |
| 634 |
\catcode`\/=12 |
| 635 |
% |
| 636 |
\def\BlankPage{% |
| 637 |
\def\@thehead{\csname\FirstHead\endcsname}% |
| 638 |
\def\@thefoot{\csname\FirstTail\endcsname}% |
| 639 |
\let\@themargin\oddsidemargin |
| 640 |
\def\headheight{\FirstHeadExtent}% |
| 641 |
\def\tailheight{\FirstTailExtent}% |
| 642 |
\mark{}% |
| 643 |
\DEBUG{Blank Page \the\c@page}% |
| 644 |
\hbox{} |
| 645 |
} |
| 646 |
%----------------------------------------------- |
| 647 |
% longtable |
| 648 |
\LTpre\z@ |
| 649 |
\LTpost-10\p@ |
| 650 |
\def\LTleft@center{\LTleft=\FOmarginleft plus 1.0fill} |
| 651 |
\def\LTright@center{\LTright=\FOmarginright plus 1.0fill} |
| 652 |
\def\LTleft@start{\LTleft=\FOmarginleft} |
| 653 |
\def\LTright@start{\LTright=\fill} |
| 654 |
\def\LTleft@end{\LTleft=\fill} |
| 655 |
\def\LTright@end{\LTright=\FOmarginright} |
| 656 |
\def\LTleft@justify{\LTleft=\fill} |
| 657 |
\def\LTright@justify{\LTright=\fill} |
| 658 |
\gdef\LeftMargin{\FOmarginleft} |
| 659 |
\gdef\RightMargin{\FOmarginright} |
| 660 |
\gdef\TopMargin{\Margintop} |
| 661 |
\gdef\BottomMargin{\Marginbottom} |
| 662 |
\gdef\EndIndent{\ifx\FOendindent\att@labelend\z@\else\FOendindent\fi} |
| 663 |
\gdef\StartIndent{\ifx\FOstartindent\att@bodystart\z@\else\FOstartindent\fi} |
| 664 |
\gdef\OddTail {} |
| 665 |
\gdef\OddHead {} |
| 666 |
\gdef\EvenTail {} |
| 667 |
\gdef\EvenHead {} |
| 668 |
\gdef\FirstTail {} |
| 669 |
\gdef\FirstHead {} |
| 670 |
\gdef\OddTailExtent{\z@} |
| 671 |
\gdef\OddHeadExtent{\z@} |
| 672 |
\gdef\EvenTailExtent{\z@} |
| 673 |
\gdef\EvenHeadExtent{\z@} |
| 674 |
\gdef\FirstTailExtent{\z@} |
| 675 |
\gdef\FirstHeadExtent{\z@} |
| 676 |
|
| 677 |
\DefineCharacter{8232}{2028}{\newline} |
| 678 |
\DefineCharacter{8208}{2010}{-\/} |
| 679 |
\def\XURL{\begingroup \urlstyle{same}\Url} |
| 680 |
\def\T@pageref#1{% |
| 681 |
\expandafter\@setref\csname r@#1\endcsname\@secondoffive{#1}% |
| 682 |
} |
| 683 |
\let\@@ReadBookmarks\ReadBookmarks |
| 684 |
\def\ReadBookmarks{{\let\InputIfFileExists\@input\@@ReadBookmarks}} |
| 685 |
\def\XReadBookmarks{% |
| 686 |
\begingroup |
| 687 |
\escapechar=`\\% |
| 688 |
\let\escapechar\@gobble % |
| 689 |
\def\@@BOOKMARK [##1][##2]##3##4##5{\calc@bm@number{##5}}% |
| 690 |
\@input{\jobname.out}% |
| 691 |
\ifx\WriteBookmarks\relax |
| 692 |
\global\let\WriteBookmarks\relax |
| 693 |
\fi |
| 694 |
\def\@@BOOKMARK[##1][##2]##3##4##5{% |
| 695 |
\def\Hy@temp{##4}% |
| 696 |
\pdfoutline goto |
| 697 |
name{##3}% |
| 698 |
count ##2\check@bm@number{##3}{% |
| 699 |
\expandafter\strip@prefix\meaning\Hy@temp |
| 700 |
}% |
| 701 |
}% |
| 702 |
{% |
| 703 |
\def\WriteBookmarks{0}% |
| 704 |
\@input{\jobname.out}% |
| 705 |
}% |
| 706 |
%{\escapechar\m@ne\InputIfFileExists{\jobname.out}{}{}}% |
| 707 |
\ifx\WriteBookmarks\relax\else |
| 708 |
\if@filesw\immediate\openout\@outlinefile=\jobname.out |
| 709 |
\ifHy@typexml |
| 710 |
\immediate\write\@outlinefile{<relaxxml>\relax}% |
| 711 |
\fi |
| 712 |
\fi |
| 713 |
\fi |
| 714 |
\endgroup |
| 715 |
} |
| 716 |
|
| 717 |
\def\TableHeader{} |
| 718 |
\def\DECO@{\@firstofone} |
| 719 |
\def\DECO@blink{\uwave} |
| 720 |
\def\DECO@underline{\uline} |
| 721 |
\expandafter\def\csname DECO@line-through\endcsname{\sout} |
| 722 |
\def\QuaddingStart{% |
| 723 |
\ifx\FOtextalignlast\att@relative |
| 724 |
\csname startQ@\FOtextalign\endcsname |
| 725 |
\else |
| 726 |
\csname startQ@\FOtextalignlast\endcsname |
| 727 |
\fi |
| 728 |
}% |
| 729 |
\def\QuaddingEnd{% |
| 730 |
\ifx\FOtextalignlast\att@relative |
| 731 |
\csname endQ@\FOtextalign\endcsname |
| 732 |
\else |
| 733 |
\csname endQ@\FOtextalignlast\endcsname |
| 734 |
\fi |
| 735 |
}% |
| 736 |
\def\Quadding{% |
| 737 |
\ifx\FOtextalignlast\att@relative |
| 738 |
\csname Q@\FOtextalign\endcsname |
| 739 |
\else |
| 740 |
\csname Q@\FOtextalignlast\endcsname |
| 741 |
\fi |
| 742 |
}% |
| 743 |
% page number compression (by David Carlisle) |
| 744 |
|
| 745 |
\def\fopagecitation{\pageref{\FOrefid}} |
| 746 |
%was \hyperlink{\FOrefid}{\pageref{\FOrefid}}} |
| 747 |
\newcount\sortcount |
| 748 |
\newtoks\sorttoks |
| 749 |
\def\fosortpagecitation{% |
| 750 |
\setbox0\hbox{\global\sortcount=0\expandafter\expandafter\expandafter |
| 751 |
\@secondoffive\csname r@\FOrefid\endcsname |
| 752 |
\relax\relax\relax\relax\relax} |
| 753 |
\let\@elt\fosort@elt |
| 754 |
\global\sorttoks\expandafter{\expandafter}\the\sorttoks |
| 755 |
\ifnum\sortcount<\maxdimen |
| 756 |
\global\sorttoks\expandafter{% |
| 757 |
\the\expandafter\sorttoks\expandafter\@elt\expandafter{\the\sortcount}} |
| 758 |
\fi |
| 759 |
} |
| 760 |
|
| 761 |
\def\fosort@elt#1{% |
| 762 |
\ifnum#1>\sortcount |
| 763 |
\global\sorttoks\expandafter{\the\expandafter\sorttoks\expandafter\@elt |
| 764 |
\expandafter{\the\sortcount}\@elt{#1}}% |
| 765 |
\global\sortcount\maxdimen |
| 766 |
\else |
| 767 |
\ifnum#1<\sortcount |
| 768 |
\global\sorttoks\expandafter{\the\sorttoks\@elt{#1}}% |
| 769 |
\fi |
| 770 |
\fi |
| 771 |
} |
| 772 |
|
| 773 |
\gdef\focompress@elt#1{% |
| 774 |
\global\advance\sortcount\@ne |
| 775 |
\ifnum#1=\sortcount |
| 776 |
\ifx\foheld\relax |
| 777 |
\edef\foheld{#1}% |
| 778 |
\else |
| 779 |
\def\foheld{\textendash#1}% |
| 780 |
\fi |
| 781 |
\else |
| 782 |
\foheld\fosep#1 |
| 783 |
\fi |
| 784 |
\global\sortcount#1 |
| 785 |
\def\fosep{, }% |
| 786 |
} |
| 787 |
|
| 788 |
% headers |
| 789 |
\def\FirstHead{\csname right-xsl-before\endcsname} |
| 790 |
\def\FirstFoot{\csname right-xsl-after\endcsname} |
| 791 |
\expandafter\def\csname left-xsl-before\endcsname{} |
| 792 |
\expandafter\def\csname left-xsl-after\endcsname{} |
| 793 |
\expandafter\def\csname right-xsl-before\endcsname{} |
| 794 |
\expandafter\def\csname right-xsl-after\endcsname{} |
| 795 |
\@ifundefined{pdfoutput}{}{\def\pdfBorderAttrs{/Border [0 0 0]}} |
| 796 |
|
| 797 |
%color |
| 798 |
\def\@declaredcolor#1{% |
| 799 |
\@ifundefined{\string\color @#1}% |
| 800 |
{\expandafter\HTMLXColor#1000000\\{#1}}% |
| 801 |
{}% |
| 802 |
\expandafter\let\expandafter\current@color |
| 803 |
\csname\string\color @#1\endcsname |
| 804 |
\set@color |
| 805 |
\ignorespaces} |
| 806 |
|
| 807 |
\def\HTMLXColor#1#2#3#4#5#6#7#8\\#9{% |
| 808 |
% \typeout{Defining color #9 as RGB "#2#3, "#4#5, "#6#7}% |
| 809 |
\toks@{\definecolor{#9}{RGB}}% |
| 810 |
\uppercase{\the\toks@{"#2#3, "#4#5, "#6#7}}% |
| 811 |
} |
| 812 |
\def\HTMLColor#1#2#3#4#5#6#7#8{% |
| 813 |
\definecolor{#1}{RGB}{"#3#4, "#5#6, "#7#8}} |
| 814 |
\HTMLColor{aqua}.00FFFF |
| 815 |
\HTMLColor{black}.000000 |
| 816 |
\HTMLColor{blue}.0000FF |
| 817 |
\HTMLColor{fuchsia}.FF00FF |
| 818 |
\HTMLColor{gray}.808080 |
| 819 |
\HTMLColor{green}.008000 |
| 820 |
\HTMLColor{lime}.00FF00 |
| 821 |
\HTMLColor{maroon}.800000 |
| 822 |
\HTMLColor{navy}.000080 |
| 823 |
\HTMLColor{olive}.808000 |
| 824 |
\HTMLColor{purple}.800080 |
| 825 |
\HTMLColor{red}.FF0000 |
| 826 |
\HTMLColor{silver}.C0C0C0 |
| 827 |
\HTMLColor{teal}.008080 |
| 828 |
\HTMLColor{white}.FFFFFF |
| 829 |
\HTMLColor{yellow}.FFFF00 |
| 830 |
|
| 831 |
\definecolor{orange}{cmyk}{0,0.61,0.87,0} |
| 832 |
\long\def\@firstoffive#1#2#3#4#5{#1}% |
| 833 |
\long\def\@secondoffive#1#2#3#4#5{#2}% |
| 834 |
\long\def\@thirdoffive#1#2#3#4#5{#3}% |
| 835 |
\long\def\@fourthoffive#1#2#3#4#5{#4}% |
| 836 |
\long\def\@fifthoffive#1#2#3#4#5{#5}% |
| 837 |
|
| 838 |
\expandafter\let\csname Format-1\endcsname\@arabic |
| 839 |
\expandafter\let\csname Format-i\endcsname\@roman |
| 840 |
\expandafter\let\csname Format-I\endcsname\@Roman |
| 841 |
\expandafter\let\csname Format-a\endcsname\@alph |
| 842 |
\expandafter\let\csname Format-A\endcsname\@Alph |
| 843 |
|
| 844 |
\def\FOgeneratePage#1#2\@null{\csname Format-#1\endcsname{\c@page}#2} |
| 845 |
|
| 846 |
\def\@item[#1]{% |
| 847 |
\if@noparitem |
| 848 |
\@donoparitem |
| 849 |
\else |
| 850 |
\if@inlabel |
| 851 |
\indent \par |
| 852 |
\fi |
| 853 |
\ifhmode |
| 854 |
\unskip\unskip \par |
| 855 |
\fi |
| 856 |
\if@newlist |
| 857 |
% removed this test 2000/11/05. always put in topsep. |
| 858 |
% \if@nobreak |
| 859 |
% \@nbitem |
| 860 |
% \else |
| 861 |
\addpenalty\@beginparpenalty |
| 862 |
\addvspace\@topsep |
| 863 |
\addvspace{-\parskip}% |
| 864 |
% \fi |
| 865 |
\else |
| 866 |
\addpenalty\@itempenalty |
| 867 |
\addvspace\itemsep |
| 868 |
\fi |
| 869 |
\global\@inlabeltrue |
| 870 |
\fi |
| 871 |
\global\everypar{% |
| 872 |
\@minipagefalse |
| 873 |
\global\@newlistfalse |
| 874 |
\if@inlabel |
| 875 |
\global\@inlabelfalse |
| 876 |
{\setbox\z@\lastbox |
| 877 |
\ifvoid\z@ |
| 878 |
\kern-\itemindent |
| 879 |
\fi}% |
| 880 |
\box\@labels |
| 881 |
\penalty\z@ |
| 882 |
\fi |
| 883 |
\if@nobreak |
| 884 |
\global\@nobreakfalse |
| 885 |
\clubpenalty \@M |
| 886 |
\else |
| 887 |
\clubpenalty \@clubpenalty |
| 888 |
\global\everypar{}% |
| 889 |
\fi}% |
| 890 |
\if@noitemarg |
| 891 |
\@noitemargfalse |
| 892 |
\if@nmbrlist |
| 893 |
\refstepcounter\@listctr |
| 894 |
\fi |
| 895 |
\fi |
| 896 |
\sbox\@tempboxa{\makelabel{#1}}% |
| 897 |
%\typeout{LIST at \the\inputlineno, \the\itemindent, \the\labelwidth, \the\wd\@tempboxa}% |
| 898 |
\global\setbox\@labels\hbox{% |
| 899 |
\unhbox\@labels |
| 900 |
\hskip \itemindent |
| 901 |
\hskip -\labelwidth |
| 902 |
\hskip -\labelsep |
| 903 |
\ifdim \wd\@tempboxa >\labelwidth |
| 904 |
\box\@tempboxa |
| 905 |
\else |
| 906 |
\hbox to\labelwidth {\unhbox\@tempboxa}% |
| 907 |
\fi |
| 908 |
\hskip \labelsep}% |
| 909 |
\ignorespaces} |
| 910 |
|
| 911 |
|
| 912 |
% support for markers |
| 913 |
\gdef\FOmarks{} |
| 914 |
|
| 915 |
\gdef\FOaddmarker#1#2{% |
| 916 |
\ifx\relax#1 |
| 917 |
\else |
| 918 |
\def\FOtemp{#1}% |
| 919 |
\ifx\FOtemp\FOmarkerclassname |
| 920 |
\else |
| 921 |
\toks@\expandafter{\the\toks@{#1}{#2}}% |
| 922 |
\fi |
| 923 |
\expandafter\FOaddmarker |
| 924 |
\fi} |
| 925 |
|
| 926 |
|
| 927 |
\gdef\FOgetmarker#1#2{% |
| 928 |
\ifx\relax#1 |
| 929 |
\DEBUG{unknown mark \FOretrieveclassname, at \the\inputlineno}% |
| 930 |
\else |
| 931 |
\def\FOtemp{#1}% |
| 932 |
\ifx\FOtemp\FOthisretrieveclassname |
| 933 |
% \typeout{\the\inputlineno: Retrieve mark (\FOretrieveposition): |
| 934 |
% \FOthisretrieveclassname: #2}% |
| 935 |
\FOmarkergobble{#2}% |
| 936 |
\fi |
| 937 |
\expandafter\FOgetmarker |
| 938 |
\fi} |
| 939 |
|
| 940 |
\gdef\FOmarkergobble#1#2\relax\relax{\fi\fi#1} |
| 941 |
|
| 942 |
% linebreak |
| 943 |
\def\FOLINEBREAK{% |
| 944 |
\ifnum\FOTableNesting>0 |
| 945 |
\else |
| 946 |
\\ |
| 947 |
\fi |
| 948 |
} |
| 949 |
|
| 950 |
|
| 951 |
% vertical spacing |
| 952 |
\newskip\FOafterskip |
| 953 |
\def\FOvspaceafter{% |
| 954 |
\ifFOinOutput |
| 955 |
\else |
| 956 |
\ifnum\FOTableNesting>0 |
| 957 |
\else |
| 958 |
\ifx\@empty\FOspaceafter |
| 959 |
\@tempdima\FOspaceafteroptimum |
| 960 |
\advance\@tempdima by -\FOspaceafterminimum |
| 961 |
\@tempdimb\FOspaceafteroptimum |
| 962 |
\advance\@tempdimb by \FOspaceaftermaximum |
| 963 |
\FOafterskip\FOspaceafteroptimum plus \@tempdimb minus \@tempdima |
| 964 |
\else |
| 965 |
\FOafterskip\FOspaceafter |
| 966 |
\fi |
| 967 |
\@tempswafalse |
| 968 |
\ifx\FOkeepwithnext\att@always\@tempswatrue\fi |
| 969 |
\ifx\FOkeepwithnextColumn\att@always\@tempswatrue\fi |
| 970 |
\ifx\FOkeepwithnextPage\att@always\@tempswatrue\fi |
| 971 |
\if@tempswa\addpenalty{\@M}\fi |
| 972 |
\addvspace\FOafterskip |
| 973 |
\fi |
| 974 |
\fi |
| 975 |
} |
| 976 |
|
| 977 |
\def\FOvspacebefore{% |
| 978 |
\ifFOinOutput |
| 979 |
\else |
| 980 |
\ifx\@empty\FOspacebefore |
| 981 |
\@tempdima\FOspacebeforeoptimum |
| 982 |
\advance\@tempdima by -\FOspacebeforeminimum |
| 983 |
\@tempdimb\FOspacebeforeoptimum |
| 984 |
\advance\@tempdimb by \FOspacebeforemaximum |
| 985 |
\@tempskipa\FOspacebeforeoptimum plus \@tempdimb minus \@tempdima |
| 986 |
\else |
| 987 |
\@tempskipa\FOspacebefore |
| 988 |
\fi |
| 989 |
%\typeout{SPACE BEFORE \the\inputlineno: \the\@tempskipa, \FOspacebeforeminimum/\FOspacebeforemaximum/\FOspacebeforeoptimum}% |
| 990 |
\ifnum\FOTableNesting>0 |
| 991 |
\rule{\z@}{\@tempskipa}% |
| 992 |
\else |
| 993 |
\@tempswafalse |
| 994 |
\ifx\FOkeepwithnext\att@always\@tempswatrue\fi |
| 995 |
\ifx\FOkeepwithnextColumn\att@always\@tempswatrue\fi |
| 996 |
\ifx\FOkeepwithnextPage\att@always\@tempswatrue\fi |
| 997 |
\if@tempswa\addpenalty\@secpenalty\fi |
| 998 |
\addvspace\@tempskipa |
| 999 |
\fi |
| 1000 |
\fi |
| 1001 |
\def\FOspacebefore{\z@}% |
| 1002 |
} |
| 1003 |
|
| 1004 |
% lets do some setup |
| 1005 |
% setup |
| 1006 |
\paperwidth211mm |
| 1007 |
\paperheight297mm |
| 1008 |
\hoffset-1in |
| 1009 |
\voffset-1in |
| 1010 |
\def\fps@table{!htbp} |
| 1011 |
\def\fps@figure{!htbp} |
| 1012 |
\parindent\z@ |
| 1013 |
\parskip\z@ |
| 1014 |
\emergencystretch 3em |
| 1015 |
\tabcolsep3pt |
| 1016 |
\hbadness=4000 |
| 1017 |
\hyphenpenalty=400 |
| 1018 |
\pretolerance=500 |
| 1019 |
\relpenalty=500 |
| 1020 |
\tolerance=1000 |
| 1021 |
\vbadness=3000 |
| 1022 |
\widowpenalty=8000 |
| 1023 |
\clubpenalty=8000 |
| 1024 |
\@twosidetrue |
| 1025 |
\fboxsep0pt |
| 1026 |
\setcounter{topnumber}{5} |
| 1027 |
\renewcommand\topfraction{.9} |
| 1028 |
\setcounter{bottomnumber}{12} |
| 1029 |
\renewcommand\bottomfraction{.9} |
| 1030 |
\setcounter{totalnumber}{6} |
| 1031 |
\renewcommand\textfraction{.1} |
| 1032 |
\def\FOpdfsetpagesize#1#2{% |
| 1033 |
\@ifundefined{pdfoutput}{}{% |
| 1034 |
\global\pdfpagewidth\paperwidth |
| 1035 |
\global\pdfpageheight\paperheight |
| 1036 |
\DEBUG{Setting pdf size to \the\pdfpagewidth, \the\pdfpageheight}% |
| 1037 |
}% |
| 1038 |
} |
| 1039 |
\let\SpecialOffset\z@ |
| 1040 |
% and now read the .cfg |
| 1041 |
\openin\@inputcheck fotex.cfg |
| 1042 |
\ifeof\@inputcheck\relax |
| 1043 |
\else |
| 1044 |
\closein\@inputcheck |
| 1045 |
\input{fotex.cfg} |
| 1046 |
\fi |
| 1047 |
\begingroup |
| 1048 |
\catcode`\^^M\active\catcode`\ \active\gdef\@resetactivechars{\def^^M{<m>}\def {<s>}}\endgroup |
| 1049 |
%\catcode`\^^M\active\gdef\@resetactivechars{\def^^M{x}}\endgroup |
| 1050 |
|
| 1051 |
\def\@outputpage{% |
| 1052 |
\begingroup % the \endgroup is put in by \aftergroup |
| 1053 |
\let \protect \noexpand |
| 1054 |
% \@resetactivechars |
| 1055 |
\@parboxrestore |
| 1056 |
\shipout \vbox{% |
| 1057 |
\set@typeset@protect |
| 1058 |
\aftergroup \endgroup |
| 1059 |
\aftergroup \set@typeset@protect |
| 1060 |
% correct? or just restore by ending |
| 1061 |
% the group? |
| 1062 |
\if@specialpage |
| 1063 |
\global\@specialpagefalse |
| 1064 |
\def\@thehead{\csname\FirstHead\endcsname}% |
| 1065 |
\def\@thefoot{\csname\FirstTail\endcsname}% |
| 1066 |
\let\@themargin\oddsidemargin |
| 1067 |
\def\headheight{\FirstHeadExtent}% |
| 1068 |
\def\tailheight{\FirstTailExtent}% |
| 1069 |
\else |
| 1070 |
\ifodd\count\z@ |
| 1071 |
\def\@thehead{\csname\OddHead\endcsname}% |
| 1072 |
\def\@thefoot{\csname\OddTail\endcsname}% |
| 1073 |
\let\@themargin\oddsidemargin |
| 1074 |
\def\headheight{\OddHeadExtent}% |
| 1075 |
\def\tailheight{\OddTailExtent}% |
| 1076 |
\else |
| 1077 |
\def\@thehead{\csname\EvenHead\endcsname}% |
| 1078 |
\def\@thefoot{\csname\EvenTail\endcsname}% |
| 1079 |
\let\@themargin\evensidemargin |
| 1080 |
\def\headheight{\EvenHeadExtent}% |
| 1081 |
\def\tailheight{\EvenTailExtent}% |
| 1082 |
\fi |
| 1083 |
\fi |
| 1084 |
\@tempdima\textwidth |
| 1085 |
\advance\@tempdima by -\FOheadindent |
| 1086 |
\reset@font |
| 1087 |
\normalsize |
| 1088 |
\normalsfcodes |
| 1089 |
\let\label\@gobble |
| 1090 |
\let\index\@gobble |
| 1091 |
\let\glossary\@gobble |
| 1092 |
\baselineskip\z@skip \lineskip\z@skip \lineskiplimit\z@ |
| 1093 |
\@begindvi |
| 1094 |
\vskip \topmargin |
| 1095 |
\moveright\@themargin \vbox {% |
| 1096 |
\setbox\@tempboxa \vbox to\headheight{% |
| 1097 |
\color@hbox |
| 1098 |
\normalcolor |
| 1099 |
\hb@xt@\textwidth{\hfill\llap{\hb@xt@\@tempdima{\@thehead}}}% |
| 1100 |
\color@endbox |
| 1101 |
\vfil |
| 1102 |
}% |
| 1103 |
\dp\@tempboxa \z@ |
| 1104 |
\box\@tempboxa |
| 1105 |
\vskip \headsep |
| 1106 |
\box\@outputbox |
| 1107 |
\baselineskip \footskip |
| 1108 |
\vskip \bottommargin |
| 1109 |
\@tempdima\textwidth |
| 1110 |
\advance\@tempdima by -\FOheadindent |
| 1111 |
\setbox\@tempboxa \vbox to\tailheight{% |
| 1112 |
\color@hbox |
| 1113 |
\normalcolor |
| 1114 |
\hb@xt@\textwidth{\hfill\llap{\hb@xt@\@tempdima{\@thefoot}}}% |
| 1115 |
\color@endbox |
| 1116 |
\vfil |
| 1117 |
}% |
| 1118 |
\dp\@tempboxa \z@ |
| 1119 |
\box\@tempboxa |
| 1120 |
}% |
| 1121 |
}% |
| 1122 |
\global \@colht \textheight |
| 1123 |
\stepcounter{page}% |
| 1124 |
\let\firstmark\botmark |
| 1125 |
} |
| 1126 |
|
| 1127 |
%%%% |
| 1128 |
\def\FO@character#1{% |
| 1129 |
\ifx\FOverticalalign\att@baseline |
| 1130 |
#1% |
| 1131 |
\else |
| 1132 |
\ifx\FOverticalalign\att@super |
| 1133 |
\textsuperscript{#1}% |
| 1134 |
\else |
| 1135 |
\ifx\FOverticalalign\att@sub |
| 1136 |
\textsubscript{#1}% |
| 1137 |
\else |
| 1138 |
\PlayWithShift |
| 1139 |
\raisebox{\dimen@}{#1}% |
| 1140 |
\fi |
| 1141 |
\fi |
| 1142 |
\fi |
| 1143 |
} |
| 1144 |
\def\FO@inlinesequence#1{% |
| 1145 |
\FOSetFont{normal}% |
| 1146 |
\ifx\FOverticalalign\att@baseline |
| 1147 |
\csname DECO@\FOtextdecoration\endcsname{\FOlabel#1}% |
| 1148 |
\else |
| 1149 |
\ifx\FOverticalalign\att@super |
| 1150 |
\textsuperscript{\csname DECO@\FOtextdecoration\endcsname{\FOlabel#1}}% |
| 1151 |
\else |
| 1152 |
\ifx\FOverticalalign\att@sub |
| 1153 |
\textsubscript{\csname DECO@\FOtextdecoration\endcsname{\FOlabel#1}}% |
| 1154 |
\else |
| 1155 |
\PlayWithShift |
| 1156 |
\raisebox{\dimen@}{\csname DECO@\FOtextdecoration\endcsname{\FOlabel#1}}% |
| 1157 |
\fi |
| 1158 |
\fi |
| 1159 |
\fi |
| 1160 |
} |
| 1161 |
\def\FOboxedsequence#1{% |
| 1162 |
\FOSetFont{normal}% |
| 1163 |
\ifx\FOborderwidth\@empty\else\fboxrule\FOborderwidth\fi |
| 1164 |
\ifx\FOverticalalign\att@baseline |
| 1165 |
\fbox{\csname DECO@\FOtextdecoration\endcsname{\FOlabel#1}}% |
| 1166 |
\else |
| 1167 |
\ifFOSuper |
| 1168 |
\fbox{\textsuperscript{\FOlabel#1}}% |
| 1169 |
\else |
| 1170 |
\ifFOSub |
| 1171 |
\fbox{\textsubscript{\FOlabel#1}}% |
| 1172 |
\else |
| 1173 |
\PlayWithShift |
| 1174 |
\fbox{\raisebox{\dimen@}{\FOlabel#1}}% |
| 1175 |
\fi |
| 1176 |
\fi |
| 1177 |
\fi |
| 1178 |
} |
| 1179 |
% |
| 1180 |
\def\FOSetStatic{\expandafter\@SetStatic\FOtextindent\\} |
| 1181 |
\def\@SetStatic#1\\{\expandafter\@@SetStatic\FOfontsize\\{#1}} |
| 1182 |
\def\@@SetStatic#1\\#2{\expandafter\@@@SetStatic\FOfontweight\\{#1}{#2}} |
| 1183 |
\def\@@@SetStatic#1\\#2#3{\expandafter\@@@@SetStatic\FOfontvariant\\{#1}{#2}{#3}} |
| 1184 |
\def\@@@@SetStatic#1\\#2#3#4{\expandafter\@@@@@SetStatic\FOfontstyle\\{#1}{#2}{#3}{#4}} |
| 1185 |
\def\@@@@@SetStatic#1\\#2#3#4#5{\expandafter\@@@@@@SetStatic\FOfontstretch\\{#1}{#2}{#3}{#4}{#5}} |
| 1186 |
\def\@@@@@@SetStatic#1\\#2#3#4#5#6{\expandafter\@@@@@@@SetStatic\FOfontfamily\\{#1}{#2}{#3}{#4}{#5}{#6}} |
| 1187 |
|
| 1188 |
\expandafter\def\csname Static:DummyRegion\endcsname{} |
| 1189 |
\def\@@@@@@@SetStatic#1\\#2#3#4#5#6#7#8#9{% |
| 1190 |
\DEBUG{ set up static area Static:#9 [#8]}% |
| 1191 |
\expandafter\gdef\csname Static:#9\endcsname{% |
| 1192 |
{% |
| 1193 |
{\def\XML@parent{}\global\FOinOutputtrue |
| 1194 |
\def\FOwhitespacecollapse{true}% |
| 1195 |
\def\FOwrapoption{wrap}% |
| 1196 |
\def\FOtextalign{start}% |
| 1197 |
\def\FOfontfamily{#1}% |
| 1198 |
\def\FOfontsize{#6}% |
| 1199 |
\def\FOfontstretch{#2}% |
| 1200 |
\def\FOfontvariant{#4}% |
| 1201 |
\def\FOfontweight{#5}% |
| 1202 |
\def\FOfontstyle{#3}#8\global\FOinOutputfalse}}}% |
| 1203 |
} |
| 1204 |
|
| 1205 |
\let\olditem\item |
| 1206 |
\def\item{\if@inlabel\leavevmode\fi\olditem} |
| 1207 |
\def\FOlabel{% |
| 1208 |
\ifx\@empty\FOid\else |
| 1209 |
% \typeout{Hypertext label \FOid, at \the\inputlineno}% |
| 1210 |
\@bsphack |
| 1211 |
\protected@write\@mainaux{}% |
| 1212 |
{\string\newlabel{\FOid}{{}{\expandafter\FOgeneratePage\FOformat\@null}{}{\FOid}{}}}% |
| 1213 |
\@esphack |
| 1214 |
\hyper@@anchor{\FOid}{\relax}% |
| 1215 |
\global\let\FOid\@empty |
| 1216 |
\fi |
| 1217 |
} |
| 1218 |
|
| 1219 |
\def\FOListBlock{% |
| 1220 |
\FOSetFont{normal}% |
| 1221 |
\get@external@font\xdef\FOlistlabelfont{\external@font}% |
| 1222 |
\ifx\@empty\FOspacebefore |
| 1223 |
\@tempdima\FOspacebeforeoptimum |
| 1224 |
\advance\@tempdima by -\FOspacebeforeminimum |
| 1225 |
\@tempdimb\FOspacebeforeoptimum |
| 1226 |
\advance\@tempdimb by \FOspacebeforemaximum |
| 1227 |
\itemsep\FOspacebeforeoptimum plus \@tempdimb minus \@tempdima |
| 1228 |
\else |
| 1229 |
\itemsep\FOspacebefore |
| 1230 |
\fi |
| 1231 |
\itemindent=\FOstartindent |
| 1232 |
\leftmargin=\FOprovisionaldistancebetweenstarts |
| 1233 |
\rightmargin=\FOmarginright |
| 1234 |
\labelwidth=\FOprovisionaldistancebetweenstarts |
| 1235 |
\advance\labelwidth by -\FOprovisionallabelseparation |
| 1236 |
\expandafter\csname List\FOtextalign\endcsname |
| 1237 |
%\typeout{List at \the\inputlineno: labelwidth: \the\labelwidth, |
| 1238 |
% labelsep: \the\labelsep, leftmargin: \the\leftmargin, itemindent |
| 1239 |
% \the\itemindent, makelabel: \meaning\makelabel, |
| 1240 |
% itemsep: \the\itemsep, \FOtextalign}% |
| 1241 |
} |
| 1242 |
|
| 1243 |
\def\FOOutputBlock{% |
| 1244 |
\FOSetFont{output}% |
| 1245 |
\ifFOBlockGrab |
| 1246 |
\FOBoxedBlock{\textwidth}% |
| 1247 |
\fi |
| 1248 |
\ifx\FOtextalignlast\att@relative |
| 1249 |
\csname startQ@\FOtextalign\endcsname |
| 1250 |
\csname Q@\FOtextalign\endcsname |
| 1251 |
\else |
| 1252 |
\csname startQ@\FOtextalignlast\endcsname |
| 1253 |
\csname Q@\FOtextalignlast\endcsname |
| 1254 |
\fi |
| 1255 |
} |
| 1256 |
|
| 1257 |
\def\FONormalBlock{% |
| 1258 |
\let\@x\relax |
| 1259 |
\ifnum\FOTableNesting>0 |
| 1260 |
\ifx\FOtextalign\att@centered |
| 1261 |
\centering |
| 1262 |
\fi |
| 1263 |
\let\@x\relax |
| 1264 |
\FOSetFont{normalblock}% |
| 1265 |
\vrule height \f@baselineskip depth \z@ width \z@ |
| 1266 |
\else |
| 1267 |
\ifnum\FOinList>0 |
| 1268 |
\FOlabel |
| 1269 |
\ifFOListInnerPar\par\FOvspacebefore\fi |
| 1270 |
\ifx\FOwhitespace\att@pre\obeyspaces\obeylines\fi |
| 1271 |
\ifx\FOwhitespacecollapse\att@false\obeyspaces\fi |
| 1272 |
\ifx\FOwrapoption\att@nowrap\obeylines\fi |
| 1273 |
\else |
| 1274 |
\ifx\FObreakbefore\att@page |
| 1275 |
\let\tempID\FOid |
| 1276 |
\penalty -\@M |
| 1277 |
\let\FOid\tempID |
| 1278 |
\else |
| 1279 |
\ifx\FObreakbefore\att@oddpage |
| 1280 |
\let\tempID\FOid |
| 1281 |
\penalty -\@M |
| 1282 |
\ifodd\c@page\else\BlankPage\newpage\fi |
| 1283 |
\let\FOid\tempID |
| 1284 |
\fi |
| 1285 |
\fi |
| 1286 |
\par |
| 1287 |
\FOlabel |
| 1288 |
\Quadding |
| 1289 |
\ifFOBlockGrab |
| 1290 |
\FOBoxedBlock{\linewidth}% |
| 1291 |
\else |
| 1292 |
\FOBorderTop |
| 1293 |
\ifdim\FOpaddingbefore>\z@ |
| 1294 |
\vskip\FOpaddingbefore |
| 1295 |
\fi |
| 1296 |
\FOvspacebefore |
| 1297 |
\parindent\FOtextindent |
| 1298 |
\advance\leftskip by \FOpaddingstart |
| 1299 |
\advance\leftskip by \FOmarginleft |
| 1300 |
\advance\rightskip by \FOpaddingend |
| 1301 |
\advance\rightskip by \FOmarginright |
| 1302 |
\fi |
| 1303 |
% \par |
| 1304 |
\ifx\FOwhitespace\att@pre\obeyspaces\obeylines\fi |
| 1305 |
\ifx\FOwhitespacecollapse\att@false\obeyspaces\fi |
| 1306 |
\ifx\FOwrapoption\att@nowrap\obeylines\fi |
| 1307 |
\fi |
| 1308 |
\FOSetFont{normal}% |
| 1309 |
\fi |
| 1310 |
\@x |
| 1311 |
} |
| 1312 |
|
| 1313 |
\def\FOEndOutputBlock{% |
| 1314 |
\ifx\FOtextalignlast\att@relative |
| 1315 |
\csname endQ@\FOtextalign\endcsname |
| 1316 |
\else |
| 1317 |
\csname endQ@\FOtextalignlast\endcsname |
| 1318 |
\fi |
| 1319 |
\ifFOBlockGrab |
| 1320 |
\FOEndBoxedBlock |
| 1321 |
\fi |
| 1322 |
\par |
| 1323 |
} |
| 1324 |
\def\FOEndBlock{% |
| 1325 |
\ifx\XML@parent\FOListItemLabel |
| 1326 |
\else |
| 1327 |
\ifnum\FOinList>0 |
| 1328 |
\ifFOListInnerPar\par\fi |
| 1329 |
\else |
| 1330 |
\ifnum\FOTableNesting>0 |
| 1331 |
\else |
| 1332 |
\FOEndBlockTwo |
| 1333 |
\fi |
| 1334 |
\fi |
| 1335 |
\fi |
| 1336 |
} |
| 1337 |
|
| 1338 |
\def\FOEndBlockTwo{% |
| 1339 |
\par |
| 1340 |
\ifFOBlockGrab |
| 1341 |
\FOEndBoxedBlock |
| 1342 |
\else |
| 1343 |
\ifdim\FOpaddingafter>\z@ |
| 1344 |
\vskip\FOpaddingafter |
| 1345 |
\fi |
| 1346 |
\FOBorderBottom |
| 1347 |
\fi |
| 1348 |
\ifx\FObreakafter\att@page |
| 1349 |
\penalty -\@M |
| 1350 |
\else |
| 1351 |
\ifx\FObreakafter\att@oddpage |
| 1352 |
\cleardoublepage |
| 1353 |
\fi |
| 1354 |
\fi |
| 1355 |
\@tempswafalse |
| 1356 |
\ifx\FOkeepwithnext\att@always\@tempswatrue\fi |
| 1357 |
\ifx\FOkeepwithnextColumn\att@always\@tempswatrue\fi |
| 1358 |
\ifx\FOkeepwithnextPage\att@always\@tempswatrue\fi |
| 1359 |
\if@tempswa\nobreak\fi |
| 1360 |
\FOvspaceafter |
| 1361 |
\if@tempswa\@afterheading\fi |
| 1362 |
} |
| 1363 |
|
| 1364 |
|
| 1365 |
\def\FOStartGrab#1{% |
| 1366 |
\@tempdima#1 |
| 1367 |
\XFOstartindent\FOstartindent |
| 1368 |
\ifnum\XFOstartindent=\z@ |
| 1369 |
\else |
| 1370 |
\advance\XFOstartindent by -\FOmarginleft |
| 1371 |
\advance\XFOstartindent by -\FOborderstartwidth |
| 1372 |
\advance\XFOstartindent by -\FOpaddingstart |
| 1373 |
\advance\@tempdima by -\XFOstartindent |
| 1374 |
\fi |
| 1375 |
\advance\@tempdima by -\FOmarginleft |
| 1376 |
\advance\@tempdima by -\FOborderstartwidth |
| 1377 |
\advance\@tempdima by -\FOpaddingstart |
| 1378 |
\XFOendindent\FOendindent |
| 1379 |
\ifx\FOstartindent\att@bodystart |
| 1380 |
\let\FOstartindent\z@ |
| 1381 |
\fi |
| 1382 |
\ifx\FOendindent\att@labelend |
| 1383 |
\let\FOendindent\z@ |
| 1384 |
\fi |
| 1385 |
\ifnum\XFOendindent=\z@ |
| 1386 |
\else |
| 1387 |
\advance\XFOendindent by -\FOpaddingend |
| 1388 |
\advance\XFOendindent by -\FOmarginright |
| 1389 |
\advance\XFOendindent by -\FOborderendwidth |
| 1390 |
\advance\@tempdima by -\XFOendindent |
| 1391 |
\fi |
| 1392 |
\advance\@tempdima by -\FOpaddingend |
| 1393 |
\advance\@tempdima by -\FOmarginright |
| 1394 |
\advance\@tempdima by -\FOborderendwidth |
| 1395 |
%\typeout{Block at\the\inputlineno,Padding:\FOpaddingstart/\FOpaddingend,Border:\FOborderstartwidth/\FOborderendwidth,Margin:\FOmarginleft/\FOmarginleft,Indent:\FOstartindent/\FOendindent, \the\XFOstartindent/\the\XFOendindent}% |
| 1396 |
% |
| 1397 |
\begin{lrbox}{\BlockBox}% |
| 1398 |
\begin{minipage}[b]{\@tempdima}% |
| 1399 |
\vskip\FOpaddingbefore |
| 1400 |
\parindent\FOtextindent\leftskip\z@\rightskip\z@ |
| 1401 |
} |
| 1402 |
\def\FOEndGrab#1{% |
| 1403 |
\vspace*{\FOpaddingafter}% |
| 1404 |
\end{minipage}% |
| 1405 |
\end{lrbox}% |
| 1406 |
%\typeout{Grabbed Block at\the\inputlineno,Padding:\FOpaddingstart/\FOpaddingend,|\FOpaddingbefore/\FOpaddingafter, Border:\FOborderstartwidth/\FOborderendwidth,Margin:\FOmarginleft/\FOmarginleft,Indent:\FOstartindent/\FOendindent, \the\XFOstartindent/\the\XFOendindent}% |
| 1407 |
\FOvspacebefore |
| 1408 |
\@tempdima\ht\BlockBox |
| 1409 |
% \advance\@tempdima by \FOpaddingbefore |
| 1410 |
% \advance\@tempdima by \FOpaddingafter |
| 1411 |
\advance\@tempdima by \FOborderbeforewidth |
| 1412 |
\advance\@tempdima by \FOborderafterwidth |
| 1413 |
\ifx\FOborderstyle\att@solid |
| 1414 |
\ifx\FObackgroundcolor\att@transparent |
| 1415 |
\fboxrule\FOborderwidth |
| 1416 |
\fboxsep\FOpadding |
| 1417 |
\vbox to \@tempdima{\hsize#1\parindent\z@\vfil |
| 1418 |
\hbox{\hfil\fbox{\usebox{\BlockBox}}\hfil}\vfil}% |
| 1419 |
\else |
| 1420 |
\vbox to \@tempdima{\hsize#1\vfil\fboxsep\FOpadding\fboxrule\FOborderwidth |
| 1421 |
\hbox{\hfil\fcolorbox{\FObordercolor}{\FObackgroundcolor}% |
| 1422 |
{\box\BlockBox}\hfil}\vfil}% |
| 1423 |
\fi |
| 1424 |
\else |
| 1425 |
\vbox to \@tempdima{\hsize#1\parindent\z@\vfil |
| 1426 |
\ifdim\FOborderbeforewidth>\z@ |
| 1427 |
{\color{\FOborderbeforecolor}% |
| 1428 |
\vrule width #1 depth \z@ height \FOborderbeforewidth}% |
| 1429 |
\fi |
| 1430 |
\hbox{% |
| 1431 |
\hskip\XFOstartindent |
| 1432 |
\hskip\FOmarginleft |
| 1433 |
\ifdim\FOborderstartwidth>\z@ |
| 1434 |
{\color{\FOborderstartcolor}% |
| 1435 |
\vrule width \FOborderstartwidth height \the\@tempdima}% |
| 1436 |
\fi |
| 1437 |
\hskip\FOpaddingstart |
| 1438 |
\ifx\FObackgroundcolor\att@transparent |
| 1439 |
\hbox{\box\BlockBox}% |
| 1440 |
\else |
| 1441 |
\colorbox{\FObackgroundcolor}% |
| 1442 |
{\box\BlockBox}% |
| 1443 |
\fi |
| 1444 |
\hskip\FOpaddingend |
| 1445 |
\ifdim\FOborderendwidth>\z@ |
| 1446 |
{\color{\FOborderendcolor}% |
| 1447 |
\vrule width \FOborderendwidth depth \z@ height |
| 1448 |
\the\@tempdima}% |
| 1449 |
\fi |
| 1450 |
\hskip\FOmarginright |
| 1451 |
\hskip\XFOendindent |
| 1452 |
}% |
| 1453 |
\ifdim\FOborderafterwidth>\z@ |
| 1454 |
{\color{\FOborderaftercolor}% |
| 1455 |
\vrule width #1 depth \z@ height \FOborderafterwidth }% |
| 1456 |
\fi |
| 1457 |
\vfil |
| 1458 |
}% |
| 1459 |
\fi |
| 1460 |
} |
| 1461 |
|
| 1462 |
\def\FOBorderBottom{% |
| 1463 |
\ifx\FOborderafterstyle\att@solid |
| 1464 |
\ifx\FOborderafterwidth\att@thin\def\FOborderafterwidth{0.4pt}\fi |
| 1465 |
\ifx\FOborderafterwidth\att@medium\def\FOborderafterwidth{0.8pt}\fi |
| 1466 |
\ifx\FOborderafterwidth\att@thick\def\FOborderafterwidth{1.2pt}\fi |
| 1467 |
\else |
| 1468 |
\def\FOborderafterwidth{\z@}% |
| 1469 |
\fi |
| 1470 |
\ifx\FOborderbeforestyle\att@solid |
| 1471 |
\ifx\FOborderbeforewidth\att@thin\def\FOborderbeforewidth{0.4pt}\fi |
| 1472 |
\ifx\FOborderbeforewidth\att@medium\def\FOborderbeforewidth{0.8pt}\fi |
| 1473 |
\ifx\FOborderbeforewidth\att@thick\def\FOborderbeforewidth{1.2pt}\fi |
| 1474 |
\FOBlockGrabtrue |
| 1475 |
\else |
| 1476 |
\def\FOborderbeforewidth{\z@}% |
| 1477 |
\fi |
| 1478 |
\ifdim\FOborderafterwidth>\z@ |
| 1479 |
\ifx\FOborderafterstyle\att@solid |
| 1480 |
{\color{\FObordercolor}\hrule height \FOborderafterwidth}% |
| 1481 |
\fi |
| 1482 |
\fi |
| 1483 |
} |
| 1484 |
|
| 1485 |
\def\FOBorderTop{% |
| 1486 |
\ifdim\FOborderbeforewidth>\z@ |
| 1487 |
\ifx\FOborderbeforestyle\att@solid |
| 1488 |
{\color{\FObordercolor}\hrule height \FOborderbeforewidth}% |
| 1489 |
\fi |
| 1490 |
\fi |
| 1491 |
} |
| 1492 |
|
| 1493 |
\def\FOfootnotemark{\protect\@FOfootnotemark} |
| 1494 |
\def\@FOfootnotemark#1{% tag |
| 1495 |
\def\@thefnmark{#1}% |
| 1496 |
\expandafter\let\csname p@footnote\endcsname\relax |
| 1497 |
\@footnotemark% |
| 1498 |
} |
| 1499 |
\def\FOfootnotetext{\protect\@FOfootnotetext} |
| 1500 |
\def\@FOfootnotetext#1#2{% plain tag and text, no interpretation |
| 1501 |
\def\@thefnmark{#1}% |
| 1502 |
\expandafter\let\csname p@footnote\endcsname\relax |
| 1503 |
\@footnotetext{\FOlabel#2}} |
| 1504 |
|
| 1505 |
\def\FOplainfootmark#1{#1} |
| 1506 |
\long\def\FOplainfoottext#1{\insert\footins{% |
| 1507 |
\reset@font\footnotesize |
| 1508 |
\interlinepenalty\interfootnotelinepenalty |
| 1509 |
\splittopskip\footnotesep |
| 1510 |
\splitmaxdepth \dp\strutbox \floatingpenalty \@MM |
| 1511 |
\hsize\columnwidth \@parboxrestore |
| 1512 |
\color@begingroup |
| 1513 |
#1\unskip\ifhmode\nobreak\fi\vskip\lineskip |
| 1514 |
\color@endgroup}% |
| 1515 |
} |
| 1516 |
\ColSpecs={}% |
| 1517 |
\NCols0 |
| 1518 |
\RowCount0 |
| 1519 |
\def\doTable#1\\#2{% |
| 1520 |
\par |
| 1521 |
\advance\leftskip by \FOpaddingstart |
| 1522 |
\advance\rightskip by \FOpaddingend |
| 1523 |
\advance\rightskip by \FOmarginright |
| 1524 |
\advance\leftskip by \FOmarginleft |
| 1525 |
\FOSetFont{normal}% |
| 1526 |
\csname LTleft@\FOtextalign\endcsname |
| 1527 |
\csname LTright@\FOtextalign\endcsname |
| 1528 |
%\typeout{LT: \FOtextalign, \the\LTleft, \the\LTright}% |
| 1529 |
\FOlabel |
| 1530 |
\ifnum\NColumns>1 |
| 1531 |
\tabular{#1} |
| 1532 |
\else |
| 1533 |
\ifnum\FOTableNesting>1 |
| 1534 |
\tabular{#1}% |
| 1535 |
\else |
| 1536 |
\longtable{#1}% |
| 1537 |
\fi |
| 1538 |
\fi |
| 1539 |
#2} |
| 1540 |
|
| 1541 |
\newdimen\@default |
| 1542 |
\@default=10pt |
| 1543 |
|
| 1544 |
% set up hyphenation and font-related things |
| 1545 |
\def\LastLanguage{(undefined)} |
| 1546 |
\selectlanguage{english} |
| 1547 |
|
| 1548 |
\def\LoadLanguage#1{% |
| 1549 |
\begingroup\utfeight@protect@chars\xdef\newL{#1}\endgroup |
| 1550 |
% \@ifundefined{L@\newL}{% |
| 1551 |
% \DEBUG{WARNING: unknown language \newL, loading english}% |
| 1552 |
% \csname L@us\endcsname |
| 1553 |
% }{% |
| 1554 |
\ifx\newL\LastLanguage |
| 1555 |
\else |
| 1556 |
\DEBUG{\the\inputlineno: hyphenation \newL, to replace \LastLanguage}% |
| 1557 |
\csname L@\newL\endcsname |
| 1558 |
\fi |
| 1559 |
%} |
| 1560 |
\edef\LastLanguage{\newL}} |
| 1561 |
|
| 1562 |
\def\FOSetHyphenation{% |
| 1563 |
\ifx\FOhyphenate\att@true |
| 1564 |
\LoadLanguage{\FOlanguage}% |
| 1565 |
\hyphenpenalty=\exhyphenpenalty |
| 1566 |
\else |
| 1567 |
\hyphenpenalty=10000 |
| 1568 |
\fi |
| 1569 |
} |
| 1570 |
\def\FOSetFont#1{% |
| 1571 |
\FOSetHyphenation |
| 1572 |
\edef\LaTeXshape{\csname Width@\FOfontstretch\endcsname |
| 1573 |
\csname Weight@\FOfontweight\endcsname}% |
| 1574 |
\ifx\LaTeXshape\@empty\def\LaTeXshape{m}\fi |
| 1575 |
\edef\fFamName{\FOfontfamily}% |
| 1576 |
%\typeout{#1 At \the\inputlineno, \FOfontweight, \FOfontstyle, |
| 1577 |
% \FOfontsize, \FOtextalign, \LaTeXshape}% |
| 1578 |
\edef\f@series{\LaTeXshape}% |
| 1579 |
\edef\f@shape{\csname Posture@\FOfontstyle\endcsname}% |
| 1580 |
\ifx\FOfontvariant\att@smallcaps |
| 1581 |
\def\f@shape{sc}% |
| 1582 |
\fi |
| 1583 |
\let\f@family\relax |
| 1584 |
\@for\FOfoo:=\FOfontfamily\do{% |
| 1585 |
\ifx\f@family\relax |
| 1586 |
\expandafter\let\expandafter\f@family |
| 1587 |
\csname Family@\FOfoo\endcsname |
| 1588 |
\fi}% |
| 1589 |
\ifx\f@family\relax |
| 1590 |
\def\f@family{\csname Family@\Defaultx@fontfamily\endcsname}% |
| 1591 |
\fi |
| 1592 |
\FOSetFontSize |
| 1593 |
\selectfont |
| 1594 |
\ifx\FOcolor\@empty |
| 1595 |
\else |
| 1596 |
\color{\FOcolor}% |
| 1597 |
\fi |
| 1598 |
} |
| 1599 |
\expandafter\def\csname size-xx-small\endcsname{7pt} |
| 1600 |
\expandafter\def\csname size-x-small\endcsname{8pt} |
| 1601 |
\expandafter\def\csname size-small\endcsname{9pt} |
| 1602 |
\expandafter\def\csname size-medium\endcsname{10pt} |
| 1603 |
\expandafter\def\csname size-large\endcsname{14.4pt} |
| 1604 |
\expandafter\def\csname size-x-large\endcsname{18pt} |
| 1605 |
\expandafter\def\csname size-xx-large\endcsname{20pt} |
| 1606 |
\def\computeFOfontsize{% |
| 1607 |
\expandafter\ifx\csname size-\FOfontsize\endcsname\relax |
| 1608 |
\PlayWithFSize\FOfontsize |
| 1609 |
\else |
| 1610 |
\edef\FOfontsizefinal{\csname size-\FOfontsize\endcsname}% |
| 1611 |
\fi |
| 1612 |
} |
| 1613 |
\def\FOSetFootFont{% |
| 1614 |
\computeFOfontsize |
| 1615 |
\ifx\FOlineheight\att@normal |
| 1616 |
\@tempdima\FOfontsizefinal |
| 1617 |
\multiply\@tempdima by 12 |
| 1618 |
\divide\@tempdima by 10 |
| 1619 |
\set@fontsize\FOfootnotesize{\FOfontsizefinal}{\@tempdima}% |
| 1620 |
\else |
| 1621 |
\@setfontsize\FOfootnotesize{\FOfontsizefinal}{\FOlineheight}% |
| 1622 |
\fi |
| 1623 |
} |
| 1624 |
\def\FOSetFontSize{% |
| 1625 |
\computeFOfontsize |
| 1626 |
\ifx\FOlineheight\att@normal |
| 1627 |
\@tempdima\FOfontsizefinal |
| 1628 |
\multiply\@tempdima by 12 |
| 1629 |
\divide\@tempdima by 10 |
| 1630 |
\set@fontsize\baselinestretch{\FOfontsizefinal}{\@tempdima}% |
| 1631 |
\else |
| 1632 |
\set@fontsize\baselinestretch{\FOfontsizefinal}{\FOlineheight}% |
| 1633 |
\fi |
| 1634 |
} |
| 1635 |
|
| 1636 |
\DeclareRobustCommand*\textsubscript[1]{% |
| 1637 |
\@textsubscript{\selectfont#1}} |
| 1638 |
\def\@textsubscript#1{% |
| 1639 |
{\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}} |
| 1640 |
\def\reserved@e{} |
| 1641 |
\def\FOSetPage{% |
| 1642 |
\bottommargin\Marginbottom |
| 1643 |
\headsep\Margintop |
| 1644 |
\topmargin\MasterTopMargin |
| 1645 |
\advance\topmargin by \SpecialOffset |
| 1646 |
\textheight\paperheight |
| 1647 |
\textwidth\paperwidth |
| 1648 |
\advance\textheight by -\FirstHeadExtent |
| 1649 |
\advance\textheight by -\FirstTailExtent |
| 1650 |
\advance\textheight by -\MasterTopMargin |
| 1651 |
\advance\textheight by -\Margintop |
| 1652 |
\advance\textheight by -\MasterBottomMargin |
| 1653 |
\advance\textheight by -\Marginbottom |
| 1654 |
\advance\textwidth by -\MasterLeftMargin |
| 1655 |
\advance\textwidth by -\MasterRightMargin |
| 1656 |
\FOpdfsetpagesize{\paperwidth}{\paperheight} |
| 1657 |
\@colht\textheight |
| 1658 |
\@colroom\textheight |
| 1659 |
\vsize\textheight |
| 1660 |
\linewidth\textwidth |
| 1661 |
\columnwidth\textwidth |
| 1662 |
\hsize\columnwidth \linewidth\hsize |
| 1663 |
\def\headheight{12pt}% |
| 1664 |
\DEBUG{Page size is \the\textwidth/\the\textheight, |
| 1665 |
on paper \the\paperwidth/\the\paperheight,^^J |
| 1666 |
with paper margins \the\MasterRightMargin/\the\MasterLeftMargin, |
| 1667 |
and region margins \the\topmargin/\the\MasterBottomMargin;^^J |
| 1668 |
footskip is \the\footskip, headsep is \the\headsep^^J |
| 1669 |
evensidemargin \the\evensidemargin, oddsidemargin \the\oddsidemargin}% |
| 1670 |
\global\@specialpagetrue |
| 1671 |
} |
| 1672 |
% don't ask |
| 1673 |
\def\supppdf{supp-pdf} |
| 1674 |
\let\FOinputIfFileExists\InputIfFileExists |
| 1675 |
\def\InputIfFileExists#1#2#3{% |
| 1676 |
{\def\@tempa{#1}\ifx\@tempa\supppdf\else |
| 1677 |
\FOinputIfFileExists{#1}{#2}{#3}\fi}} |
| 1678 |
%\catcode`^^M=10 |
| 1679 |
\providecommand\textasciitilde{~} |
| 1680 |
|
| 1681 |
\define@key{Gin}{scale}{% |
| 1682 |
\if@tempswa |
| 1683 |
\edef\@tempa{\toks@{\noexpand\Gscale@box{#1}[#1]{\the\toks@}}}% |
| 1684 |
\@tempa |
| 1685 |
\else |
| 1686 |
\def\Gin@req@sizes{% |
| 1687 |
\def\Gin@scalex{#1}\let\Gin@scaley\Gin@exclamation |
| 1688 |
\Gin@req@height\Gin@scalex\Gin@nat@height |
| 1689 |
\Gin@req@width\Gin@scalex\Gin@nat@width}% |
| 1690 |
\fi |
| 1691 |
\@tempswatrue} |
| 1692 |
|
| 1693 |
|
| 1694 |
\def\usewhitespace{% |
| 1695 |
\UnicodeCharacter{13}{ \ignorespaces}% |
| 1696 |
\UnicodeCharacter{32}{ \ignorespaces}% |
| 1697 |
\UnicodeCharacter{9}{ \ignorespaces}% |
| 1698 |
} |
| 1699 |
\def\ignorewhitespace{% |
| 1700 |
\UnicodeCharacter{13}{}% |
| 1701 |
\UnicodeCharacter{32}{}% |
| 1702 |
\UnicodeCharacter{9}{}% |
| 1703 |
} |
| 1704 |
|
| 1705 |
% taken from Heiko Oberdiek's epstopdf.sty |
| 1706 |
% but the redefinitions need to be global |
| 1707 |
\global\let\orgGin@setfile\Gin@setfile |
| 1708 |
\global\def\Gin@setfile#1#2#3{% |
| 1709 |
\if`\@car #3\relax\@nil |
| 1710 |
\let\Gin@base\filename@base |
| 1711 |
\immediate\write18{\@cdr #3\@empty\@nil}% |
| 1712 |
\orgGin@setfile{#1}{#2}{\filename@base #2}% |
| 1713 |
\else |
| 1714 |
\orgGin@setfile{#1}{#2}{#3}% |
| 1715 |
\fi |
| 1716 |
} |
| 1717 |
|
| 1718 |
% support .gif and .eps |
| 1719 |
\g@addto@macro\Gin@extensions{,.eps} |
| 1720 |
\g@addto@macro\Gin@extensions{,.gif} |
| 1721 |
\@namedef{Gin@[email protected]}#1{{pdf}{.pdf}{`epstopdf #1}} |
| 1722 |
\@namedef{Gin@[email protected]}#1{{png}{.png}{`giftopng #1}} |
| 1723 |
|
| 1724 |
\endinput |