; TeX output 1996.06.25:2213sof߀DtGGcmr17A7tstqyleoptionforrotatedobjectsinLdKGXQ cmr12AT[-E;gX!", cmsy10҅LeonorBarroSca37 1995/08/22:ōINff cmbx12ContentsI"V cmbx101XHistory(}1I2XUsage0Az2I3XSetup1W'2I4XT urningTandrotationen9vironments3I5XSidew9aysT guresandtables4 XK`y cmr105.1oRotatedUUcaptionsonlyj.........................V6!čIListffofFiguresIListffofTfables!Kt : cmbx9Abstractэoo cmr9ThisarticledoAcumen9tsaL5Aacmr6A TuAEXpack|rage,`rotating.sty',whichpAerformall btheTdi eren9tsortsofrotationonemightlike,includingcomplete gures.I1aLHistoryIV*ersion2.0isacompletere-write,withmostoftheworknowbGeingdonebytheIL5ffٓRcmr7A͉TU>'ExX2 b> cmmi10"qgraphicsUUpackqage.XV*ersion2.1providesa`cloGckwise'optiontoreinstatethebGehaviourdescribGedIinUUthe`L5ffA͉TU>'ExXCompanion'XV*ersiona2.2justinterceptsthestandard oatmacrosinsteadofcopyingandIchangingUUthe.qThe`twoside'optionisobGeyed.XV*ersionUU2.5correctsproblemsinsidewaysUU gures.XV*ersionv2.6isarewriteofthesidewaysv oatsviaFrankMittelbach(towhomImanyUUthanksforloGokingatthemangycode).XV*ersion|2.7ischecked|forL5ffA͉TU>'ExXofDecembGer94,;andaddstheoptionoftwosideIbGehaviourUUindependentUUofthegeneraltwoside.IX-ffr @ -:q% cmsy6L|{Ycmr8ThisX lehasvÎersionnumb'ExXenvironments:Isidew9aysy@printsUUthecontentsturnedthrough90degreescountercloGckwiseIturnckprintsUUthecontentsturnedthroughanarbitraryangleIrotatelJprintsmythecontentsturnedthroughanarbitraryanglebutdoGes!': cmti10not`Qleave banyUUspacefortheresultIA}full}setofexamplesaregiveninthe le"'ExXatleast).=Ifyouwantthe`twoside'option,IbutNwantthe guresalwaysinonedirection,usethe` guresright'or`riguresleft'IoptionsUUto`rotating'.I11S\DeclareOption{figuresleft}{%I12]\@rot@twosidefalseI13]\def\rot@LR{0}%I14S}I15S\DeclareOption{figuresright}{%I16XdD\@rot@twosidefalseI17XdD\def\rot@LR{-1}%I18S}I19S\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{graphics}}I20S\PassOptionsToPackage{dvips}{graphics}I21S\ExecuteOptions{clockwise}I22S\if@twosideI23]\@rot@twosidetrueI24S\else2 ҠsoI25]\@rot@twosidefalse I26S\fiI27S\def\rot@LR{-1}I28S\ProcessOptionsI29S\RequirePackage{graphicx}I30S\RequirePackage{ifthen}I31S\def\rotdriver#1{\makeatletter\input{#1.def}\makeatother}I32S\newcount\r@tfl@tI33S\r@tfl@t0 ҘI4aLTfurningffandrotationenvironmentsysidewaysIEnvironmentUUtoturnthecontentsUUthrough90degrees. I34S\def\sideways{%I35]\Grot@setangle{90}%I36]\setbox\z@\hbox\bgroup\ignorespaces}I37S\def\endsideways{%I38]\unskip\egroupI39]\Grot@x\z@I40]\Grot@y\z@I41]\Grot@boxI42S}#ꍍ,`turnIRotateUUthecontentsUUoftheenvironment,UUleavingtheappropriatespaceI43S\def\turn#1{%I44]\Grot@setangle{#1}%I45]\setbox\z@\hbox\bgroup\ignorespaces}I46S\def\endturn{%I47]\unskip\egroupI48]\Grot@x\z@I49]\Grot@y\z@I50]\Grot@boxI51S}#ꍍ"rotateIRotateUUthecontentsUUoftheenvironment,UUleavingnosp}'ace.I52S\def\rotate#1{%I53]\Grot@setangle{#1}%I54]\setbox\z@\hbox\bgroup\ignorespaces}I55S\def\endrotate{%I56]\unskip\egroupI57]\Grot@x\z@I58]\Grot@y\z@I59]\wd0\z@\dp0\z@\ht0\z@I60]\Grot@boxI61S}#ꍍy\turnboxIAUUmacroversionofthe`rotate'environment.I62S\def\turnbox#1#2{%I63]\Grot@setangle{#1}%I64]\setbox\z@\hbox{{#2}}%I65]\Grot@x\z@\Grot@y\z@I66]\wd0\z@\dp0\z@\ht0\z@I67]\Grot@box3soI68S}!čI5aLSidewaysff guresandtablesINoweforthemacrostoprovideacompleteenvironmentforsideways guresand Itables.P9W*ede netwoenvironmentssidewaysfigureandsidewaystablethat tIin%withthenormaltableand gure oats.Theseare` xed'environments%thatIjust~do90degreerotation,2butitwouldbGeeasytoparameterizethistodootherIrotationsUUifneeded(themindbGoggles...)XFirstlageneralised`rot oat'environment.Y W*elneedtointerceptL5ffA͉TU>'ExX's oatImacros,iin.ordertochangetheassumedwidthofa oatbGeing\columnwidth.UW*eIwantyittoworkonawidthof\textheightsothatwhenwerotatethe oat,Iitcomesouttherightheight.b\Thisisnotactuallyverysatisfactory*,$>sincewhatIwer}'eallykwantisforrotated oatstooGccupythespacetheyactuallyuse.TheIcaptions܏areaproblem|sincetheycanprecedethe gureortable,]wecannotIset>theminabGoxoftherightwidth(ietheheight1oftheforthcomingob8ject),IbGecauseithasnothappenedyet.lTheresultofthesedicultiesisthatrotatedI guresUUalwaysendupasfullpage gures.I69S\newsavebox\rot@float@box I70S\def\@rotfloat#1{%I71]\@ifnextchar[%I72f{\@xrotfloat{#1}}%I73f{\edef\@tempa{\noexpand\@xrotfloat{#1}[\csnamefps@#1\endcsname]}\@tempa}%I74S}I75S\def\@xrotfloat#1[#2]{%I76]\@float{#1}[#2]%ISetUUthe oatcontentsUUinabGoxof\textheightinsteadof\columnwidth.I77]\begin{lrbox}\rot@float@boxI78]\begin{minipage}\textheightI79XdD}IW*ecallthe\end@floatmacrohavingpreviouslyrotatedthebGox\@currboxThe Irotation ]iseithercloGckwiseoranti-cloGckwise,8depending ]onwhetherthepageisIoGddUUoreven;inonesidemodeitisalwaysUUodd.I80S\def\end@rotfloat{%IIfB3wearegoingtoknowwhetherpagesareoGddoreven,y:weneedtousethe\pagerefImechanism,xandAlabGels.ButLabelswon'tworkunlessŲtheuserhasputinacaption.IBeware!I81ap\end{minipage}\end{lrbox}% I82ap\global\advance\r@tfl@tby1I83ap\label{RF\the\r@tfl@t}%I84ap\message{Addingsidewaysfigureon}%I85ap\def\R@@page{\pageref{RF\the\r@tfl@t}}%I86ap\wd\rot@float@box\z@I87ap\ht\rot@float@box\z@I88ap\dp\rot@float@box\z@I89ap\vboxto\textheight{%IW*e5&needtoknowforsurewhichdirectionrotationisgoingtobGein,msolocally IresetUUthegraphicsunits.I90f\setkeys{Grot}{units=360}%4SsoI91f\if@rot@twoside I92p2\def\R@@page{\pageref{RF\the\r@tfl@t}}%I93f\elseI94p2\let\R@@page\rot@LRI95f\fiI96f\ifthenelse{\isodd{\R@@page}}{%I97f\message{righthandpage}%I98f\vfillI99f\centerline{\rotatebox{90}{\box\rot@float@box}}%E100~0}{%E101f\message{lefthandpage}%E102f\centerline{\rotatebox{-90}{\box\rot@float@box}}%E103kJ\vfillE104~0}%E105XdD}%E106ap\end@floatE107S}IThe8followingde nitionssetuptwoenvironments,qsidewaystableandsidewaysfigure, Iwhich޻usesthistypGeof oat. Naturally*,usersmayneedtochangethesetosuitItheirUUloGcalstyle.qBothcontributetothenormallistsof guresandtables.E108S\def\sidewaysfigure{\@rotfloat{figure}} E109S%E110S\let\endsidewaysfigure\end@rotfloatE111S%E112S\def\sidewaystable{\@rotfloat{table}}E113S\let\endsidewaystable\end@rotfloatIHandlingUUdoublecolumn oatsE114S\def\@rotdblfloat{%E115]\if@twocolumn\let\reserved@a\@rotdbflt\else\let\reserved@a\@rotfloat\fiE116]\reserved@a}E117S\def\@rotdbflt#1{\@ifnextchar[{\@rotxdblfloat{#1}}{\@rotxdblfloat{#1}[tp]}}E118S\def\@rotxdblfloat#1[#2]{%E119]\hsize\textwidth\linewidth\textwidthE120]\@float{#1}[#2]%E121]\begin{lrbox}\rot@float@boxE122]\begin{minipage}\textheightE123S}E124S\def\end@rotdblfloat{%IIfB3wearegoingtoknowwhetherpagesareoGddoreven,y:weneedtousethe\pageref Imechanism,xandAlabGels.ButLabelswon'tworkunlessŲtheuserhasputinacaption.IBeware!E125ap\end{minipage}\end{lrbox}% E126ap\global\advance\r@tfl@tby1E127ap\label{RF\the\r@tfl@t}%E128ap\message{Addingsidewaysfigureon}%E129ap\def\R@@page{\pageref{RF\the\r@tfl@t}}%E130ap\@tempdima\ht\rot@float@boxE131ap\advance\@tempdimaby\dp\rot@float@boxE132S\typeout{BOXwd:\the\wd\rot@float@box,ht:\the\ht\rot@float@box,dp:\the\dp\rot@float@box:soshiftby.5of\the\@tempdima}%E133ap\wd\rot@float@box\z@E134ap\ht\rot@float@box\z@E135ap\dp\rot@float@box\z@5(soE136ap\vboxto\textheight{%IW*e5&needtoknowforsurewhichdirectionrotationisgoingtobGein,msolocally IresetUUthegraphicsunits.E137f\setkeys{Grot}{units=360}% E138f\if@rot@twosideE139p2\def\R@@page{\pageref{RF\the\r@tfl@t}}%E140f\elseE141p2\let\R@@page\rot@LRE142f\fiE143f\ifthenelse{\isodd{\R@@page}}{%E144f\message{righthandpage}%E145f\vfillE146f\hboxto\textwidth{\hfill\rotatebox{90}{\box\rot@float@box}\hfill}%E147~0}{%E148f\message{lefthandpage}%E149f\hboxto\textwidth{\hfill\rotatebox{-90}{\box\rot@float@box}\hfill}%E150kJ\vfillE151~0}%E152XdD}%E153ap\end@dblfloatE154S}E155S\newenvironment{sidewaystable*}E156x{\@rotdblfloat{table}}E157x{\end@rotdblfloat}E158S\newenvironment{sidewaysfigure*}E159x{\@rotdblfloat{figure}}E160x{\end@rotdblfloat}E1616I)N cmbx125.1gRotatedcaptionsonlyuTISometimes@youmay ndthattherotationofcomplete guresdoGesnotgivequiteItheT7rightresult,sincetheyalwaystakeupthewholepage.Y*oumayprefertorotateIthecaptionandthe oatcontentsseparatelywithinaconventional gure.3HereweIo erasuggestionfora\rotcaptioncommand,*whichinsertsthecaptionrotatedIby90degrees.UTItisessentiallyacopyofthenormalcaptioningcoGde.UTStyleswhichIde ne3bthe\@makecaptioncommandmayalsoneedtode ne\@makerotcaption.E162S\def\rotcaption{\refstepcounter\@captype\@dblarg{\@rotcaption\@captype}}E163S\long\def\@rotcaption#1[#2]#3{%E164S\addcontentsline{\csnameext@#1\endcsname}{#1}{%E165XdD\protect\numberline{\csnamethe#1\endcsname}{\ignorespaces#2}}%E166]\parE167]\begingroupE168f\@parboxrestoreE169f\normalsizeE170f\@makerotcaption{\csnamefnum@#1\endcsname}{#3}%E171]\endgroup}E172S\long\def\@makerotcaption#1#2{%E173XdD\setbox\@tempboxa\hbox{#1:#2}%E174XdD\ifdim\wd\@tempboxa>.8\vsizeE175f\rotatebox{90}{%E176f\begin{minipage}{.8\textheight}#1:#2\end{minipage}%63isoE177f}\par E178XdD\else%E179f\rotatebox{90}{\box\@tempboxa}%E180XdD\fiE181XdD\hspace{12pt}%E182S}I7=;)N cmbx12$ow cmss9#ߤN cmtt9" cmmi10K`y cmr10ٓRcmr7?