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 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966
|
%% BEGIN fancybox.sty
%%
%% COPYRIGHT 1993-2010, by Timothy Van Zandt, Timothy.VAN-ZANDT@insead.edu
%%
%% DESCRIPTION:
%% fancybox.sty is a LaTeX style option, consisting of:
%% * Variants of \fbox: \shadowbox, \doublebox, \ovalbox, \Ovalbox.
%% * Helpful tools for using box macros.
%% * Extensive documentation about how to use box macros.
%% * Flexible verbatim macros.
%%
%% INSTALLATION:
%% Put this file where your TeX looks for inputs.
%%
%% DOCUMENTATION:
%% See fancybox.doc, which might be appended to this file.
%%
%% This file may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, either version 1.2 of this license
%% or (at your option) any later version. The latest version of this
%% license is in:
%%
%% http://www.latex-project.org/lppl.txt
%%
%% and version 1.2 or later is part of all distributions of LaTeX version
%% 1999/12/01 or later.
%%
%%
%%
\def\fileversion{1.4}
\def\filedate{2010/05/15}
% DG/SR modification begin - September 19, 2000
% (suggested by Heiko Oberdiek <oberdiek@ruf.uni-freiburg.de>)
\@ifundefined{ProvidesPackage}{}{%
\ProvidesPackage{fancybox}[\filedate\space\fileversion]}
% DG/SR modification end
% DG/SR modification begin - May 16, 1997
\providecommand\@begindvi{} % For rather old versions of LaTeX 2e
% DG/SR modification end
% DG/SR modification begin - Feb. 27, 1997
% Now defined only in latex209.def
\def\@lquote{\leavevmode{\kern\z@}`}
% DG/SR modification end
%% CODE:
\expandafter\ifx\csname fb@framepage\endcsname\relax\else
\expandafter\endinput
\fi
\typeout{Style option: `fancybox' v\fileversion \space <\filedate> (tvz)}
\newbox\@fancybox
\@ifundefined{@tempdimc}{\newdimen\@tempdimc}{}
%% \shadowbox
\newdimen\shadowsize
\shadowsize 4pt
\def\shadowbox{\VerbBox\@shadowbox}
\def\@shadowbox#1{%
\setbox\@fancybox\hbox{\fbox{#1}}%
\leavevmode\vbox{%
\offinterlineskip
\dimen@=\shadowsize
\advance\dimen@ .5\fboxrule
\hbox{\copy\@fancybox\kern-.5\fboxrule\lower\shadowsize\hbox{%
\vrule \@height\ht\@fancybox \@depth\dp\@fancybox \@width\dimen@}}%
\vskip-\dimen@
\moveright\shadowsize\vbox{%
\hrule \@width\wd\@fancybox \@height\dimen@}}}
% \fancyoval
\def\cornersize{\@ifstar{\@cornersize}{\@@cornersize}}
\def\@cornersize#1{%
\@tempdima=#1\relax
\edef\the@cornersize{\number\@tempdima sp}}
\def\@@cornersize#1{%
\edef\the@cornersize{#1\noexpand\@tempdimb}}
\cornersize{.5}
% This is just a simple change to \oval, making use of the \cornersize
% parameter instead of making the corner arcs are large as possible.
\def\fancyoval(#1,#2){\@ifnextchar[{\fancy@oval(#1,#2)}{\fancy@oval(#1,#2)[]}}
\def\fancy@oval(#1,#2)[#3]{%
\begingroup
\fancy@@oval{#1\unitlength}{#2\unitlength}{#3}%
\@put{-.5\wd\@tempboxa}{-.5\ht\@tempboxa}{\ht\@tempboxa=\z@\box\@tempboxa}%
\endgroup}
\def\fancy@@oval#1#2#3{%
\boxmaxdepth \maxdimen
\@ovttrue \@ovbtrue \@ovltrue \@ovrtrue
\@tfor\@tempa :=#3\do{\csname @ov\@tempa false\endcsname}%
\@ovxx#1\relax
\advance\@ovxx-\@wholewidth
\@ovyy#2\relax
\advance\@ovyy-\@wholewidth
\@tempdimb \ifdim \@ovyy >\@ovxx \@ovxx\else \@ovyy \fi
\advance\@tempdimb-2\p@
\ifdim\@tempdimb>\the@cornersize\relax
\@tempdimb=\the@cornersize
\fi
\@getcirc\@tempdimb
\@ovro\ht\@tempboxa \@ovri\dp\@tempboxa
\@ovdx\@ovxx \advance\@ovdx-\@tempdima \divide\@ovdx \tw@
\@ovdy\@ovyy \advance\@ovdy-\@tempdima \divide\@ovdy \tw@
\@circlefnt
\setbox\@tempboxa\hbox{%
\if@ovr \@ovvert32\kern -\@tempdima \fi
\if@ovl \kern \@ovxx \@ovvert01\kern -\@tempdima \kern -\@ovxx \fi
\if@ovt \@ovhorz \kern -\@ovxx \fi
\if@ovb \raise \@ovyy \@ovhorz \fi}%
\advance\@ovdx\@ovro
\advance\@ovdy\@ovro
\advance\@ovxx\@wholewidth
\wd\@tempboxa=\@ovxx
\dp\@tempboxa=\z@}
% \ovalbox
\def\ovalbox{\VerbBox{\@ovalbox\thinlines}}
\def\Ovalbox{\VerbBox{\@ovalbox\thicklines}}
\def\@ovalbox#1#2{%
\begingroup
#1\relax
\setbox\@fancybox\hbox{{#2}}%
\@tempdimc\fboxsep \advance\@tempdimc\@wholewidth
\@tempdima\ht\@fancybox \advance\@tempdima\dp\@fancybox
\advance\@tempdima2\@tempdimc
\@tempdimb\wd\@fancybox \advance\@tempdimb2\@tempdimc
\fancy@@oval\@tempdimb\@tempdima{}%
\@tempdima\dp\@fancybox \advance\@tempdima\@tempdimc
\wd\@tempboxa=\z@
\leavevmode\hbox{%
\lower\@tempdima\box\@tempboxa
\kern\@tempdimc\box\@fancybox\kern\@tempdimc}%
\endgroup}
% \doublebox
\def\doublebox{\VerbBox\@doublebox}
\def\@doublebox#1{%
\begingroup
\setbox\@fancybox\hbox{{#1}}%
\fboxrule=.75\fboxrule
\setbox\@fancybox\hbox{\fbox{\box\@fancybox}}%
\fboxrule=2\fboxrule
\fboxsep=\fboxrule
\advance\fboxsep .5pt
\fbox{\box\@fancybox}%
\endgroup}
% Frames for seminar.sty:
\@ifundefined{newslideframe}{}{%
\newslideframe{shadow}{\shadowbox{#1}}
\newslideframe{double}{\doublebox{#1}}
\newslideframe{oval}{\ovalbox{#1}}
\newslideframe{Oval}{\Ovalbox{#1}}}
% Sbox environment
\newbox\@Sbox
\def\Sbox{\global\setbox\@Sbox\hbox\bgroup\ignorespaces}
\def\endSbox{%
\@testtrue\ifhmode\ifinner\@testfalse\fi\fi
\if@test\@latexerr{Misplaced \string\endSbox! Should be in LR mode}\@ehd\fi
\egroup}
\def\TheSbox{%
\ifvoid\@Sbox
\@latexerr{\string\TheSbox\space is empty!}\@ehd
\else
\box\@Sbox
\fi}
\def\beginsbox#1{\setbox#1\hbox\bgroup\ignorespaces}
\def\endsbox{\endSbox}
% \VerbBox
\newtoks\do@VerbBox
\def\VerbBox#1{%
\do@VerbBox{#1}%
\afterassignment\begin@VerbBox
\setbox\@fancybox=\hbox}
\def\begin@VerbBox{\aftergroup\end@VerbBox}
\def\end@VerbBox{\the\do@VerbBox{\box\@fancybox}}%
% \Btrivlist
\def\@Blistrestore{%
\let\par\relax
\let\-\@dischyph \let\'\@acci \let\`\@accii \let\=\@acciii
\lineskip\normallineskip \baselineskip\normalbaselineskip}
\def\Btrivlist#1{\@ifnextchar[{\@Btrivlist{#1}}{\@Btrivlist{#1}[]}}
\def\@Btrivlist#1[#2]{%
\@Blistrestore
\let\\=\@Btrivlistcr
\fb@beginvbox{#2}%
\halign\bgroup
\if#1l\else\@empty\hfil\fi
\ignorespaces##\unskip
\if#1r\@empty\else\hfil\fi\cr}
\def\endBtrivlist{\crcr\egroup\egroup\if@pboxsw$\fi}
\def\fb@beginvbox#1{%
\leavevmode
\@pboxswfalse
\if#1b\@empty\vbox\else\if#1t\@empty\vtop\else
\ifmmode\vcenter\else\@pboxswtrue$\vcenter\fi% $
\fi\fi\bgroup}
\def\@Btrivlistcr{\@ifstar
{\@ifnextchar[{@@Btrivlistcr}{\cr}}{\@ifnextchar[{\@@Btrivlistcr}{\cr}}}
\def\@@Btrivlistcr[#1]{\cr\noalign{\vskip #1}}
\def\Bcenter{\Btrivlist{c}}
\def\endBcenter{\endBtrivlist}
\def\Bflushleft{\Btrivlist{l}}
\def\endBflushleft{\endBtrivlist}
\def\Bflushright{\Btrivlist{r}}
\def\endBflushright{\endBtrivlist}
% \Blist
\def\Blist#1#2{\@ifnextchar[{\@Blist{#1}{#2}}{\@Blist{#1}{#2}[]}}
\def\@Blist#1#2[#3]{%
\ifnum\@listdepth>5
\@toodeep
\else
\global\advance\@listdepth\@ne
\fi
\itemindent\z@
\csname @list\romannumeral\the\@listdepth\endcsname
\def\@itemlabel{#1}%
\let\makelabel\@mklab
\@nmbrlistfalse
\@Blistrestore
\let\\=\@Blistcr
\let\item\Bitem
\@Bitemswfalse
#2\relax
\fb@beginvbox{#3}%
\halign\bgroup
\ignorespaces##&\hskip\labelsep\ignorespaces##\unskip\hfil\cr}
\def\endBlist{\endBtrivlist\global\advance\@listdepth\m@ne}
\newif\if@Bitemsw
\def\Bitem{\@ifnextchar({\@Bitemcr\Bitem@skip}{\@Bitemcr\@Bitem}}
\def\@Bitemcr{%
\if@Bitemsw
\def\next{\cr\noalign{\vskip\itemsep}}%
\else
\def\next{\global\@Bitemswtrue}%
\fi
\next}
\def\Bitem@skip(#1){\noalign{\vskip #1}\@Bitem}
\def\@Bitem{\@ifnextchar[{\Bitem@label}{\Bitem@nolabel}}
\def\Bitem@label[#1]{\makelabel{#1}&}
\def\Bitem@nolabel{%
\if@nmbrlist
\expandafter\advance\csname c@\@listctr\endcsname1 \fi
\makelabel{\@itemlabel}%
&%
\if@nmbrlist\refstepcounter{\@listctr}\fi}
\def\@Blistcr{\@ifstar
{\@ifnextchar[{@@Blistcr}{\cr&}}{\@ifnextchar[{\@@Blistcr}{\cr&}}}
\def\@@Blistcr[#1]{\cr\noalign{\vskip #1}&}
% \Bitemize
\def\Bitemize{%
\ifnum\@itemdepth>3
\@toodeep
\else
\advance\@itemdepth\@ne
\fi
\edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
\Blist{\csname\@itemitem\endcsname}{\def\makelabel####1{\hfil####1}}}
\def\endBitemize{\endBlist}
% \Bdescription
\def\Bdescription{\Blist{}{\def\makelabel####1{\bf####1\hfil}}}
\def\endBdescription{\endBlist}
% \Benumerate
\def\Benumerate{%
\ifnum\@enumdepth>3
\@toodeep
\else
\advance\@enumdepth\@ne
\fi
\edef\@enumctr{enum\romannumeral\the\@enumdepth}%
\Blist{\csname label\@enumctr\endcsname}%
{\usecounter{\@enumctr}\def\makelabel####1{\hfil####1}}}
\def\endBenumerate{\endBlist}
% Beqnarray
\def\Beqnarray{%
\stepcounter{equation}%
\let\@currentlabel\theequation
\def\@eqnnum{{\csname reset@font\endcsname\rm (\theequation)}}%
\global\@eqnswtrue\m@th
\global\@eqcnt\z@
\tabskip\@centering
\let\\\@eqncr
\vbox\bgroup
\halign\bgroup
\@eqnsel
\hskip\@centering
$\displaystyle\tabskip\z@{##}$%
&\global\@eqcnt\@ne
\hskip 2\arraycolsep
\hfil${##}$\hfil
&\global\@eqcnt\tw@
\hskip 2\arraycolsep
$\displaystyle\tabskip\z@{##}$%
\hfil
\tabskip\@centering
&\if@eqnsw\hskip 1em\fi
\hfil{##}\tabskip\z@
\cr}
\def\endBeqnarray{%
\@@eqncr
\egroup
\global\advance\c@equation\m@ne
\egroup
\global\@ignoretrue}
\@namedef{Beqnarray*}{\def\@eqncr{\nonumber\@seqncr}\Beqnarray}
\@namedef{endBeqnarray*}{\nonumber\endBeqnarray}
% \fb@outputage
% Here we insert various hooks for rotating or framing the page.
% Otherwise, it is the usual \@outputpage
\def\fb@outputpage{%
\begingroup
\catcode`\ =10
\let\-\@dischyph
\let\'\@acci
\let\`\@accii
\let\=\@acciii
\if@specialpage
\global\@specialpagefalse\@nameuse{ps@\@specialstyle}%
\fi
\if@twoside
\ifodd\count\z@
\let\@thehead\@oddhead
\let\@thefoot\@oddfoot
\let\@themargin\oddsidemargin
\else
\let\@thehead\@evenhead
\let\@thefoot\@evenfoot
\let\@themargin\evensidemargin
\fi
\fi
\csname reset@font\endcsname
\normalsize
\baselineskip\z@
\lineskip\z@
\let\par\@@par
\ifx\this@fancypage\@empty\else
\this@fancypage
\gdef\this@fancypage{}%
\fi
\ifx\the@fancypage\@empty\else
\setbox\@outputbox\hbox{\the@fancypage{\box\@outputbox}}%
\fi
\ifx\fb@@rotatepage\@empty\else
\setbox\@outputbox\hbox{\fb@@rotatepage{\box\@outputbox}}%
\fi
\setbox\@outputbox\vbox{%
\@tempdima=\wd\@outputbox
\setbox\@tempboxa=\hbox to\@tempdima{%
\let\label\@gobble
\let\index\@gobble
\let\glossary\@gobble
\@thehead}%
\ht\@tempboxa\headheight
\dp\@tempboxa\z@
\box\@tempboxa
\vskip\headsep
\box\@outputbox
\baselineskip\footskip
\hbox to\@tempdima{%
\let\label\@gobble
\let\index\@gobble
\let\glossary\@gobble
\@thefoot}}
\ifx\the@@fancypage\@empty\else
\setbox\@outputbox\hbox{\the@@fancypage{\box\@outputbox}}%
\fi
\setbox\@outputbox\vbox{%
\ifnum\fancyput@flag>-1 \do@fancyput\fi
\vskip\topmargin
\moveright\@themargin\box\@outputbox}%
\ifx\fb@rotatepage\@empty\else
\setbox\@outputbox\hbox{\lower\ht\@outputbox\box\@outputbox}%
\dp\@outputbox\z@
\wd\@outputbox\z@
\setbox\@outputbox\hbox{\fb@rotatepage{\box\@outputbox}}%
\expandafter\fb@setoffsets\fb@theoffsets
\fi
% DG/SR modification begin - September 19, 2000
% (suggested by Marcin Wolinski <wolinski@melkor.mimuw.edu.pl> and
% Heiko Oberdiek <oberdiek@ruf.uni-freiburg.de>)
\let\protect\noexpand
% DG/SR modification end
\shipout\box\@outputbox
\global\@colht\textheight
\endgroup
\stepcounter{page}%
\let\firstmark\botmark}
% \fancypage
\def\the@fancypage{}
\def\the@@fancypage{}
\def\this@fancypage{}
\def\fancypage#1#2{%
% DG/SR modification begin - May 16, 1997
\@begindvi % Need today by LaTeX 2e
% DG/SR modification end
\def\the@fancypage{#1}%
\def\the@@fancypage{#2}%
\def\@outputpage{\fb@outputpage}}
\def\thisfancypage#1#2{%
% DG/SR modification begin - May 16, 1997
\@begindvi % Need today by LaTeX 2e
% DG/SR modification end
\gdef\@outputpage{\fb@outputpage}%
\gdef\this@fancypage{\def\the@fancypage{#1}\def\the@@fancypage{#2}}}
% \fancyput
% Token registers used to make it easier to put definitions in argument.
% Boxes not processed until output so that contents can depend, e.g., on
% current page or marks or whatever. This makes everything slightly more
% complicated than one would expect.
\newtoks\the@fancyput
\newtoks\this@fancyput
\def\fancyput@flag{-1}%
% \fancyput@flag=-1 if no fancyput, 0 if regular fancyput, 1 if thisfancyput.
\def\fancyput{%
% DG/SR modification begin - May 16, 1997
\@begindvi % Need today by LaTeX 2e
% DG/SR modification end
\def\@outputpage{\fb@outputpage}
\@ifstar{\@testtrue\@fancyput}{\@testfalse\@fancyput}}
\def\@fancyput{\@ifnextchar({\@@fancyput}{\@@fancyput(\z@,\z@)}}
\def\@@fancyput(#1,#2)#3{%
\if@test
\expandafter\the@fancyput\expandafter{\the\the@fancyput\do{#1}{#2}{#3}}%
\else
\the@fancyput{\do{#1}{#2}{#3}}%
\fi
\gdef\fancyput@flag{\z@}}
\def\thisfancyput{%
% DG/SR modification begin - May 16, 1997
\@begindvi % Need today by LaTeX 2e
% DG/SR modification end
\gdef\@outputpage{\fb@outputpage}
\@ifstar{\@testtrue\@thisfancyput}{\@testfalse\@thisfancyput}}
\def\@thisfancyput{\@ifnextchar({\@@thisfancyput}{\@@thisfancyput(\z@,\z@)}}
\def\@@thisfancyput(#1,#2)#3{%
\if@test
\ifnum\fancyput@flag=\z@
\expandafter\global\expandafter\this@fancyput\expandafter{%
\the\this@fancyput\do{#1}{#2}{#3}}%
\else
\expandafter\global\expandafter\this@fancyput\expandafter{%
\the\the@fancyput\do{#1}{#2}{#3}}%
\fi
\else
\global\this@fancyput{\do{#1}{#2}{#3}}%
\fi
\gdef\fancyput@flag{1}}
\def\do@fancyput{%
\def\do##1##2##3{\raise##2\hbox to\z@{\kern##1\relax##3\hss}}%
\setbox\@tempboxa=\hbox to\z@{%
\kern-\hoffset
\raise\voffset\hbox{%
\ifnum\fancyput@flag=\z@\the\the@fancyput\else\the\this@fancyput\fi}%
\hss}%
\ht\@tempboxa=\z@ \dp\@tempboxa=\z@
\box\@tempboxa
\gdef\fancyput@flag{\z@}%
\global\this@fancyput{}}
% \Landscape
\def\UsePageParameters{%
\clearpage
\global\@colht\textheight
\onecolumn}
\def\fb@rotatepage{}
\def\Landscape{\@ifstar{\@testtrue\@Landscape}{\@testfalse\@Landscape}}
\def\@Landscape#1#2#3{%
% DG/SR modification begin - May 16, 1997
\@begindvi % Need today by LaTeX 2e
% DG/SR modification end
\clearpage
\def\fb@rotatepage{#3}%
\def\@outputpage{\fb@outputpage}%
\@tempdima#1\relax
\@tempdimb#2\relax
\if@test
\edef\fb@theoffsets{{\voffset}{\hoffset}{\number\@tempdima sp}}%
\else
\edef\fb@theoffsets{{\hoffset}{\voffset}{\number\@tempdimb sp}}%
\fi
\advance\@tempdimb-\@tempdima
\advance\textwidth\@tempdimb
\advance\textheight-\@tempdimb
\UsePageParameters}
\def\endLandscape{\clearpage\aftergroup\UsePageParameters}
\def\fb@setoffsets#1#2#3{%
\@tempdima#1%
\advance#1#2%
#2#3
\advance#2-2in
\advance#2-\@tempdima}
\@namedef{Landscape*}{\@testtrue\@Landscape}
\@namedef{endLandscape*}{\endLandscape}
% \LandScape
\def\fb@@rotatepage{}
\def\LandScape#1{%
% DG/SR modification begin - May 16, 1997
\@begindvi % Need today by LaTeX 2e
% DG/SR modification end
\clearpage
\def\fb@@rotatepage{#1}%
\def\@outputpage{\fb@outputpage}%
\@tempdima\textheight
\textheight\textwidth
\textwidth\@tempdima
\UsePageParameters}
\def\endLandScape{\clearpage\aftergroup\UsePageParameters}
% \GenericCaption
\def\GenericCaption#1{%
\par
\begingroup
\@parboxrestore
\normalsize
\vskip 10\p@
\setbox\@tempboxa\hbox{#1}%
\ifdim\wd\@tempboxa>\hsize
#1\par
\else
\hbox to\hsize{\hfil\box\@tempboxa\hfil}%
\fi
\endgroup
\par}
% \landfloat
\def\landfloat#1#2{%
\gdef\curr@landfloat{#1}%
\gdef\float@rotation{#2}%
\begin{#1}[p]%
\setbox\@tempboxa\vbox\bgroup
\hsize\@colht
\@parboxrestore}
\def\endlandfloat{%
\par\vskip\z@
\egroup
\setbox\@tempboxa\hbox{\float@rotation{\box\@tempboxa}}%
\centerline{\box\@tempboxa}%
\expandafter\end\expandafter{\curr@landfloat}}
% \boxput
\def\boxput{\@ifstar{\@testtrue\@boxput}{\@testfalse\@boxput}}
\def\@boxput{\@ifnextchar({\@@boxput}{\@@boxput(0,0)}}
\long\def\@@boxput(#1,#2)#3#4{%
\setbox\@fancybox\hbox{{#4}}%
\setbox\@tempboxa\vbox to\z@{\vss\hbox to\z@{\hss{#3}\hss}\vss}%
\@tempdima=#1\wd\@fancybox
\advance\@tempdima\wd\@fancybox
\divide\@tempdima 2
\ifcat a#2\relax
\@tempdimb=\z@
\else
\@tempdimb=.5\ht\@fancybox
\advance\@tempdimb.5\dp\@fancybox
\@tempdimc=\@tempdimb
\advance\@tempdimc-\dp\@fancybox
\@tempdimb=#2\@tempdimb
\advance\@tempdimb\@tempdimc
\fi
\setbox\@tempboxa\hbox to \z@{%
\if@test\kern-\wd\@fancybox\fi
\kern\@tempdima\raise\@tempdimb\box\@tempboxa\hss}%
\ht\@tempboxa=\z@ \dp\@tempboxa=\z@
\leavevmode
\if@test
\hbox{\box\@fancybox\box\@tempboxa}%
\else
\hbox{\box\@tempboxa\box\@fancybox}%
\fi}
% \Vfootnotes
\def\VerbatimFootnotes{\let\@footnotetext\V@footnotetext}
\long\def\V@footnotetext{%
\afterassignment\V@@footnotetext
\let\@tempa}
\def\V@@footnotetext{%
\insert\footins\bgroup
\csname reset@font\endcsname
\footnotesize
\interlinepenalty\interfootnotelinepenalty
\splittopskip\footnotesep
\splitmaxdepth\dp\strutbox
\floatingpenalty \@MM
\hsize\columnwidth
\@parboxrestore
\edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}%
\@makefntext{}%
\rule{\z@}{\footnotesep}%
\bgroup
\aftergroup\V@@@footnotetext
\ignorespaces}
\def\V@@@footnotetext{\strut\egroup}
% Verbatim
% The main idea is to separate the reading and formatting of the
% verbatim listing. It's pretty simple.
\def\Verbatim@Codes{%
\let\do\@makeother
\dospecials
\Verbatim@ObeyThings
\ThisVerbCodes\relax\gdef\ThisVerbCodes{}}
\def\EveryVerbatimCodes{}
% \Verbatim is redefined temporarilly in \Get@Verbatim to scan the
% verbatim text. \Verbatim is used so that error messages are more
% enlightening. \next checks whether \Verbatim found its argument,
% and attempts to recover if not.
%
% Heuristically, if current environment is `foo' and argument of
% \Get@Verbatim is \The@Verbatim, then definition of \Verbatim is
%
% \def\Verbatim#1^^M#2^^M\the\EndVerbatimTokens\end{foo}{%
% \xdef\The@Verbatim{\noexpand\Every@VerbatimLine#2}%
% \endgroup\end{foo}}
%
% \The@Verbatim is then equal to the verbatim text, with spaces
% replaced by \Verbatim@Space, tabs replaced by \Verbatim@Tab,
% and ` replaced by \@lquote. In addition, each line begins with
% \Every@VerbatimLine, and each line but the last ends with
% \Verbatim@Par. It is then possible to redefine these when formatting
% the verbatim text. To insert each line as an argument to \foo, use
% \def\Every@VerbatimLine#1\Verbatim@Par{\foo{#1}}
% \The@Verbatim\Verbatim@Par
%
\newtoks\EndVerbatimTokens
\begingroup
\catcode`\|=0
\catcode`\[=1
\catcode`\]=2
\catcode`\{=12
\catcode`\}=12
\catcode`\^^M=13%
\catcode`\\=12%
|gdef|Get@Verbatim#1[%
|begingroup%
|Verbatim@Codes|EveryVerbatimCodes%
|let|protect|noexpand%
|VerbatimEnvironment%
|edef|next[|noexpand|def|noexpand|Verbatim####1|noexpand^^M####2%
|noexpand^^M|the|EndVerbatimTokens\end{|@VerbEnvir}]%
|edef|endVerbatim[|noexpand|endgroup|noexpand|end[|@VerbEnvir]]%
|global|let|@VerbEnvir|relax%
|next[|@nil|xdef#1[|noexpand|Every@VerbatimLine##2]|endVerbatim]%
|def|next[|@ifnextchar|@nil[|@gobble]% If \@nil is there, then
[|gdef#1[]|endVerbatim|end[document]]]% \Verbatim found its argument.
|expandafter|next|Verbatim]% Otherwise, try to recover.
|gdef|AltGet@Verbatim#1[%
|begingroup%
|Verbatim@Codes|EveryVerbatimCodes%
|def^^M##1^^M##2[%
|ifx|@nil##2|@empty|else%
|noexpand|Verbatim@Par|noexpand|Every@VerbatimLine##1%
|expandafter^^M|expandafter##2%
|fi]%
|let|protect|noexpand%
|VerbatimEnvironment%
|edef|next[|noexpand|def|noexpand|Verbatim####1|noexpand^^M####2%
\end{|@VerbEnvir}]%
|edef|endVerbatim[|noexpand|endgroup|noexpand|end[|@VerbEnvir]]%
|global|let|@VerbEnvir|relax%
|next[|@nil|xdef#1[|noexpand|Every@VerbatimLine##2^^M|@nil]|endVerbatim]%
|def|next[|@ifnextchar|@nil[|@gobble]%
[|gdef#1[]|endVerbatim|end[document]]]%
|expandafter|next|Verbatim]%
|endgroup
\def\AltGetVerbatim{\let\Get@Verbatim\AltGet@Verbatim}
% It is enough to not use \begin or \end when defining new verbatim
% environments, as the default is for \Get@Verbatim to look for the
% end of the current environment, but using \VerbatimEnvironment
% is easier to explain to users.
\def\VerbatimEnvironment{%
\ifx\@VerbEnvir\relax\xdef\@VerbEnvir{\@currenvir}\fi}
\let\@VerbEnvir\relax
\def\The@VerbatimErr{%
\gdef\The@Verbatim{\@latexerr{Misplaced \string\end{Verbatim}}\@ehd}}
\The@VerbatimErr
\begingroup
\catcode`\^^M=\active%
\catcode`\ =\active%
\catcode`\^^I=\active%
\gdef\Verbatim@ObeyThings{%
\catcode`\^^M=\active%
\catcode`\ =\active%
\catcode`\^^I=\active%
\catcode``=\active%
\def^^M{\noexpand\Verbatim@Par\noexpand\Every@VerbatimLine}%
\def^^I{\noexpand\Verbatim@Tab}%
\def {\noexpand\Verbatim@Space}%
\Verbatim@NoLigs}%
\gdef\Verbatim@DontObeyLines{\outer\def^^M{}}%
\endgroup
\def\SaveVerbatim{\@bsphack\Get@Verbatim}
\def\endSaveVerbatim{\@esphack}
{\catcode``13 \gdef\Verbatim@NoLigs{\def`{\noexpand\@lquote}}}
\def\Verbatim@Prep{%
\frenchspacing
\ThisVerb\relax\gdef\ThisVerb{}%
\VerbatimFont
\EveryVerbatim
\let\Every@VerbatimLine\EveryVerbatimLine
\def\Verbatim@Space{\leavevmode\penalty\@M\VerbatimSpace}%
\def\Verbatim@Tab{\leavevmode\penalty\@M\VerbatimTab}}%
\def\Verb@Prep{%
\frenchspacing
\ThisVerb\relax\gdef\ThisVerb{}%
\VerbFont
\EveryVerb
\let\Every@VerbatimLine\EveryVerbatimLine
\def\Verbatim@Space{\leavevmode\penalty\@M\VerbSpace}%
\def\Verbatim@Tab{\leavevmode\penalty\@M\VerbTab}}%
\def\Verbatim@Par{\leavevmode\null\@@par\penalty\interlinepenalty}
% Parameter initialization:
\def\VerbatimSpace{\ }
{\catcode`\ =12\gdef\ttspace{{\tt }}}
\def\VerbSpace{\ }
\def\VerbatimTab{\ \ \ \ \ \ \ \ }
\def\VerbTab{\ }
\def\EveryVerbatim{}
\def\EveryVerb{}
\def\ThisVerb{}
\def\EveryVerbatimLine{}%
\def\EveryVerbOutLine{}
\def\VerbatimFont{\tt}
\def\VerbFont{\tt}
\def\VerbatimFuzz{2pt}%
\def\EveryVerbatimCodes{}
\def\EveryVerbCodes{}
\def\EveryVerbOutCodes{}
\def\ThisVerbCodes{}
\def\Verbatim@List#1{%
\if@minipage\else\vskip\parskip\fi
\leftskip\@totalleftmargin
\@rightskip\@flushglue \rightskip\@rightskip
\parindent\z@
\parskip\z@
\parfillskip\@flushglue
\hfuzz\VerbatimFuzz\relax
\@@par
\global\@inlabelfalse %Prevents vspace from being inserted when
\Verbatim@Prep %first line exceeds \hsize.
#1%
\Verbatim@Par}%
\def\UseVerbatim#1{%
\begingroup\trivlist\item[]\Verbatim@List{#1}\endtrivlist\endgroup}
\def\Verbatim{\Get@Verbatim\The@Verbatim}
\def\endVerbatim{\UseVerbatim\The@Verbatim\The@VerbatimErr}
\def\LUseVerbatim#1{%
\begingroup\list{}{}\item[]\Verbatim@List{#1}\endlist\endgroup}
\def\LVerbatim{\Get@Verbatim\The@Verbatim}
\def\endLVerbatim{\LUseVerbatim\The@Verbatim\The@VerbatimErr}
\def\BUseVerbatim{%
\@ifnextchar[{\@BUseVerbatim}{\@BUseVerbatim[]}}
\def\@BUseVerbatim[#1]#2{%
\begingroup
\Verbatim@Prep
\let\Verbatim@Par\@Btrivlistcr
\@Btrivlist{l}[#1]%
#2%
\endBtrivlist
\endgroup}%
\def\BVerbatim{%
\catcode`\^^M=13\relax
\@ifnextchar[{\@BVerbatim}{\@BVerbatim[]}}
\def\@BVerbatim[#1]{\def\@tempa{[#1]}\Get@Verbatim\The@Verbatim}
\def\endBVerbatim{
\expandafter\@BUseVerbatim\@tempa\The@Verbatim\The@VerbatimErr}
\newwrite\Verbatim@Outfile
\def\VerbatimOut#1{%
\@bsphack
\begingroup
\immediate\openout\Verbatim@Outfile #1\relax
\def\EveryVerbatimCodes{\EveryVerbOutCodes}%
\Get@Verbatim\The@Verbatim}
\def\endVerbatimOut{%
\Verbatim@ObeyThings
\def\Verbatim@Par{^^J}%
\def\Verbatim@Space{\space}%
\def\Verbatim@Tab{\space}%
\def\@lquote{\string`}%
\ThisVerb\relax\gdef\ThisVerb{}%
\let\Every@VerbatimLine\EveryVerbOutLine
\immediate\write\Verbatim@Outfile{\The@Verbatim}%
\immediate\closeout\Verbatim@Outfile
\endgroup
\The@VerbatimErr
\@esphack}
% This one is a little tricky because:
% * we want to ignore the ^^M at the end of the last line,
% * we want to handle files that end with newline and files that don't
% * we want comment characters to work properly,
% * we want to expand each line before inserting \Every@VerbatimLine and
% \Verbatim@Par,
%
% \The@GVerbatim is used as scratch with global redefinition.
\newread\Verbatim@Infile
\def\Verbatim@Input#1#2{%
\begingroup
\Verbatim@Codes\EveryVerbatimCodes
\immediate\openin\Verbatim@Infile #1\relax
\ifeof\Verbatim@Infile
\@latexerr{No verbatim file #1}\@ehd
\else
\def\The@GVerbatim{}\Verbatim@NextLine
\ifeof\Verbatim@Infile
\@latexerr{Verbatim file #1 is empty}\@ehd
\else
\let\The@Verbatim\The@GVerbatim
\def\The@GVerbatim{}\Verbatim@NextLine
#2{\Verbatim@@Input}%
\fi
\fi
\immediate\closein\Verbatim@Infile
\endgroup}
\def\Verbatim@@Input{%
\let\protect\noexpand
\edef\The@Verbatim{%
\noexpand\Every@VerbatimLine
\The@Verbatim
\ifeof\Verbatim@Infile\else\noexpand\Verbatim@Par\fi}%
\let\protect\relax
\The@Verbatim
\ifeof\Verbatim@Infile\else
\let\The@Verbatim\The@GVerbatim
\def\The@GVerbatim{}\Verbatim@NextLine
\expandafter\Verbatim@@Input
\fi}%
\begingroup\catcode`\^^M=\active%
\gdef\Verbatim@NextLine{%
\ifeof\Verbatim@Infile\else%
\immediate\read\Verbatim@Infile to\@tempa%
\expandafter\Verbatim@@NextLine\@tempa^^M\relax^^M\@nil%
\fi}%
% #2 is empty if line ends in ^^M, #2=\relax otherwise.
\gdef\Verbatim@@NextLine#1^^M#2^^M#3\@nil{%
\expandafter\gdef\expandafter\The@GVerbatim\expandafter{\The@GVerbatim#1}%
\ifx#2\@empty\@empty\else\expandafter\Verbatim@NextLine\fi}%
\endgroup%
\def\UseVerb#1{\begingroup\Verb@Prep#1\endgroup}
\def\SaveVerb{\@ifnextchar[{\Save@Verb}{\Save@Verb[]}}
\long\def\Save@Verb[#1]#2{%
\begingroup
\Verbatim@Codes\Verbatim@DontObeyLines\EveryVerbCodes
\Save@@Verb{#1}{#2}}
\long\def\Save@@Verb#1#2#3{%
\let\protect\noexpand
\def\next{\@ifnextchar\@nil{\@gobble}{\endgroup}}%
\long\def\Verb##1#3{\@nil\xdef#2{##1}\endgroup#1}%
\expandafter\next\Verb}
\def\Verb{\Save@Verb[\UseVerb{\The@Verbatim}]{\The@Verbatim}}
\def\VerbatimInput#1{\begingroup\Verbatim@Input{#1}\UseVerbatim\endgroup}
\def\LVerbatimInput#1{\begingroup\Verbatim@Input{#1}\LUseVerbatim\endgroup}
\def\BVerbatimInput{\@ifnextchar[{\@BVerbatimInput}{\@BVerbatimInput[]}}
\def\@BVerbatimInput[#1]#2{%
\begingroup\Verbatim@Input{#2}{\@BUseVerbatim[#1]}\endgroup}
\endinput
%% END fancybox.sty
|