Debian Codegraph @

texmf-dist/doc/latex/flowfram/flowfram-manual-examples/flowfram-manual-example002.tex

raw
1 % This file is embedded in flowfram-manual.pdf
2 % Example 2 Frame Stacking Order
3 % Label: "ex:stackingorder"
4 % arara: pdflatex
5 % arara: pdfcrop
6 \documentclass[10pt]{article}
7 \pagestyle{empty}
8 \usepackage[T1]{fontenc}
9 \usepackage{flowfram}
10 \usepackage{lipsum}
11 \usepackage{graphicx}
12 \usepackage{fancybox}
13
14 \newflowframe
15 {0.4\typeblockwidth}% width
16 {0.6\typeblockwidth}% height
17 {0pt}% x
18 {0.6\typeblockwidth}% y
19 [upper]% label
20 \setflowframe*{upper}{border=plain}
21
22 \newflowframe
23 {0.4\typeblockwidth}% width
24 {0.6\typeblockwidth}% height
25 {0.6\typeblockwidth}% x
26 {0pt}% y
27 [lower]% label
28 \setflowframe*{lower}{border=shadowbox}
29
30 \newflowframe
31 {0.4\typeblockwidth}% width
32 {0.6\typeblockwidth}% height
33 {0.3\typeblockwidth}% x
34 {0.3\typeblockwidth}% y
35 [middle]% label
36 \setflowframe*{middle}{backcolor=yellow}
37
38 \newcounter{sample}
39
40 \newdynamicframe
41 {0.5\typeblockwidth}% width
42 {0.5\typeblockwidth}% height
43 {0.75\typeblockwidth}% x
44 {0.25\typeblockwidth}% y
45 [sample]% label
46 \setdynamiccontents*{sample}{%
47 \hfill\stepcounter{sample}
48 Sample \thesample\ (dynamic).\par
49 \includegraphics[width=\linewidth]{example-image-a}
50 }
51
52 \newstaticframe
53 {0.5\typeblockwidth}% width
54 {0.5\typeblockwidth}% height
55 {0.5\typeblockwidth}% x
56 {0.5\typeblockwidth}% y
57 [sample]% label
58
59
60 \begin{document}
61 START (sample \stepcounter{sample}\thesample). \lipsum[1-2] END.
62
63 \setstaticcontents*{sample}{%
64 \stepcounter{sample}
65 Sample \thesample\ (static).\par
66 \includegraphics[width=\linewidth]{example-image-b}
67 }
68 \end{document}