| 1 |
% This file is public domain. |
| 2 |
|
| 3 |
% arara: pdflatex |
| 4 |
% arara: pdflatex |
| 5 |
\documentclass{book} |
| 6 |
|
| 7 |
\usepackage[demo]{graphicx} |
| 8 |
\usepackage{lipsum} |
| 9 |
\usepackage{color} |
| 10 |
\usepackage[ |
| 11 |
draft, |
| 12 |
% verbose, |
| 13 |
pages=absolute |
| 14 |
]{flowfram} |
| 15 |
\usepackage[hidelinks]{hyperref} |
| 16 |
|
| 17 |
\onecolumn |
| 18 |
|
| 19 |
\setflowframe{1}{label=single} |
| 20 |
|
| 21 |
\twocolumnDtop[none]{2in} |
| 22 |
|
| 23 |
\setdynamicframe{1}{label=title} |
| 24 |
\setflowframe{2}{label=shortleft} |
| 25 |
\setflowframe{3}{label=shortright} |
| 26 |
|
| 27 |
\twocolumn[none] |
| 28 |
|
| 29 |
\setflowframe{4}{label=left} |
| 30 |
\setflowframe{5}{label=right} |
| 31 |
|
| 32 |
\newdynamicframe[none]{\typeblockwidth}{\typeblockheight}{0pt}{0pt}[image] |
| 33 |
|
| 34 |
\setdynamicframe*{image}{valign=c} |
| 35 |
|
| 36 |
\makethumbtabs{1in} |
| 37 |
\flowframsetup{thumbtab-links=all} |
| 38 |
\enablethumbtabs |
| 39 |
|
| 40 |
\title{Sample Document} |
| 41 |
\author{A.N. Other} |
| 42 |
|
| 43 |
\begin{document}\raggedright |
| 44 |
\pagenumbering{alph} |
| 45 |
\maketitle |
| 46 |
|
| 47 |
\frontmatter |
| 48 |
\tableofcontents |
| 49 |
\chapter{Acknowledgements} |
| 50 |
|
| 51 |
\lipsum[1] |
| 52 |
|
| 53 |
\flowswitchoffnextodd*{single}% |
| 54 |
\flowswitchonnextoddonly*{shortleft,shortright}% |
| 55 |
\dynamicswitchonnextoddonly*{title}% |
| 56 |
\dfchaphead*{title} |
| 57 |
|
| 58 |
\mainmatter |
| 59 |
\chapter{Sample} |
| 60 |
|
| 61 |
\flowswitchonnext*{left,right}% |
| 62 |
% From this point onwards, automate the switch at the start of |
| 63 |
% each chapter |
| 64 |
\renewcommand{\ffprechapterhook}{% |
| 65 |
\flowswitchoffnextoddonly*{left,right}% |
| 66 |
\flowswitchonnextoddonly*{shortleft,shortright}% |
| 67 |
\dynamicswitchonnextoddonly*{title}% |
| 68 |
} |
| 69 |
|
| 70 |
\lipsum |
| 71 |
|
| 72 |
\lipsum |
| 73 |
|
| 74 |
\chapter[][Another]{Another Sample Chapter} |
| 75 |
|
| 76 |
\lipsum[1-20] |
| 77 |
|
| 78 |
% Switch to single column just for the next page |
| 79 |
|
| 80 |
\flowswitchoffnextonly*{left,right} |
| 81 |
\flowswitchonnextonly*{single} |
| 82 |
|
| 83 |
\clearpage |
| 84 |
|
| 85 |
\begin{figure}[p] |
| 86 |
\centering |
| 87 |
\includegraphics{image1} |
| 88 |
\caption{A Sample Figure} |
| 89 |
\label{fig:sample} |
| 90 |
\end{figure} |
| 91 |
|
| 92 |
\clearpage |
| 93 |
|
| 94 |
\lipsum[21-30] |
| 95 |
|
| 96 |
\chapter[][Surprise!]{Here's Another Chapter} |
| 97 |
|
| 98 |
\lipsum[1-20] |
| 99 |
|
| 100 |
% Switch off columns for next page only and switch on dynamic frame |
| 101 |
% called "image": |
| 102 |
|
| 103 |
\flowswitchoffnextonly*{left,right} |
| 104 |
\dynamicswitchonnextonly*{image} |
| 105 |
|
| 106 |
\setdynamiccontents*{image}{% |
| 107 |
\begin{staticfigure} |
| 108 |
\centering |
| 109 |
\includegraphics{image2} |
| 110 |
\caption{Another Sample Figure} |
| 111 |
\label{fig:sample2} |
| 112 |
\end{staticfigure} |
| 113 |
} |
| 114 |
|
| 115 |
\lipsum[21-40] |
| 116 |
|
| 117 |
\end{document} |