summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/flowfram/samples/sample-pages.tex
blob: 38e52856a4ced6f005bb28872cb4e739d29f8020 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
 % This file is public domain.

\documentclass{book}

\usepackage[demo]{graphicx}
\usepackage{lipsum}
\usepackage{color}
\usepackage[
  draft,
  verbose,
  pages=absolute
 ]{flowfram}

\onecolumn

\setflowframe{1}{label=single}

\twocolumnDtop[none]{2in}

\setdynamicframe{1}{label=title}
\setflowframe{2}{label=shortleft}
\setflowframe{3}{label=shortright}

\twocolumn[none]

\setflowframe{4}{label=left}
\setflowframe{5}{label=right}

\newdynamicframe[none]{\textwidth}{\textheight}{0pt}{0pt}[image]

\setdynamicframe*{image}{valign=c}

\title{Sample Document}
\author{A.N. Other}

\begin{document}\raggedright
\maketitle

\frontmatter
\tableofcontents
\chapter{Acknowledgements}

\lipsum[1]

\flowswitchoffnextodd*{single}%
\flowswitchonnextoddonly*{shortleft,shortright}%
\dynamicswitchonnextoddonly*{title}%
\dfchaphead*{title}

\mainmatter
\chapter{Sample}

\flowswitchonnext*{left,right}%
\renewcommand{\ffprechapterhook}{%
  \flowswitchoffnextoddonly*{left,right}%
  \flowswitchonnextoddonly*{shortleft,shortright}%
  \dynamicswitchonnextoddonly*{title}%
}

\lipsum

\lipsum

\chapter{Another Sample Chapter}

\lipsum[1-20]


\flowswitchoffnextonly*{left,right}
\flowswitchonnextonly*{single}

\clearpage

\begin{figure}[p]
\centering
 \includegraphics{image1}
\caption{A Sample Figure}
\label{fig:sample}
\end{figure}

\clearpage

\lipsum[21-30]

\chapter{Here's Another Chapter}

\lipsum[1-20]


\flowswitchoffnextonly*{left,right}
\dynamicswitchonnextonly*{image}

\setdynamiccontents*{image}{%
  \begin{staticfigure}
    \centering
    \includegraphics{image2}
    \caption{Another Sample Figure}
    \label{fig:sample2}
  \end{staticfigure}
}

\lipsum[21-40]

\end{document}