; TeX output 1995.06.22:1539soDtGGcmr17The7tGGcmss17captionpacqkage!", cmsy10 XQ cmr12HaraldAxelSommerfeldt2axel@hp1.ang-phrysik.uni-kiel.de)37 1995/04/051!Kt : cmbx9Abstractэ[o cmr9Theow cmss9captionpac9k|rageprovidesmanywaystocustomisethecaptionsin N oating/Ten9vironmentssuchߤN cmtt9figureandtable.jqThe\rotcaptioncommandNand thesidewaysfigureandsidewaystableen9vironments providedbytheNrotatinggpac9k|rageFfromS.RahtzandL.BarroAcaarealsosupported.FTheNcaption]Lpac9k|ragealsocoAoperates]Lwiththe oatpack|ragewrittenbyA.LingnauNandTthesub gurepac9k|ragewrittenbyS.D.CoAchran.$č5 Nff cmbx121MLTheffuserinterface5K`y cmr10T*oUUusethispackqagejusttypGeN!5Here's`Canexample gurewhichwasproGducedwiththefollowingcoGdeinthepream-5bleUUofthisdoGcument:N\usepackage[hang,small,bf]{caption}N\setlength{\captionmargin}{20pt}= @EXAMPLEUUFIGUREIFigure1:wThisMisanexamplecaptionwithasmallfon9tandasansseriflabAel. wTheQhangoptionw9asused.oThereisaleftandrightmarginof20pt.'53MLTheffcos3de53.1SIdenti cationuT8sٓRcmr71?\NeedsTeXFormat{LaTeX2e}[1994/06/01] 8s2?\ProvidesPackage{caption}[1995/04/05v1.4bcaptionpackage(HS)]8s3?\typeout{Package:captionv1.4b<1995/04/05>(HaraldSommerfeldt)}153.2SInitialco`deuTb\captionfont t\captionlabelfont 6\captionmargin5\captionsizeUUisde nedforbackwardUUcompatibilitywithv1.3ofthispackqage. #8s4?\newcommand{\captionsize}{}8s5?\newcommand{\captionfont}{\captionsize}8s6?\newcommand{\captionlabelfont}{}8s7?\newlength{\captionmargin}j5HereUUarethedi erentbasictypGesofcaptionsimplemented:Ft\as@normalcaption5TheUU`normal'caption8s8?\newcommand{\as@normalcaption}[2]{%8s9I#1#2\par}j 6\as@isucaption5The,l`iso'or`hang'caption;thiscoGdewastakenfromTheL5ffA͉TU>'ExXCompanion[3, 5p155]UUandmoGdi ed510?\newcommand{\as@isucaption}[2]{%511I\sbox{\as@captionbox}{#1\space}%3}so512I\addtolength{\as@captionwidth}{-\wd\as@captionbox}% 513I\usebox{\as@captionbox}\parbox[t]{\as@captionwidth}{\leavevmode#2}}t\as@centercaption5TheUU`center'caption514?\newcommand{\as@centercaption}[2]{%515I\parbox[t]{\as@captionwidth}{{\centering#1#2\par}}}f\as@annecaption5TheA`centerlast'caption;MtheideahowtodothiswastakenfromBrGuggemann- 5Klein[4],UUitisalsomentionedinKopkqa[5,p227]516?\newcommand{\as@annecaption}[2]{%517I\addtolength{\leftskip}{0ptplus1fil}%518I\addtolength{\rightskip}{0ptplus-1fil}%519I\setlength{\parfillskip}{0ptplus2fil}%520I#1#2\par}߭ \as@shortcaption5ShortUUcaptionsarecenteredbydefault521?\let\as@shortcaption\as@centercaption653.3SDetectionofthesub gurepack@ageuT 6\as@subcapsize 6\@thesubfigure \@thesubtable5If8thesub gurepackqageisloaded,qalittlemessagewillbGetypGeoutand\as@subcapsize 5{whichsetsthesizeofthesubGcaptions{willbede ned.-Also\@thesubfigure5and]\@thesubtablewillbGerede nedheretosupportthe\captionlabelfont5insubGcaptions,Wtoo(thankstoKevinRulandforthisidea!).#gIfyoudon'tlike5thisbbGehaviour,ejustloadthecaptionpackqageaftervthesubfigurepackqage(and5eventuallyjrede nethe\subcapsizebyyourself)orrede ne\@thesubfigureand5\@thesubtableXafterloadingthecaptionpackqageasshowninthedoGcumentation5ofUUthesub gurepackqage.522?\ifx\thesubfigure\undefined 523I\newcommand{\as@subcapsize}[1]{}524?\else%525I\typeout{\space\space\space\space\space\space\space\space\space526s `subfigure'packagedetected}527I\let\as@subcapsize\subcapsize528I\renewcommand{\@thesubfigure}{{\captionlabelfont\thesubfigure}\space}529I\renewcommand{\@thesubtable}{{\captionlabelfont\thesubtable}\space}530?\fi653.4SDeclarationofoptionsuT5There*arefourdi erenttypGesofcaptionssupported:Qnormal,_Kisu,center*and 5centerlast.qhangUUisexactlythesameasisu.531?\DeclareOption{normal}{\let\as@caption\as@normalcaption}532?\DeclareOption{isu}{\let\as@caption\as@isucaption}533?\DeclareOption{hang}{\ExecuteOptions{isu}}534?\DeclareOption{center}{\let\as@caption\as@centercaption}535?\DeclareOption{anne}{\let\as@caption\as@annecaption}536?\DeclareOption{centerlast}{\ExecuteOptions{anne}}5IfUUoptionnoonelineisset,only-one-linecaptionswillbGehaveUUlikenormalones.537?\DeclareOption{nooneline}{\AtBeginDocument{\let\as@shortcaption\as@caption}}4 zso5There: areoptionsforsixdi erentfontsizesavqailable,6theyalsorede nethe 5\subcapsizeUUprovidedbythesub gurepackqage(ifdetected).538?\DeclareOption{scriptsize}{% 539I\renewcommand{\captionsize}{\scriptsize}540I\as@subcapsize{\scriptsize}}541?\DeclareOption{footnotesize}{%542I\renewcommand{\captionsize}{\footnotesize}543I\as@subcapsize{\scriptsize}}544?\DeclareOption{small}{%545I\renewcommand{\captionsize}{\small}546I\as@subcapsize{\footnotesize}}547?\DeclareOption{normalsize}{%548I\renewcommand{\captionsize}{\normalsize}549I\as@subcapsize{\footnotesize}}550?\DeclareOption{large}{%551I\renewcommand{\captionsize}{\large}552I\as@subcapsize{\normalsize}}553?\DeclareOption{Large}{%554I\renewcommand{\captionsize}{\Large}555I\as@subcapsize{\large}}5ThereUUarenineoptionsavqailabletosetthefontattributesofthecaptionlabGels.556?\DeclareOption{up}{\renewcommand{\captionlabelfont}{\upshape}}557?\DeclareOption{it}{\renewcommand{\captionlabelfont}{\itshape}}558?\DeclareOption{sl}{\renewcommand{\captionlabelfont}{\slshape}}559?\DeclareOption{sc}{\renewcommand{\captionlabelfont}{\scshape}}560?\DeclareOption{md}{\renewcommand{\captionlabelfont}{\mdseries}}561?\DeclareOption{bf}{\renewcommand{\captionlabelfont}{\bfseries}}562?\DeclareOption{rm}{\renewcommand{\captionlabelfont}{\rmfamily}}563?\DeclareOption{sf}{\renewcommand{\captionlabelfont}{\sffamily}}564?\DeclareOption{tt}{\renewcommand{\captionlabelfont}{\ttfamily}}5Iftheoptionruledisset,ʑthecaptionsofruled oatsprovidedbythe oatpackqage 5willUUalsobGesupported.565?\DeclareOption{ruled}{\newcommand\as@ruled{}}653.5SExecutionofoptionsuT5TheUU`normal'typGeofcaptionispreselected.566?\ExecuteOptions{normal}567?\ProcessOptions653.6SMainco`deuT 6\as@captionbox ߭ \as@captionwidth f\as@makecaption \@makecaption5AndUUnow...it'sUU...theUUnew\@makecaptioncoGde!568?\newsavebox{\as@captionbox}569?\newlength{\as@captionwidth}570?\newcommand{\as@makecaption}[2]{%571I\setlength{\leftskip}{\captionmargin}%572I\setlength{\rightskip}{\captionmargin}%573I\addtolength{\as@captionwidth}{-2\captionmargin}%574I\captionfont%575I\sbox{\as@captionbox}{{\captionlabelfont#1:}#2}%5-Iso576I\ifdim\wd\as@captionbox>\as@captionwidth 577R\as@caption{{\captionlabelfont#1:}}{#2}%578I\else%579R\as@shortcaption{{\captionlabelfont#1:}}{#2}%580I\fi}581?\renewcommand{\@makecaption}[2]{%582I\vskip\abovecaptionskip%583I\setlength{\as@captionwidth}{\linewidth}%584I\as@makecaption{#1}{#2}%585I\vskip\belowcaptionskip}653.7SSupp`ortoftherotatingpack@ageuT 6\@makercaption ߭ \@makerotcaption5IftherotatingPpackqageisloaded,"thecommand\@makerotcaption(forsuppGort 5ofRI\rotcaption)willbGerede nedhere.hThecodewastakenfromtherotating5packqageUU[1]itselfandadapted.586?\ifx\@makerotcaption\undefined 587?\else588I\typeout{\space\space\space\space\space\space\space\space\space589s `rotating'packagedetected}590?%\let\@makercaption\undefined591I\renewcommand{\@makerotcaption}[2]{%592R\captionfont%593R\sbox{\as@captionbox}{{\captionlabelfont#1:}#2}%594R\ifdim\wd\as@captionbox>.8\vsize595\2\rotatebox{90}{%596ew^\setlength{\as@captionwidth}{.8\textheight}%597ew^\begin{minipage}{\as@captionwidth}%598n\as@caption{{\captionlabelfont#1:}}{#2}%599ew^\end{minipage}}\par1100R\else%1101\2\rotatebox{90}{\usebox{\as@captionbox}}%1102R\fi1103R\hspace{12pt}}1104?\fi53.8SSupp`ortofthe oatpack@ageuT\floatc@plain \floatc@ruled5If3the oatpackqageisloaded,thecommand\floatc@plain(andthecommand 5\floatc@ruledUUiftheoptionruledisgiven)willbGerede nedhere.1105?\ifx\floatc@plain\undefined1106?\else1107I\typeout{\space\space\space\space\space\space\space\space\space1108s `float'packagedetected}1109I\renewcommand\floatc@plain[2]{%1110R\setlength{\as@captionwidth}{\linewidth}%1111R\as@makecaption{#1}{#2}}1112I\ifx\as@ruled\undefined1113I\else1114R\renewcommand\floatc@ruled[2]{%1115\2\setlength{\as@captionwidth}{\linewidth}%1116\2\captionfont%1117\2\as@caption{{\captionlabelfont#1:}}{#2}}69so1118I\fi 1119?\fi!č5References5[1]D;SebastianRahtzandLeonorBarroGca:Astyleoptionforr}'otatedobjectsin D;L雍Q&t}\cmti7ATKß'E-X,UU1994/10/025[2]D;AnselmUULingnau:qAnImpr}'ovedEnvironmentforFloats,UU1995/03/255[3]D;MichelGoGossens,F*rankMittelbachandAlexanderSamarin:The7XL雍QATKß'E-XCom-D;p}'anion,nAddison-W*esley,UUReading,Massachusetts,UU1994.5[4]D;AnneBrGuggemann-Klein: Einf uhrung XindieDokumentver}'arbeitung,B.G.D;T*eubner,UUStuttgart,19895[5]D;HelmutKopkqa:nL雍QATKß'E-X{SErweiterungsmoglichkeiten,=3.ubGerarbeiteteAuflage,D;Addison-W*esley,UUBonn,19917C;&t}\cmti7%R6 cmss12$N cmbx12#m#R cmss10"': cmti10!