; TeX output 1997.06.26:1043so=&DtGGcmr17The7tGGcmss17sidecappacqkageї9XQ cmr12RolfNieprascrhkU0K`y cmr10niepraschk@ptb.deUU(INTERNET)(Ȍȹv1.00{1997/05/08$!Kt : cmbx9Abstractэoo cmr9Thiskpac9k|ragede nesthenewenvironmentsߤN cmtt9SCfigureandSCtable,4anal- bogous`tofigureandtable,Wwhic9hmakeiteasytotypAesetcaptionssideways.!čINff cmbx121aLIntros3ductionIInmsomecasesitmaybGeusefultotypGesetthecaptionasidethe gureorthe Ithetable. F*orthispurpGosethepackqagesidecapde nesthenewenvironmentsI'ExXpackqage m#R cmss10ifthen.1*sI&p0J cmsl104 THEUUIMPLEMENT*ATIONa2oI4aLTheffimplementationLs1S" cmsy9h#ow cmss9pack9age#g iǍLs2 Ls3S\typeout{Package:SideCapv1.00<1997/05/08>(RN)}Ls4Ls5S\RequirePackage{ifthen}Ls6Ls7S\newlength{\SCtab@figLEN}\newlength{\SCcap@LEN}Ls8S\newcounter{SC@figureC}\newcounter{SC@tableC}Ls9S\newsavebox{\SCtab@figBOX}\newcommand\SCtab@fig{}I10I11S\newcommand\SC@LABEL{SC@\@captype:\number\value{SC@\@captypeC}}I12Ǎ\SCtab@figIHas|threeparameters.=The rstisthelabGelthatdeterminesifthecurrentpage IisoGddoreven.bThisparameterisonlyusedwiththeoptionsoutercaptionorIinnercaption.4TheHsecondparameteristheminipagewiththecaptiontextinsideIandUUthelastparameteristheminipagewiththe gureortableinside.I13S\DeclareOption{innercaption}{% I14]\renewcommand\SCtab@fig[3]{\ifthenelse{\isodd{\pageref{#1}}}I15f{{#2}\hspace{\columnsep}{#3}}{{#3}\hspace{\columnsep}{#2}}}}I16I17S\DeclareOption{outercaption}{%I18]\renewcommand\SCtab@fig[3]{\ifthenelse{\isodd{\pageref{#1}}}I19f{{#3}\hspace{\columnsep}{#2}}{{#2}\hspace{\columnsep}{#3}}}}I20I21S\DeclareOption{rightcaption}{%I22]\renewcommand\SCtab@fig[3]{{#3}\hspace{\columnsep}{#2}}}I23I24S\DeclareOption{leftcaption}{%I25]\renewcommand\SCtab@fig[3]{{#2}\hspace{\columnsep}{#3}}}I26I27S\ExecuteOptions{outercaption}\ProcessOptionsI28$\SCfigureIChecksZthetwooptionalparametersandjumpstoSC@floatwithparameter` g- Iure'. 䍍I29S\def\SCfigure{\@ifnextchar[%I30]\SC@figure{\SC@@figure{1.0}[\fps@figure]}}I31S\def\SC@figure[#1]{\@ifnextchar[%I32]{\SC@@figure{#1}}{\SC@@figure{1.0}[#1]}}I33S\def\SC@@figure#1[#2]{\SC@float{#1}{figure}{#2}}b\endSCfigure 䍍I34S\def\endSCfigure{\endSC@float}I35y\SCtableIChecksJthetwooptionalparametersandjumpstoSC@floatwithparameter`ta- Ible'. 䍍I36S\def\SCtable{\@ifnextchar[%I37]\SC@table{\SC@@table{1.0}[\fps@table]}}I38S\def\SC@table[#1]{\@ifnextchar[% sI4 THEUUIMPLEMENT*ATIONa3oI39]{\SC@@table{#1}}{\SC@@table{1.0}[#1]}} I40S\def\SC@@table#1[#2]{\SC@float{#1}{table}{#2}} L\endSCtable ꫍I41S\def\endSCtable{\endSC@float}I42$\SC@floatIThenew oatenvironment.Parameter1isrelwidth,GYParameter2is` gure'or I`table',UUParameter3isthe oatingpGosition. ꫍I43S\def\SC@float#1#2#3{%I44]\expandafter\edef\csnamefps@#2\endcsname{#3}%I45]\gdef\@captype{#2}\def\SC@fraction{#1}%꫍ITheUUcaptionandlabelcommandsmustbGesafedandrede ned.I46]\let\SC@SAVcaption\caption\let\SC@SAVlabel\label%I47]\let\SC@CAPtext\@empty\let\SC@OPTCAPtext\@empty\let\SC@LABtext\@empty%I48]\renewcommand\caption[2][]{\gdef\SC@OPTCAPtext{##1}\gdef\SC@CAPtext{##2}}%I49]\renewcommand\label[1]{\gdef\SC@LABtext{##1}}%I50]\@namedef{fnum@#2}{\mbox{\@nameuse{#2name}~\@nameuse{the#2}}}%꫍ISaveUUthe gureortableinabGox.I51]\begin{lrbox}{\SCtab@figBOX}%I52S}%I53b\endSC@floatIOutputsUUthe gureortableandthecaption.I54S\def\endSC@float{%I55]\end{lrbox}%꫍ISetsJthecaptionwidth.nPIfcaptionwidthplus gure/tablewidthistoGolargethen ItheUUcaptionwidthissetequaltotheremainingwidth.I56]\settowidth\SCtab@figLEN{\usebox\SCtab@figBOX}%I57]\setlength\SCcap@LEN{\SC@fraction\SCtab@figLEN}%I58]\setlength\@tempdima{\SCtab@figLEN}%I59]\addtolength\@tempdima{\SCcap@LEN}%I60]\addtolength\@tempdima{\columnsep}%I61]\ifthenelse{\lengthtest{\@tempdima>\linewidth}}%I62f{\addtolength\SCcap@LEN{-\@tempdima}%I63kJ\addtolength\SCcap@LEN{\linewidth}}{}%꫍ICallsUUtheL5ffA͉TU>'ExX oatcommandwiththetwoUUminipagesinsideamainminipage.I64]\@float{\@captype}%I65f\setlength\abovecaptionskip{0pt}%I66f\setlength\belowcaptionskip{0pt}%꫍ICreatesalabGelforeach gureortableforlaterdeterminationifthepageisodd IorUUeven.qThecountersSC@figureCorSC@tableCmustbGeincrementedbGefore.I67f\stepcounter{SC@\@captypeC}\SC@SAVlabel{\SC@LABEL}%I68f\begin{minipage}[b]{\linewidth}%I69p2\centering%꫍ITheUU gurecaptionshouldbGebottomaligned,thetablecaptiontopaligned.I70p2\ifthenelse{\equal{\@captype}{figure}}{\def\SC@pos{b}}{\def\SC@pos{t}}%I71p2\SCtab@fig{\SC@LABEL}%I72yw^{\begin{minipage}[\SC@pos]{\SCcap@LEN}%I73 \ifthenelse{\equal{\SC@OPTCAPtext}{\@empty}}%sI4 THEUUIMPLEMENT*ATIONa4oI74L{\SC@SAVcaption{\expandafter\protect\SC@CAPtext}}% I75L{\SC@SAVcaption[\expandafter\protect\SC@OPTCAPtext]%I76{\expandafter\protect\SC@CAPtext}}%I77 \ifthenelse{\equal{\SC@LABtext}{\@empty}}%I78L{}{\SC@SAVlabel{\expandafter\protect\SC@LABtext}}%I79~0\end{minipage}}%I80yw^{\begin{minipage}[\SC@pos]{\SCtab@figLEN}%I81 \rule{\linewidth}{0pt}%I82 \usebox{\SCtab@figBOX}%I83~0\end{minipage}}%I84f\end{minipage}%I85]\end@float%I86S}I87Sh!5" cmmi9=pack9age#g i ; &p0J cmsl10#ow cmss9" cmsy9!5" cmmi9 m#R cmss10': cmti10