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/frsample11.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/frsample11.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/floatrow/frsample11.tex | 169 |
1 files changed, 169 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/floatrow/frsample11.tex b/Master/texmf-dist/doc/latex/floatrow/frsample11.tex new file mode 100644 index 00000000000..1381bd870bf --- /dev/null +++ b/Master/texmf-dist/doc/latex/floatrow/frsample11.tex @@ -0,0 +1,169 @@ +%frsample02 - sample head +%one-column non-facing layout with left margin +%figures use BOXED style +%text boxes use modified Boxed style +\input pictures +\listfiles +\documentclass{book} + +\usepackage{calc} +\usepackage{tabularx,array} + +\IfFileExists{pstricks.sty}{\usepackage{pstricks}\psset{unit=1pt}}{} + +\IfFileExists{fancyhdr.sty}{\RequirePackage{fancyhdr}\pagestyle{fancy}\fancyfoot{} +\fancyhead[LE]{\leavevmode\hspace*{-.5\marginparwidth}\hskip-\marginparsep + \def\arraystretch{1,2}\begin{tabular}{@{}l@{}} + \leavevmode\rlap{\thepage}\hskip.5\marginparwidth\hskip\marginparsep + \hbox to\textwidth{\slshape\leftmark\hfill}\\\hline\end{tabular}} +\fancyhead[LO]{\leavevmode\hspace*{-.5\marginparwidth}\hskip-\marginparsep + \def\arraystretch{1,2}\begin{tabular}{@{}l@{}} + \hskip.5\marginparwidth\hskip\marginparsep + \hbox to\textwidth{{\slshape\rightmark}\quad\hfill\thepage}\\\hline\end{tabular}} +\fancyhead[RE]{}\fancyhead[CE]{} +\fancyhead[RO]{}\fancyhead[CO]{} +\def\headrulewidth{0pt}} +{\pagestyle{plain}} + +%load floatrow +\usepackage{floatrow} +\floatsetup{font={small,sf},footskip=.5\skip\footins, + footnoterule=limited,captionskip=5pt,margins=raggedright, + objectset=raggedright,capbesideposition=right, + capbesidesep=quad,floatrowsep=quad,style=BOXED} +\usepackage{fr-fancy} +\usepackage{floatpagestyle} + +% new float +\DeclareNewFloatType{textbox}{fileext=lor,name=Text,placement=tp} + +\DeclareObjectSet{unindent}{\leftskip12pt\parindent-\leftskip\parskip2pt} + +\floatsetup[textbox]{style=Boxed,heightadjust=all, + frameset={\fboxrule=1pt\fboxsep=12pt}, + capposition=bottom,objectset=unindent, + capbesideframe=yes,heightadjust=object, + valign=t} + +\newif\ifWideLayout\WideLayouttrue + +\DeclareMarginSet{hangleft}% + {\setfloatmargins + {\hskip-.5\marginparwidth\hskip-\marginparsep}{\hfil}} +\floatsetup[widefloat]{margins=hangleft} + +%load caption +\usepackage[font=small,labelfont=bf,labelsep=period, + justification=justified,singlelinecheck=no]{caption}[2004/11/28] + +\newif\ifLoadRotating +\IfFileExists{rotating.sty} +{\usepackage[figuresright]{rotating} + +\DeclareMarginSet{expand}% + {\setfloatmargins + {}{\hskip-\headsep\hskip-.7\headheight plus1fil}} +\floatsetup[rotfloat]{capbesideposition=right,margins=expand} +\LoadRotatingtrue}{\LoadRotatingfalse} + +%load subfig +\newif\ifLoadSubfig +\IfFileExists{subfig.sty} +{\usepackage[justification=justified,font=rm]{subfig} +\LoadSubfigtrue}{\LoadSubfigfalse} + +%load wrapfig +\newif\ifLoadWrapfig +\IfFileExists{wrapfig.sty}{\usepackage{wrapfig} +\LoadWrapfigtrue}{\LoadWrapfigfalse} + +\let\wideemptyfloatpage\emptyfloatpage + +\providecommand*{\pkg}[1]{\texttt{#1}} +\providecommand*{\com}[1]{\texttt{\char`\\#1}} +\begin{document} + +\chapter{One Column Document and~Wide Floats} + +\begin{sl} +This example shows floats in one-column document, wide float left hanged. + +\emph{Common settings.}\\ +Font for float contents \verb|\small| sans serif (except tables), +in this case font settings for subfloats was restored Roman family; +skips before foot material half reduced; +skip between caption and object also half reduced; +footnote rule has maximum width 1\,in (here is created special footnote style); +box alignment and justification of object contents flushed to left margin; +separation between beside caption and object equals to 1\,em; separation +between beside float boxes also equals to 1\,em. Common float style +\texttt{BOXED} (box around all float contents). +\begin{verbatim} +\floatsetup{font={small,sf},footskip=.5\skip\footins, + footnoterule=limited,captionskip=5pt,margins=raggedright, + objectset=raggedright,capbesideposition=right, + capbesidesep=quad,floatrowsep=quad,style=BOXED} +\end{verbatim} + +\emph{Common caption settings.}\\ +For caption text used \verb|\small| font, caption label font bold, separated +by period sign, justification justified. +\begin{verbatim} +\usepackage[font=small,labelfont=bf,labelsep=period, + justification=justified,singlelinecheck=no]{caption} +\end{verbatim} + +\emph{Common subcaption settings.}\\ +Justification centerlast (last line centered). Restored roman family. +\begin{verbatim} +\usepackage[justification=justified,font=rm]{subfig} +\end{verbatim} + +\emph{Special settings for float types.} + +\emph{Textbox.}\\ +The new float textbox uses corrected \texttt{Boxed} style (changed frame +settings); object contents left aligned (\verb|\raggedright|), with +\verb|\parindent|${{}=15}$\,pt, \verb|\parskip|${{}=15}$\,pt. +To get aligned subfloats the key \texttt{heightadjust=all} loaded. +\begin{verbatim} +\DeclareNewFloatType{textbox}{fileext=lor,name=Text,placement=tp} + +\DeclareObjectSet{unindent}{\leftskip12pt\parindent-\leftskip\parskip2pt} + +\floatsetup[textbox]{style=Boxed,heightadjust=all, + frameset={\fboxrule=1pt\fboxsep=12pt}, + capposition=bottom,objectset=unindent, + capbesideframe=yes,heightadjust=object, + valign=t} +\end{verbatim} + +\emph{Special settings for special float layout.} + +\emph{Wide float.}\\ +For wide float set hanged indentation to the left margin. +\begin{verbatim} +\DeclareMarginSet{hangleft}% + {\setfloatmargins + {\hskip-.5\marginparwidth\hskip-\marginparsep}{\hfil}} +\floatsetup[widefloat]{margins=hangleft} +\end{verbatim} + +\emph{Rotated float.}\\ +For rotated floats beside caption placed to right side of object; +right side expanded to the top of running head. To delete running head from pages +with rotated float was used \verb|\emptyfloatpage| macro\footnote{In current example the +\protect\com{wideemptyfloatpage} command is the synonym.} and +loaded \pkg{floatpagestyle} package. +\begin{verbatim} +\DeclareMarginSet{expand}% + {\setfloatmargins + {}{\hskip-\headsep\hskip-.7\headheight plus1fil}} +\floatsetup[rotfloat]{capbesideposition=right,margins=expand} +\end{verbatim} + +\end{sl} + +\input fr-sample + +\end{document} |