diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-09 00:44:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-09 00:44:40 +0000 |
commit | b4fc5f639874db951177ec539299d20908adb654 (patch) | |
tree | 52f08823ca58fffe3db6a9b075635038c567626c /Master/texmf-dist/doc/latex/floatrow/frsample01.tex | |
parent | dec3d98ebe442d7ea93efbaa8dd2e2be8149a467 (diff) |
doc 4
git-svn-id: svn://tug.org/texlive/trunk@80 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/floatrow/frsample01.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/floatrow/frsample01.tex | 193 |
1 files changed, 193 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/floatrow/frsample01.tex b/Master/texmf-dist/doc/latex/floatrow/frsample01.tex new file mode 100644 index 00000000000..e2a802fd5a7 --- /dev/null +++ b/Master/texmf-dist/doc/latex/floatrow/frsample01.tex @@ -0,0 +1,193 @@ +%sample file +%all possible combinations of predefined floatrow styles +%plain environments and float rows +%caption above/below float object +\listfiles +\documentclass{book} + +\usepackage[footskip=4pt,objectset=centering]{floatrow} + +%load caption +\usepackage[font=small,labelfont=bf,labelsep=period, + justification=justified,singlelinecheck=no]{caption}[2004/11/28] + +\providecommand*{\com}[1]{\texttt{\char`\\#1}} + +%%%try with fancy shadowbox frame +%%%there is the trick: base boxed and BOXED styles changed to use shadowbox frame +%\usepackage{fr-fancy} +%\DeclareFloatStyle{boxed}{capposition=bottom,captionskip=2pt, +% framestyle=shadowbox,heightadjust=object,framearound=object} +%\DeclareFloatStyle{BOXED}{capposition=bottom,framestyle=shadowbox, +% framefit=yes,heightadjust=all,framearound=all} + +\setlength\textfloatsep{8ptplus2ptminus2pt} +\setlength\intextsep{8ptplus2ptminus2pt} +\advance\textheight1.2in +\advance\topmargin-.6in +\hbadness2000 +\advance\textwidth.5in +\advance\evensidemargin-.25in +\advance\oddsidemargin-.25in + +\begin{document} +\chapter{Float Boxes with Foots: Variants of Layout} + +In this sample file are gathered plain float environments and float rows +with usage of all predefined base float styles. You may try to run this document +with \texttt{shadowbox} frame: uncomment line with \verb|\usepackage{fr-fancy}| +at the preamble and lines below. + +The default vertical alignment of float objects is centered. +To change alignment to top edge you may say: +\begin{verbatim} +\floatsetup{valign=t} +\end{verbatim} +like in current sample. +Keys are analogous to option of vertical alignment in minipage and \verb|\parbox|: +\texttt{t}---for top alignment, \texttt{c}---for center alignment, +\texttt{b}---for bottom alignment, and \texttt{s}---to stretch float object material +to full height. + +\emph{Note}. All float styles with frames get \verb|frameset={\fboxsep7.5pt}| +to get more visible differences between fitted and non-fitted frames. + +%%%aligns float objects by top +\floatsetup{valign=t} + +\newcommand\PICTURE[4]{\begin{picture}(#1,#2) + \put(0,0){\line(#3,#4){#1}}\put(0,0){\line(1,0){#1}}\put(0,0){\line(0,1){#2}} + \put(0,#2){\line(#3,-#4){#1}}\put(0,#2){\line(1,0){#1}} + \put(#1,0){\line(0,1){#2}} + \end{picture}} +\newcommand\FIGS[5][]{ +\clearpage +\markboth +{{\small Variant #3: \texttt{style=#2,capposition=#4,footposition=#5}}} +{{\small Variant #3: \texttt{style=#2,capposition=#4,footposition=#5}}} + +\noindent Var.\,#3: \protect\com{floatsetup}\texttt{\{style=#2,\allowbreak capposition=#4,\allowbreak +footposition=#5\}} + +\clearfloatsetup{figure} +\floatsetup[figure]{style=#2,capposition=#4,footposition=#5#1 +%%%you may try to create row with usage of predefined height uncomment next line +%%%and [150] few lines below +%,heightadjust=all +} +\begingroup\samepage +\begin{figure}[H] + {\PICTURE{20}{20}11}% + \caption{% +Plain figure in \texttt{#2} style. Caption position \texttt{#4}}% +\label{fig:plain:#3}% +\floatfoot{\sloppy Much more, more and more and more and more and more and more and more text inside macro +\protect\com{floatfoot}}% +\end{figure} + +\medskip +\strut\vrule +\medskip + +\begin{figure}[H] +\begin{floatrow}[3] +\floatbox{figure} +{\caption{Beside figure in float row, ``column'' width. And more text\protect\footnote{\texttt{footpos=#5}}}} +{\PICTURE{20}{20}11% +\floatfoot{\sloppy Text inside \protect\com{floatfoot}}% +\label{figI:#2:row:#3}} + +\floatbox{figure}[\FBwidth] +{\caption{Beside figure, graphic width\strut}\label{figII:#2:row:#3}} +{\PICTURE{96}{48}21% +\floatfoot{\sloppy More and more text inside the \protect\com{floatfoot}}} + +%%%you may try to create float rows with usage of predefined height - uncomment [150pt] +%%%and key heightadjust in \floatsetup few lines above +\floatbox{figure}[\Xhsize]%[150pt] +{\caption{Beside figure in float row. Float row in \texttt{#2} style, caption \texttt{#4}}} +{\PICTURE{35}{35}11% +\floatfoot{\sloppy Much more, more and more, more and more text inside \protect\com{floatfoot}}% +\label{figIII:#2:row:#3}} +\end{floatrow} +\end{figure} + +\medskip +\strut\vrule +\medskip + +\captionof{figure}{Beside figure in float row. Float row in \texttt{#2} style, caption \texttt{#4}} + +\medskip +\strut\vrule +\medskip + +\captionof*{figure}{Beside figure in float row. Float row in \texttt{#2} style, caption \texttt{#4}} + +\medskip +\strut\vrule +\medskip + +\floatbox{figure}{}{\caption{Beside figure in float row. Float row in \texttt{#2} style, caption \texttt{#4}}} + +\medskip +\strut\vrule +\medskip + +\floatbox{figure}{\PICTURE{35}{35}11}{} + +\endgroup} + +\clearpage\raggedright +% +\FIGS[,frameset={\fboxsep7.5pt}]{BOXED}{I}{TOP}{caption} +\FIGS[,frameset={\fboxsep7.5pt}]{BOXED}{II}{bottom}{caption} + +\FIGS{Ruled}{III}{TOP}{caption} +\FIGS{Ruled}{IV}{bottom}{caption} + +\FIGS[,frameset={\fboxsep7.5pt}]{Boxed}{V}{TOP}{caption} +\FIGS[,frameset={\fboxsep7.5pt}]{Boxed}{VI}{bottom}{caption} + +% +\FIGS[,frameset={\fboxsep7.5pt}]{BOXED}{VII}{TOP}{default} +\FIGS[,frameset={\fboxsep7.5pt}]{BOXED}{VIII}{bottom}{default} + +\FIGS{Ruled}{IX}{TOP}{default} +\FIGS{Ruled}{X}{bottom}{default} + +\FIGS[,frameset={\fboxsep7.5pt}]{Boxed}{XI}{TOP}{default} +\FIGS[,frameset={\fboxsep7.5pt}]{Boxed}{XII}{bottom}{default} + +% +\FIGS[,frameset={\fboxsep7.5pt}]{BOXED}{XIII}{TOP}{bottom} +\FIGS{Ruled}{XIV}{TOP}{bottom} + +\FIGS[,frameset={\fboxsep7.5pt}]{Boxed}{XV}{TOP}{bottom} + +\clearpage +\textbf{The next variants (XVI--XXI) show layout of framed styles +with key \texttt{framefit=no}; \texttt{boxed} style (native style of \textsf{float} package), +and \texttt{BOXED} with added key \texttt{framefit=no}.} +\vfill\vbox{}\vfill + +\floatsetup{floatrowsep=qquad} +\clearpage +\FIGS[,frameset={\fboxsep7.5pt}]{boxed}{XVI}{TOP}{caption} +\FIGS[,framefit=no,frameset={\fboxsep7.5pt}]{BOXED}{XVII}{TOP}{caption} + +\FIGS[,frameset={\fboxsep7.5pt}]{boxed}{XVIII}{TOP}{default} +\FIGS[,framefit=no,frameset={\fboxsep7.5pt}]{BOXED}{XIX}{TOP}{default} + +\FIGS[,frameset={\fboxsep7.5pt}]{boxed}{XX}{TOP}{bottom} +\FIGS[,framefit=no,frameset={\fboxsep7.5pt}]{BOXED}{XXI}{TOP}{bottom} + +\FIGS{plain}{XXII}{TOP}{caption} +\FIGS{plain}{XXIII}{bottom}{caption} + +\FIGS{plain}{XXIV}{TOP}{default} +\FIGS{plain}{XXV}{bottom}{default} + +\FIGS{plain}{XXVI}{TOP}{bottom} + +\end{document}
\ No newline at end of file |