| 1 |
% This file is public domain. |
| 2 |
|
| 3 |
\documentclass{article} |
| 4 |
|
| 5 |
\usepackage{color} |
| 6 |
\usepackage[draft]{flowfram} |
| 7 |
\usepackage{tikz} |
| 8 |
\usetikzlibrary{decorations.pathmorphing} |
| 9 |
|
| 10 |
\newstaticframe[1,2]{3in}{3in}{0pt}{0pt}[sf1] |
| 11 |
\newdynamicframe[1,3]{2in}{3in}{0.7\textwidth}{0.5\textheight}[df1] |
| 12 |
|
| 13 |
\newstaticframe[2]{3in}{3in}{0.5\textwidth}{0.5\textheight}[sf2] |
| 14 |
|
| 15 |
\newdynamicframe[3]{2in}{2in}{0.5\textwidth}{0pt}[df2] |
| 16 |
|
| 17 |
\setlength{\sdfparindent}{\parindent} |
| 18 |
|
| 19 |
\onecolumn |
| 20 |
|
| 21 |
\newlength\fancywidth |
| 22 |
\newlength\fancyheight |
| 23 |
\newlength\fancydepth |
| 24 |
|
| 25 |
\newcommand{\fancyframe}[1]{% |
| 26 |
\settowidth{\fancywidth}{#1}% |
| 27 |
\settoheight{\fancyheight}{#1}% |
| 28 |
\settodepth{\fancydepth}{#1}% |
| 29 |
\addtolength{\fancyheight}{\fancydepth}% |
| 30 |
\tikz[baseline=0pt]{% |
| 31 |
\draw[decorate,decoration={bumps}] |
| 32 |
(0pt,0pt) |
| 33 |
rectangle (\fancywidth,\fancyheight); |
| 34 |
}} |
| 35 |
|
| 36 |
\begin{document} |
| 37 |
\setstaticframe{1,2}{valign=t} |
| 38 |
\setstaticframe{1}{border=fancyframe} |
| 39 |
\setstaticcontents{1}{Top\par |
| 40 |
\vfill |
| 41 |
Bottom} |
| 42 |
|
| 43 |
\setdynamiccontents{1}{Bar} |
| 44 |
\begin{dynamiccontents*}{df1} |
| 45 |
Paragraph 1 |
| 46 |
|
| 47 |
Paragraph 2 |
| 48 |
\end{dynamiccontents*} |
| 49 |
|
| 50 |
Dynamic frame 1 is |
| 51 |
\relativeframelocation{dynamic}{1}{static}{1} |
| 52 |
of static frame 1. |
| 53 |
|
| 54 |
\newpage\mbox{} |
| 55 |
|
| 56 |
\begin{staticcontents*}{sf1} |
| 57 |
Some sample text on the left static frame. |
| 58 |
\continueonframe[continued \relativeframelocation{static}{2}{static}{1}]{sf2} |
| 59 |
Some more text on the right static frame, and |
| 60 |
some more text to pad it out a bit. |
| 61 |
\end{staticcontents*} |
| 62 |
|
| 63 |
\newpage\mbox{} |
| 64 |
|
| 65 |
Dynamic frame 1 is |
| 66 |
\SaveRelativeFrameLocation{savedref}{dynamic}{1}{static}{1}% save to aux file |
| 67 |
\RefSavedRelativeLocation{savedref} % needs rerun |
| 68 |
of static frame 1. |
| 69 |
|
| 70 |
Is dynamic frame 1 above static frame 1? |
| 71 |
\IfSavedRelativeLocationAbove{savedref}{true}{false}. |
| 72 |
|
| 73 |
Is dynamic frame 1 above but not right of static frame 1? |
| 74 |
\IfSavedRelativeLocationEq{savedref}{\FFabove}{true}{false}. |
| 75 |
|
| 76 |
Is dynamic frame 1 above right of static frame 1? |
| 77 |
\IfSavedRelativeLocationEq{savedref}{\FFaboveright}{true}{false}. |
| 78 |
|
| 79 |
\begin{dynamiccontents}{1} |
| 80 |
Some sample text in the first dynamic frame. |
| 81 |
\continueonframe[continued \reldynamicloc*{df2}{df1}]{2} |
| 82 |
Some more text in the second dynamic frame, and |
| 83 |
some more text to pad it out a bit. |
| 84 |
\end{dynamiccontents} |
| 85 |
|
| 86 |
\end{document} |