| 1 |
%sample file |
| 2 |
%all possible combinations of predefined floatrow styles |
| 3 |
%caption beside float object |
| 4 |
\documentclass{book} |
| 5 |
|
| 6 |
\usepackage{graphicx} |
| 7 |
\usepackage[footskip=4pt,objectset=centering,capbesidesep=quad]{floatrow} |
| 8 |
|
| 9 |
%load caption |
| 10 |
\usepackage[font=small,labelfont=bf,labelsep=period, |
| 11 |
justification=raggedright,singlelinecheck=no]{caption} |
| 12 |
|
| 13 |
\providecommand*\rightlast{\leftskip0ptplus1fil |
| 14 |
\rightskip0ptplus-1fil\parfillskip0ptplus1fil} |
| 15 |
\providecommand*\leftlast{\leftskip0pt\rightskip0pt\parfillskip0ptplus1fil} |
| 16 |
\DeclareCaptionJustification{togglelast} |
| 17 |
{\floatfacing*\rightlast\leftlast} |
| 18 |
\captionsetup[floatbeside]{justification=togglelast} |
| 19 |
|
| 20 |
\providecommand*{\com}[1]{\texttt{\char`\\#1}} |
| 21 |
|
| 22 |
%%try with fancy shadowbox frame |
| 23 |
%%there is the trick: base boxed style changed to use shadowbox frame |
| 24 |
%\usepackage{fr-fancy} |
| 25 |
%\DeclareFloatStyle{boxed}{capposition=bottom,captionskip=2pt, |
| 26 |
% framestyle=shadowbox,heightadjust=object,framearound=object} |
| 27 |
%\DeclareFloatStyle{BOXED}{capposition=bottom,framestyle=shadowbox, |
| 28 |
% framefit=yes,heightadjust=all,framearound=all} |
| 29 |
|
| 30 |
\setlength\textfloatsep{8ptplus2ptminus2pt} |
| 31 |
\setlength\intextsep{8ptplus2ptminus2pt} |
| 32 |
\advance\textheight2in |
| 33 |
\advance\topmargin-.85in |
| 34 |
\hbadness5000 |
| 35 |
\advance\textwidth.5in |
| 36 |
\advance\evensidemargin-.25in |
| 37 |
\advance\oddsidemargin-.25in |
| 38 |
|
| 39 |
\begin{document} |
| 40 |
\chapter{Float Boxes with Beside Captions: Variants of Layout} |
| 41 |
|
| 42 |
In this sample are gathered all possible combinations with beside captions |
| 43 |
with all predefined base float styles. You may try to run this document |
| 44 |
with \texttt{shadowbox} frame: uncomment line with \verb|\usepackage{fr-fancy}| |
| 45 |
at the preamble and lines below. |
| 46 |
|
| 47 |
\emph{Notes}. |
| 48 |
|
| 49 |
1)\enskip All float styles with frames get \verb|frameset={\fboxsep6pt}| |
| 50 |
to get more visible differences between fitted and non-fitted frames. |
| 51 |
|
| 52 |
2)\enskip The fancy boxes \texttt{shadowbox} and \texttt{wshadowbox} |
| 53 |
do not make differences between \texttt{capbesideframe=yes} and \texttt{capbesideframe=no}. |
| 54 |
|
| 55 |
\raggedright |
| 56 |
|
| 57 |
\newcommand\FIGS[5][]{% |
| 58 |
\markboth{\hbox{\small Variant #3}}{\hbox{\small Variant #3}} |
| 59 |
|
| 60 |
\small Variant #3: {\ttfamily\raggedright |
| 61 |
style=#2,capposition=beside,\allowbreak capbesideposition=\{#4\},\allowbreak capbesideframe=#5\par} |
| 62 |
|
| 63 |
\clearfloatsetup{figure} |
| 64 |
\floatsetup[figure]{style=#2,capposition=beside,capbesideposition=#4,capbesideframe=#5,facing=yes#1} |
| 65 |
\begin{figure}[!h] |
| 66 |
{{\fboxsep2pt\fbox{\begin{picture}(128,32)\put(0,0){\line(4,1){128}}\put(0,32){\line(4,-1){128}}\end{picture}}}}% |
| 67 |
\caption{% |
| 68 |
Plain figure in \texttt{#2} style. \texttt{#2} style. Width of column}% |
| 69 |
\label{fig:plain:#3}% |
| 70 |
\end{figure} |
| 71 |
|
| 72 |
\begin{figure}[!h] |
| 73 |
\fcapside |
| 74 |
{{\fboxsep2pt\fbox{\begin{picture}(128,32)\put(0,0){\line(4,1){128}}\put(0,32){\line(4,-1){128}}\end{picture}}}}% |
| 75 |
{\caption{% |
| 76 |
Figure in \protect\com{ffigbox}. \texttt{#2} style. Width of column}% |
| 77 |
\label{fig:floatbox:#3}}% |
| 78 |
|
| 79 |
\vskip\floatsep |
| 80 |
\fcapside[\FBwidth] |
| 81 |
{{\fboxsep2pt\fbox{\begin{picture}(128,32)\put(0,0){\line(4,1){128}}\put(0,32){\line(4,-1){128}}\end{picture}}}}% |
| 82 |
{\caption{% |
| 83 |
Figure in \protect\com{ffigbox}. \texttt{#2} style. Width of graphics}% |
| 84 |
\label{fig:fbwidth:#3}}% |
| 85 |
\end{figure} |
| 86 |
|
| 87 |
} |
| 88 |
|
| 89 |
\clearpage |
| 90 |
\FIGS[,frameset={\fboxsep6pt}]{Boxed}{1}{{top,inside}}{yes} |
| 91 |
\vfill |
| 92 |
\FIGS[,frameset={\fboxsep6pt}]{Boxed}{2}{{center,inside}}{yes} |
| 93 |
\vfill |
| 94 |
\FIGS[,frameset={\fboxsep6pt}]{Boxed}{3}{{bottom,inside}}{yes} |
| 95 |
\vfill |
| 96 |
|
| 97 |
\clearpage |
| 98 |
\FIGS[,frameset={\fboxsep6pt}]{Boxed}{4}{{top,inside}}{no} |
| 99 |
\vfill |
| 100 |
\FIGS[,frameset={\fboxsep6pt}]{Boxed}{5}{{center,inside}}{no} |
| 101 |
\vfill |
| 102 |
\FIGS[,frameset={\fboxsep6pt}]{Boxed}{6}{{bottom,inside}}{no} |
| 103 |
\vfill |
| 104 |
% |
| 105 |
\clearpage |
| 106 |
\FIGS[,frameset={\fboxsep6pt}]{Boxed}{7}{{top,outside}}{yes} |
| 107 |
\vfill |
| 108 |
\FIGS[,frameset={\fboxsep6pt}]{Boxed}{8}{{center,outside}}{yes} |
| 109 |
\vfill |
| 110 |
\FIGS[,frameset={\fboxsep6pt}]{Boxed}{9}{{bottom,outside}}{yes} |
| 111 |
\vfill |
| 112 |
|
| 113 |
\clearpage |
| 114 |
\FIGS[,frameset={\fboxsep6pt}]{Boxed}{10}{{top,outside}}{no} |
| 115 |
\vfill |
| 116 |
\FIGS[,frameset={\fboxsep6pt}]{Boxed}{11}{{center,outside}}{no} |
| 117 |
\vfill |
| 118 |
\FIGS[,frameset={\fboxsep6pt}]{Boxed}{12}{{bottom,outside}}{no} |
| 119 |
\vfill |
| 120 |
% |
| 121 |
\clearpage |
| 122 |
\FIGS[,frameset={\fboxsep6pt}]{Boxed}{13}{{top,left}}{yes} |
| 123 |
\vfill |
| 124 |
\FIGS[,frameset={\fboxsep6pt}]{Boxed}{14}{{center,left}}{yes} |
| 125 |
\vfill |
| 126 |
\FIGS[,frameset={\fboxsep6pt}]{Boxed}{15}{{bottom,left}}{yes} |
| 127 |
\vfill |
| 128 |
|
| 129 |
\clearpage |
| 130 |
\FIGS[,frameset={\fboxsep6pt}]{Boxed}{16}{{top,left}}{no} |
| 131 |
\vfill |
| 132 |
\FIGS[,frameset={\fboxsep6pt}]{Boxed}{17}{{center,left}}{no} |
| 133 |
\vfill |
| 134 |
\FIGS[,frameset={\fboxsep6pt}]{Boxed}{18}{{bottom,left}}{no} |
| 135 |
\vfill |
| 136 |
% |
| 137 |
\clearpage |
| 138 |
\FIGS[,frameset={\fboxsep6pt}]{Boxed}{19}{{top,right}}{yes} |
| 139 |
\vfill |
| 140 |
\FIGS[,frameset={\fboxsep6pt}]{Boxed}{20}{{center,right}}{yes} |
| 141 |
\vfill |
| 142 |
\FIGS[,frameset={\fboxsep6pt}]{Boxed}{21}{{bottom,right}}{yes} |
| 143 |
\vfill |
| 144 |
|
| 145 |
\clearpage |
| 146 |
\FIGS[,frameset={\fboxsep6pt}]{Boxed}{22}{{top,right}}{no} |
| 147 |
\vfill |
| 148 |
\FIGS[,frameset={\fboxsep6pt}]{boxed}{23}{{center,right}}{no} |
| 149 |
\vfill |
| 150 |
\FIGS[,frameset={\fboxsep6pt}]{boxed}{24}{{bottom,right}}{no} |
| 151 |
\vfill |
| 152 |
|
| 153 |
%%% |
| 154 |
|
| 155 |
\clearpage |
| 156 |
\floatsetup{capbesidesep=qquad} |
| 157 |
\FIGS[,frameset={\fboxsep6pt}]{boxed}{25}{{top,inside}}{yes} |
| 158 |
\vfill |
| 159 |
\FIGS[,frameset={\fboxsep6pt}]{boxed}{26}{{center,inside}}{yes} |
| 160 |
\vfill |
| 161 |
\FIGS[,frameset={\fboxsep6pt}]{boxed}{27}{{bottom,inside}}{yes} |
| 162 |
\vfill |
| 163 |
|
| 164 |
\clearpage |
| 165 |
\FIGS[,frameset={\fboxsep6pt}]{boxed}{28}{{top,inside}}{no} |
| 166 |
\vfill |
| 167 |
\FIGS[,frameset={\fboxsep6pt}]{boxed}{29}{{center,inside}}{no} |
| 168 |
\vfill |
| 169 |
\FIGS[,frameset={\fboxsep6pt}]{boxed}{30}{{bottom,inside}}{no} |
| 170 |
\vfill |
| 171 |
% |
| 172 |
\clearpage |
| 173 |
\FIGS[,frameset={\fboxsep6pt}]{boxed}{31}{{top,outside}}{yes} |
| 174 |
\vfill |
| 175 |
\FIGS[,frameset={\fboxsep6pt}]{boxed}{32}{{center,outside}}{yes} |
| 176 |
\vfill |
| 177 |
\FIGS[,frameset={\fboxsep6pt}]{boxed}{33}{{bottom,outside}}{yes} |
| 178 |
\vfill |
| 179 |
|
| 180 |
\clearpage |
| 181 |
\FIGS[,frameset={\fboxsep6pt}]{boxed}{34}{{top,outside}}{no} |
| 182 |
\vfill |
| 183 |
\FIGS[,frameset={\fboxsep6pt}]{boxed}{35}{{center,outside}}{no} |
| 184 |
\vfill |
| 185 |
\FIGS[,frameset={\fboxsep6pt}]{boxed}{36}{{bottom,outside}}{no} |
| 186 |
\vfill |
| 187 |
% |
| 188 |
\clearpage |
| 189 |
\FIGS[,frameset={\fboxsep6pt}]{boxed}{37}{{top,left}}{yes} |
| 190 |
\vfill |
| 191 |
\FIGS[,frameset={\fboxsep6pt}]{boxed}{38}{{center,left}}{yes} |
| 192 |
\vfill |
| 193 |
\FIGS[,frameset={\fboxsep6pt}]{boxed}{39}{{bottom,left}}{yes} |
| 194 |
\vfill |
| 195 |
|
| 196 |
\clearpage |
| 197 |
\FIGS[,frameset={\fboxsep6pt}]{boxed}{40}{{top,left}}{no} |
| 198 |
\vfill |
| 199 |
\FIGS[,frameset={\fboxsep6pt}]{boxed}{41}{{center,left}}{no} |
| 200 |
\vfill |
| 201 |
\FIGS[,frameset={\fboxsep6pt}]{boxed}{42}{{bottom,left}}{no} |
| 202 |
\vfill |
| 203 |
% |
| 204 |
\clearpage |
| 205 |
\FIGS[,frameset={\fboxsep6pt}]{boxed}{43}{{top,right}}{yes} |
| 206 |
\vfill |
| 207 |
\FIGS[,frameset={\fboxsep6pt}]{boxed}{44}{{center,right}}{yes} |
| 208 |
\vfill |
| 209 |
\FIGS[,frameset={\fboxsep6pt}]{boxed}{45}{{bottom,right}}{yes} |
| 210 |
\vfill |
| 211 |
|
| 212 |
\clearpage |
| 213 |
\FIGS[,frameset={\fboxsep6pt}]{boxed}{46}{{top,right}}{no} |
| 214 |
\vfill |
| 215 |
\FIGS[,frameset={\fboxsep6pt}]{boxed}{47}{{center,right}}{no} |
| 216 |
\vfill |
| 217 |
\FIGS[,frameset={\fboxsep6pt}]{boxed}{48}{{bottom,right}}{no} |
| 218 |
\vfill |
| 219 |
|
| 220 |
%%% |
| 221 |
|
| 222 |
\clearpage |
| 223 |
\floatsetup{capbesidesep=quad} |
| 224 |
\FIGS[,frameset={\fboxsep6pt}]{BOXED}{49}{{top,inside}}{no} |
| 225 |
\vfill |
| 226 |
\FIGS[,frameset={\fboxsep6pt}]{BOXED}{50}{{center,inside}}{no} |
| 227 |
\vfill |
| 228 |
\FIGS[,frameset={\fboxsep6pt}]{BOXED}{51}{{bottom,inside}}{no} |
| 229 |
\vfill |
| 230 |
% |
| 231 |
\clearpage |
| 232 |
\FIGS[,frameset={\fboxsep6pt}]{BOXED}{52}{{top,outside}}{no} |
| 233 |
\vfill |
| 234 |
\FIGS[,frameset={\fboxsep6pt}]{BOXED}{53}{{center,outside}}{no} |
| 235 |
\vfill |
| 236 |
\FIGS[,frameset={\fboxsep6pt}]{BOXED}{54}{{bottom,outside}}{no} |
| 237 |
\vfill |
| 238 |
% |
| 239 |
\clearpage |
| 240 |
\FIGS[,frameset={\fboxsep6pt}]{BOXED}{55}{{top,left}}{no} |
| 241 |
\vfill |
| 242 |
\FIGS[,frameset={\fboxsep6pt}]{BOXED}{56}{{center,left}}{no} |
| 243 |
\vfill |
| 244 |
\FIGS[,frameset={\fboxsep6pt}]{BOXED}{57}{{bottom,left}}{no} |
| 245 |
\vfill |
| 246 |
% |
| 247 |
\clearpage |
| 248 |
\FIGS[,frameset={\fboxsep6pt}]{BOXED}{58}{{top,right}}{no} |
| 249 |
\vfill |
| 250 |
\FIGS[,frameset={\fboxsep6pt}]{BOXED}{59}{{center,right}}{no} |
| 251 |
\vfill |
| 252 |
\FIGS[,frameset={\fboxsep6pt}]{BOXED}{60}{{bottom,right}}{no} |
| 253 |
\vfill |
| 254 |
|
| 255 |
%%% |
| 256 |
|
| 257 |
\clearpage |
| 258 |
\floatsetup{capbesidesep=qquad} |
| 259 |
\FIGS[,frameset={\fboxsep6pt},framefit=no]{BOXED}{61}{{top,inside}}{no} |
| 260 |
\vfill |
| 261 |
\FIGS[,frameset={\fboxsep6pt},framefit=no]{BOXED}{62}{{center,inside}}{no} |
| 262 |
\vfill |
| 263 |
\FIGS[,frameset={\fboxsep6pt},framefit=no]{BOXED}{63}{{bottom,inside}}{no} |
| 264 |
\vfill |
| 265 |
% |
| 266 |
\clearpage |
| 267 |
\FIGS[,frameset={\fboxsep6pt},framefit=no]{BOXED}{64}{{top,outside}}{no} |
| 268 |
\vfill |
| 269 |
\FIGS[,frameset={\fboxsep6pt},framefit=no]{BOXED}{65}{{center,outside}}{no} |
| 270 |
\vfill |
| 271 |
\FIGS[,frameset={\fboxsep6pt},framefit=no]{BOXED}{66}{{bottom,outside}}{no} |
| 272 |
\vfill |
| 273 |
% |
| 274 |
\clearpage |
| 275 |
\FIGS[,frameset={\fboxsep6pt},framefit=no]{BOXED}{67}{{top,left}}{no} |
| 276 |
\vfill |
| 277 |
\FIGS[,frameset={\fboxsep6pt},framefit=no]{BOXED}{68}{{center,left}}{no} |
| 278 |
\vfill |
| 279 |
\FIGS[,frameset={\fboxsep6pt},framefit=no]{BOXED}{69}{{bottom,left}}{no} |
| 280 |
\vfill |
| 281 |
% |
| 282 |
\clearpage |
| 283 |
\FIGS[,frameset={\fboxsep6pt},framefit=no]{BOXED}{70}{{top,right}}{no} |
| 284 |
\vfill |
| 285 |
\FIGS[,frameset={\fboxsep6pt},framefit=no]{BOXED}{71}{{center,right}}{no} |
| 286 |
\vfill |
| 287 |
\FIGS[,frameset={\fboxsep6pt},framefit=no]{BOXED}{72}{{bottom,right}}{no} |
| 288 |
\vfill |
| 289 |
|
| 290 |
%%% |
| 291 |
|
| 292 |
\clearpage |
| 293 |
\FIGS[,frameset={\fboxsep6pt}]{ruled}{73}{{top,inside}}{no} |
| 294 |
\vfill |
| 295 |
\FIGS[,frameset={\fboxsep6pt}]{ruled}{74}{{center,inside}}{no} |
| 296 |
\vfill |
| 297 |
\FIGS[,frameset={\fboxsep6pt}]{ruled}{75}{{bottom,inside}}{no} |
| 298 |
\vfill |
| 299 |
% |
| 300 |
\clearpage |
| 301 |
\FIGS[,frameset={\fboxsep6pt}]{ruled}{76}{{top,outside}}{no} |
| 302 |
\vfill |
| 303 |
\FIGS[,frameset={\fboxsep6pt}]{ruled}{77}{{center,outside}}{no} |
| 304 |
\vfill |
| 305 |
\FIGS[,frameset={\fboxsep6pt}]{ruled}{78}{{bottom,outside}}{no} |
| 306 |
\vfill |
| 307 |
% |
| 308 |
\clearpage |
| 309 |
\FIGS[,frameset={\fboxsep6pt}]{ruled}{79}{{top,left}}{no} |
| 310 |
\vfill |
| 311 |
\FIGS[,frameset={\fboxsep6pt}]{ruled}{80}{{center,left}}{no} |
| 312 |
\vfill |
| 313 |
\FIGS[,frameset={\fboxsep6pt}]{ruled}{81}{{bottom,left}}{no} |
| 314 |
\vfill |
| 315 |
% |
| 316 |
\clearpage |
| 317 |
\FIGS[,frameset={\fboxsep6pt}]{ruled}{82}{{top,right}}{no} |
| 318 |
\vfill |
| 319 |
\FIGS[,frameset={\fboxsep6pt}]{ruled}{83}{{center,right}}{no} |
| 320 |
\vfill |
| 321 |
\FIGS[,frameset={\fboxsep6pt}]{ruled}{84}{{bottom,right}}{no} |
| 322 |
\vfill |
| 323 |
|
| 324 |
%%% |
| 325 |
|
| 326 |
\clearpage |
| 327 |
\FIGS[,frameset={\fboxsep6pt}]{plain}{85}{{top,inside}}{no} |
| 328 |
\vfill |
| 329 |
\FIGS[,frameset={\fboxsep6pt}]{plain}{86}{{center,inside}}{no} |
| 330 |
\vfill |
| 331 |
\FIGS[,frameset={\fboxsep6pt}]{plain}{87}{{bottom,inside}}{no} |
| 332 |
\vfill |
| 333 |
% |
| 334 |
\clearpage |
| 335 |
\FIGS[,frameset={\fboxsep6pt}]{plain}{88}{{top,outside}}{no} |
| 336 |
\vfill |
| 337 |
\FIGS[,frameset={\fboxsep6pt}]{plain}{89}{{center,outside}}{no} |
| 338 |
\vfill |
| 339 |
\FIGS[,frameset={\fboxsep6pt}]{plain}{90}{{bottom,outside}}{no} |
| 340 |
\vfill |
| 341 |
% |
| 342 |
\clearpage |
| 343 |
\FIGS[,frameset={\fboxsep6pt}]{plain}{91}{{top,left}}{no} |
| 344 |
\vfill |
| 345 |
\FIGS[,frameset={\fboxsep6pt}]{plain}{92}{{center,left}}{no} |
| 346 |
\vfill |
| 347 |
\FIGS[,frameset={\fboxsep6pt}]{plain}{93}{{bottom,left}}{no} |
| 348 |
\vfill |
| 349 |
% |
| 350 |
\clearpage |
| 351 |
\FIGS[,frameset={\fboxsep6pt}]{plain}{94}{{top,right}}{no} |
| 352 |
\vfill |
| 353 |
\FIGS[,frameset={\fboxsep6pt}]{plain}{95}{{center,right}}{no} |
| 354 |
\vfill |
| 355 |
\FIGS[,frameset={\fboxsep6pt}]{plain}{96}{{bottom,right}}{no} |
| 356 |
\vfill |
| 357 |
|
| 358 |
|
| 359 |
\end{document} |