% arara: lualatex
% arara: bib2gls: { group: on, packages: [ mfirstuc-english ], options: [ "--replace-quotes" ] }
% arara: lualatex: { shell: yes }
% arara: bib2gls: { group: on, packages: [ mfirstuc-english ], options: [ "--replace-quotes" ] } if found ("log", "Glossary entry `sym.")
% arara: lualatex
% arara: lualatex if found ("log", "Rerun to")
%
% This manual creates example documents on the fly in the 
% directory created by the following line:
\directlua{os.execute("mkdir -p \jobname-examples")}
% If the above doesn't work, you'll have to create the directory
% manually.

% This document requires glossaries-extra v1.49, bib2gls v3.0
% and nlctuserguide.sty.

\documentclass[fontsize=12pt]{scrbook}

\usepackage[a4paper,landscape,margin=1in,top=1in,bottom=1in]{geometry}
\usepackage{xcolor}
\usepackage{microtype}
\usepackage{fontspec}

\usepackage{graphicx}
\usepackage[
 %draft,
 pages=absolute]{flowfram}
\usepackage{shapepar}
\usepackage{flowframtkutils}

\usepackage
 [
  tikzsymbols,
  novref,
  summaryregularloc,
  deephierarchy,
  %debug=showwrgloss,
  %showtargets=innerleft
 ]
 {nlctuserguide}

\tcbuselibrary{hooks}

\defsemanticcmd[style1]{\frameoptfmt}{\textsf}{}
\defsemanticcmd[style2]{\htmloptfmt}{\textsf}{}
\defsemanticcmd[style3]{\pagestylefmt}{\textsf}{}
\defsemanticcmd[style3]{\hookfmt}{\textsf}{}
\defsemanticcmd[style3]{\speciallabelfmt}{\textsf}{}

\glsxtrnewgls{opt.frame.}{\frameopt}
\newcommand{\frameoptval}[2]{\optval{frame.#1}{#2}}
\newcommand{\frameoptvalm}[2]{\optval{frame.#1}{\marg{#2}}}
\newcommand{\frameoptvalref}[2]{\optvalref{frame.#1}{#2}}
\newcommand{\frameopteqvalref}[2]{\opteqvalref{frame.#1}{#2}}
\newcommand{\frameoptiondef}[1]{\optiondef{frame.#1}}

\glsxtrnewgls{opt.frame.html}{\htmlopt}
\newcommand{\htmloptval}[2]{\optval{frame.html.#1}{#2}}
\newcommand{\htmloptvalm}[2]{\optval{frame.html.#1}{\marg{#2}}}
\newcommand{\htmloptvalref}[2]{\optvalref{frame.html.#1}{#2}}
\newcommand{\htmlopteqvalref}[2]{\opteqvalref{frame.html.#1}{#2}}
\newcommand{\htmloptiondef}[1]{\optiondef{frame.html.#1}}

\glsxtrnewgls{opt.pagestyle.}{\pstyle}
\newcommand{\pagestyledef}[1]{\optiondef{pagestyle.#1}}

\glsxtrnewgls{opt.hook.}{\hook}
\newcommand{\hookdef}[1]{\optiondef*{hook.#1}}

\glsxtrnewgls{opt.speciallabel.}{\speciallabel}
\newcommand{\speciallabelinlinedef}[1]{\inlineglsdef{opt.speciallabel.#1}}
\newcommand{\speciallabelmeta}[2]{%
 \glslink{opt.speciallabel.#1}{\speciallabelfmt{#1#2}}%
}

\glsxtrnewgls{opt.overlayencap.}{\overlayencapopt}
\newcommand{\overlayencapoptval}[2]{\optval{overlayencap.#1}{#2}}
\newcommand{\overlayencapoptvalm}[2]{\optval{overlayencap.#1}{\marg{#2}}}
\newcommand{\overlayencapoptvalref}[2]{\optvalref{overlayencap.#1}{#2}}
\newcommand{\overlayencapopteqvalref}[2]{\opteqvalref{overlayencap.#1}{#2}}
\newcommand{\overlayencapoptdef}[1]{\optiondef*{overlayencap.#1}}
\newcommand{\overlayencapoptvaldef}[2]{\optionvaldef*{overlayencap.#1}{#2}}

\newcommand{\headerandfooterframe}{%
\idxc{header-frame}{header} and \idxc{footer-frame}{footer} frame}
\newcommand{\headerandfooterframes}{\headerandfooterframe s}

\newcommand{\staticordynamicframe}{%
 \idxc{static-frame}{static} or \idxc{dynamic-frame}{dynamic} frame%
}
\newcommand{\staticordynamicframes}{\staticordynamicframe s}

\nlctuserguidegls
{
  \def\gframeopt#1#2{\glsbibwriteentry{option}{opt.frame.#1}%
   {\field{name}{\frameoptfmt{#1}}\parent{idx.setframeopts}#2}}%
  \def\ghtmlopt#1#2{\glsbibwriteentry{option}{opt.frame.html.#1}%
   {\field{name}{\htmloptfmt{#1}}\parent{opt.frame.html}#2}}%
  \def\gpagestyle#1#2{\glsbibwriteentry{option}{opt.pagestyle.#1}%
   {\field{name}{\pagestylefmt{#1}}\parent{idx.page-style}#2}}%
  \def\ghook#1#2{\glsbibwriteentry{option}{opt.hook.#1}%
   {\field{name}{\hookfmt{#1}}\parent{idx.hook}#2}}%
  \def\gspeciallabel#1#2{\glsbibwriteentry{option}{opt.speciallabel.#1}%
   {\field{name}{\speciallabelfmt{#1}}\parent{idx.speciallabel}#2}}%
  \def\gspeciallabelmeta#1#2#3{\glsbibwriteentry{option}{opt.speciallabel.#1}%
   {\field{name}{\speciallabelfmt{#1}\meta{#2}}\parent{idx.speciallabel}#3}}%
% COUNTERS
 % absolutepage
 \gctr{absolute\-page}
 {
   \providedby{\sty{flowfram} v1.14+}
   \desc{incremented every time a page is shipped out. This counter
should not be reset}
 }
 % displayedframe
 \gctr{displayed\-frame}
 {
   \providedby{\sty{flowfram} v1.11+}
   \desc{incremented each time the next \idx{flow-frame} is selected
by the \idx{output-routine}. It's reset at the start of a new page}
   \field{seealso}{ctr.thisframe}
 }
% maxflow
 \gctr{max\-flow}
 {
   \providedby{\sty{flowfram}}
   \desc{incremented each time a new \idx{flow-frame} is defined,
this counter's value may be used to identify the most last defined
\idx{flow-frame}}
 }
% maxstatic
 \gctr{max\-static}
 {
   \providedby{\sty{flowfram}}
   \desc{incremented each time a new \idx{static-frame} is defined,
this counter's value may be used to identify the most last defined
\idx{static-frame}}
 }
% maxdynamic
 \gctr{max\-dynamic}
 {
   \providedby{\sty{flowfram}}
   \desc{incremented each time a new \idx{dynamic-frame} is defined,
this counter's value may be used to identify the most last defined
\idx{dynamic-frame}}
 }
% maxthumbtabs
 \gctr{max\-thumb\-tabs}
 {
   \providedby{\sty{flowfram}}
   \desc{incremented each time a new \idx{thumbtab} set (main and index)
is defined. This counter may be used to reference the total number
of \idxpl{thumbtab}}
 }
% thisframe
 \gctr{this\-frame}
 {
   \providedby{\sty{flowfram}}
   \desc{set by the \idx{output-routine} to the \idx{IDN} of the
current \idx{flow-frame}}
   \field{seealso}{ctr.displayedframe}
 }
% ENVIRONMENTS
 % staticfigure
 \genv{static\-figure}
 {
   \providedby{\sty{flowfram}}
   \desc{simulate a figure in a \staticordynamicframe}
 }
 % statictable
 \genv{static\-table}
 {
   \providedby{\sty{flowfram}}
   \desc{simulate a table in a \staticordynamicframe}
 }
% staticcontents
 \genv{static\-contents}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{options}\margm{IDN}}
   \desc{sets the contents of the \idx{static-frame} identified by
its \idx{IDN}}
 }
% staticcontents*
 \genv{static\-contents*}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{options}\margm{IDL}}
   \desc{sets the contents of the \idx{static-frame} identified by
its \idx{IDL}}
 }
% dynamiccontents
 \genv{dynamic\-contents}
 {
   \providedby{\sty{flowfram} v1.09+}
   \syntax{\oargm{options}\margm{IDN}}
   \desc{sets the contents of the \idx{dynamic-frame} identified by
its \idx{IDN}. Note that \idx{verbatim} text can't occur within the
environment body.}
 }
% dynamiccontents*
 \genv{dynamic\-contents*}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{options}\margm{IDL}}
   \desc{sets the contents of the \idx{dynamic-frame} identified by
its \idx{IDL}. Note that \idx{verbatim} text can't occur within the
environment body.}
 }
% REGISTERS (LENGTHS, BOXES)
% \staticframe
 \gcmd{static\-frame}
 {
   \providedby{\sty{flowfram}}
   \desc{temporary box register used in as an intermediate when
setting the contents of a \idx{static-frame}}
 }
% \vcolumnsep
 \gcmd{vcol\-umn\-sep}
 {
   \providedby{\sty{flowfram}}
   \initvalcs{columnsep}
   \desc{the vertical distance between the top\slash bottom frame
and the column \idxpl{flow-frame} when using commands like
\gls{Ncolumntop}}
 }
% \fflabelsep
 \gcmd{ff\-label\-sep}
 {
   \providedby{\sty{flowfram}}
   \initval{1pt}
   \desc{when drawing the \idxpl{bbox} in draft mode (but not for
the \idx{typeblock}), this is the
distance between the \idx{bbox} outline and the label}
 }
 % \typeblockoffsety
 \gcmd{type\-block\-offsety}
 {
   \providedby{\sty{flowfram} v2.0+}
   \desc{a length (dimension) that stores the vertical offset of the \idx{typeblock}
    (initialised to the sum of \gls{topmargin}, \gls{headheight},
    \gls{headsep} and \gls{voffset})}
 }
 % \typeblockwidth
 \gcmd{type\-block\-width}
 {
   \providedby{\sty{flowfram} v2.0+}
   \desc{a length (dimension) that stores the width of the \idx{typeblock}
    (initialised to \gls{textwidth})}
 }
 % \typeblockheight
 \gcmd{type\-block\-height}
 {
   \providedby{\sty{flowfram} v2.0+}
   \desc{a length (dimension) that stores the height of the \idx{typeblock}
    (initialised to \gls{textheight})}
 }
% \sdfparindent
 \gcmd{sdfparindent}
 {
   \providedby{\sty{flowfram}}
   \initval{0pt}
   \desc{the default paragraph indentation within \idx{static} and
\idx{dynamic} frames (may be overridden for individual frames
through the \frameopt{parindent} option)}
 }
% \flowframesep
 \gcmd{flow\-frame\-sep}
 {
   \providedby{\sty{flowfram}}
   \desc{the gap between the text and the border of \idxpl{frame},
    if the standard border is used. This is initialised to
    \gls+{fboxsep} when \sty{flowfram} loads}
 }
% \flowframerule
 \gcmd{flow\-frame\-rule}
 {
   \providedby{\sty{flowfram}}
   \desc{the width of the rule for the border of \idxpl{frame},
    if the standard border is used. This is initialised to
    \gls{fboxrule} when \sty{flowfram} loads}
 }
% \ffcolumnseprule
 \gcmd{ff\-col\-umn\-sep\-rule}
 {
   \providedby{\sty{flowfram} v1.09+}
   \initval{2pt}
   \desc{the width\slash height of the rules created by
\gls{insertvrule}\slash \gls{inserthrule}}
 }
% \ffareawidth
 \gcmd{ff\-area\-width}
  {
   \providedby{\sty{flowfram}}
   \desc{used by commands like \gls{computeflowframearea} to store the calculated width}
  }
% \ffareaheight
 \gcmd{ff\-area\-height}
  {
   \providedby{\sty{flowfram}}
   \desc{used by commands like \gls{computeflowframearea} to store
the calculated height}
  }
% \ffareax
 \gcmd{ff\-areax}
  {
   \providedby{\sty{flowfram}}
   \desc{used by commands like \gls{computeflowframearea} to store
the calculated $x$ position}
  }
% \ffareay
 \gcmd{ff\-areay}
  {
   \providedby{\sty{flowfram}}
   \desc{used by commands like \gls{computeflowframearea} to store
the calculated $y$ position}
  }
% \ffareaevenx
 \gcmd{ff\-area\-evenx}
  {
   \providedby{\sty{flowfram}}
   \desc{used by commands like \gls{computeflowframearea} to store
the calculated $x$ position for even pages}
  }
% \ffareaeveny
 \gcmd{ff\-area\-eveny}
  {
   \providedby{\sty{flowfram}}
   \desc{used by commands like \gls{computeflowframearea} to store
the calculated $y$ position for even pages}
  }
% \fftolerance
 \gcmd{ff\-tol\-er\-ance}
 {
   \providedby{\sty{flowfram} v1.14+}
   \initval{2pt}
   \desc{the tolerance used when determining whether or not to warn
when moving between \idxpl{flow-frame} of different widths}
 }
% \thumbtabwidth
 \gcmd{thumb\-tab\-width}
 {
   \providedby{\sty{flowfram}}
   \initval{1cm}
   \desc{the default width of \idxpl{thumbtab}}
 }
% \beforeminitocskip
 \gcmd{before\-mini\-toc\-skip}
 {
   \providedby{\sty{flowfram}}
   \initval{0pt}
   \desc{the vertical space before \idxpl{minitoc}}
 }
% \afterminitocskip
 \gcmd{after\-mini\-toc\-skip}
 {
   \providedby{\sty{flowfram}}
   \initval{\cmd{baselineskip}}
   \desc{the vertical space after \idxpl{minitoc}}
 }
% CONDITIONALS
 % \ifffvadjust
 \gcond{if\-ff\-vadjust}
 {
   \initval{\cmd{iftrue}}
   \providedby{\sty{flowfram}}
   \desc{if true, the column commands, such as \gls{onecolumninarea}
will adjust the specified height to ensure that it is an integer
multiple of \gls{baselineskip}}
 }
% \ffvadjusttrue
 \gcmd{ff\-vadjust\-true}
 {
   \providedby{\sty{flowfram}}
   \desc{sets the \gls{ifffvadjust} conditional to true}
 }
% \ffvadjustfalse
 \gcmd{ff\-vadjust\-false}
 {
   \providedby{\sty{flowfram}}
   \desc{sets the \gls{ifffvadjust} conditional to false}
 }
% \ifshowtypeblock
 \gcond{if\-show\-type\-block}
 {
   \initval{\cmd{iffalse}}
   \providedby{\sty{flowfram}}
   \desc{if true, the \idx{typeblock} will be drawn in grey on the
page}
 }
% \showtypeblocktrue
 \gcmd{show\-type\-block\-true}
 {
   \providedby{\sty{flowfram}}
   \desc{sets the \gls{ifshowtypeblock} conditional to true}
 }
% \showtypeblockfalse
 \gcmd{show\-type\-block\-false}
 {
   \providedby{\sty{flowfram}}
   \desc{sets the \gls{ifshowtypeblock} conditional to false}
 }
% \ifshowmargins
 \gcond{if\-show\-margins}
 {
   \initval{\cmd{iffalse}}
   \providedby{\sty{flowfram}}
   \desc{if true, the \idx{flow-frame} margins will be drawn in grey
on the page}
 }
% \showmarginstrue
 \gcmd{show\-margins\-true}
 {
   \providedby{\sty{flowfram}}
   \desc{sets the \gls{ifshowmargins} conditional to true}
 }
% \showmarginsfalse
 \gcmd{show\-margins\-false}
 {
   \providedby{\sty{flowfram}}
   \desc{sets the \gls{ifshowmargins} conditional to false}
 }
% \ifshowframebbox
 \gcond{if\-show\-frame\-bbox}
 {
   \initval{\cmd{iffalse}}
   \providedby{\sty{flowfram}}
   \desc{if true, the \idxpl{bbox} of all \idxpl{frame} will be
drawn in grey on the page}
 }
% \showframebboxtrue
 \gcmd{show\-frame\-bbox\-true}
 {
   \providedby{\sty{flowfram}}
   \desc{sets the \gls{ifshowframebbox} conditional to true}
 }
% \showframebboxfalse
 \gcmd{show\-frame\-bbox\-false}
 {
   \providedby{\sty{flowfram}}
   \desc{sets the \gls{ifshowframebbox} conditional to false}
 }
% \iflefttorightcolumns
 \gcond{if\-left\-to\-right\-columns}
 {
   \initval{\cmd{iftrue}}
   \providedby{\sty{flowfram} v1.12+}
   \desc{set to \csfmt{iftrue} by the \opt{LR} package option and to
\csfmt{iffalse} by the \opt{RL} option, this conditional determines
the order of frames created by the column commands, such as 
\gls{twocolumn}}
 }
% \lefttorightcolumnstrue
 \gcmd{left\-to\-right\-columns\-true}
 {
   \providedby{\sty{flowfram} v1.12+}
   \desc{sets the \gls{iflefttorightcolumns} conditional to true}
 }
% \lefttorightcolumnsfalse
 \gcmd{left\-to\-right\-columns\-false}
 {
   \providedby{\sty{flowfram} v1.12+}
   \desc{sets the \gls{iflefttorightcolumns} conditional to false}
 }
% \ifaligntoc
 \gcond{if\-align\-toc}
 {
   \initval{\cmd{iffalse}}
   \providedby{\sty{flowfram}}
   \desc{if true, the \idx{thumbtab} indexes should be aligned in
the table of contents. This conditional is changed by the
\opt{toc-thumbtab} option}
 }
% \ifusedframebreak
 \gcond{if\-used\-frame\-break}
 {
   \initval{\cmd{iftrue}}
   \providedby{\sty{flowfram}}
   \desc{set to true by \gls{framebreak} and is checked by the
output routine to determine whether or not to warn when switching
between \idxpl{flow-frame} of different widths}
 }
% \ifFLFabove
 \gcond{if\-FLF\-above}
 {
   \initval{\cmd{iffalse}}
   \providedby{\sty{flowfram}}
   \desc{set by commands that determine the relative location
between \idxpl{frame}}
 }
% \ifFLFbelow
 \gcond{if\-FLF\-below}
 {
   \initval{\cmd{iffalse}}
   \providedby{\sty{flowfram}}
   \desc{set by commands that determine the relative location
between \idxpl{frame}}
 }
% \ifFLFleft
 \gcond{if\-FLF\-left}
 {
   \initval{\cmd{iffalse}}
   \providedby{\sty{flowfram}}
   \desc{set by commands that determine the relative location
between \idxpl{frame}}
 }
% \ifFLFright
 \gcond{if\-FLF\-right}
 {
   \initval{\cmd{iffalse}}
   \providedby{\sty{flowfram}}
   \desc{set by commands that determine the relative location
between \idxpl{frame}}
 }
% COMMANDS (flowframtkutils.sty)
 % \includeteximage
 \gcmd{in\-clude\-tex\-image}
 {
   \providedby{\sty{flowframtkutils} v2.0+}
   \syntax{\oarg{\keyvallist}\margm{filename}}
   \desc{if the optional argument is omitted, this just inputs
\meta{filename}, otherwise it applies a transformation according to
the options}
 }
 % \jdroutline
 \gcmd{jdr\-out\-line}
 {
   \providedby{\sty{flowframtkutils}}
   \syntax{\margm{pdf-trans code}\margm{pst-char code}\margm{text}}
   \desc{if enabled by the \opt{outline} option, this will attempt
to render \meta{text} as an outline using \meta{pdf-trans code} (if
\file{pdf-trans.tex} was loaded) or \meta{pst-char code} (if
\sty{pst-char} was loaded). If not enabled, this command will
generate a warning and just do \meta{text}}
 }
 % \jdrimagebox
 \gcmd{jdr\-image\-box}
 {
   \providedby{\sty{flowframtkutils}}
   \syntax{\margm{image}}
   \desc{used for encapsulated images, this is designed to prevent
problems if numerical rounding errors cause the image to be larger
than the available area}
 }
 % \FlowFramTkUtilsSetOverlayEncap
 \gcmd{Flow\-Fram\-Tk\-Utils\-Set\-Over\-lay\-Encap}
 {
   \providedby{\sty{flowframtkutils} v2.0+}
   \syntax{\oarg{\keyvallist}}
   \desc{redefines \gls{flowframtkencapobject} to use a low-level
command (\gls+{flowframtkutilsuncoverencap:nnnnnnnn}) that uncovers 
objects according to the settings given in the
optional argument. The settings may be changed later with
\gls{FlowFramTkUtilsOverlayEncapSetup}}
 }
 % \flowframtkutils_uncover:nn
 \gcmd{flow\-fram\-tk\-utils\dsb uncover\dcolon nn}
 {
   \providedby{\sty{flowframtkutils} v2.0+}
   \syntax{\ \margm{number} \margm{content}}
   \desc{used by \gls{flowframtkutilsuncoverencap:nnnnnnnn} 
   to uncover an object on a single overlay}
 }
 % \flowframtkutils_uncover_from:nn
 \gcmd{flow\-fram\-tk\-utils\dsb uncover\dsb from\dcolon nn}
 {
   \providedby{\sty{flowframtkutils} v2.0+}
   \syntax{\ \margm{number} \margm{content}}
   \desc{used by \gls{flowframtkutilsuncoverencap:nnnnnnnn} 
   to uncover an object from \meta{number}}
 }
 % \flowframtkutils_uncover_encap:nnnnnnnn
 \gcmd{flow\-fram\-tk\-utils\dsb uncover\dsb encap\dcolon nnnnnnnn}
 {
   \providedby{\sty{flowframtkutils} v2.0+}
   \syntax{\ \margm{n} \margm{Java class name} \margm{description} \margm{tag} \margm{pgf point} \margm{width} \margm{height} \margm{object}}
   \desc{the low-level function used by \gls{flowframtkencapobject}
   when enabled with \gls{FlowFramTkUtilsSetOverlayEncap}}
 }
 % \FlowFramTkUtilsOverlayEncapSetup
 \gcmd{Flow\-Fram\-Tk\-Utils\-Over\-lay\-En\-cap\-Setup}
 {
   \providedby{\sty{flowframtkutils} v2.0+}
   \syntax{\marg{\keyvallist}}
   \desc{set the options for \gls{FlowFramTkUtilsSetOverlayEncap}}
 }
 % \FlowFramTkUtilsOverlayEncapSetup : uncover
 \gcsopt{overlayencap.uncover}
 {
    \name{\csoptfmt{uncover}}
    \parent{FlowFramTkUtilsOverlayEncapSetup}
    \syntax{\meta{value}}
    \initval{from}
    \desc{determines whether or not overlays should be used for
image objects and, if so, should the object just be shown on a
single overlay or from a certain number}
 }
 % uncover = single
 \goptval{overlayencap.uncover}{single}
 {
   \desc{uncover for a single slide}
 }
 % uncover = from
 \goptval{overlayencap.uncover}{from}
 {
   \desc{uncover from a slide}
 }
 % uncover = false
 \goptval{overlayencap.uncover}{false}
 {
   \desc{don't have overlays for image objects (but annotations may
still be overlaid)}
 }
 % \FlowFramTkUtilsOverlayEncapSetup : annote
 \gcsopt{overlayencap.annote}
 {
    \name{\csoptfmt{annote}}
    \parent{FlowFramTkUtilsOverlayEncapSetup}
    \syntax{\meta{value}}
    \initval{false}
    \defval{true}
    \desc{determines whether or not annotations should be added and,
if so, what overlays should be used for annotations}
 }
 % annote = single
 \goptval{overlayencap.annote}{single}
 {
   \desc{uncover annotation, if applicable, for a single slide}
 }
 % annote = from
 \goptval{overlayencap.annote}{from}
 {
   \desc{uncover annotation, if applicable, from a slide}
 }
 % annote = match
 \goptval{overlayencap.annote}{match}
 {
   \desc{uncover annotation, if applicable, matching the object's
overlay setting}
 }
 % annote = true
 \goptval{overlayencap.annote}{true}
 {
   \desc{enable annotations without changing the overlay setting}
 }
 % annote = false
 \goptval{overlayencap.annote}{false}
 {
   \desc{disable annotations}
 }
 % \FlowFramTkUtilsOverlayEncapSetup : annote-position
 \gcsopt{overlayencap.annote-position}
 {
    \name{\csoptfmt{annote\dhyphen position}}
    \parent{FlowFramTkUtilsOverlayEncapSetup}
    \syntax{\meta{value}}
    \initval{auto}
    \desc{if annotations should be added, this setting indicates in
which direction the annotation should be}
 }
 % annote-position = auto
 \goptval{overlayencap.annote-position}{auto}
 {
   \desc{automatically determine the direction based on the object's
relative position within the image}
 }
 % annote-position = north
 \goptval{overlayencap.annote-position}{north}
 {
   \desc{place the annotation above the object}
 }
 % annote-position = northeast
 \goptval{overlayencap.annote-position}{northeast}
 {
   \desc{place the annotation above right of the object}
 }
 % annote-position = east
 \goptval{overlayencap.annote-position}{east}
 {
   \desc{place the annotation right of the object}
 }
 % annote-position = southeast
 \goptval{overlayencap.annote-position}{southeast}
 {
   \desc{place the annotation below right of the object}
 }
 % annote-position = south
 \goptval{overlayencap.annote-position}{south}
 {
   \desc{place the annotation below the object}
 }
 % annote-position = southwest
 \goptval{overlayencap.annote-position}{southwest}
 {
   \desc{place the annotation below left of the object}
 }
 % annote-position = west
 \goptval{overlayencap.annote-position}{west}
 {
   \desc{place the annotation left of the object}
 }
 % annote-position = northwest
 \goptval{overlayencap.annote-position}{northwest}
 {
   \desc{place the annotation above left of the object}
 }
 % \FlowFramTkUtilsOverlayEncapSetup : annote-arrow
 \gcsopt{overlayencap.annote-arrow}
 {
    \name{\csoptfmt{annote\dhyphen arrow}}
    \parent{FlowFramTkUtilsOverlayEncapSetup}
    \syntax{\marg{\keyvallist}}
    \defval{show}
    \desc{if annotations should be added, this setting governs the
annotation arrow}
 }
 % annote-arrow = { show = boolean }
 \gopt{overlayencap.annote-arrow.show}
  {
    \name{\optfmt{show}}
    \parent{overlayencap.annote-arrow}
    \syntax{\meta{boolean}}
    \initval{true}
    \defval{true}
    \desc{if annotations should be added, show an arrow in addition
to the text}
  }
 % annote-arrow = { hide = boolean }
 \gopt{overlayencap.annote-arrow.hide}
  {
    \name{\optfmt{hide}}
    \parent{overlayencap.annote-arrow}
    \syntax{\meta{boolean}}
    \initval{false}
    \defval{true}
    \desc{if annotations should be added, don't show an arrow (only
show the text)}
  }
 % annote-arrow = { dx = dim }
 \gopt{overlayencap.annote-arrow.dx}
  {
    \name{\optfmt{dx}}
    \parent{overlayencap.annote-arrow}
    \syntax{\margm{dim}}
    \defval{1cm}
    \desc{if annotations should be added, the horizontal
displacement from the start of the arrow. This is also the
horizontal displacement for the annotation text, regardless of
whether or not the arrow is shown}
  }
 % annote-arrow = { dy = dim }
 \gopt{overlayencap.annote-arrow.dy}
  {
    \name{\optfmt{dy}}
    \parent{overlayencap.annote-arrow}
    \syntax{\margm{dim}}
    \defval{1cm}
    \desc{if annotations should be added, the vertical
displacement from the start of the arrow. This is also the
vertical displacement for the annotation text, regardless of
whether or not the arrow is shown}
  }
 % annote-arrow = { color = colour-name }
 \gopt{overlayencap.annote-arrow.color}
  {
    \name{\optfmt{color}}
    \parent{overlayencap.annote-arrow}
    \syntax{\margm{colour-name}}
    \initval{black}
    \desc{the colour to use for the annotation arrow, if shown. The
value may be empty to indicate the current stroke colour should be
used}
  }
 % annote-arrow = { start = arrow }
 \gopt{overlayencap.annote-arrow.start}
  {
    \name{\optfmt{start}}
    \parent{overlayencap.annote-arrow}
    \syntax{\margm{arrow-name}}
    \initval{<}
    \desc{the start arrow marker to use for the annotation arrow, if shown. The
value may be empty to indicate there should be no start arrow}
  }
 % annote-arrow = { end = arrow }
 \gopt{overlayencap.annote-arrow.end}
  {
    \name{\optfmt{end}}
    \parent{overlayencap.annote-arrow}
    \syntax{\margm{arrow-name}}
    \initvalempty
    \desc{the end arrow marker to use for the annotation arrow, if shown. The
value may be empty to indicate there should be no end arrow}
  }
 % \FlowFramTkUtilsOverlayEncapSetup : annote-text
 \gcsopt{overlayencap.annote-text}
 {
    \name{\csoptfmt{annote\dhyphen text}}
    \parent{FlowFramTkUtilsOverlayEncapSetup}
    \syntax{\margm{value}}
    \defval{description}
    \desc{the text to use for the annotation}
 }
 % annote-text = hide
 \goptval{overlayencap.annote-text}{hide}
 {
   \desc{no annotation text}
 }
 % annote-text = description
 \goptval{overlayencap.annote-text}{description}
 {
   \desc{if the object has a description, use that as the annotation text}
 }
 % annote-text = tag
 \goptval{overlayencap.annote-text}{tag}
 {
   \desc{if the object has a tag, use that as the annotation text}
 }
 % annote-text = description-or-tag
 \goptval{overlayencap.annote-text}{description\dhyphen or\dhyphen tag}
 {
   \desc{if the object has a description, use that as the annotation
text, otherwise if the object has a tag use that}
 }
 % annote-text = tag-map
 \goptval{overlayencap.annote-text}{tag-map}
 {
   \desc{if the object has a tag and a mapping has been set with
     \overlayencapopt{tag-text}, use the mapping as the annotation text}
 }
 % \FlowFramTkUtilsOverlayEncapSetup : tag-text
 \gcsopt{overlayencap.tag-text}
 {
    \name{\csoptfmt{tag\dhyphen text}}
    \parent{FlowFramTkUtilsOverlayEncapSetup}
    \syntax{\marg{\keyvallist}}
    \desc{set up mappings for use with
\overlayencapoptval{annote-text}{tag-map}, where the key in
\keyvallist\ is the tag and the value is the text to use for that
tag}
 }
 % \FlowFramTkUtilsOverlayEncapSetup : auto-overlay
 \gcsopt{overlayencap.auto-overlay}
 {
    \name{\csoptfmt{auto\dhyphen overlay}}
    \parent{FlowFramTkUtilsOverlayEncapSetup}
    \syntax{\margm{boolean}}
    \initval{false}
    \defval{true}
    \desc{if true, auto-increment the overlay for each object that's
not a group}
 }
 % \FlowFramTkUtilsOverlayEncapSetup : tag-overlay
 \gcsopt{overlayencap.tag-overlay}
 {
    \name{\csoptfmt{tag\dhyphen overlay}}
    \parent{FlowFramTkUtilsOverlayEncapSetup}
    \syntax{\marg{\keyvallist}}
    \desc{if \overlayencapval{overlayencap.auto-overlay}{false},
     set up the tag overlays, where the key in \keyvallist\ is
     the tag and the value is the overlay number}
 }
 % \FlowFramTkUtilsOverlayEncapSetup : object-overlay
 \gcsopt{overlayencap.object-overlay}
 {
    \name{\csoptfmt{object\dhyphen overlay}}
    \parent{FlowFramTkUtilsOverlayEncapSetup}
    \syntax{\marg{\keyvallist}}
    \desc{if \overlayencapval{overlayencap.auto-overlay}{false},
set up the object overlays, where the key in \keyvallist\
identifies the object and the value is the overlay number}
 }
 % \FlowFramTkUtilsOverlayEncapSetup : fallback-overlay
 \gcsopt{overlayencap.fallback-overlay}
 {
    \name{\csoptfmt{fallback\dhyphen overlay}}
    \parent{FlowFramTkUtilsOverlayEncapSetup}
    \syntax{\marg{\keyvallist}}
    \desc{if \overlayencapval{overlayencap.auto-overlay}{false},
and if an object doesn't have an overlay identified by either
\overlayencapopt{tag-overlay} or \overlayencapopt{object-overlay},
then use this fallback}
 }
 % fallback-overlay = { enable = boolean }
 \gopt{overlayencap.fallback-overlay.enable}
  {
    \name{\optfmt{enable}}
    \parent{overlayencap.fallback-overlay}
    \syntax{\meta{boolean}}
    \initval{false}
    \defval{true}
    \desc{enabled fallback overlay setting}
  }
 % fallback-overlay = { fixed = number }
 \gopt{overlayencap.fallback-overlay.fixed}
  {
    \name{\optfmt{fixed}}
    \parent{overlayencap.fallback-overlay}
    \syntax{\margm{number}}
    \desc{if fallback overlay setting enabled, set the default
overlay to \meta{number}}
  }
 % fallback-overlay = { increment }
 \gopt{overlayencap.fallback-overlay.increment}
  {
    \name{\optfmt{increment}}
    \parent{overlayencap.fallback-overlay}
    \desc{if fallback overlay setting enabled, set the default
overlay to a number that's incremented}
  }
 % \flowframtkimageinfo
 \gcmd{flow\-fram\-tk\-image\-info}
 {
   \providedby{\sty{flowframtkutils} v2.0+}
   \syntax{\marg{\keyvallist}}
   \desc{set the document title and creation date}
 }
 % \flowframtkimageinfo : title
 \gcsopt{image.title}
 {
    \name{\csoptfmt{title}}
    \parent{flowframtkimageinfo}
    \syntax{\margm{text}}
    \desc{sets the document title}
 }
 % \flowframtkimageinfo : creationdate
 \gcsopt{image.creationdate}
 {
    \name{\csoptfmt{creationdate}}
    \parent{flowframtkimageinfo}
    \syntax{\margm{PDF date}}
    \desc{sets the creation date}
 }
 % \flowframtkSetTitle
 \gcmd{flow\-fram\-tk\-Set\-Title}
 {
   \providedby{\sty{flowframtkutils} v2.0+}
   \syntax{\margm{title}}
   \desc{set the document title}
 }
 % \flowframtkSetCreationDate
 \gcmd{flow\-fram\-tk\-Set\-Creation\-Date}
 {
   \providedby{\sty{flowframtkutils} v2.0+}
   \syntax{\margm{PDF date}}
   \desc{set the PDF creation date}
 }
 % \flowframtkimgtitlechar
 \gcmd{flow\-fram\-tk\-img\-title\-char}
 {
   \providedby{\sty{flowframtkutils} v2.0+}
   \syntax{\margm{char}\margm{PDF replacement}}
   \desc{normally just expands to \meta{char}}
 }
% \flowframtkstartobject
 \gcmd{flow\-fram\-tk\-start\-object}
 {
   \providedby{\sty{flowframtkutils} v2.0+}
   \syntax{\margm{n}\margm{Java class name}\margm{description}\margm{tag}\margm{pgf point}\margm{width}\margm{height}}
   \desc{marks the start of an object that forms part of the image.
Should always be paired with a matching \gls{flowframtkendobject}}
 }
 % \flowframtkendobject
 \gcmd{flow\-fram\-tk\-end\-object}
 {
   \providedby{\sty{flowframtkutils} v2.0+}
   \syntax{\margm{n}\margm{Java class name}\margm{description}\margm{tag}\margm{pgf point}\margm{width}\margm{height}}
   \desc{marks the end of an object that forms part of the image.
Should always be paired with a matching \gls{flowframtkstartobject}}
 }
 % \flowframtkencapobject
 \gcmd{flow\-fram\-tk\-en\-cap\-object}
 {
   \providedby{\sty{flowframtkutils} v2.0+}
   \syntax{\margm{n}\margm{Java class name}\margm{description}\margm{tag}\margm{pgf point}\margm{width}\margm{height}\margm{object}}
   \desc{encapsulates an object that forms part of an image}
 }
% COMMANDS (flowfram.sty)
 % \framebreak
 \gcmd{frame\-break}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{n}}
   \desc{forces a break from one frame to another. This creates a
paragraph break in order to ensure the output routine adjusts to the
new frame width but gives the effect of a continuous paragraph
(although this may cause excess spacing)}
 }
 % \finishthispage
 \gcmd{finish\-this\-page}
 {
   \providedby{\sty{flowfram}}
   \desc{similar to the way \gls{clearpage} works for normal
two-column mode, this command issues the correct number of \gls{newpage} needed to finish
the current page to allow a page break even if the current
\idx{flow-frame} isn't the last available for the current page}
 }
 % \cleartoevenpage
 \gcmd{clear\-to\-even\-page}
  {
   \providedby{\sty{flowfram} v2.0+}
   \desc{similar to \gls{cleardoublepage} (which clears to the next
odd page) this clears to the next even page for two-sided documents.
For one-sided documents this just does \gls{clearpage}}
  }
 % \flowframeshowlayout
 \gcmd{flow\-frame\-show\-lay\-out}
 {
   \providedby{\sty{flowfram}}
   \desc{finishes the current page, temporarily sets draft mode, and
prints an empty page}
 }
 % \chapterfirstpagestyle
 \gcmd{chapter\-first\-page\-style}
 {
   \providedby{\sty{flowfram}}
   \initval{plain}
   \desc{the page style for the first page of a chapter}
 }
 % \ffprechapterhook
 \gcmd{ff\-pre\-chapter\-hook}
 {
   \providedby{\sty{flowfram} v1.14+}
   \initvalempty
   \desc{hook added to the start of \gls{chapter}}
 }
 % \getflowlabel
 \gcmd{get\-flow\-label}
 {
   \providedby{\sty{flowfram} v1.11+}
   \syntax{\margm{IDN}}
   \desc{expands to the \idx{IDL} of the \idx{flow-frame} identified
by its \idx{IDN}}
 }
 % \getflowid
 \gcmd{get\-flow\-id}
 {
   \providedby{\sty{flowfram} v1.11+}
   \syntax{\margm{cmd}\margm{IDL}}
   \desc{defines the command \meta{cmd} to expand to the \idx{IDN} of the 
   \idx{flow-frame} identified by its \idx{IDL}}
 }
 % \newflowframe
 \gcmds{new\-flow\-frame}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}}
   \desc{defines a new \idx{flow-frame} with the given dimensions
and location. If \meta{label} is provided, that will be set as the
frame's \idx{IDL} otherwise the \idx{IDL} will be the same as the
\idx{IDN}}
   \note{preamble only}
 }
 % \newframe
 \gcmds{new\-frame}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{frame-type}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}}
   \desc{defines a new frame of the given \meta{frame-type} with the given dimensions
and location. If \meta{label} is provided, that will be set as the
frame's \idx{IDL} otherwise the \idx{IDL} will be the same as the
\idx{IDN}}
   \note{preamble only}
 }
 % \labelflowidn
 \gcmd{label\-flow\-idn}
 {
   \providedby{\sty{flowfram} v1.11+}
   \syntax{\margm{label}}
   \desc{labels the current \idx{flow-frame} with \gls{label} so
that its \idx{IDN} can be referenced with \gls{ref}}
 }
 % \labelflow
 \gcmd{label\-flow}
 {
   \providedby{\sty{flowfram} v1.11+}
   \syntax{\margm{label}}
   \desc{labels the current \idx{flow-frame} with \gls{label} so
that its displayed index (\ctr{displayedframe}) can be referenced with \gls{ref}}
 }
 % \getstaticlabel
 \gcmd{get\-static\-label}
 {
   \providedby{\sty{flowfram} v1.11+}
   \syntax{\margm{IDN}}
   \desc{expands to the \idx{IDL} of the \idx{static-frame} identified
by its \idx{IDN}}
 }
 % \getstaticid
 \gcmd{get\-static\-id}
 {
   \providedby{\sty{flowfram} v1.11+}
   \syntax{\margm{cmd}\margm{IDL}}
   \desc{defines the command \meta{cmd} to expand to the \idx{IDN} of the 
   \idx{static-frame} identified by its \idx{IDL}}
 }
 % \getdynamiclabel
 \gcmd{get\-dynamic\-label}
 {
   \providedby{\sty{flowfram} v1.11+}
   \syntax{\margm{IDN}}
   \desc{expands to the \idx{IDL} of the \idx{dynamic-frame} identified
by its \idx{IDN}}
 }
 % \getdynamicid
 \gcmd{get\-dynamic\-id}
 {
   \providedby{\sty{flowfram} v1.11+}
   \syntax{\margm{cmd}\margm{IDL}}
   \desc{defines the command \meta{cmd} to expand to the \idx{IDN} of the 
   \idx{dynamic-frame} identified by its \idx{IDL}}
 }
 % \continueonframe
 \gcmd{con\-tinue\-on\-frame}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{text}\margm{ID}}
   \desc{ends the current \env{staticcontents} or
    \env{dynamiccontents} and starts a new environment of the same
    type for the frame given by \meta{ID}. If the starred version of the
    environment was used then \meta{ID} refers to the next
    \idx*{frame}['s] \idx{IDL} otherwise it refers to its \idx{IDN}.
   If \meta{text} is omitted then \gls{ffdefaultstaticcontinuetext}
   or \gls{ffdefaultstaticcontinuetext} will be used (with the
   appropriate arguments), as applicable}
 }
 % \ffdefaultstaticcontinuetext
 \gcmd{ff\-default\-static\-con\-tin\-ue\-text}
 {
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\margm{IDN1}\margm{IDN2}}
   \initvalcs{ffdefaultcontinuetext}
   \desc{default continuation text if the optional argument of
\gls{continueonframe} is omitted in \idxpl{static-frame}. The
arguments are the \idx{IDN} of the current frame and of the
continuation frame (not the \idx{IDL}, regardless of the
encapsulating command or environment)}
 }
 % \ffdefaultdynamiccontinuetext
 \gcmd{ff\-default\-dynamic\-con\-tin\-ue\-text}
 {
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\margm{IDN1}\margm{IDN2}}
   \initvalcs{ffdefaultcontinuetext}
   \desc{default continuation text if the optional argument of
\gls{continueonframe} is omitted in \idxpl{dynamic-frame}. The
arguments are the \idx{IDN} of the current frame and of the
continuation frame (not the \idx{IDL}, regardless of the
encapsulating command or environment)}
 }
 % \ffdefaultcontinuetext
 \gcmd{ff\-default\-con\-tin\-ue\-text}
 {
   \providedby{\sty{flowfram} v2.0+}
   \initvalempty
   \desc{default used by both \gls{ffdefaultstaticcontinuetext}
    and \gls{ffdefaultdynamiccontinuetext}}
 }
 % \ffcontinuedtextlayout
 \gcmd{ff\-con\-tin\-ued\-text\-layout}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{text}}
   \desc{used by \gls{continueonframe} to adjust the current
paragraph so that it ends flushed with the right margin and 
adds the continuation text flush right on the next line}
 }
 % \ffcontinuedtextfont
 \gcmd{ff\-con\-tin\-ued\-text\-font}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{text}}
   \desc{used \gls{ffcontinuedtextlayout} to apply the font for the continuation text}
   \field{seealso}{continueonframe}
 }
 % \ffdefaultpostcontinued
 \gcmd{ff\-default\-post\-con\-tin\-ued}
 {
   \providedby{\sty{flowfram} v2.0+}
   \desc{default behaviour of \gls{ffstaticpostcontinued} 
   and \gls{ffdynamicpostcontinued}}
   \field{seealso}{continueonframe}
 }
 % \ffdynamicpostcontinued
 \gcmd{ff\-dynamic\-post\-contin\-ued}
 {
   \providedby{\sty{flowfram} v2.0+}
   \initvalcs{ffdefaultpostcontinued}
   \syntax{\margm{IDN1}\margm{IDN2}}
   \desc{placed at the start of a \idx{dynamic-frame} with continued content
     where \meta{IDN1} is the \idx{IDN} of the previous frame
     and \meta{IDN2} is the \idx{IDN} of the continuation frame}
   \field{seealso}{continueonframe}
 }
 % \ffstaticpostcontinued
 \gcmd{ff\-static\-post\-con\-tin\-ued}
 {
   \providedby{\sty{flowfram} v2.0+}
   \initvalcs{ffdefaultpostcontinued}
   \syntax{\margm{IDN1}\margm{IDN2}}
   \desc{placed at the start of a \idx{static-frame} with continued content
     where \meta{IDN1} is the \idx{IDN} of the previous frame
     and \meta{IDN2} is the \idx{IDN} of the continuation frame}
   \field{seealso}{continueonframe}
 }
 % \ChapterInDynamic
 \gcmds{Chapter\-In\-Dynamic}
 {
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\margm{ID}}
   \desc{adapts \gls{chapter} to ensure that chapter titles are
placed in the identified \idx{dynamic-frame}}
 }
 % \dfchapterclearpage
 \gcmd{df\-chap\-ter\-clear\-page}
 {
   \providedby{\sty{flowfram} v2.0+}
   \desc{used with \gls{ChapterInDynamic} to start a new page}
 }
 % \ffchapterpreheadskip
 \gcmd{ff\-chap\-ter\-pre\-head\-skip}
 {
   \providedby{\sty{flowfram} v2.0+}
   \desc{vertical space before chapter header}
   \note{only if \cls{book} or \cls{report} class}
 }
 % \ffchapterpostheadskip
 \gcmd{ff\-chapter\-post\-head\-skip}
 {
   \providedby{\sty{flowfram} v2.0+}
   \desc{vertical space after chapter header}
   \note{only if \cls{book} or \cls{report} class}
 }
 % \ffchapterheadstyle
 \gcmd{ff\-chap\-ter\-head\-style}
 {
   \providedby{\sty{flowfram} v2.0+}
   \desc{the paragraph style for the chapter header}
   \note{only if \cls{book} or \cls{report} class}
 }
 % \ffchapternamenumfont
 \gcmd{ff\-chapter\-name\-num\-font}
 {
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\margm{text}}
   \desc{the font command for the chapter name and number}
   \note{only if \cls{book} or \cls{report} class}
 }
 % \ffchaptertitlefont
 \gcmd{ff\-chap\-ter\-title\-font}
 {
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\margm{text}}
   \desc{the font command for the chapter title}
   \note{only if \cls{book} or \cls{report} class}
 }
 % \ffchapterdefaultfont
 \gcmd{ff\-chap\-ter\-default\-font}
 {
   \providedby{\sty{flowfram} v2.0+}
   \desc{the default font declarations for the chapter heading}
   \note{only if \cls{book} or \cls{report} class}
 }
 % \ffchapternamenum
 \gcmd{ff\-chap\-ter\-name\-num}
 {
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\margm{name}\margm{number}}
   \desc{typesets the chapter name (Chapter\slash Appendix) and number}
   \note{only if \cls{book} or \cls{report} class}
 }
 % \ffchapterpostnamenum
 \gcmd{ff\-chap\-ter\-post\-name\-num}
 {
   \providedby{\sty{flowfram} v2.0+}
   \desc{separator between the chapter number and title}
   \note{only if \cls{book} or \cls{report} class}
 }
 % \dfchaphead
 \gcmds{df\-chap\-head}
 {
   \deprecated
   \providedby{\sty{flowfram}}
   \syntax{\margm{ID}}
   \desc{old method for putting chapter title in a
\idx{dynamic-frame}}
 }
 % \newstaticframe
 \gcmds{new\-static\-frame}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}}
   \desc{defines a new \idx{static-frame} with the given dimensions
and location. If \meta{label} is provided, that will be set as the
frame's \idx{IDL} otherwise the \idx{IDL} will be the same as the
\idx{IDN}}
   \note{preamble only}
 }
 % \newdynamicframe
 \gcmds{new\-dynamic\-frame}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}}
   \desc{defines a new \idx{dynamic-frame} with the given dimensions
and location. If \meta{label} is provided, that will be set as the
frame's \idx{IDL} otherwise the \idx{IDL} will be the same as the
\idx{IDN}}
   \note{preamble only}
 }
 % \makedfheaderfooter
 \gcmd{make\-df\-head\-er\-foot\-er}
 {
   \providedby{\sty{flowfram}}
   \desc{creates the header and footer \idxpl{dynamic-frame} to use
for the page header and footer. They can then be moved, resized or
styled as required. This command will set the \pstyle{ffheadings}
package style and, depending on the \opt{dynamic-page-style}
setting, may adjust the standard page styles}
   \note{preamble only}
 }
 % \dfOddFooterStyle
 \gcmd{df\-Odd\-Foot\-er\-Style}
 {
   \providedby{\sty{flowfram} v2.0}
   \syntax{\margm{text}}
   \desc{used to format the page footer in the \headerandfooterframe\
   page styles for odd pages}
 }
 % \dfEvenFooterStyle
 \gcmd{df\-Even\-Foot\-er\-Style}
 {
   \providedby{\sty{flowfram} v2.0}
   \syntax{\margm{text}}
   \desc{used to format the page footer in the \headerandfooterframe\
   page styles for even pages}
 }
 % \dfOddHeaderStyle
 \gcmd{df\-Odd\-Head\-er\-Style}
 {
   \providedby{\sty{flowfram} v2.0}
   \syntax{\margm{text}}
   \desc{used to format the page header in the \headerandfooterframe\
   page styles for odd pages}
 }
 % \dfEvenHeaderStyle
 \gcmd{df\-Even\-Head\-er\-Style}
 {
   \providedby{\sty{flowfram} v2.0}
   \syntax{\margm{text}}
   \desc{used to format the page header in the \headerandfooterframe\
   page styles for even pages}
 }
 % \flowframchapterheader
 \gcmd{flow\-fram\-chap\-ter\-head\-er}
 {
   \providedby{\sty{flowfram} v2.0}
   \syntax{\margm{text}}
   \desc{used by the \pstyle{ffheadings} page style to format the chapter mark}
 }
 % \flowframsectionheader
 \gcmd{flow\-fram\-section\-head\-er}
 {
   \providedby{\sty{flowfram} v2.0}
   \syntax{\margm{text}}
   \desc{used by the \pstyle{ffheadings} page style to format the section mark}
 }
 % \flowframsubsectionheader
 \gcmd{flow\-fram\-sub\-section\-head\-er}
 {
   \providedby{\sty{flowfram} v2.0}
   \syntax{\margm{text}}
   \desc{used by the \pstyle{ffheadings} page style to format the subsection mark}
 }
 % \flowframheadersep
 \gcmd{flow\-fram\-head\-er\-sep}
 {
   \providedby{\sty{flowfram} v2.0}
   \initvalvaries
   \desc{separator used between the chapter or section number and
the title (when the number is shown).}
 }
 % \flowframheaderchapprefix
 \gcmd{flowframheaderchapprefix}
 {
   \providedby{\sty{flowfram} v2.0}
   \initvalvaries
   \desc{prefix inserted before the chapter number}
 }
 % \appenddfminitoc
 \gcmds{append\-df\-mini\-toc}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{ID}}
   \desc{appends the \idx{minitoc} to the \idx{dynamic-frame} identified
by \meta{ID} (the \idx{IDN} for the unstarred version or the
\idx{IDL} for the starred version). The \idx{minitoc} support needs
to be enabled with \gls{enableminitoc}}
   \note{preamble only}
   \field{seealso}{enableminitoc}
 }
 % \enableminitoc
 \gcmd{en\-able\-mini\-toc}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{section-type}}
   \desc{enables \idxpl{minitoc} at the start of the given sectional
unit}
   \note{preamble only}
 }
 % \minitocstyle
 \gcmd{mini\-toc\-style}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{content}}
   \desc{the style used to format the \idx{minitoc}}
 }
 % \flowframex
 \gcmd{flow\-framex}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{IDN}}
   \desc{expands to the $x$-coordinate of the \idx{flow-frame} identified
by its \idx{IDN}}
 }
 % \staticframex
 \gcmd{static\-framex}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{IDN}}
   \desc{expands to the $x$-coordinate of the \idx{static-frame} identified
by its \idx{IDN}}
 }
 % \dynamicframex
 \gcmd{dynamic\-framex}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{IDN}}
   \desc{expands to the $x$-coordinate of the \idx{dynamic-frame} identified
by its \idx{IDN}}
 }
 % \flowframeevenx
 \gcmd{flow\-frame\-evenx}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{IDN}}
   \desc{expands to the even-page $x$-coordinate of the \idx{flow-frame} identified
by its \idx{IDN}}
 }
 % \staticframeevenx
 \gcmd{static\-frame\-evenx}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{IDN}}
   \desc{expands to the even-page $x$-coordinate of the \idx{static-frame} identified
by its \idx{IDN}}
 }
 % \dynamicframeevenx
 \gcmd{dynamic\-frame\-evenx}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{IDN}}
   \desc{expands to the even-page $x$-coordinate of the \idx{dynamic-frame} identified
by its \idx{IDN}}
 }
 % \flowframeeveny
 \gcmd{flow\-frame\-eveny}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{IDN}}
   \desc{expands to the even-page $y$-coordinate of the \idx{flow-frame} identified
by its \idx{IDN}}
 }
 % \staticframeeveny
 \gcmd{static\-frame\-eveny}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{IDN}}
   \desc{expands to the even-page $y$-coordinate of the \idx{static-frame} identified
by its \idx{IDN}}
 }
 % \dynamicframeeveny
 \gcmd{dynamic\-frame\-eveny}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{IDN}}
   \desc{expands to the even-page $y$-coordinate of the \idx{dynamic-frame} identified
by its \idx{IDN}}
 }
 % \flowframey
 \gcmd{flow\-framey}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{IDN}}
   \desc{expands to the $y$-coordinate of the \idx{flow-frame} identified
by its \idx{IDN}}
 }
 % \staticframey
 \gcmd{static\-framey}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{IDN}}
   \desc{expands to the $y$-coordinate of the \idx{static-frame} identified
by its \idx{IDN}}
 }
 % \dynamicframey
 \gcmd{dynamic\-framey}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{IDN}}
   \desc{expands to the $y$-coordinate of the \idx{dynamic-frame} identified
by its \idx{IDN}}
 }
 % \flowframewidth
 \gcmd{flow\-frame\-width}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{IDN}}
   \desc{expands to the width of the \idx{flow-frame} identified
by its \idx{IDN}}
 }
 % \staticframewidth
 \gcmd{static\-frame\-width}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{IDN}}
   \desc{expands to the width of the \idx{static-frame} identified
by its \idx{IDN}}
 }
 % \dynamicframewidth
 \gcmd{dynamic\-frame\-width}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{IDN}}
   \desc{expands to the width of the \idx{dynamic-frame} identified
by its \idx{IDN}}
 }
 % \flowframeheight
 \gcmd{flow\-frame\-height}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{IDN}}
   \desc{expands to the height of the \idx{flow-frame} identified
by its \idx{IDN}}
 }
 % \staticframeheight
 \gcmd{static\-frame\-height}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{IDN}}
   \desc{expands to the height of the \idx{static-frame} identified
by its \idx{IDN}}
 }
 % \dynamicframeheight
 \gcmd{dynamic\-frame\-height}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{IDN}}
   \desc{expands to the height of the \idx{dynamic-frame} identified
by its \idx{IDN}}
 }
 % \ffswapoddeven
 \gcmds{ff\-swap\-odd\-even}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{ID-list}}
   \desc{swap the odd and even co-ordinates for all listed
\idxpl{flow-frame}}
 }
 % \sfswapoddeven
 \gcmds{sf\-swap\-odd\-even}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{ID-list}}
   \desc{swap the odd and even co-ordinates for all listed
\idxpl{static-frame}}
 }
 % \dfswapoddeven
 \gcmds{df\-swap\-odd\-even}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{ID-list}}
   \desc{swap the odd and even co-ordinates for all listed
\idxpl{dynamic-frame}}
 }
 % \getstaticevenbounds
 \gcmds{get\-static\-even\-bounds}
 {
   \providedby{\sty{flowfram} v1.11+}
   \syntax{\margm{ID}}
   \desc{gets the even-page bounds for the \idx{static-frame} identified by
\meta{ID} (the \idx{IDL} for the starred version or the \idx{IDN}
for the unstarred version)}
 }
 % \getflowevenbounds
 \gcmds{get\-flow\-even\-bounds}
 {
   \providedby{\sty{flowfram} v1.11+}
   \syntax{\margm{ID}}
   \desc{gets the even-page bounds for the \idx{flow-frame} identified by
\meta{ID} (the \idx{IDL} for the starred version or the \idx{IDN}
for the unstarred version)}
 }
 % \getdynamicevenbounds
 \gcmds{get\-dynamic\-even\-bounds}
 {
   \providedby{\sty{flowfram} v1.11+}
   \syntax{\margm{ID}}
   \desc{gets the even-page bounds for the \idx{dynamic-frame} identified by
\meta{ID} (the \idx{IDL} for the starred version or the \idx{IDN}
for the unstarred version)}
 }
 % \computeleftedgeodd
 \gcmd{compute\-left\-edge\-odd}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{dim var}}
   \desc{computes the position of the leftmost edge of the page,
relative to the left side of the \idx{typeblock} for odd pages}
 }
 % \computeleftedgeeven
 \gcmd{compute\-left\-edge\-even}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{dim var}}
   \desc{computes the position of the leftmost edge of the page,
relative to the left side of the \idx{typeblock} for even pages}
 }
 % \computetopedge
 \gcmd{compute\-top\-edge}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{dim var}}
   \desc{computes the position of the top edge of the page, relative
to the bottom of the \idx{typeblock}}
 }
 % \computebottomedge
 \gcmd{compute\-bottom\-edge}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{dim var}}
   \desc{computes the position of the bottom edge of the page, relative
to the bottom of the \idx{typeblock}}
 }
 % \computerightedgeodd
 \gcmd{compute\-right\-edge\-odd}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{dim var}}
   \desc{computes the position of the rightmost edge of the page,
relative to the left side of the \idx{typeblock} for odd pages}
 }
 % \computerightedgeeven
 \gcmd{compute\-right\-edge\-even}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{dim var}}
   \desc{computes the position of the rightmost edge of the page,
relative to the left side of the \idx{typeblock} for even pages}
 }
 % \getstaticbounds
 \gcmds{getstaticbounds}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{ID}}
   \desc{gets the bounds for the \idx{static-frame} identified by
\meta{ID} (the \idx{IDL} for the starred version and the \idx{IDN}
for the unstarred version) and stores the results in \gls{ffareax},
\gls{ffareay}, \gls{ffareawidth} and \gls{ffareaheight}}
 }
 % \getdynamicbounds
 \gcmds{get\-dynamic\-bounds}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{ID}}
   \desc{gets the bounds for the \idx{dynamic-frame} identified by
\meta{ID} (the \idx{IDL} for the starred version and the \idx{IDN}
for the unstarred version) and stores the results in \gls{ffareax},
\gls{ffareay}, \gls{ffareawidth} and \gls{ffareaheight}}
 }
 % \getflowbounds
 \gcmds{get\-flow\-bounds}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{ID}}
   \desc{gets the bounds for the \idx{flow-frame} identified by
\meta{ID} (the \idx{IDL} for the starred version and the \idx{IDN}
for the unstarred version) and stores the results in \gls{ffareax},
\gls{ffareay}, \gls{ffareawidth} and \gls{ffareaheight}}
 }
 % \computeflowframearea
 \gcmds{compute\-flow\-frame\-area}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{ID list}}
   \desc{computes the minimum area surrounding the listed
\idxpl{flow-frame} (identified by their \idx{IDL} for the starred
version and their \idx{IDN} for the unstarred version) and stores the results in \gls{ffareax},
\gls{ffareay}, \gls{ffareawidth} and \gls{ffareaheight}}
 }
 % \relativeframelocation
 \gcmds{relative\-frame\-location}
 {
   \providedby{\sty{flowfram} v1.11+}
   \syntax{\margm{type1}\margm{ID1}\margm{type2}\margm{ID2}}
   \desc{produces a textual description of the relative location of
the \meta{type1} \gls{frame} identified by \meta{ID1} to the
\meta{type2} \gls{frame} identified by \meta{ID2} (the starred
version references the \idxpl{frame} by their \idx{IDL} and the
unstarred version references them by their \idx{IDN})}
 }
 % \reldynamicloc
 \gcmds{rel\-dynamic\-loc}
 {
   \providedby{\sty{flowfram} v1.11+}
   \syntax{\margm{ID1}\margm{ID2}}
   \desc{shortcut for \gls{relativeframelocation} where both frame
types are \idx{dynamic}}
 }
 % \relstaticloc
 \gcmds{rel\-static\-loc}
 {
   \providedby{\sty{flowfram} v1.11+}
   \syntax{\margm{ID1}\margm{ID2}}
   \desc{shortcut for \gls{relativeframelocation} where both frame
types are \idx{static}}
 }
 % \relflowloc
 \gcmds{rel\-flow\-loc}
 {
   \providedby{\sty{flowfram} v1.11+}
   \syntax{\margm{ID1}\margm{ID2}}
   \desc{shortcut for \gls{relativeframelocation} where both frame
types are \idx{flow}}
 }
 % \SaveRelativeFrameLocation
 \gcmds{Save\-Relative\-Frame\-Location}
 {
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\margm{label}\margm{type1}\margm{ID1}\margm{type2}\margm{ID2}}
   \desc{similar to \gls{relativeframelocation} but defers the
calculations for the next \LaTeX\ run. The result may be referenced
with \gls{RefSavedRelativeLocation}}
 }
 % \RefSavedRelativeLocation
 \gcmd{Ref\-Saved\-Relative\-Location}
 {
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\margm{label}}
   \desc{fetches the information saved on the previous run with
\gls{SaveRelativeFrameLocation}}
 }
 % \IfSavedRelativeLocationEq
 \gcmd{If\-Saved\-Relative\-Location\-Eq}
 {
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\margm{label}\margm{cmd}\margm{true}\margm{false}}
   \desc{tests if the saved result from
\gls{SaveRelativeFrameLocation} matches \meta{cmd}, which should be
one of the relative placeholder commands such as \gls{FFabove}}
 }
 % \IfSavedRelativeLocationAbove
 \gcmd{If\-Saved\-Relative\-Location\-Above}
 {
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\margm{label}\margm{true}\margm{false}}
   \desc{tests if the saved result from
\gls{SaveRelativeFrameLocation} indicates that the first frame is
above the second frame, without regard to their horizontal positions}
 }
 % \IfSavedRelativeLocationBelow
 \gcmd{If\-Saved\-Relative\-Location\-Below}
 {
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\margm{label}\margm{true}\margm{false}}
   \desc{tests if the saved result from
\gls{SaveRelativeFrameLocation} indicates that the first frame is
below the second frame, without regard to their horizontal positions}
 }
 % \IfSavedRelativeLocationLeft
 \gcmd{If\-Saved\-Relative\-Location\-Left}
 {
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\margm{label}\margm{true}\margm{false}}
   \desc{tests if the saved result from
\gls{SaveRelativeFrameLocation} indicates that the first frame is
left of the second frame, without regard to their vertical positions}
 }
 % \IfSavedRelativeLocationRight
 \gcmd{If\-Saved\-Relative\-Location\-Right}
 {
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\margm{label}\margm{true}\margm{false}}
   \desc{tests if the saved result from
\gls{SaveRelativeFrameLocation} indicates that the first frame is
right of the second frame, without regard to their vertical positions}
 }
 % \FFaboveleft
 \gcmd{FF\-above\-left}
 {
   \providedby{\sty{flowfram} v1.11+}
   \initval{above left}
   \desc{text used to describe one frame above left from another}
 }
 % \FFaboveright
 \gcmd{FF\-above\-right}
 {
   \providedby{\sty{flowfram} v1.11+}
   \initval{above right}
   \desc{text used to describe one frame above right from another}
 }
 % \FFbelowleft
 \gcmd{FF\-below\-left}
 {
   \providedby{\sty{flowfram} v1.11+}
   \initval{below left}
   \desc{text used to describe one frame below left from another}
 }
 % \FFbelowright
 \gcmd{FF\-below\-right}
 {
   \providedby{\sty{flowfram} v1.11+}
   \initval{below right}
   \desc{text used to describe one frame below right from another}
 }
 % \FFleft
 \gcmd{FF\-left}
 {
   \providedby{\sty{flowfram} v1.11+}
   \initval{on the left}
   \desc{text used to describe one frame is to the left of another}
 }
 % \FFright
 \gcmd{FF\-right}
 {
   \providedby{\sty{flowfram} v1.11+}
   \initval{on the right}
   \desc{text used to describe one frame is to the right of another}
 }
 % \FFabove
 \gcmd{FF\-above}
 {
   \providedby{\sty{flowfram} v1.11+}
   \initval{above}
   \desc{text used to describe one frame is above another}
 }
 % \FFbelow
 \gcmd{FF\-below}
 {
   \providedby{\sty{flowfram} v1.11+}
   \initval{below}
   \desc{text used to describe one frame is below another}
 }
 % \FFoverlap
 \gcmd{FF\-overlap}
 {
   \providedby{\sty{flowfram} v1.11+}
   \initval{overlap}
   \desc{text used to describe overlapping frames}
 }
 % \flowframsetup
 \gcmd{flow\-fram\-set\-up}
 {
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\marg{\keyvallist}}
   \desc{set any options that may be adjusted after the package has
loaded}
 }
 % \FlowFramRestoreOR
 \gcmd{Flow\-Fram\-Re\-store\-OR}
 {
   \providedby{\sty{flowfram} v2.0+}
   \desc{restore the original output routine (the current page will
be finished and output first)}
   \note{not preamble}
 }
 % \FlowFramUnrestoreOR
 \gcmd{Flow\-Fram\-Un\-re\-store\-OR}
 {
   \providedby{\sty{flowfram} v2.0+}
   \desc{restore \sty{flowfram}['s] modified output routine (the current page will
be finished and output first)}
   \note{not preamble}
 }
 % \makethumbtabs
 \gcmd{make\-thumb\-tabs}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{y-offset}\margm{height}\oargm{section-type}}
   \desc{create \idxpl{thumbtab} for the given section type with the
given height, where the first \idx{thumbtab} is offset from the top
of the \idx{typeblock} by \meta{y-offset}. This command first inputs
the \ext+{ttb} file to read the information from the previous run
and the opens the file to allow information from this run to be
written to it. Note that the \idx{thumbtab} dynamic frames will have
the \frameopt{hide} attribute switched on. This will be switched off
by \gls{enablethumbtabs}}
   \note{preamble only}
 }
 % \defaultthumbtabtype
 \gcmd{default\-thumb\-tab\-type}
 {
   \providedby{\sty{flowfram}}
   \initvalvaries
   \desc{expands to the default section type to be used by \gls{makethumbtabs}
    if the \meta{section-type} argument is missing. The default
definition is either \glscsname{chapter} or \glscsname{section},
depending on whether or not \gls{chapter} is defined}
 }
 % \thumbtabindex
 \gcmd{thumb\-tab\-index}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}}
   \desc{used internally by \sty{flowfram}['s] modified
    \gls{tableofcontents} to show the \idx{thumbtab} index frames.
    However, if \opteqvalref{adjust-toc}{off} has been used to
    prevent this, the \idx{thumbtab} index frames can be switched on with \gls{thumbtabindex}}
 }
 % \enablethumbtabs
 \gcmd{en\-able\-thumb\-tabs}
  {
   \providedby{\sty{flowfram}}
   \desc{the \idx{thumbtab} frames created by \gls{makethumbtabs}
will have the \frameopt{hide} attribute switched off and
\idx{thumbtab} information can start being written to the \ext+{ttb}
file. Any \idx{thumbtab} sectional units that occur before this
command won't have a corresponding \idx{thumbtab}}
  }
 % \disablethumbtabs
 \gcmd{dis\-able\-thumb\-tabs}
  {
   \providedby{\sty{flowfram}}
   \desc{the \idx{thumbtab} frames created by \gls{makethumbtabs}
will have the \frameopt{hide} attribute switched on and
\idx{thumbtab} information will stop being written to the \ext+{ttb}}
  }
 % \thumbtabhyperlinkformat
 \gcmd{thumb\-tab\-hyper\-link\-format}
 {
   \providedby{\sty{flowfram} v2.0}
   \syntax{\margm{anchor}\margm{text}\margm{height}}
   \desc{if \sty{hyperref} is loaded, this command will be redefined
to create a hyperlink for the \idx{thumbtab} frame content}
 }
 % \thumbtabindexformat
 \gcmd{thumb\-tab\-index\-format}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{anchor}\margm{text}\margm{height}}
   \desc{used to format the content of the \idx{thumbtab} index
frames}
 }
 % \thumbtabregularformat
 \gcmd{thumb\-tab\-regular\-format}
 {
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\margm{anchor}\margm{text}\margm{height}}
   \desc{used to format the content of the \idx{thumbtab}
(non-index) frames}
 }
 % \thumbtabformat
 \gcmd{thumb\-tab\-format}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{text}\margm{height}}
   \desc{used to format the \idx{thumbtab} text}
 }
 % \setthumbtab
 \gcmd{set\-thumb\-tab}
 {
   \providedby{\sty{flowfram}}
   \syntax{\marg{\meta{index}|all}\marg{\keyvallist}}
   \desc{sets the given attributes for all of the \idxpl{dynamic-frame}
for the \idx{thumbtab} with the
identified index or for all \idxpl{thumbtab} if the first argument
is the keyword \optfmt{all}}
 }
 % \setthumbtabindex
 \gcmd{set\-thumb\-tab\-index}
 {
   \providedby{\sty{flowfram}}
   \syntax{\marg{\meta{index}|all}\marg{\keyvallist}}
   \desc{sets the given attributes for the \idx{thumbtab} index
frame with the
identified index or for all \idxpl{thumbtab} index frames if the first argument
is the keyword \optfmt{all}}
 }
 % \part
 \gcmds{part}
  {
    \syntax{\oargm{toc}\oargm{thumbtab-title}\margm{title}}
    \desc{modified by \sty{flowfram}, this has an additional
optional argument for the \idx{thumbtab} titles (see \opt{sections-extra-option}
if you are using a class that also has a second optional argument).
Note that the starred version also has both optional arguments}
  }
 % \chapter
 \gcmds{chapter}
 {
   \syntax{\oargm{toc}\oargm{thumbtab-title}\margm{title}}
   \desc{modified by \sty{flowfram}, this has an additional
optional argument for the \idx{thumbtab} titles (see \opt{sections-extra-option}
if you are using a class that also has a second optional argument).
Note that the starred version also has both optional arguments}
 }
 % \section
 \gcmds{section}
  {
   \syntax{\oargm{toc}\oargm{thumbtab-title}\margm{title}}
   \desc{modified by \sty{flowfram}, this has an additional
optional argument for the \idx{thumbtab} titles (see \opt{sections-extra-option}
if you are using a class that also has a second optional argument).
Note that the starred version also has both optional arguments}
  }
 % \subsection
 \gcmds{sub\-section}
  {
   \syntax{\oargm{toc}\oargm{thumbtab-title}\margm{title}}
   \desc{modified by \sty{flowfram}, this has an additional
optional argument for the \idx{thumbtab} titles (see \opt{sections-extra-option}
if you are using a class that also has a second optional argument).
Note that the starred version also has both optional arguments}
  }
 % \subsubsection
 \gcmds{sub\-sub\-section}
 {
   \syntax{\oargm{toc}\oargm{thumbtab-title}\margm{title}}
   \desc{modified by \sty{flowfram}, this has an additional
optional argument for the \idx{thumbtab} titles (see \opt{sections-extra-option}
if you are using a class that also has a second optional argument).
Note that the starred version also has both optional arguments}
 }
 % \paragraph
 \gcmds{paragraph}
  {
   \syntax{\oargm{toc}\oargm{thumbtab-title}\margm{title}}
   \desc{modified by \sty{flowfram}, this has an additional
optional argument for the \idx{thumbtab} titles (see \opt{sections-extra-option}
if you are using a class that also has a second optional argument).
Note that the starred version also has both optional arguments}
  }
 % \subparagraph
 \gcmds{sub\-paragraph}
  {
   \syntax{\oargm{toc}\oargm{thumbtab-title}\margm{title}}
   \desc{modified by \sty{flowfram}, this has an additional
optional argument for the \idx{thumbtab} titles (see \opt{sections-extra-option}
if you are using a class that also has a second optional argument).
Note that the starred version also has both optional arguments}
  }
 % \onecolumn
 \gcmd{one\-column}
 {
   \syntax{\oargm{page-list}\oargm{label}}
   \desc{creates a \idx{flow-frame} that spans the \idx{typeblock}, with
the height adjusted if the conditional \gls{ifffvadjust} is true}
   \note{redefined by \sty{flowfram}}
   \field{seealso}{twocolumn,Ncolumn}
 }
 % \twocolumn
 \gcmd{two\-column}
 {
   \syntax{\oargm{page-list}\oargm{label}}
   \desc{creates two \idxpl{flow-frame} that fit in the \idx{typeblock}
separated by the distance given by \gls{columnsep}, with
the height adjusted if the conditional \gls{ifffvadjust} is true}
   \note{redefined by \sty{flowfram}}
   \field{seealso}{onecolumn,Ncolumn}
 }
 % \Ncolumn
 \gcmd{N\-column}
 {
   \syntax{\oargm{page-list}\margm{n}\oargm{label}}
   \desc{creates \meta{n} \idxpl{flow-frame} that fit in the \idx{typeblock}
separated by the distance given by \gls{columnsep}, with
the height adjusted if the conditional \gls{ifffvadjust} is true}
   \note{preamble only}
 }
 % \SetOneColumnFrame
 \gcmds{Set\-One\-Column\-Frame}
 {
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\margm{ID}}
   \desc{for use with \opteqvalref{column-changes}{switch}, this
command identifies the \idx{flow-frame} to use if \gls{onecolumn} is
encountered in the \env{document} environment}
 }
 % \SetTwoColumnFrames
 \gcmds{Set\-Two\-Col\-umn\-Frames}
 {
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\oargm{header-type}\oargm{header-id}\margm{col-1}\oargm{header-col1}\margm{col-2}\oargm{header-col-2}}
   \desc{for use with \opteqvalref{column-changes}{switch}, this
command identifies the \idxpl{frame} to use if \gls{twocolumn} is
encountered in the \env{document} environment}
 }
 % \onecolumninarea
 \gcmd{one\-col\-umn\-in\-area}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}}
   \desc{creates a \idx{flow-frame} that spans the given area, with
the height adjusted if the conditional \gls{ifffvadjust} is true}
   \note{preamble only}
 }
 % \twocolumninarea
 \gcmd{two\-col\-umn\-in\-area}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{labels}}
   \desc{creates two \idxpl{flow-frame} that span the given area
separated by the distance given by \gls{columnsep}, with
the height adjusted if the conditional \gls{ifffvadjust} is true}
   \field{seealso}{onecolumninarea,Ncolumninarea}
   \note{preamble only}
 }
 % \Ncolumninarea
 \gcmd{N\-col\-umn\-in\-area}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{n}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{labels}}
   \desc{creates \meta{n} \idxpl{flow-frame} that span the given area
separated by the distance given by \gls{columnsep}, with
the height adjusted if the conditional \gls{ifffvadjust} is true}
   \note{preamble only}
 }
 % \onecolumntopinarea
 \gcmd{one\-col\-umn\-top\-in\-area}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{type}\margm{top-height}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}}
   \desc{creates a frame of the given type (\idx{flow}, \idx{static}
or \idx{dynamic}) and height \meta{top-height} and a
\idx{flow-frame} that fit in the given area so that the first frame
is above the second frame, separated by \gls{vcolumnsep}. The height
of the second frame is adjusted if \gls{ifffvadjust} is true}
   \note{preamble only}
 }
 % \onecolumntop
 \gcmd{one\-col\-umn\-top}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{type}\margm{top-height}\oargm{label}}
   \desc{as \gls{onecolumntopinarea} where the area is given by the
\idx{typeblock}}
   \note{preamble only}
 }
 % \onecolumnStop
 \gcmd{one\-col\-umn\-S\-top}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{top-height}\oargm{label}}
   \desc{as \gls{onecolumntop} with the \meta{type} set to
\optfmt{static}}
   \note{preamble only}
 }
 % \onecolumnDtop
 \gcmd{one\-col\-umn\-D\-top}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{top-height}\oargm{label}}
   \desc{as \gls{onecolumntop} with the \meta{type} set to
\optfmt{dynamic}}
   \note{preamble only}
 }
 % \onecolumnStopinarea
 \gcmd{one\-col\-umn\-S\-top\-in\-area}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{top-height}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}}
   \desc{as \gls{onecolumntopinarea} with the \meta{type} set to
\optfmt{static}}
   \note{preamble only}
 }
 % \onecolumnDtopinarea
 \gcmd{one\-col\-umn\-D\-top\-in\-area}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{top-height}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}}
   \desc{as \gls{onecolumntopinarea} with the \meta{type} set to
\optfmt{dynamic}}
   \note{preamble only}
 }
 % \twocolumntopinarea
 \gcmd{two\-col\-umn\-top\-in\-area}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{type}\margm{top-height}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}}
   \desc{creates a frame of the given type (\idx{flow}, \idx{static}
or \idx{dynamic}) and height \meta{top-height} and two side-by-side
\idxpl{flow-frame} that all fit in the given area such that the first frame
is above the other two frames, separated by \gls{vcolumnsep}. The height
of the two side-by-side \idxpl{flow-frame} is adjusted if
\gls{ifffvadjust} is true. The horizontal gap between them is given
by \gls{columnsep}}
   \note{preamble only}
 }
 % \twocolumntop
 \gcmd{two\-col\-umn\-top}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{type}\margm{top-height}\oargm{label}}
   \desc{as \gls{twocolumntopinarea} where the area is given by the
\idx{typeblock}}
   \note{preamble only}
 }
 % \twocolumnStop
 \gcmd{two\-col\-umn\-S\-top}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{top-height}\oargm{label}}
   \desc{as \gls{twocolumntop} with the \meta{type} set to
\optfmt{static}}
   \note{preamble only}
 }
 % \twocolumnDtop
 \gcmd{two\-col\-umn\-D\-top}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{top-height}\oargm{label}}
   \desc{as \gls{twocolumntop} with the \meta{type} set to
\optfmt{dynamic}}
   \note{preamble only}
 }
 % \twocolumnStopinarea
 \gcmd{two\-col\-umn\-S\-top\-in\-area}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{top-height}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}}
   \desc{as \gls{twocolumntopinarea} with the \meta{type} set to
\optfmt{static}}
   \note{preamble only}
 }
 % \twocolumnDtopinarea
 \gcmd{two\-col\-umn\-D\-top\-in\-area}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{top-height}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}}
   \desc{as \gls{twocolumntopinarea} with the \meta{type} set to
\optfmt{dynamic}}
   \note{preamble only}
 }
 % \Ncolumntopinarea
 \gcmd{Ncol\-umn\-top\-in\-area}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{type}\margm{n}\margm{top-height}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}}
   \desc{creates a frame of the given type (\idx{flow}, \idx{static}
or \idx{dynamic}) and height \meta{top-height} and \meta{n} side-by-side
\idxpl{flow-frame} that all fit in the given area such that the first frame
is above the other \meta{n} frames, separated by \gls{vcolumnsep}. The height
of the \meta{n} side-by-side \idxpl{flow-frame} is adjusted if
\gls{ifffvadjust} is true. The horizontal gap between them is given
by \gls{columnsep}}
   \note{preamble only}
 }
 % \Ncolumntop
 \gcmd{Ncol\-umn\-top}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{type}\margm{n}\margm{top-height}\oargm{label}}
   \desc{as \gls{Ncolumntopinarea} where the area is given by the
\idx{typeblock}}
   \note{preamble only}
 }
 % \NcolumnStop
 \gcmd{Ncol\-umn\-S\-top}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{n}\margm{top-height}\oargm{label}}
   \desc{as \gls{Ncolumntop} with the \meta{type} set to
\optfmt{static}}
   \note{preamble only}
 }
 % \NcolumnDtop
 \gcmd{Ncol\-umn\-D\-top}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{n}\margm{top-height}\oargm{label}}
   \desc{as \gls{Ncolumntop} with the \meta{type} set to
\optfmt{dynamic}}
   \note{preamble only}
 }
 % \NcolumnStopinarea
 \gcmd{Ncol\-umn\-S\-top\-in\-area}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{n}\margm{top-height}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}}
   \desc{as \gls{Ncolumntopinarea} with the \meta{type} set to
\optfmt{static}}
   \note{preamble only}
 }
 % \NcolumnDtopinarea
 \gcmd{Ncol\-umn\-D\-top\-in\-area}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{n}\margm{top-height}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}}
   \desc{as \gls{Ncolumntopinarea} with the \meta{type} set to
\optfmt{dynamic}}
   \note{preamble only}
 }
 % \onecolumnbottominarea
 \gcmd{one\-col\-umn\-bottom\-in\-area}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{type}\margm{bottom-height}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}}
   \desc{creates a frame of the given type (\idx{flow}, \idx{static}
or \idx{dynamic}) and height \meta{bottom-height} and a
\idx{flow-frame} that fit in the given area so that the first frame
is below the second frame, separated by \gls{vcolumnsep}. The height
of the second frame is adjusted if \gls{ifffvadjust} is true}
   \note{preamble only}
 }
 % \onecolumnbottom
 \gcmd{one\-col\-umn\-bottom}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{type}\margm{bottom-height}\oargm{label}}
   \desc{as \gls{onecolumnbottominarea} where the area is given by the
\idx{typeblock}}
   \note{preamble only}
 }
 % \onecolumnSbottom
 \gcmd{one\-col\-umn\-S\-bottom}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{bottom-height}\oargm{label}}
   \desc{as \gls{onecolumnbottom} with the \meta{type} set to
\optfmt{static}}
   \note{preamble only}
 }
 % \onecolumnDbottom
 \gcmd{one\-col\-umn\-D\-bottom}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{bottom-height}\oargm{label}}
   \desc{as \gls{onecolumnbottom} with the \meta{type} set to
\optfmt{dynamic}}
   \note{preamble only}
 }
 % \onecolumnSbottominarea
 \gcmd{one\-col\-umn\-S\-bottom\-in\-area}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{bottom-height}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}}
   \desc{as \gls{onecolumnbottominarea} with the \meta{type} set to
\optfmt{static}}
   \note{preamble only}
 }
 % \onecolumnDbottominarea
 \gcmd{one\-col\-umn\-D\-bottom\-in\-area}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{bottom-height}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}}
   \desc{as \gls{onecolumnbottominarea} with the \meta{type} set to
\optfmt{dynamic}}
   \note{preamble only}
 }
 % \twocolumnbottominarea
 \gcmd{two\-col\-umn\-bottom\-in\-area}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{type}\margm{bottom-height}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}}
   \desc{creates a frame of the given type (\idx{flow}, \idx{static}
or \idx{dynamic}) and height \meta{top-height} and two side-by-side
\idxpl{flow-frame} that all fit in the given area such that the first frame
is below the other two frames, separated by \gls{vcolumnsep}. The height
of the two side-by-side \idxpl{flow-frame} is adjusted if
\gls{ifffvadjust} is true. The horizontal gap between them is given
by \gls{columnsep}}
   \note{preamble only}
 }
 % \twocolumnbottom
 \gcmd{two\-col\-umn\-bottom}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{type}\margm{bottom-height}\oargm{label}}
   \desc{as \gls{twocolumnbottominarea} where the area is given by the
\idx{typeblock}}
   \note{preamble only}
 }
 % \twocolumnSbottom
 \gcmd{two\-col\-umn\-S\-bottom}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{bottom-height}\oargm{label}}
   \desc{as \gls{twocolumnbottom} with the \meta{type} set to
\optfmt{static}}
   \note{preamble only}
 }
 % \twocolumnDbottom
 \gcmd{two\-col\-umn\-D\-bottom}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{bottom-height}\oargm{label}}
   \desc{as \gls{twocolumnbottom} with the \meta{type} set to
\optfmt{dynamic}}
   \note{preamble only}
 }
 % \twocolumnSbottominarea
 \gcmd{two\-col\-umn\-S\-bottom\-in\-area}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{bottom-height}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}}
   \desc{as \gls{twocolumnbottominarea} with the \meta{type} set to
\optfmt{static}}
   \note{preamble only}
 }
 % \twocolumnDbottominarea
 \gcmd{two\-col\-umn\-D\-bottom\-in\-area}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{bottom-height}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}}
   \desc{as \gls{twocolumnbottominarea} with the \meta{type} set to
\optfmt{dynamic}}
   \note{preamble only}
 }
 % \Ncolumnbottominarea
 \gcmd{Ncol\-umn\-bottom\-in\-area}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{type}\margm{n}\margm{top-height}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}}
   \desc{creates a frame of the given type (\idx{flow}, \idx{static}
or \idx{dynamic}) and height \meta{top-height} and \meta{n} side-by-side
\idxpl{flow-frame} that all fit in the given area such that the first frame
is below the other \meta{n} frames, separated by \gls{vcolumnsep}. The height
of the \meta{n} side-by-side \idxpl{flow-frame} is adjusted if
\gls{ifffvadjust} is true. The horizontal gap between them is given
by \gls{columnsep}}
   \note{preamble only}
 }
 % \Ncolumnbottom
 \gcmd{Ncol\-umn\-bottom}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{type}\margm{n}\margm{top-height}\oargm{label}}
   \desc{as \gls{Ncolumnbottominarea} where the area is given by the
\idx{typeblock}}
   \note{preamble only}
 }
 % \NcolumnSbottom
 \gcmd{Ncol\-umn\-S\-bottom}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{n}\margm{top-height}\oargm{label}}
   \desc{as \gls{Ncolumnbottom} with the \meta{type} set to
\optfmt{static}}
   \note{preamble only}
 }
 % \NcolumnDbottom
 \gcmd{Ncol\-umn\-D\-bottom}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{n}\margm{top-height}\oargm{label}}
   \desc{as \gls{Ncolumnbottom} with the \meta{type} set to
\optfmt{dynamic}}
   \note{preamble only}
 }
 % \NcolumnSbottominarea
 \gcmd{Ncol\-umn\-S\-bottom\-in\-area}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{n}\margm{bottom-height}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}}
   \desc{as \gls{Ncolumnbottominarea} with the \meta{type} set to
\optfmt{static}}
   \note{preamble only}
 }
 % \NcolumnDbottominarea
 \gcmd{Ncol\-umn\-D\-bottom\-in\-area}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\margm{n}\margm{bottom-height}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}}
   \desc{as \gls{Ncolumnbottominarea} with the \meta{type} set to
\optfmt{dynamic}}
   \note{preamble only}
 }
 % \adjustheight
 \gcmd{adjust\-height}
 {
   \providedby{\sty{flowfram}}
   \syntax{\meta{dim-var}}
   \desc{adjusts the given dimension variable (length register) so that 
it's rounded to a multiple of \gls{baselineskip}}
 }
 % \adjustcolsep
 \gcmd{adjust\-col\-sep}
 {
   \providedby{\sty{flowfram}}
   \desc{adjust the value of \gls+{columnsep} so that it's equal to
twice its original value plus \gls+{marginparwidth}}
 }
 % \vtwotone
 \gcmd{vtwo\-tone}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\oargm{x-offset}\margm{W1}\margm{C1}\margm{L1}\margm{W2}\margm{C2}\margm{L2}}
   \desc{defines two side-by-side \idxpl{static-frame} where the first frame has
width \meta{W1}, background colour \meta{C1} and label \meta{L1},
and the second frame has width \meta{W2}, background colour
\meta{C1} and label \meta{L2}. Both frames have the height set to
\gls+{paperheight} and are positioned so that their base is at the
bottom of the page, with the first frame offset from the left side of the page by
\meta{x-offset}. Note that the colour specifications \meta{C1} and
\meta{C2} should be enclosed in braces, for example
\code{\marg{\oarg{gray}\marg{0.5}}} not \code{\oarg{gray}\marg{0.5}}}
 }
 % \vtwotonebottom
 \gcmd{vtwo\-tone\-bottom}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\oargm{x-offset}\margm{H}\margm{W1}\margm{C1}\margm{L1}\margm{W2}\margm{C2}\margm{L2}}
   \desc{as \gls{vtwotone} but instead of being the full height of
the page, the height for both frames is set to \meta{H}}
 }
 % \vtwotonetop
 \gcmd{vtwo\-tone\-top}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\oargm{x-offset}\margm{H}\margm{W1}\margm{C1}\margm{L1}\margm{W2}\margm{C2}\margm{L2}}
   \desc{as \gls{vtwotonebottom} but vertically offset so that the top of the
frames is at the top of the page}
 }
 % \vNtone
 \gcmd{vN\-tone}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\oargm{x-offset}\margm{n}\margm{W1}\margm{C1}\margm{L1}\ldots\margm{Wn}\margm{Cn}\margm{Ln}}
   \desc{as \gls{vtwotone} but creates \meta{n} \idxpl{static-frame}}
 }
 % \vNtonebottom
 \gcmd{vN\-tone\-bottom}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\oargm{x-offset}\margm{n}\margm{H}\margm{W1}\margm{C1}\margm{L1}\ldots\margm{Wn}\margm{Cn}\margm{Ln}}
   \desc{as \gls{vtwotonebottom} but creates \meta{n} \idxpl{static-frame}}
 }
 % \vNtonetop
 \gcmd{vN\-tone\-top}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\oargm{x-offset}\margm{n}\margm{H}\margm{W1}\margm{C1}\margm{L1}\ldots\margm{Wn}\margm{Cn}\margm{Ln}}
   \desc{as \gls{vtwotonetop} but creates \meta{n} \idxpl{static-frame}}
 }
 % \htwotone
 \gcmd{htwo\-tone}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\oargm{y-offset}\margm{H1}\margm{C1}\margm{L1}\margm{H2}\margm{C2}\margm{L2}}
   \desc{defines two vertically stacked \idxpl{static-frame} where the first frame has
height \meta{H1}, background colour \meta{C1} and label \meta{L1},
and the second frame has height \meta{H2}, background colour
\meta{C1} and label \meta{L2}. Both frames have the width set to
\gls+{paperwidth} and are positioned so that their left edge is at the
left side of the page, with the first frame offset from the bottom
edge of the page by
\meta{y-offset}. Note that the colour specifications \meta{C1} and
\meta{C2} should be enclosed in braces, for example
\code{\marg{\oarg{gray}\marg{0.5}}} not \code{\oarg{gray}\marg{0.5}}}
 }
 % \htwotoneleft
 \gcmd{htwo\-tone\-left}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\oargm{y-offset}\margm{W}\margm{H1}\margm{C1}\margm{L1}\margm{H2}\margm{C2}\margm{L2}}
   \desc{as \gls{htwotone} but instead of being the full width of
the page, the width for both frames is set to \meta{W}}
 }
 % \htwotoneright
 \gcmd{htwo\-tone\-right}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\oargm{y-offset}\margm{W}\margm{H1}\margm{C1}\margm{L1}\margm{H2}\margm{C2}\margm{L2}}
   \desc{as \gls{htwotoneleft} but horizontally offset so that the
right edge of the frames is along the right edge of the page}
 }
 % \hNtone
 \gcmd{hN\-tone}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\oargm{y-offset}\margm{n}\margm{H1}\margm{C1}\margm{L1}\ldots\margm{Hn}\margm{Cn}\margm{Ln}}
   \desc{as \gls{htwotone} but creates \meta{n} \idxpl{static-frame}}
 }
 % \hNtoneleft
 \gcmd{hN\-tone\-left}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\oargm{y-offset}\margm{n}\margm{W}\margm{H1}\margm{C1}\margm{L1}\ldots\margm{Hn}\margm{Cn}\margm{Ln}}
   \desc{as \gls{htwotoneleft} but creates \meta{n} \idxpl{static-frame}}
 }
 % \hNtoneright
 \gcmd{hN\-tone\-right}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\oargm{y-offset}\margm{n}\margm{W}\margm{H1}\margm{C1}\margm{L1}\ldots\margm{Hn}\margm{Cn}\margm{Ln}}
   \desc{as \gls{htwotoneright} but creates \meta{n} \idxpl{static-frame}}
 }
 % \makebackgroundframe
 \gcmd{make\-back\-ground\-frame}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{page-list}\oargm{label}}
   \desc{creates a single \idx{static-frame} that covers the entire
page. This command, if required, should come before any other
\idxpl{static-frame} that are shown on any of the pages in
\meta{page-list} otherwise it will obscure them}
 }
 % \ffruledeclarations
 \gcmd{ff\-rule\-declarations}
 {
   \providedby{\sty{flowfram} v1.11+}
   \initvalempty
   \desc{used by \gls{insertvrule} and \gls{inserthrule} to apply
any declarations that may alter the way that the rule appears}
 }
 % \insertvrule
 \gcmds{insert\-v\-rule}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{y-top}\oargm{y-bottom}\margm{type-1}\margm{ID1}\margm{type-2}\margm{ID2}}
   \desc{creates a vertical rule between two frames. The starred
version references the frames by their \idx{IDL} otherwise
the frames are referenced by their \idx{IDN}. The rule will extend
from the highest point of the two frames plus \meta{y-top} to the
lowest point of the two frames minus \meta{y-bottom}}
 }
 % \ffvrule
 \gcmd{ff\-v\-rule}
 {
   \providedby{\sty{flowfram} v1.11+}
   \syntax{\margm{offset}\margm{width}\margm{height}}
   \desc{used to draw the rule for \gls{insertvrule}}
 }
 % \inserthrule
 \gcmds{insert\-h\-rule}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oargm{x-left}\oargm{x-right}\margm{type-1}\margm{ID1}\margm{type-2}\margm{ID2}}
   \desc{creates a horizontal rule between two frames. The starred
version references the frames by their \idx{IDL} otherwise
the frames are referenced by their \idx{IDN}. The rule will extend
from the leftmost point of the two frames minus \meta{x-left} to the
rightmost point of the two frames plus \meta{x-right}}
 }
 % \ffhrule
 \gcmd{ff\-h\-rule}
 {
   \providedby{\sty{flowfram} v1.11+}
   \syntax{\margm{offset}\margm{width}\margm{height}}
   \desc{used to draw the rule for \gls{inserthrule}}
 }
 % \setstaticcontents
 \gcmds{set\-static\-contents}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oarg{options}\margm{ID}\margm{content}}
   \desc{sets the content of the given \idxpl{static-frame}
identified by \meta{ID}, which is the frame's \idx{IDN} (unstarred)
or \idx{IDL} (starred). If \meta{options} is present, they will be
applied to the frame at the same time}
 }
 % \setdynamiccontents
 \gcmds{set\-dynamic\-contents}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oarg{options}\margm{ID}\margm{content}}
   \desc{sets the content of the \idxpl{dynamic-frame} identified by
\meta{ID}, which is the frame's \idx{IDN} (unstarred) or \idx{IDL}
(starred). If \meta{options} is present, they will be
applied to the frame at the same time}
 }
 % \appenddynamiccontents
 \gcmds{append\-dynamic\-contents}
 {
   \providedby{\sty{flowfram}}
   \syntax{\oarg{options}\margm{ID}\margm{content}}
   \desc{appends the given content to the \idxpl{dynamic-frame}
identified by \meta{ID}, which is the frame's \idx{IDN} (unstarred) or \idx{IDL} (starred). If \meta{options} is present, they will be
applied to the frame at the same time}
 }
 % \flowsetpagelist
 \gcmd{flow\-set\-page\-list}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{IDN}\marg{\meta{page-list}\textbar\meta{keyword}}}
   \desc{sets the \idx{pglist} for the \idx{flow-frame} identified
by its \idx{IDN}}
 }
 % \staticsetpagelist
 \gcmd{static\-set\-page\-list}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{IDN}\marg{\meta{page-list}\textbar\meta{keyword}}}
   \desc{sets the \idx{pglist} for the \idx{static-frame} identified
by its \idx{IDN}}
 }
 % \dynamicsetpagelist
 \gcmd{dynamic\-set\-page\-list}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{IDN}\marg{\meta{page-list}\textbar\meta{keyword}}}
   \desc{sets the \idx{pglist} for the \idx{dynamic-frame} identified
by its \idx{IDN}}
 }
 % \flowsetexclusion
 \gcmd{flow\-set\-ex\-clusion}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{IDN}\margm{list}}
   \desc{sets the exclusion list for the \idx{flow-frame} identified
by its \idx{IDN}}
 }
 % \staticsetexclusion
 \gcmd{static\-set\-ex\-clusion}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{IDN}\margm{list}}
   \desc{sets the exclusion list for the \idx{static-frame} identified
by its \idx{IDN}}
 }
 % \dynamicsetexclusion
 \gcmd{dynamic\-set\-ex\-clusion}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{IDN}\margm{list}}
   \desc{sets the exclusion list for the \idx{dynamic-frame} identified
by its \idx{IDN}}
 }
 % \flowaddexclusion
 \gcmd{flow\-add\-ex\-clusion}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{IDN}\margm{list}}
   \desc{appends \meta{list} to the exclusion list 
   for the \idx{flow-frame} identified by its \idx{IDN}}
 }
 % \staticaddexclusion
 \gcmd{static\-add\-ex\-clusion}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{IDN}\margm{list}}
   \desc{appends \meta{list} to the exclusion list 
   for the \idx{static-frame} identified by its \idx{IDN}}
 }
 % \dynamicaddexclusion
 \gcmd{dynamic\-add\-ex\-clusion}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{IDN}\margm{list}}
   \desc{appends \meta{list} to the exclusion list 
   for the \idx{dynamic-frame} identified by its \idx{IDN}}
 }
 % \flowswitchonnext
 \gcmds{flow\-switch\-on\-next}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{ID-list}}
   \desc{switch on the listed \idxpl{flow-frame} from the next page
onwards}
 }
 % \flowswitchonnextodd
 \gcmds{flow\-switch\-on\-next\-odd}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{ID-list}}
   \desc{switch on the listed \idxpl{flow-frame} from the next odd page
onwards (after that they will show on both even and odd pages)}
 }
 % \flowswitchoffnext
 \gcmds{flow\-switch\-off\-next}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{ID-list}}
   \desc{switch off the listed \idxpl{flow-frame} from the next page
onwards}
 }
 % \flowswitchoffnextodd
 \gcmds{flow\-switch\-off\-next\-odd}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{ID-list}}
   \desc{switch off the listed \idxpl{flow-frame} from the next odd page
onwards (after that they will be off for both even and odd pages)}
 }
 % \flowswitchonnextonly
 \gcmds{flow\-switch\-on\-next\-only}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{ID-list}}
   \desc{switch on the listed \idxpl{flow-frame} for the next page
only}
 }
 % \flowswitchonnextoddonly
 \gcmds{flow\-switch\-on\-next\-odd\-only}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{ID-list}}
   \desc{switch on the listed \idxpl{flow-frame} for the next odd page
only}
 }
 % \flowswitchoffnextonly
 \gcmds{flow\-switch\-off\-next\-only}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{ID-list}}
   \desc{switch off the listed \idxpl{flow-frame} for the next page
only}
 }
 % \flowswitchoffnextoddonly
 \gcmds{flow\-switch\-off\-next\-odd\-only}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{ID-list}}
   \desc{switch off the listed \idxpl{flow-frame} for the next odd page
only}
 }
 % \dynamicswitchonnext
 \gcmds{dynamic\-switch\-on\-next}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{ID-list}}
   \desc{switch on the listed \idxpl{dynamic-frame} from the next page
onwards}
 }
 % \dynamicswitchonnextodd
 \gcmds{dynamic\-switch\-on\-next\-odd}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{ID-list}}
   \desc{switch on the listed \idxpl{dynamic-frame} from the next odd page
onwards (after that they will show on both even and odd pages)}
 }
 % \dynamicswitchoffnext
 \gcmds{dynamic\-switch\-off\-next}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{ID-list}}
   \desc{switch off the listed \idxpl{dynamic-frame} from the next page
onwards}
 }
 % \dynamicswitchoffnextodd
 \gcmds{dynamic\-switch\-off\-next\-odd}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{ID-list}}
   \desc{switch off the listed \idxpl{dynamic-frame} from the next odd page
onwards (after that they will be off for both even and odd pages)}
 }
 % \dynamicswitchonnextonly
 \gcmds{dynamic\-switch\-on\-next\-only}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{ID-list}}
   \desc{switch on the listed \idxpl{dynamic-frame} for the next page
only}
 }
 % \dynamicswitchonnextoddonly
 \gcmds{dynamic\-switch\-on\-next\-odd\-only}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{ID-list}}
   \desc{switch on the listed \idxpl{dynamic-frame} for the next odd page
only}
 }
 % \dynamicswitchoffnextonly
 \gcmds{dynamic\-switch\-off\-next\-only}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{ID-list}}
   \desc{switch off the listed \idxpl{dynamic-frame} for the next page
only}
 }
 % \dynamicswitchoffnextoddonly
 \gcmds{dynamic\-switch\-off\-next\-odd\-only}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{ID-list}}
   \desc{switch off the listed \idxpl{dynamic-frame} for the next odd page
only}
 }
 % \staticswitchonnext
 \gcmds{static\-switch\-on\-next}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{ID-list}}
   \desc{switch on the listed \idxpl{static-frame} from the next page
onwards}
 }
 % \staticswitchonnextodd
 \gcmds{static\-switch\-on\-next\-odd}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{ID-list}}
   \desc{switch on the listed \idxpl{static-frame} from the next odd page
onwards (after that they will show on both even and odd pages)}
 }
 % \staticswitchoffnext
 \gcmds{static\-switch\-off\-next}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{ID-list}}
   \desc{switch off the listed \idxpl{static-frame} from the next page
onwards}
 }
 % \staticswitchoffnextodd
 \gcmds{static\-switch\-off\-next\-odd}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{ID-list}}
   \desc{switch off the listed \idxpl{static-frame} from the next odd page
onwards (after that they will be off for both even and odd pages)}
 }
 % \staticswitchonnextonly
 \gcmds{static\-switch\-on\-next\-only}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{ID-list}}
   \desc{switch on the listed \idxpl{static-frame} for the next page
only}
 }
 % \staticswitchonnextoddonly
 \gcmds{static\-switch\-on\-next\-odd\-only}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{ID-list}}
   \desc{switch on the listed \idxpl{static-frame} for the next odd page
only}
 }
 % \staticswitchoffnextonly
 \gcmds{static\-switch\-off\-next\-only}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{ID-list}}
   \desc{switch off the listed \idxpl{static-frame} for the next page
only}
 }
 % \staticswitchoffnextoddonly
 \gcmds{static\-switch\-off\-next\-odd\-only}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{ID-list}}
   \desc{switch off the listed \idxpl{static-frame} for the next odd page
only}
 }
 % \ffaddtoadjustframeshook
 \gcmd{ff\-add\-to\-adjust\-frames\-hook}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\margm{code}}
   \desc{add \meta{code} to the \idx{flow-frame} adjustment hook,
which is used when the \idx{output-routine} starts searching for the next
\idx{flow-frame}}
 }
 % \FLFsimpar
 \gcmd{FLF\-sim\-par}
 {
   \providedby{\sty{flowfram} v2.0+}
   \desc{simulate a paragraph break inside \gls{shapepar} or
\gls{Shapepar}}
 }
 % \simpar
 \gcmd{sim\-par}
 {
   \deprecated
   \providedby{\sty{flowfram}}
   \desc{old name for \gls{FLFsimpar} provided for backward-compatibility}
   \field{alias}{FLFsimpar}
 }
 % \ffpshpar
 \gcmd{ff\-psh\-par}
 {
   \providedby{\sty{flowfram}}
   \desc{allow \gls{parshape} to be carried over a paragraph break}
 }
 % \setffdraftcolor
 \gcmd{set\-ff\-draft\-color}
 {
   \providedby{\sty{flowfram}}
   \desc{sets the colour of the \idx{bbox} outlines in draft mode}
 }
 % \setffdrafttypeblockcolor
 \gcmd{set\-ff\-draft\-type\-block\-color}
 {
   \providedby{\sty{flowfram}}
   \desc{sets the colour of the \idx{typeblock} outline in draft mode}
 }
 % \fflabelfont
 \gcmd{ff\-label\-font}
 {
   \providedby{\sty{flowfram}}
   \desc{font declarations used for the annotation labels shown in draft
mode}
 }
 % \flowfram@preamble@htmlopts
 \gcmd{flow\-fram\-@\-pre\-amble\-@\-html\-opts}
 {
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\margm{n}\marg{\keyvallist}\margm{type}\margm{IDN}\margm{page}\margm{absolute-page}}
   \desc{does nothing. This command is written to the \ext{aux} file
if the \frameopt{html} option is used in the preamble. It's provided
for the benefit of \LaTeX\ to HTML parsers}
 }
 % \flowfram@doc@htmlopts
 \gcmd{flow\-fram\-@\-doc\-@\-html\-opts}
 {
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\margm{n}\marg{\keyvallist}\margm{type}\margm{IDN}\margm{page}\margm{absolute-page}}
   \desc{does nothing. This command is written to the \ext{aux} file
if the \frameopt{html} option is used in the \env{document}
environment. It's provided for the benefit of \LaTeX\ to HTML parsers}
 }
 % \setflowframe
 \gcmds{set\-flow\-frame}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{ID-list}\marg{\keyvallist}}
   \desc{sets the attributes for the given \idxpl{flow-frame},
identified by the list of IDs, which each identify a frame by
its \idx{IDN} (unstarred) or \idx{IDL} (starred)}
 }
 % \setallflowframes
 \gcmd{set\-all\-flow\-frames}
 {
   \providedby{\sty{flowfram}}
   \syntax{\marg{\keyvallist}}
   \desc{sets the attributes in \meta{\keyvallist} for all defined \idxpl{flow-frame}}
 }
 % \setstaticframe
 \gcmds{set\-static\-frame}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{ID-list}\marg{\keyvallist}}
   \desc{sets the attributes for the given \idxpl{static-frame},
identified by the list of IDs, which each identify a frame by
its \idx{IDN} (unstarred) or \idx{IDL} (starred)}
 }
 % \setallstaticframes
 \gcmd{set\-all\-static\-frames}
 {
   \providedby{\sty{flowfram}}
   \syntax{\marg{\keyvallist}}
   \desc{sets the attributes in \meta{\keyvallist} for all defined
\idxpl{static-frame}}
 }
 % \setdynamicframe
 \gcmds{set\-dynamic\-frame}
 {
   \providedby{\sty{flowfram}}
   \syntax{\margm{ID-list}\marg{\keyvallist}}
   \desc{sets the attributes for the given \idxpl{dynamic-frame},
identified by the list of IDs, which each identify a frame by
its \idx{IDN} (unstarred) or \idx{IDL} (starred)}
 }
 % \setalldynamicframes
 \gcmd{set\-all\-dynamic\-frames}
 {
   \providedby{\sty{flowfram}}
   \syntax{\marg{\keyvallist}}
   \desc{sets the attributes in \meta{\keyvallist} for all defined
\idxpl{dynamic-frame}}
 }
 % \set<...>frame
 \gcmd{set...frame}
 {
   \name{\csmetafmt{set}{type}{frame}}
   \syntax{\margm{ID-list}\margm{options}}
   \field{see}{setflowframe,setdynamicframe,setstaticframe}
 }
% OPTIONS
% set*frame options
 \gidxpl{setframeopts}
 {
   \field{text}{\NoCaseChange{\glsentrytext{set...frame} option}}
   \desc{options that may be used with the \gls+{set...frame}
commands (some only apply to a particular type or types of frame)}
 }
% setframe label
 \gframeopt{label}
 {
   \syntax{\meta{IDL}}
   \desc{assign a label to the frame}
 }
% setframe pages
 \gframeopt{pages}
 {
   \syntax{\meta{page-list}\textbar\meta{keyword}}
   \desc{set the frame's \idx{pglist}}
 }
% setframe excludepages
 \gframeopt{ex\-clude\-pages}
 {
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\meta{list}}
   \desc{set the frame's exclusion list (overrides the \idx{pglist}
for the listed pages)}
 }
% setframe hide
 \gframeopt{hide}
 {
   \providedby{\sty{flowfram} v1.16+}
   \initval{false}
   \defval{true}
   \syntax{\meta{boolean}}
   \desc{if true, hides the frame (overrides the \idx{pglist})}
 }
% setframe hidethis
 \gframeopt{hide\-this}
 {
   \providedby{\sty{flowfram} v1.16+}
   \initval{false}
   \defval{true}
   \syntax{\meta{boolean}}
   \desc{if true, hides the frame for the current page (overrides the \idx{pglist})}
 }
% setframe offset
 \gframeopt{offset}
 {
   \initval{compute}
   \syntax{\meta{dimension}\textbar\optfmt{compute}}
   \desc{set the frame's offset to take the border into account}
 }
% setframe width
 \gframeopt{width}
 {
   \syntax{\meta{dimension}}
   \desc{set the frame width}
 }
% setframe height
 \gframeopt{height}
 {
   \syntax{\meta{dimension}}
   \desc{set the frame height}
 }
% setframe x
 \gframeopt{x}
 {
   \syntax{\meta{dimension}}
   \desc{set the frame's $x$-coordinate for all pages on which it's
defined}
 }
% setframe y
 \gframeopt{y}
 {
   \syntax{\meta{dimension}}
   \desc{set the frame's $y$-coordinate for all pages on which it's
defined}
 }
% setframe evenx
 \gframeopt{evenx}
 {
   \syntax{\meta{dimension}}
   \desc{set the frame's $x$-coordinate for all even pages on which it's
defined (only applicable if the document is two-sided)}
 }
% setframe eveny
 \gframeopt{eveny}
 {
   \syntax{\meta{dimension}}
   \desc{set the frame's $y$-coordinate for all even pages on which it's
defined (only applicable if the document is two-sided)}
 }
% setframe oddx
 \gframeopt{oddx}
 {
   \syntax{\meta{dimension}}
   \desc{set the frame's $x$-coordinate for all odd pages on which it's
defined}
 }
% setframe oddy
 \gframeopt{oddy}
 {
   \syntax{\meta{dimension}}
   \desc{set the frame's $y$-coordinate for all odd pages on which it's
defined}
 }
% setframe clear
 \gframeopt{clear}
 {
   \providedby{\sty{flowfram} v1.11+}
   \syntax{\meta{boolean}}
   \initval{false}
   \defval{true}
   \desc{clear the \staticordynamicframe\ contents whenever a page is shipped out}
   \note{\idx{static} \& \idx{dynamic} only}
 }
% setframe angle
 \gframeopt{angle}
 {
   \providedby{\sty{flowfram} v1.02+}
   \syntax{\meta{angle}}
   \initval{0}
   \desc{rotate the frame by \meta{angle} degrees}
 }
% setframe border
 \gframeopt{border}
 {
   \syntax{\meta{value}}
   \initval{false}
   \defval{plain}
   \desc{sets the frame's border}
 }
% setframe bordercolor
 \gframeopt{border\-color}
 {
   \syntax{\oargm{colour-space}\margm{colour-specs}}
   \initval{none}
   \desc{sets the frame's border colour}
 }
% setframe border-color
 \gframeopt{border\dhyphen color}
 {
   \providedby{\sty{flowfram} v2.0+}
   \desc{synonym for \frameopt{bordercolor}}
   \field{alias}{opt.frame.bordercolor}
 }
% setframe bordercolour
 \gframeopt{border\-colour}
 {
   \providedby{\sty{flowfram} v2.0+}
   \desc{synonym for \frameopt{bordercolor}}
   \field{alias}{opt.frame.bordercolor}
 }
% setframe border-colour
 \gframeopt{border\dhyphen colour}
 {
   \providedby{\sty{flowfram} v2.0+}
   \desc{synonym for \frameopt{bordercolor}}
   \field{alias}{opt.frame.bordercolor}
 }
% setframe backcolor
 \gframeopt{back\-color}
 {
   \syntax{\oargm{colour-space}\margm{colour-specs}}
   \initval{none}
   \desc{sets the frame's background colour}
 }
% setframe back-color
 \gframeopt{back\dhyphen color}
 {
   \providedby{\sty{flowfram} v2.0+}
   \desc{synonym for \frameopt{backcolor}}
   \field{alias}{opt.frame.backcolor}
 }
% setframe backcolour
 \gframeopt{back\-colour}
 {
   \providedby{\sty{flowfram} v2.0+}
   \desc{synonym for \frameopt{backcolor}}
   \field{alias}{opt.frame.backcolor}
 }
% setframe back-colour
 \gframeopt{back\dhyphen colour}
 {
   \providedby{\sty{flowfram} v2.0+}
   \desc{synonym for \frameopt{backcolor}}
   \field{alias}{opt.frame.backcolor}
 }
% setframe textcolor
 \gframeopt{text\-color}
 {
   \syntax{\oargm{colour-space}\margm{colour-specs}}
   \initval{none}
   \desc{sets the frame's text colour. Note that it's best to just
use the default document colour for all \idxpl{flow-frame}.}
 }
% setframe text-color
 \gframeopt{text\dhyphen color}
 {
   \providedby{\sty{flowfram} v2.0+}
   \desc{synonym for \frameopt{textcolor}}
   \field{alias}{opt.frame.textcolor}
 }
% setframe textcolour
 \gframeopt{textcolour}
 {
   \providedby{\sty{flowfram} v2.0+}
   \desc{synonym for \frameopt{textcolor}}
   \field{alias}{opt.frame.textcolor}
 }
% setframe text-colour
 \gframeopt{text\dhyphen colour}
 {
   \providedby{\sty{flowfram} v2.0+}
   \desc{synonym for \frameopt{textcolor}}
   \field{alias}{opt.frame.textcolor}
 }
% setframe margin
 \gframeopt{margin}
 {
   \syntax{\meta{value}}
   \initval{right}
   \desc{sets the margin position for \idxpl{flow-frame}}
 }
% setframe style
 \gframeopt{style}
 {
   \syntax{\meta{value}}
   \initval{none}
   \desc{sets content style for \idxpl{dynamic-frame}}
 }
% setframe shape
 \gframeopt{shape}
 {
   \providedby{\sty{flowfram} v1.03+}
   \syntax{\meta{value}}
   \initval{\cmd{relax}}
   \desc{sets content shape for \idxpl{static-frame} or \idxpl{dynamic-frame}}
 }
% setframe parindent
 \gframeopt{par\-indent}
 {
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\meta{dim expr}}
   \initval{\cmd{sdfparindent}}
   \desc{sets the paragraph indentation for \idxpl{static-frame} or \idxpl{dynamic-frame}
   (\meta{dim expr} will be evaluated whenever it is required)}
 }
% setframe valign
 \gframeopt{valign}
 {
   \providedby{\sty{flowfram} v1.03+}
   \syntax{\meta{value}}
   \initvalvaries
   \desc{sets vertical alignment for \idxpl{static-frame} or \idxpl{dynamic-frame}}
 }
% setframe html
 \gframeopt{html}
 {
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\marg{\keyvallist}}
   \desc{provided for the benefit of \LaTeX\ to HTML parsers that
don't have access to the output routine. When the document is
compiled with \LaTeX, this option simply writes information to the
\ext{aux} file. It's up to the \LaTeX\ to HTML parser to determine
what to do with the information}
   \note{\idx{static} and \idx{dynamic} only}
 }
 % html = { show = boolean }
 \ghtmlopt{show}
 {
   \syntax{\meta{boolean}}
   \initval{false}
   \defval{true}
   \desc{the frame contents should be shown at this point}
 }
 % html = { div = boolean }
 \ghtmlopt{div}
 {
   \syntax{\meta{boolean}}
   \initval{true}
   \defval{true}
   \desc{if the frame contents should be shown, encapsulate the
content in a \code{div} element}
 }
 % html = { style = css }
 \ghtmlopt{style}
 {
   \syntax{\meta{css}}
   \desc{if the frame contents should be shown in a \code{div}
element, set the \code{style} attribute to \meta{css}}
 }
 % html = { class = css-class }
 \ghtmlopt{class}
 {
   \syntax{\meta{css-class}}
   \desc{if the frame contents should be shown in a \code{div}
element, set the \code{class} attribute to \meta{css-class}}
 }
 % html = { image = boolean }
 \ghtmlopt{image}
 {
   \syntax{\meta{boolean}}
   \initval{false}
   \defval{true}
   \desc{if the frame contents should be shown, convert the content
into an image (because it can't be rendered correctly in HTML)}
 }
 % html = { mime-type = type }
 \ghtmlopt{mime\dhyphen type}
 {
   \syntax{\meta{type}}
   \desc{if the frame contents should be converted to an image, the
image should have the given MIME type}
 }
 % html = { alt = text }
 \ghtmlopt{alt}
 {
   \syntax{\meta{text}}
   \desc{if the frame contents should be converted to an image, the
\code{alt} tag should be set to \meta{text}}
 }
% PAGE STYLES
 % page style ffempty
 \gpagestyle{ff\-empty}
 {
   \desc{a nominally empty page style for dynamic header and footer
    frames that's governed by the \opt{dynamic-empty-page-style} option}
 }
 % page style ffplain
 \gpagestyle{ff\-plain}
 {
   \desc{a plain page style for dynamic header and footer frames}
 }
 % page style ffheadings
 \gpagestyle{ff\-headings}
 {
   \desc{a headings page style for dynamic header and footer frames}
 }
 % page style ffmyheadings
 \gpagestyle{ff\-my\-headings}
 {
   \desc{a \qt{myheadings} page style for dynamic header and footer frames}
 }
% HOOKS
 \gidx{hook}{\name{hooks}\field{text}{hook}}
 \ghook{flowfram\dslash chaphead\dslash before}{}
 \ghook{flowfram\dslash chaphead\dslash after}{}
 \ghook{flowfram\dslash chaphead\dslash box\dslash before}{}
 \ghook{flowfram\dslash chaphead\dslash box\dslash after}{}
 \ghook{flowfram\dslash staticbox\dslash before}{}
 \ghook{flowfram\dslash staticbox\dslash after}{}
% SPECIAL LABELS
 \gidx{speciallabel}
 {
   \name{special labels}
   \field{text}{special label}
 }
 \gspeciallabel{header}{}
 \gspeciallabel{footer}{}
 \gspeciallabel{evenheader}{}
 \gspeciallabel{evenfooter}{}
 \gspeciallabelmeta{thumbtab}{n}{}
 \gspeciallabelmeta{thumbtabindex}{n}{}
 \gspeciallabelmeta{eventhumbtab}{n}{}
 \gspeciallabelmeta{eventhumbtabindex}{n}{}
% PACKAGES
 \gpkg{flow\-fram}% flowfram.sty
 {
   \common
   \syntax{\meta{options}}
   \desc{package for constructing custom document columns and fixed
frames}
 }
 \gpkg{flow\-fram\-tk\-utils}% flowframtkutils.sty
 {
   \syntax{\meta{options}}
   \desc{supplementary package for use with \app{flowframtk}}
 }
% PACKAGE OPTIONS
 % outline (flowframtkutils.sty)
 \gstyopt{out\-line}
 {
   \inpackage{flowframtkutils}
   \providedby{\sty{flowframtkutils}}
   \syntax{\meta{boolean}}
   \initval{false}
   \defval{true}
   \desc{if true, provide support for outline text according to the
\TeX\ engine}
 }
 % textpath (flowframtkutils.sty)
 \gstyopt{text\-path}
 {
   \inpackage{flowframtkutils}
   \providedby{\sty{flowframtkutils}}
   \syntax{\meta{boolean}}
   \initval{false}
   \defval{true}
   \desc{if true, provide support for text along a path}
 }
% draft
 \gstyopt{draft}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v1.0+}
   \desc{switches on draft mode}
 }
% final
 \gstyopt{final}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v1.0}
   \desc{switches off draft mode}
 }
% verbose
 \gstyopt{verbose}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\meta{boolean}}
   \initval{false}
   \defval{true}
   \desc{switches on/off verbose mode}
 }
% color
 \gstyopt{color}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v1.0}
   \syntax{\meta{boolean}}
   \initval{true}
   \defval{true}
   \desc{if true, enable colour support}
   \note{preamble only}
 }
% nocolor
 \gstyopt{nocolor}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v1.0}
   \desc{equivalent to \optval{color}{false}}
   \note{preamble only}
 }
% LR
 \gstyopt{LR}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v1.12+}
   \desc{the column commands, such as \gls{twocolumn}, will
create \idxpl{flow-frame} from left to right}
   \note{preamble only}
 }
% RL
 \gstyopt{RL}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v1.12+}
   \desc{the column commands, such as \gls{twocolumn}, will
create \idxpl{flow-frame} from right to left}
   \note{preamble only}
 }
% pages
 \gstyopt{pages}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\meta{setting}}
   \initval{relative}
   \desc{indicates which value \idxpl{pglist} refer to}
   \note{preamble only}
 }
% pages = relative
 \goptval{pages}{relative}
 {
   \desc{all \idxpl{pglist} refer to the \ctr{page} counter}
 }
% pages = absolute
 \goptval{pages}{absolute}
 {
   \desc{all \idxpl{pglist} refer to the \ctr{absolutepage} counter}
 }
 % column-changes
 \gstyopt{column-changes}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v2.0+}
   \initval{ignore}
   \syntax{\meta{setting}}
   \desc{indicates what to do if \gls{onecolumn} or \gls{twocolumn}
    are encountered in the \env{document} environment}
 }
 % column-changes = ignore
 \goptval{column-changes}{ignore}
 {
   \desc{ignore any instance of \gls{onecolumn} or \gls{twocolumn}
found in the \env{document} environment}
 }
 % column-changes = clearpage
 \goptval{column-changes}{clear\-page}
 {
   \desc{clear the page but otherwise ignore any instance of \gls{onecolumn} or \gls{twocolumn}
found in the \env{document} environment}
 }
 % column-changes = switch
 \goptval{column-changes}{switch}
 {
   \desc{switch to the designated frames}
 }
 % sections-extra-option
 \gstyopt{sections\dhyphen extra\dhyphen option}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\meta{setting}}
   \desc{indicates whether or not the second optional argument of
sectioning commands should be passed to the original or just be used
for the \idx{thumbtab} title}
 }
 % sections-extra-option = as-original
 \goptval{sections-extra-option}{as\dhyphen original}
 {
   \desc{indicates that the underlying command has a second optional
argument and any second optional argument should simply be passed
and not used as the \idx{thumbtab} title}
 }
 % sections-extra-option = thumbtab-only
 \goptval{sections-extra-option}{thumbtab\dhyphen only}
 {
   \desc{indicates that the second optional argument (if present)
should only be used as the \idx{thumbtab} title (if enabled) and not
passed to the underlying command}
 }
 % sections-extra-option = original-and-thumbtab
 \goptval{sections-extra-option}{original\dhyphen and\dhyphen thumbtab}
 {
   \desc{indicates that the underlying command has a second optional
argument and any second optional argument should be both passed
to the underlying command and used as the \idx{thumbtab} title (if
enabled)}
 }
 % toc-thumbtabs
 \gstyopt{toc\dhyphen thumbtabs}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\meta{setting}}
   \defval{true}
   \initval{false}
   \desc{sets whether or not to show the thumbtab index frames in
the table of contents (if thumbtabs have been created)}
 }
 % toc-thumbtabs = aligned
 \goptval{toc-thumbtabs}{aligned}
 {
   \desc{separate the table of contents into blocks that are the
same height as the corresponding \idx{thumbtab} (for single-paged
table of contents only)}
 }
 % toc-thumbtabs = unaligned
 \goptval{toc-thumbtabs}{unaligned}
 {
   \desc{don't align sub-blocks of the table of contents with the
\idxpl{thumbtab} and only show the \idx{thumbtab} indexes on the
first page of the table of contents}
 }
 % toc-thumbtabs = false
 \goptval{toc-thumbtabs}{false}
 {
   \desc{don't show the \idx{thumbtab} indexes in the table of
contents}
 }
 % toc-thumbtabs = true
 \goptval{toc-thumbtabs}{true}
 {
   \desc{show the \idx{thumbtab} indexes on every page of the table of
contents}
 }
 % thumbtab-text
 \gstyopt{thumbtab\dhyphen text}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\meta{setting}}
   \initval{rotate}
   \desc{indicates how the text should be shown in the
\idxpl{thumbtab}}
 }
% thumbtab-text = rotate
 \goptval{thumbtab-text}{rotate}
 {
   \desc{turn the text sideways}
 }
% thumbtab-text = rotate-right
 \goptval{thumbtab-text}{rotate\dhyphen right}
 {
   \desc{rotate the text to the right}
 }
% thumbtab-text = rotate-left
 \goptval{thumbtab-text}{rotate\dhyphen left}
 {
   \desc{rotate the text to the left}
 }
% thumbtab-text = stack
 \goptval{thumbtab-text}{stack}
 {
   \desc{stack the letters vertically}
 }
% thumbtab-text = normal
 \goptval{thumbtab-text}{normal}
 {
   \desc{no rotation or stacking}
 }
 % adjust-pre-chapter
 \gstyopt{adjust\dhyphen pre\dhyphen chapter}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\meta{boolean}}
   \initval{true}
   \defval{true}
   \desc{if true and \gls{chapter} is defined, this setting will
define \gls{ffprechapterhook} and \gls{chapterfirstpagestyle}}
   \note{package option only}
 }
 % adjust-toc
 \gstyopt{adjust\dhyphen toc}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\meta{setting}}
   \desc{specifies whether or not the table of contents should be
adjusted to support \idx{thumbtab} indexes and \idxpl{minitoc}}
 }
 % adjust-toc = header
 \goptval{adjust-toc}{header}
 {
   \desc{adjust the table of contents, including the header}
 }
 % adjust-toc = notheader
 \goptval{adjust-toc}{notheader}
 {
   \desc{adjust the table of contents, but not the header}
 }
 % adjust-toc = off
 \goptval{adjust-toc}{off}
 {
   \desc{don't adjust the table of contents, which means there
won't be any support for \idx{thumbtab} indexes or \idxpl{minitoc}}
 }
 % dynamic-page-style
 \gstyopt{dynamic\dhyphen page\dhyphen style}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\meta{setting}}
   \initval{adjust}
   \desc{indicates whether or not to adjust the standard page styles if the header and
footer are converted into \idxpl{dynamic-frame}}
   \note{preamble only}
 }
 % dynamic-page-style = noadjust
 \goptval{dynamic-page-style}{noadjust}
 {
   \desc{don't adjust the \pstyle{empty}, \pstyle{plain},
    \pstyle{headings} and \pstyle{myheadings} page styles}
 }
 % dynamic-page-style = adjust
 \goptval{dynamic-page-style}{adjust}
 {
   \desc{if used, \gls{makedfheaderfooter} will set (\csfmt{let}) the
    \pstyle{empty}, \pstyle{plain},
    \pstyle{headings} and \pstyle{myheadings} page styles
    to \pstyle{ffempty}, \pstyle{ffplain},
    \pstyle{ffheadings} and \pstyle{ffmyheadings}}
 }
 % dynamic-header-case
 \gstyopt{dynamic\dhyphen header\dhyphen case}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\meta{setting}}
   \initval{no-change}
   \desc{indicates whether or not \gls{chaptermark} (if chapters are
defined) or \gls{sectionmark} (otherwise) with the \pstyle{ffheadings} and
\pstyle{ffmyheadings} styles should change the case of the header
text}
 }
 % dynamic-header-case = uc
 \goptval{dynamic-header-case}{uc}
 {
   \desc{change the header to uppercase}
 }
 % dynamic-header-case = no-change
 \goptval{dynamic-header-case}{no\dhyphen change}
 {
   \desc{don't change the case of the header}
 }
 % dynamic-subheader-case
 \gstyopt{dynamic\dhyphen subheader\dhyphen case}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\meta{setting}}
   \initval{no-change}
   \desc{indicates whether or not \gls{sectionmark} (if chapters are
defined) or \gls{subsectionmark} (otherwise) with the \pstyle{ffheadings} and
\pstyle{ffmyheadings} styles should change the case of the sub-header
text}
 }
 % dynamic-subheader-case = uc
 \goptval{dynamic-subheader-case}{uc}
 {
   \desc{change the sub-header to uppercase}
 }
 % dynamic-subheader-case = no-change
 \goptval{dynamic-subheader-case}{no\dhyphen change}
 {
   \desc{don't change the case of the sub-header}
 }
 % dynamic-page-style-header-font
 \gstyopt{dynamic\dhyphen page\dhyphen style\dhyphen header\dhyphen font}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\margm{code}}
   \initval{\cmd{emph}}
   \desc{use the given \meta{code} to set the font used by
   \gls{chaptermark} (if chapters are available) or \gls{sectionmark}
   (otherwise) with \pstyle{ffheadings}. The \meta{code} may be
declarations or the final command in \meta{code} may be a text-block
command}
 }
 % dynamic-page-style-subheader-font
 \gstyopt{dynamic\dhyphen page\dhyphen style\dhyphen subheader\dhyphen font}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\margm{code}}
   \desc{use the given \meta{code} to set the font used by
   \gls{sectionmark} (if chapters are available) or \gls{subsectionmark}
   (otherwise) with \pstyle{ffheadings}. Initialised to match
   \opt{dynamic-page-style-header-font}}
 }
 % dynamic-empty-page-style
 \gstyopt{dynamic\dhyphen empty\dhyphen page\dhyphen style}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\margm{value}}
   \initval{hide}
   \desc{controls how the \pstyle{ffempty} page style behaves with
dynamic header and footer frames}
 }
 % dynamic-empty-page-style = empty
 \goptval{dynamic-empty-page-style}{empty}
 {
   \desc{the header and footer frames have their contents set to
empty but will still be shown on the page}
 }
 % dynamic-empty-page-style = plain
 \goptval{dynamic-empty-page-style}{plain}
 {
   \desc{behaves like \pstyle{ffplain}}
 }
 % dynamic-empty-page-style = headings
 \goptval{dynamic-empty-page-style}{headings}
 {
   \desc{behaves like \pstyle{ffheadings}}
 }
 % dynamic-empty-page-style = myheadings
 \goptval{dynamic-empty-page-style}{myheadings}
 {
   \desc{behaves like \pstyle{ffmyheadings}}
 }
 % dynamic-empty-page-style = ignore
 \goptval{dynamic-empty-page-style}{ignore}
 {
   \desc{the style will do nothing, retaining the current page style}
 }
 % dynamic-empty-page-style = hide
 \goptval{dynamic-empty-page-style}{hide}
 {
   \desc{the \frameopt{hide} attribute will be switched on with
\gls{pagestyle} and the \frameopt{hidethis} attribute will be switched on with
\gls{thispagestyle}}
 }
 % dynamic-empty-page-style = show
 \goptval{dynamic-empty-page-style}{show}
 {
   \desc{the \frameopt{hide} or \frameopt{hidethis} attribute won't be switched on
   by the \pstyle{ffempty} style}
 }
 % backmatter-sections
 \gstyopt{backmatter\dhyphen sections}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\meta{setting}}
   \initval{no-number}
   \desc{classes that support \gls{backmatter} tend to suppress the
chapter number but not section numbers. As this can cause
interference, this option may be used to suppress section numbers as
well}
 }
 % backmatter-sections = no-number
 \goptval{backmatter-sections}{no-number}
 {
   \desc{suppress section numbers in the \idx{back-matter}
(\gls{backmatter} will set \ctr{secnumdepth} to -1)}
 }
 % backmatter-sections = no-change
 \goptval{backmatter-sections}{no-change}
 {
   \desc{don't alter \ctr{secnumdepth} in the \idx{back-matter}}
 }
 % matter-thumbtabs
 \gstyopt{matter\dhyphen thumbtabs}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\meta{setting}}
   \desc{indicates whether or not unstarred sectional units outside
of the \idx{main-matter} should have \idxpl{thumbtab}}
 }
 % matter-thumbtabs = main-only
 \goptval{matter-thumbtabs}{main\dhyphen only}
 {
   \desc{only have \idxpl{thumbtab} for unstarred units in the
\idx{main-matter}}
 }
 % matter-thumbtabs = all
 \goptval{matter-thumbtabs}{all}
 {
   \desc{support \idxpl{thumbtab} for unstarred units everywhere}
 }
 % matter-thumbtabs = not-front
 \goptval{matter-thumbtabs}{not\dhyphen front}
 {
   \desc{only have \idxpl{thumbtab} for unstarred units in the
\idx{main-matter} and \idx{back-matter} but not in the
\idx{front-matter}}
 }
 % matter-thumbtabs = not-back
 \goptval{matter-thumbtabs}{not\dhyphen back}
 {
   \desc{only have \idxpl{thumbtab} for unstarred units in the
\idx{main-matter} and \idx{front-matter} but not in the
\idx{back-matter}}
 }
 % thumbtab-links
 \gstyopt{thumbtab\dhyphen links}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\meta{setting}}
   \desc{indicates which \idxpl{thumbtab} should have
\idxpl{hyperlink} (if supported)}
 }
 % thumbtab-links = toc-only
 \goptval{thumbtab-links}{toc\dhyphen only}
 {
   \desc{only have \idxpl{hyperlink} in the \idx{thumbtab} indexes}
 }
 % thumbtab-links = all
 \goptval{thumbtab-links}{all}
 {
   \desc{have \idxpl{hyperlink} in all the \idxpl{thumbtab}}
 }
 % thumbtab-links = none
 \goptval{thumbtab-links}{none}
 {
   \desc{don't have \idxpl{hyperlink} in any of the \idxpl{thumbtab}}
 }
 % unstarred-thumbtabs
 \gstyopt{unstarred\dhyphen thumbtabs}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\meta{boolean}}
   \initval{false}
   \defval{true}
   \desc{indicates whether or not unstarred units should have
\idxpl{thumbtab}}
 }
% prohibit-frame-rotation
 \gstyopt{prohibit\dhyphen frame\dhyphen rotation}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v2.0+}
   \syntax{\meta{boolean}}
   \initval{false}
   \defval{true}
   \desc{if true, disable frame rotation}
 }
% rotate
 \gstyopt{rotate}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v1.0}
   \syntax{\meta{boolean}}
   \initval{false}
   \defval{true}
   \desc{if true, enables frame rotation and sets
     \opteqvalref{thumbtab-text}{rotate-right}}
 }
% norotate
 \gstyopt{no\-rotate}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v1.0}
   \desc{prevents frame rotation and sets
     \opteqvalref{thumbtab-text}{stack}}
 }
% thumbtabs
 \gstyopt{thumbtabs}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v1.14+}
   \syntax{\meta{setting}}
   \desc{indicates whether or not the number or title should be shown in
the \idxpl{thumbtab}}
   \note{preamble only}
 }
% thumbtabs = number
 \goptval{thumbtabs}{number}
 {
   \desc{only show the number (if applicable)}
 }
% thumbtabs = title
 \goptval{thumbtabs}{title}
 {
   \desc{only show the title}
 }
% thumbtabs = both
 \goptval{thumbtabs}{both}
 {
   \desc{show both the number (if applicable) and the title}
 }
% thumbtabs = none
 \goptval{thumbtabs}{none}
 {
   \desc{don't show either the number or title}
 }
% ttbtitle
 \gstyopt{ttb\-title}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v1.0}
   \desc{include the title in the \idxpl{thumbtab} (if enabled)}
   \note{preamble only}
   \field{see}{opt.thumbtabs}
 }
% ttbnotitle
 \gstyopt{ttb\-no\-title}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v1.0}
   \desc{don't include the title in the \idxpl{thumbtab} (if enabled)}
   \note{preamble only}
   \field{see}{opt.thumbtabs}
 }
% ttbnum
 \gstyopt{ttb\-num}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v1.0}
   \desc{include the number in the \idxpl{thumbtab} (if enabled)}
   \note{preamble only}
   \field{see}{opt.thumbtabs}
 }
% ttbnonum
 \gstyopt{ttb\-no\-num}
 {
   \inpackage{flowfram}
   \providedby{\sty{flowfram} v1.0}
   \desc{don't include the number in the \idxpl{thumbtab} (if enabled)}
   \note{preamble only}
   \field{see}{opt.thumbtabs}
 }
% FILE EXTENSIONS
 \gext{tex}{}% .tex
 \gext{cls}{}% .cls
 \gext{sty}{}% .sty
 \gext{aux}{}% .aux
 \gext{toc}{}% .toc
 \gext{ttb}{}% .ttb
% FILES
 \gfile{pdf\dhyphen trans.tex}{}% pdf-trans
 \gapp{kpse\-which}{}% kpsewhich
% GENERAL PACKAGES / CLASSES
 \gpkg{hyper\-ref}{}% hyperref.sty
 \gpkg{geometry}{}% geometry.sty
 \gpkg{long\-table}{}% longtable.sty
 \gpkg{super\-tabular}{}% supertabular.sty
 \gpkg{color}{}% color.sty
 \gpkg{fancybox}{}% fancybox.sty
 \gpkg{pgf}{}% pgf.sty
 \gmodule{decorations.text}{\parent{pkg.pgf}}% decorations.text pgf library
 \gpkg{tikz}{}% tikz.sty
 \gpkg{lua\-tex85}{}% luatex85.sty
 \gpkg{pst\dhyphen char}{}% pst-char.sty
 \gcls{memoir}{}% memoir.cls
 \gcls{scr\-book}{}% scrbook.cls
 \gcls{beamer}{}% beamer.cls
 \gcls{book}{}% book.cls
 \gcls{report}{}% report.cls
 \gpkg{shape\-par}{}% shapepar.sty
 \gpkg{graphicx}{}% graphicx.sty
% GENERAL COUNTERS
 \gctr{page}{}% page counter
 \gctr{sec\-num\-depth}{}% secnumdepth counter
% GENERAL COMMANDS
 \gcmd{text\-width}{} % \textwidth
 \gcmd{text\-height}{} % \textheight
 \gcmd{paper\-width}{} % \paperwidth
 \gcmd{paper\-height}{} % \paperheight
 \gcmd{line\-width}{}% \linewidth
 \gcmd{hsize}{} % \hsize
 \gcmd{vsize}{} % \vsize
 \gcmd{base\-line\-skip}{}% \baselineskip
 \gcmd{column\-sep}{}% \columnsep
 \gcmd{column\-width}{}% \columnwidth
 \gcmd{column\-sep\-rule}{}% \columnseprule
 \gcmd{top\-margin}{}% \topmargin
 \gcmd{head\-height}{}% \headheight
 \gcmd{head\-sep}{}% \headsep
 \gcmd{voffset}{}% \voffset
 \gcmd{odd\-side\-margin}{}% \oddsidemargin
 \gcmd{even\-side\-margin}{}% \evensidemargin
 \gcmd{margin\-par}{}% \marginpar
 \gcmd{margin\-par\-width}{}% \marginparwidth
 \gcmd{par}{}% \par
 \gcmd{par\-box}{}% \parbox
 \gcmd{par\-indent}{}% \parindent
 \gcmd{fbox}{}% \fbox
 \gcmd{fbox\-sep}{}% \fboxsep
 \gcmd{fbox\-rule}{}% \fboxrule
 \gcmd{ovalbox}{}% \ovalbox
 \gcmd{Ovalbox}{}% \Ovalbox
 \gcmd{doublebox}{}% \doublebox
 \gcmd{shadowbox}{}% \shadowbox
 \gcmd{table\-of\-contents}{}% \tableofcontents
 \gcmd{main\-matter}{}% \mainmatter
 \gcmd{front\-matter}{}% \frontmatter
 \gcmd{back\-matter}{}% \backmatter
 \gcmd{clear\-page}{}% \clearpage
 \gcmd{clear\-double\-page}{}% \cleardoublepage
 \gcmd{new\-page}{}% \newpage
 \gcmd{page\-break}{}% \pagebreak
 \gcmd{input}{}% \input
 \gcmd{color}{}% \color
 \gcmd{fcolor\-box}{}% \fcolorbox
 \gcmd{cap\-tion}{}% \caption
 \gcmd{label}{}% \label
 \gcmd{ref}{}% \ref
 \gcmd{page\-ref}{}% \pageref
 \gcmd{hyper\-link}{}% \hyperlink
 \gcmd{geo\-metry}{}% \geometry
 \gcmd{page\-style}{}% \pagestyle
 \gcmd{this\-page\-style}{}% \thispagestyle
 \gcmd{chapter\-mark}{}% \chaptermark
 \gcmd{section\-mark}{}% \sectionmark
 \gcmd{sub\-section\-mark}{}% \subsectionmark
 \gcmd{pdf\-info}{}% \pdfinfo
 \gcmd{hyper\-set\-up}{}% hypersetup
 \gcmd{pgf\-point}{}% \pgfpoint
 \gcmd{set\-length}{}% \setlength
 \gcmd{@make\-chap\-ter\-head}{}% \@makechapterhead
 \gcmd{@odd\-foot}{}% \@oddfoot
 \gcmd{@even\-foot}{}% \@evenfoot
 \gcmd{@odd\-head}{}% \@oddhead
 \gcmd{@even\-head}{}% \@evenhead
 \gcmd{left\-mark}{}% \leftmark
 \gcmd{right\-mark}{}% \rightmark
 \gcmd{appendix}{}% \appendix
 \gcmd{uncover}{}% \uncover (beamer)
 % \parshape
 \gcmd{par\-shape}{
    \syntax{\dequals \meta{n} \meta{i\textsubscript{1}} \meta{l\textsubscript{1}} \meta{i\textsubscript{2}} \meta{l\textsubscript{2}} \ldots\ \meta{i\textsubscript{n}} \meta{l\textsubscript{n}}}
 }
 \gcmd{shape\-par}{}% \shapepar
 \gcmd{Shape\-par}{}% \Shapepar
 \gcmd{include\-graphics}{}% \includegraphics
 \gcmd{item}{}% \item
 \gcmd{verb}{}% \verb
% GENERAL ENVIRONMENTS
 \genv{doc\-u\-ment}{} % document environment
 \genv{figure}{} 
 \genv{figure*}{} 
 \genv{table}{} 
 \genv{table*}{} 
 \genv{pgf\-picture}{}% pgfpicture environment
 \genv{lr\-box}{}% lrbox
% GENERAL PAGE STYLES
 \gpagestyle{plain}{}% \ps@plain
 \gpagestyle{empty}{}% \ps@empty
 \gpagestyle{headings}{}% \ps@headings
 \gpagestyle{my\-head\-ings}{}% \ps@myheadings
% TERMS
 \gterm{typeblock}
 {
   \desc{The area of the page where the main body of the text goes.
The width and height of this area are given by \gls{typeblockwidth}
and \gls{typeblockheight}. This lengths are initialised to 
\gls{textwidth} and \gls{textheight}, and may be adjusted at the
start of the \env{document} environment}
 }
 \gterm{flow-frame}
 {
   \common
   \name{flow frame}
   \desc{The frames in a document such that the contents of the 
\env{document} environment flow from one frame to the next in 
the order that they were defined. There must be at least one flow frame 
on every page.}
 }
 \gterm{static-frame}
 {
   \common
   \name{static frame}
   \desc{Frames in which text is fixed in place.  The contents are fixed until
explicitly changed or cleared via the \frameopt{clear} key
in \gls{setstaticcontents}}
 }
 \gterm{dynamic-frame}
 {
   \common
   \name{dynamic frame}
   \desc{Frames in which text is fixed in place, but the contents are re-typeset
each time the frame is displayed}
 }
 \gterm{header-frame}
 {
   \name{header frame}
   \desc{a special \idx{dynamic-frame} with the label
   \speciallabel{header} created either with \gls{makedfheaderfooter}
   or via \idx{FlowframTk}['s] export function,
   or the special \idx*{dynamic-frame} with the label
   \speciallabel{evenheader} that may be created with
   \idx{FlowframTk}. If \speciallabel{evenheader} doesn't exist, 
   the \speciallabel{header} frame will be used for the page header
   on both odd and even pages. If \speciallabel{evenheader} does exist,
   it will be used as the page header for even pages if the document
   two-sided setting is on. This special behaviour must be enabled either
   with \gls{makedfheaderfooter} or via \idx{FlowframTk}}
 }
 \gterm{footer-frame}
 {
   \name{footer frame}
   \desc{a special \idx{dynamic-frame} with the label
   \speciallabel{footer} created either with \gls{makedfheaderfooter}
   or via \idx{FlowframTk}['s] export function,
   or the special \idx*{dynamic-frame} with the label
   \speciallabel{evenfooter} that may be created with
   \idx{FlowframTk}. If \speciallabel{evenfooter} doesn't exist, 
   the \speciallabel{footer} frame will be used for the page footer
   on both odd and even pages. If \speciallabel{evenfooter} does exist,
   it will be used as the page footer for even pages if the document
   two-sided setting is on. This special behaviour must be enabled either
   with \gls{makedfheaderfooter} or via \idx{FlowframTk}}
 }
 \gterm{frame}
 {
   \common
   \desc{A rectangular area of the page in which text can be placed (not to be
confused with a \idx{fcmd}). There are three types:
\idx{flow}, \idx{static} and \idx{dynamic}}
 }
 \gterm{fcmd}
 {
   \name{frame making command}
   \desc{A \LaTeX\ command which places some kind of border around its
argument. For example: \gls{fbox}}
 }
 \gterm{pglist}
 {
   \name{page list}
   \desc{A list of pages. This can either be a single keyword:
\optfmt{all},
\optfmt{odd}, \optfmt{even} or \optfmt{none}, or it can
be a comma-separated list of individual page numbers or
page ranges. For example: \code{\textless3,5,7-11,\textgreater15}
indicates pages 1,2,5,7,8,9,10,11 and all pages after page 15.
These numbers refer to the decimal value of the page counter by
default. To make them refer to the absolute page number use
the package option \optval{pages}{absolute}}
 }
 \gterm{pgrange}
  {
   \name{page range}
   \desc{Page ranges can be closed (for example \code{5-10}) or
open (for example, \code{\textless7} or \code{\textgreater9})}
  }
 \gterm{bbox}
  {
    \name{bounding box}
    \field{plural}{bounding boxes}
    \desc{The bounding box of a frame is the area allocated for the 
contents of that frame. However the text may not completely fill that 
area, and it is possible that the text may overflow that area}
  }
  \gtermabbr{IDN}{IDN}{identification number}
  {
    \desc{A unique number assigned to each frame, which you can use to identify
the frame when modifying its appearance. Example: if you
have defined 3 \idxpl{flow-frame}, 2 \idxpl{static-frame} and 
1 \idx{dynamic-frame}, the \idxpl{flow-frame} will have IDNs 1, 2 and 3, 
the \idxpl{static-frame} will have IDNs 1 and 2, and the 
\idx{dynamic-frame} will have IDN 1}
  }
  \gtermabbr{IDL}{IDL}{identification label}
  {
    \desc{A unique label which can be assigned to a frame, enabling you to
refer to the frame by label instead of by its \idx{IDN}}
  }
  \gapp{flow\-fram\-tk}{}
  \gterm{Flow\-fram\-Tk}% FlowframTk
  {
    \desc{A Java application with a graphical user interface which
can be used to construct frames for use with the \sty{flowfram}
package. It can also be used to create vector graphics images which
can be exported as \ext{tex} files containing a \env{pgfpicture}
environment (defined by the \sty{pgf} package). The supplementary 
package \sty{flowframtkutils} provided with \sty{flowfram} will
need to be loaded by any document that inputs these files.
The \sty{flowframtkutils} package will also be automatically added to
any \ext+{cls} or \ext+{sty} files created by \appfmt{flowframtk}
(version 0.8.8 onwards). The latest stable release is available on
\CTANpkg{flowframtk} or experimental releases can be found 
on \urlfootref{https://github.com/nlct/flowframtk/releases}{GitHub}.
FlowFramTk was originally called JpgfDraw (a Java \sty{pgf}-code
generating drawing application). Ensure you have at least version
0.8.8 to use the features mentioned in this manual}
  }
% GENERAL INDEX
 \gidx{flow}{\parent{frame}\field{alias}{flow-frame}}
 \gidx{static}{\parent{frame}\field{alias}{static-frame}}
 \gidx{dynamic}{\parent{frame}\field{alias}{dynamic-frame}}
 \gidx{dynamic-frame.special}
 {
   \name{dynamic frame (special)}
   \field{text}{special}
   \field{alias}{idx.speciallabel}
 }
 \gidx{IDL.special}
 {
   \name{IDL (special)}
   \field{text}{special}
   \field{alias}{idx.speciallabel}
 }
 \gidx{thumbtab}{}
 \gidx{thumbtab-label}
 {
   \name{thumbtab label}
   \field{alias}{idx.speciallabel}
 }
 \gidx{minitoc}{\name{mini-toc}}
 \gidx{main-matter}{\name{main matter}}
 \gidx{front-matter}{\name{front matter}}
 \gidx{back-matter}{\name{back matter}}
 \gidx{hyperlink}{}
 \gidx{output-routine}{\name{output routine}}
 \gidx{page-style}{
    \name{page styles}
    \field{text}{page style}
    \field{seealso}{header-frame,footer-frame}
 }
 \gidx{header}
  {
    \name{header (page)}
    \field{text}{header}
    \field{seealso}{header-frame,idx.page-style}
  }
 \gidx{footer}
  {
    \name{footer (page)}
    \field{text}{footer}
    \field{seealso}{footer-frame,idx.page-style}
  }
 \gidx{verbatim}{}
}

% Page layout stuff

% set up some background frames to liven up the title page
\newlength{\leftwidth}
\newlength{\rightwidth}

\computeleftedgeodd{\leftwidth}
\setlength{\leftwidth}{-\leftwidth}
\addtolength{\leftwidth}{0.4\textwidth}
\setlength{\rightwidth}{\paperwidth}
\addtolength{\rightwidth}{-\leftwidth}
% only defined on page 1 unfortunately the document
% has more than one page 1, so will need to change the settings after the title page
\vtwotone[1]{\leftwidth}{magenta}{backleft}{\rightwidth}{[cmyk]{0,0.48,0,0}}{backright}

% This is for the back cover.
\vtwotone[none]{\rightwidth}{[cmyk]{0,0.48,0,0}}{lastbackright}{\leftwidth}{magenta}{lastbackleft}

\vtwotonetop[odd]{1cm}{\leftwidth}{magenta}{oddtopleft}{\rightwidth}{[cmyk]{0,0.48,0,0}}{oddtopright}
\vtwotonetop[even]{1cm}{\rightwidth}{[cmyk]{0,0.48,0,0}}{eventopleft}{\leftwidth}{magenta}{eventopright}

% Set the margin width
\setlength{\marginparwidth}{2cm}

% now set up main document frames. Each page has a dynamic
% frame for the chapter heading, and a flow frame for the
% text.
\newflowframe{0.6\textwidth}{\textheight}{0pt}{0pt}[main]
\newdynamicframe{0.38\textwidth}{\textheight}{0.62\textwidth}{0pt}[chaphead]

\twocolumninarea[none]{0.6\textwidth}{\textheight}{0pt}{0pt}[left,right]

% swap them round on even pages
\setflowframe*{main}{evenx=0.4\typeblockwidth}
\setdynamicframe*{chaphead}{evenx=0pt,clear}

% make a frames to illustrate shaped frames
\newstaticframe[none]{0.38\typeblockwidth}{0.55\typeblockheight}{0.62\typeblockwidth}{0.45\typeblockheight}[shapedt]
\setstaticframe*{shapedt}{evenx=0pt,clear}

\newstaticframe[none]{0.38\typeblockwidth}{0.45\typeblockheight}{0.62\typeblockwidth}{0pt}[shapedb]
\setstaticframe*{shapedb}{evenx=0pt,clear}

\newdynamicframe{0.38\typeblockwidth}{\typeblockheight}{0.62\typeblockwidth}{0pt}[examples]
\setdynamicframe*{examples}{evenx=0pt,valign=t,clear}

% set the margins to appear on the spine side of the page
\setflowframe*{main}{margin=inner}

\IfTeXParserLib
{
  \newcommand\thisdoc{the PDF version of this document}
  \newcommand\chapdesc[1]{\par\emph{#1}\par}
}
{
  \newcommand\thisdoc{this document}
  % put chapter headings in dynamic frame with IDL chaphead
  \ChapterInDynamic*{chaphead}

  \addtokomafont{chapter}{\color{blue}}
  \renewcommand\chapterheadstartvskip{}

  % append chapter minitocs to same dynamic frame.
  \appenddfminitoc*{chaphead}

  \newcommand{\chapdesc}[1]{%
   \appenddynamiccontents*{chaphead}{\par \normalfont\emph{#1}}%
  }

  \renewcommand{\flowframheaderchapprefix}{}
  \renewcommand{\glsglossarymark}[1]{}
}


\flowframsetup{
 dynamic-empty-page-style=hide,
 toc-thumbtabs,
 thumbtabs=number,
 thumbtab-text=normal
}

% Make thumb tabs (specify each tab to be 0.75in high)

\makethumbtabs{0.6in}
\enableminitoc

% Thumbtabs are grey by default which looks a bit boring,
% so change the colours
\setthumbtab{1}{backcolor=[rgb]{0.15,0.15,1}}
\setthumbtab{2}{backcolor=[rgb]{0.2,0.2,1}}
\setthumbtab{3}{backcolor=[rgb]{0.25,0.25,1}}
\setthumbtab{4}{backcolor=[rgb]{0.3,0.3,1}}
\setthumbtab{5}{backcolor=[rgb]{0.35,0.35,1}}
\setthumbtab{6}{backcolor=[rgb]{0.4,0.4,1}}
\setthumbtab{7}{backcolor=[rgb]{0.45,0.45,1}}
\setthumbtab{8}{backcolor=[rgb]{0.5,0.5,1}}
\setthumbtab{9}{backcolor=[rgb]{0.55,0.55,1}}

% change the text style on the thumbtabs
\newcommand{\thumbtabstyle}[1]{%
 \centering
 \bfseries\large\sffamily #1
}

\setthumbtab{all}{valign=c,style=thumbtabstyle,textcolor=white}

% Put headers and footers in dynamic frames
\makedfheaderfooter

% set default page style

\pagestyle{ffheadings}

\newlength{\xoffset}
\computerightedgeodd{\xoffset}
\addtolength{\xoffset}{-2cm}
\newlength{\yoffset}
\computebottomedge{\yoffset}

\newcommand{\footstyle}[1]{\bfseries\LARGE #1}

\setdynamicframe*{footer}{oddx=\xoffset,y=\yoffset,width=2cm,height=2cm,
backcolor=blue,textcolor=white,style=footstyle,pages=none}

% now work out the x offset for the even pages

\computeleftedgeeven{\xoffset}
\setdynamicframe*{footer}{evenx=\xoffset}

\title{Creating Flow Frames for Posters, Brochures or 
Magazines using flowfram.sty version 2.1}
\author{Nicola L.C. Talbot\\[10pt]
Dickimaw Books\\
\href{https://www.dickimaw-books.com/}{\nolinkurl{dickimaw-books.com}}}
\date{2026-02-23}

\begin{document}

% swap frames around for title page
\ffswapoddeven*{main}
\dfswapoddeven*{chaphead}

\pagenumbering{alph}
\maketitle

% swap frames back again
\ffswapoddeven*{main}
\dfswapoddeven*{chaphead}

\htmlavailable

\begin{information}
Version 2.0 has been mostly rewritten using \LaTeX3 commands and
updated to take into account changes to the \idx{output-routine} in the
\LaTeX\ kernel. Some defaults have changed. If there are any compatibility issues you can
rollback to v1.18 or v1.17. For example:
\begin{codebox}
\cmd{usepackage}\marg{flowfram}[=v1.18]
\end{codebox}
Note that v1.18 was never publicly released but is just a minor
change to v1.17 to allow for rollback with corrections.

The rollback files are frozen snapshots of older versions.
Bear in mind that those old versions may not work properly with
new kernels.
\end{information}

%suppress the background
\setstaticframe*{backleft}{pages=none}
\setstaticframe*{backright}{pages=none}

\frontmatter
% make the footers appear from this point on
\setdynamicframe*{footer}{pages=all}

\tableofcontents
\listofexamples

\mainmatter
\enablethumbtabs
\chapter{Introduction}\label{sec:intro}
\chapdesc{This chapter provides a brief overview of the package, 
the package options and the various frame types.}

This document is the user manual for the \sty{flowfram} package.
Advanced users wanting further details of the package should read
the documented code \filefmt{flowfram-code.pdf}. Sample files are provided
with the documentation. 

The \sty{flowfram} package is a \LaTeX\ package designed to 
enable you to create text \idxpl{frame} in a document such that 
the contents of the \env{document} environment flow from one 
\idx*{frame} to the next in the order that they were defined.  
This is useful for creating posters
or magazines or any other form of document that does not 
conform to the standard one or two column layout. There's an
optional helper application called \idx{FlowframTk} (distributed
separately) if you prefer to use a graphical user interface to set up the
document layout (see \sectionref{sec:flowframtk}).

Each \idx{frame} has an \idx{IDN} that's unique to the particular
type of \idx{frame} that may be used to identify it. You may also
assign an \idx{IDL} for reference purposes to make it easier to
remember. In general, a command or environment with both a starred and unstarred
version that requires an ID will need the \idx{IDN} for the
unstarred version and the \idx{IDL} for the starred version.
Some commands may allow keywords (\optfmt{all}, \optfmt{odd}
or \optfmt{even}) instead of a numeric value for the unstarred versions.

\begin{important}
The \sty{flowfram} package tries to make \TeX\ do
something it wasn't originally designed to do. It modifies the
\idx{output-routine} and may not always perform as desired. Extra care
must be taken if a paragraph spans frames of unequal width due to
the asynchronous nature of \TeX's \idx{output-routine}.  (See
\sectionref{sec:unexpectedoutput}.)
The \sty{flowfram} package has only been tested on a limited number
of packages, and may well conflict with packages that also modify
the \idx{output-routine} or rely on it being unmodified.
You can switch back to the normal \idx{output-routine} with 
\gls{FlowFramRestoreOR} and then restore \sty{flowfram}['s]
modified \idx{output-routine} with \gls{FlowFramUnrestoreOR} if necessary (see
\sectionref{sec:outputroutine}).
\end{important}

If the \sty{geometry} package is required, it's best to load it
first and setup the page dimensions before \sty{flowfram} is loaded. You can
load \sty{geometry} afterwards and the \idx{typeblock} dimensions will
automatically be updated after it has been loaded, but they won't be
correct if you later change the settings with \gls{geometry}.
The lengths governing the \idx{typeblock} are:

\cmddef{typeblockwidth}
The width of the \idx{typeblock}. This is initialised to
\gls{textwidth}.

\cmddef{typeblockheight}
The height of the \idx{typeblock}. This is initialised to
\gls{textheight}.

\cmddef{typeblockoffsety}
The vertical offset of the \idx{typeblock}. This is initialised to
the sum of \gls{topmargin}, \gls{headheight}, \gls{headsep} and \gls{voffset}.

These lengths identify the dimensions and vertical offset of the
\idx{typeblock} to ensure that all defined \idxpl{frame} are in the
correct relative positions. If these dimensions change then the
available area used by commands like \gls{onecolumn},
\gls{twocolumn} and \gls{Ncolumn} might be incorrect.

\begin{information}
The \sty{geometry} package's \optfmt{showframes} option will be
confused by \sty{flowfram}['s] frames. You can instead use 
\sty{flowfram}['s] \opt{draft} option to show the layout.
\end{information}

If you need to switch \idxpl{frame} on and off, it's best to use the
\opteqvalref{pages}{absolute} package option if the \ctr{page}
counter is reset in the document.

\mExampleref{ex:twocolumnsidepanel} creates three
\idxpl{flow-frame}. The first is labelled \qt{single} (only shown on absolute
page~1), and the other two are labelled \qt{left} and \qt{right} (shown on all pages except the
first). The example also creates a \idx{dynamic-frame} labelled
\qt{sidepanel} that's shown on all pages (the default \idx{pglist}
setting). The \opt{draft} package
option is used to show the outlines of each frame and the
\idx{typeblock}. The \idxpl{flow-frame} created with \gls{onecolumn}
and \gls{twocolumn} are slightly shorter than the \idx{typeblock}
due to the default adjustment setting (see \sectionref{sec:Ncolumn}).
\begin{codebox}[before upper app=\small]
\cmd{documentclass}\oarg{11pt}\marg{book}
\cmd{usepackage}\oarg{a4paper,outer=3in,marginparwidth=2cm,
 columnsep=4pt}\marg{geometry}
\cmd{usepackage}\oarg{\opteqvalref{pages}{absolute},\opt{draft}}\marg{flowfram}
\cmd{usepackage}\marg{lipsum}\comment{provide dummy text}
\gls{pagestyle}\marg{plain}
\gls{onecolumn}\oarg{1}\oarg{single}\comment{only use on page 1}
\gls{setflowframe}*\marg{single}\marg{\frameoptval{margin}{inner}}
\gls{twocolumn}\oarg{>1}\oarg{left,right}\comment{all pages except p.1}
\gls{setflowframe}*\marg{left}\marg{\frameoptval{margin}{left}}
\gls{setflowframe}*\marg{right}\marg{\frameoptval{margin}{right}}
\gls{newdynamicframe}\marg{2in}\marg{\gls{typeblockheight}}\comment{width \& height}
 \marg{\gls{typeblockwidth}+\gls{columnsep}}\marg{0pt}\comment{position}
 \oarg{sidepanel}\comment{label}
\cmd{newcommand}\marg{\cmd{Hugebf}}\marg{\cmd{Huge}\cmd{bfseries}}
\gls{setdynamicframe}*\marg{sidepanel}
 \marg{\frameoptvalm{evenx}{-2in-\gls{columnsep}}, \frameoptvalm{style}{Hugebf}}
\gls{setdynamiccontents}*\marg{sidepanel}\marg{Side Panel on
Page~\thectr{page}.}
\cbeg{document}
First page.\gls{marginpar}\marg{note1}
\gls{mainmatter}
Start sample.\gls{marginpar}\marg{note2} \cmd{lipsum}\oarg{3-5}
End sample.\gls{marginpar}\marg{note3}
\cend{document}
\end{codebox}

\createresultexampleindynamicframe*
 [title={Frame Page Lists},arara={pdflatex},border,
 fontsize=11,class=book,pagestyle=plain,
 pages={1,2,3},pagesperrow=2,pagesep=2pt,solofirst,
 label={ex:twocolumnsidepanel},
 description={Example document with lipsum filler text in two
columns with a side panel}
]
{examples}
{%
\cmd{usepackage}\oarg{a4paper,outer=3in,marginparwidth=2cm,columnsep=4pt}\marg{geometry}\nl
\cmd{usepackage}\oarg{pages=absolute,draft}\marg{flowfram}\nl
\cmd{usepackage}\marg{lipsum}\commentnl{provide dummy text}%
\gls{onecolumn}\oarg{1}\oarg{single}\commentnl{only use on page 1}%
\gls{setflowframe}*\marg{single}\marg{margin=inner}\nl
\gls{twocolumn}\oarg{>1}\oarg{left,right}\commentnl{use on all pages except p.1}%
\gls{setflowframe}*\marg{left}\marg{margin=left}\nl
\gls{setflowframe}*\marg{right}\marg{margin=right}\nl
\gls{newdynamicframe}\marg{2in}\marg{\gls{typeblockheight}}\nlsp
 \marg{\gls{typeblockwidth}+\gls{columnsep}}\marg{0pt}\oarg{sidepanel}\nl
\cmd{newcommand}\marg{\cmd{Hugebf}}\marg{\cmd{Huge}\cmd{bfseries}}\nl
\gls{setdynamicframe}*\marg{sidepanel}\nlsp
 \marg{evenx={-2in-\gls{columnsep}},\nlsp
 style=Hugebf\nl
}
\codepar
\gls{setdynamiccontents}*\marg{sidepanel}\marg{Side Panel on
Page~\thectr{page}.}
}
{%
First page.\gls{marginpar}\marg{note1}\nl
\gls{mainmatter}\nl
Start sample.\gls{marginpar}\marg{note2}\nl
\cmd{lipsum}\oarg{3-5}\nl
End sample.\gls{marginpar}\marg{note3}
}

Note that this example document has narrow columns with a small gap
between them. This can cause overfull lines and a cramped layout,
but it's for illustrative purposes only.

In \exampleref{ex:twocolumnsidepanel} the \ctr{page} counter is reset by \gls{mainmatter}
(which also does \gls{cleardoublepage}).
With \opteqvalref{pages}{relative}, the \idx{pglist} \qt{1} refers
to any page where the \ctr{page} counter is 1 so the \qt{single}
\idx{flow-frame} would be used on both the first and third page and
the \qt{left} and \qt{right} \idxpl{flow-frame} (which have
\idx{pglist} \code{>1}) wouldn't be selected on the third page but
would still be selected on the second page. However, with
\opteqvalref{pages}{absolute} the \idxpl{pglist} now refer to the
absolute page.

The \sty{flowfram} package provides three types of \gls{frame}:
\idxpl{flow-frame}, \idxpl{static-frame} and \idxpl{dynamic-frame},
each with a custom width, height and position. (These may be changed
later, see \sectionref{sec:modattr}.)
The main contents of the \env{document} environment flow from
one \idx{flow-frame} to the next in the order of definition
(for the \idxpl{flow-frame} that are valid on the current page),
whereas the contents of the \idx{static} and \idx{dynamic} frames
are set explicitly using commands such as \gls{setstaticcontents}
(see \sectionref{sec:static})
and \gls{setdynamiccontents} (see \sectionref{sec:dynamic}).

\begin{important}
Unless otherwise stated, all co-ordinates are relative to the
bottom left hand corner of the \idx{typeblock}. If you have
a two-sided document, the absolute position of the \gls*{typeblock} 
may vary depending on the values of \gls{oddsidemargin} 
and \gls{evensidemargin}, and all the \idxpl*{frame} will shift
accordingly unless otherwise indicated. Alternative positions for
even pages can be set with the \frameopt{evenx} and \frameopt{eveny}
attributes but those co-ordinates are still relative to the position of the even
page \idx{typeblock}.
\end{important}

The \idx{pglist} (\frameopt{pages}), exclusion list
(\frameopt{excludepages}), and the \frameopt{hide} and
\frameopt{hidethis} settings determine whether or not a
\idx{frame} is valid for a particular page.

\section{Frame Stacking Order}
\label{sec:stacking}

\setdynamiccontents*[html={show,div,class=figure}]{examples}{%
 \begin{staticfigure}
 \includeteximage[scale=0.5]{images/flowframe-layers1}
 \includeteximage[scale=0.5]{images/flowframe-layers2}
 \caption{Frame Layers}\label{fig:framelayers}
 \end{staticfigure}
}

The material on each page is placed in the following order:
\begin{enumerate}
\item Each \idx{static-frame} that's valid for the current page in ascending
order of \idx{IDN} (shown in magenta in \figureref{fig:framelayers}).

\item Each \idx{flow-frame} that's valid for the current page in ascending
order of \idx{IDN} (shown in yellow in \figureref{fig:framelayers}).

\item Each \idx{dynamic-frame} that's valid for the current page in ascending
order of \idx{IDN} (shown in cyan in \figureref{fig:framelayers}).

\item \Glspl{bbox} if the \opt{draft} package option has been used.
\end{enumerate}

This ordering can be used to determine if you want something
to overlay or underlay everything else on the page.
Note that the \idxpl{frame} do not interact with each other. If
you have two or more overlapping \idxpl*{frame}, the text in each 
\idx*{frame} will not attempt to wrap around the other 
\idxpl*{frame}, but will simply overwrite them.

\begin{information}
For non-rectangular \idxpl{frame}, see \sectionref{sec:parshape}.
(That is, normal \staticordynamicframes\ that have their content
shaped using \gls{parshape} or \gls{shapepar}\slash\gls{Shapepar}.)
\end{information}

\mExampleref{ex:stackingorder} demonstrates the layers with a strange
overlapping layout. Note that this example is intentionally weird
and is not a recommendation!

First, some \idxpl{flow-frame} are defined. I've given them labels
to make them easier to reference when changing their attributes:
\begin{codebox}
\gls{newflowframe}
 \marg{0.4\gls{typeblockwidth}}\comment{width}
 \marg{0.6\gls{typeblockwidth}}\comment{height}
 \marg{0pt}\comment{x}
 \marg{0.6\gls{typeblockwidth}}\comment{y}
 [upper]\comment{label}
\gls{setflowframe}*\marg{upper}\marg{\frameoptval{border}{plain}}
\codepar
\gls{newflowframe}
 \marg{0.4\gls{typeblockwidth}}\comment{width}
 \marg{0.6\gls{typeblockwidth}}\comment{height}
 \marg{0.6\gls{typeblockwidth}}\comment{x}
 \marg{0pt}\comment{y}
 [lower]\comment{label}
\gls{setflowframe}*\marg{lower}\marg{\frameoptval{border}{shadowbox}}
\codepar
\gls{newflowframe}
 \marg{0.4\gls{typeblockwidth}}\comment{width}
 \marg{0.6\gls{typeblockwidth}}\comment{height}
 \marg{0.3\gls{typeblockwidth}}\comment{x}
 \marg{0.3\gls{typeblockwidth}}\comment{y}
 [middle]\comment{label}
\gls{setflowframe}*\marg{middle}\marg{\frameoptval{backcolor}{yellow}}
\end{codebox}
This will need the \sty{fancybox} package for the \gls{shadowbox} command.
(More complex borders can be created with \styfmt{tikz} or
using \idx{FlowframTk}.)

Order of definition matters. The above are defined in the order:
\optfmt{upper} (\idx{IDN}~1), \optfmt{lower} (\idx{IDN}~2), and
\optfmt{middle} (\idx{IDN}~3). This means that the document text
will start in \optfmt{upper}, flow into \optfmt{lower}, and then
into \optfmt{middle}.

A custom counter helps to demonstrate the order in which contents
are processed:
\begin{codebox}
\cmd{newcounter}\marg{sample}
\end{codebox}

Next a \idx{dynamic-frame} is defined:
\begin{codebox}
\gls{newdynamicframe}
 \marg{0.5\gls{typeblockwidth}}\comment{width}
 \marg{0.5\gls{typeblockwidth}}\comment{height}
 \marg{0.75\gls{typeblockwidth}}\comment{x}
 \marg{0.25\gls{typeblockwidth}}\comment{y}
 [sample]\comment{label}
\end{codebox}
The contents are then set so that the \ctrfmt{sample} counter is
incremented and shown, and an image (provided by \styfmt{mwe}) is displayed 
(this will need the \styfmt{graphicx} package):
\begin{codebox}
\gls{setdynamiccontents}*\marg{sample}\marg{\comment{}
 \cmd{hfill}\cmd{stepcounter}\marg{sample}
  Sample \cmd{thesample}\cmd{\visiblespace}(dynamic).\cmd{par}
 \cmd{includegraphics}\oarg{width=\cmd{linewidth}}
   \marg{example-image-a}
}
\end{codebox}
Labels are unique to the particular \gls{frame}['s] \emph{type}.
A \idx{static-frame} is defined in a similar way and, in this case, it
happens to have the same label (\optfmt{sample}) as the \idx{dynamic-frame}. This isn't a
problem as they are different types of frame. However, it can be a
bit confusing. 
\begin{codebox}
\gls{newstaticframe}
 \marg{0.5\gls{typeblockwidth}}\comment{width}
 \marg{0.5\gls{typeblockwidth}}\comment{height}
 \marg{0.5\gls{typeblockwidth}}\comment{x}
 \marg{0.4\gls{typeblockwidth}}\comment{y}
 [sample]\comment{label}
\end{codebox}
The document uses the \styfmt{lipsum} package to provide sample
text:
\begin{codebox}
START.
(sample \cmd{stepcounter}\marg{sample}\cmd{thesample}).
\cmd{lipsum}\oarg{1-2}
END.
\end{codebox}
\Glspl{frame} must be defined in the preamble, but the contents of
\staticordynamicframes\ may be set in the document body.
This example sets the \optfmt{sample} \idx{static-frame} content
after the sample text (but it's still on page~1):
\begin{codebox}
\gls{setstaticcontents}*\marg{sample}\marg{\comment{}
 \cmd{stepcounter}\marg{sample}
  Sample \cmd{thesample}\cmd{\visiblespace}(static).\cmd{par}
 \cmd{includegraphics}\oarg{width=\cmd{linewidth}}
   \marg{example-image-b}
}
\end{codebox}

\createresultexampleindynamicframe*
 [title={Frame Stacking Order},fontsize=10,
 label={ex:stackingorder},
 description={Example document with lipsum filler text that starts
in the upper left, moves to the lower right and then into the middle
frames}
]
{examples}
{%
\cmd{usepackage}\oarg{T1}\marg{fontenc}\nl
\cmd{usepackage}\marg{flowfram}\nl
\cmd{usepackage}\marg{lipsum}\nl
\cmd{usepackage}\marg{graphicx}\nl
\cmd{usepackage}\marg{fancybox}
\codepar
\gls{newflowframe}\nldbsp
 \marg{0.4\gls{typeblockwidth}}\commentdbsp{width}
 \marg{0.6\gls{typeblockwidth}}\commentdbsp{height}
 \marg{0pt}\commentdbsp{x}
 \marg{0.6\gls{typeblockwidth}}\commentdbsp{y}
 [upper]\commentnl{label}
\gls{setflowframe}*\marg{upper}\marg{border=plain}
\codepar
\gls{newflowframe}\nldbsp
 \marg{0.4\gls{typeblockwidth}}\commentdbsp{width}
 \marg{0.6\gls{typeblockwidth}}\commentdbsp{height}
 \marg{0.6\gls{typeblockwidth}}\commentdbsp{x}
 \marg{0pt}\commentdbsp{y}
 [lower]\commentnl{label}
\gls{setflowframe}*\marg{lower}\marg{border=shadowbox}
\codepar
\gls{newflowframe}\nldbsp
 \marg{0.4\gls{typeblockwidth}}\commentdbsp{width}
 \marg{0.6\gls{typeblockwidth}}\commentdbsp{height}
 \marg{0.3\gls{typeblockwidth}}\commentdbsp{x}
 \marg{0.3\gls{typeblockwidth}}\commentdbsp{y}
 [middle]\commentnl{label}
\gls{setflowframe}*\marg{middle}\marg{backcolor=yellow}
\codepar
\cmd{newcounter}\marg{sample}
\codepar
\gls{newdynamicframe}\nldbsp
 \marg{0.5\gls{typeblockwidth}}\commentdbsp{width}
 \marg{0.5\gls{typeblockwidth}}\commentdbsp{height}
 \marg{0.75\gls{typeblockwidth}}\commentdbsp{x}
 \marg{0.25\gls{typeblockwidth}}\commentdbsp{y}
 [sample]\commentnl{label}
\gls{setdynamiccontents}*\marg{sample}\marg{\commentdbsp{}
 \cmd{hfill}\cmd{stepcounter}\marg{sample}\nldbsp
  Sample \cmd{thesample}\ (dynamic).\cmd{par}\nldbsp
 \cmd{includegraphics}\oarg{width=\cmd{linewidth}}\marg{example-image-a}\nl
}
\codepar
\gls{newstaticframe}\nldbsp
 \marg{0.5\gls{typeblockwidth}}\commentdbsp{width}
 \marg{0.5\gls{typeblockwidth}}\commentdbsp{height}
 \marg{0.5\gls{typeblockwidth}}\commentdbsp{x}
 \marg{0.5\gls{typeblockwidth}}\commentdbsp{y}
 [sample]\comment{label}\nl
}
{%
START 
(sample \cmd{stepcounter}\marg{sample}\cmd{thesample}).
\cmd{lipsum}\oarg{1-2}
END.
\codepar
\gls{setstaticcontents}*\marg{sample}\marg{\commentdbsp{}
 \cmd{stepcounter}\marg{sample}\nldbsp
 Sample \cmd{thesample}\ (static).\cmd{par}\nldbsp
 \cmd{includegraphics}\oarg{width=\cmd{linewidth}}\marg{example-image-b}\nl
}
}

Some things to note from \exampleref{ex:stackingorder}: 

\begin{itemize}
\item The \idx{static-frame} has its contents set in a box register, which
means that the \ctrfmt{sample} counter is incremented as soon as the
contents are set, but \gls{setstaticcontents} was placed at the end
of the one-paged document. The first increment of the \ctrfmt{sample} counter occurs 
at the start of the first paragraph of the document text, so the
counter has the value 1 when \gls{setstaticcontents} is processed. 
Therefore the contents of the \idx{static-frame} shows \qt{Sample 2}.

\Idxpl{static-frame} are always positioned on the page
first, so the sample \idx{static-frame} is drawn first and is
partially obscured by the other \idxpl{frame} with overlapping positions.
Although the \idxpl{flow-frame} were filled first (because the
document text came before \gls{setstaticcontents}), they are still drawn on
top of the \idx{static-frame}.

\item The document text automatically flows into the
\idxpl{flow-frame} (using a similar mechanism to the way the
standard two-column mode works). However the column order is determined 
by the order of definition of the \idxpl{flow-frame}. In this
example, the order leads to the document text starting at the top
left, continuing in the bottom right, and then moving into the
middle of the page. \Idxpl{flow-frame} are always positioned after
\idxpl{static-frame} so the middle and lower frames obscure the
\idx{static-frame} that has an overlapping position.

\item The \idx{dynamic-frame} has its contents stored in a token
list variable which isn't expanded until the \idx{output-routine}
positions it on the page so, although the frame contents were set in
the preamble, the \ctrfmt{sample} counter increment
in the \idx{dynamic-frame} contents doesn't take effect until the
end of the current page. \Idxpl{dynamic-frame} are always positioned after the other
types of \gls{frame}, so the sample \idx{dynamic-frame} obscures the
others with overlapping positions.

\item If more content is added to the document text before 
\gls{setstaticcontents} then the first page may be completed before the
contents of the \idx{static-frame} are set. In which case, the
\qt{B} image won't show until the next page and the \ctrfmt{sample}
counter increment won't occur until after it has been incremented by
the \idx{dynamic-frame} when the first page is shipped.

\end{itemize}

So it's important to consider the order when defining \idxpl{frame}
but it's also important to consider the frame type and when and how
the different types of \gls{frame} are filled and processed.


\section{Package Options}\label{sec:pkgopts}

\pkgdef{flowfram}

Some options may only be set when the package is loaded, some may be
set in the preamble (before any command affected by the setting
is used) and a few may be used anywhere. For those options that may be
changed after the package has loaded, you can set them with:
\cmddef{flowframsetup}

Available options are listed in the sections below or see
\sectionref{styoptsummary} for an alphabetical list.

\subsection{Thumbtabs, Contents and Mini-Tocs}
\label{sec:pkgoptsthumbtoc}

\Idxpl{thumbtab} are \idxpl{dynamic-frame} with a \idx{speciallabel} that can be created with
\gls{makethumbtabs} (see \sectionref{sec:thumbtabs}). If enabled,
they correspond to a particular sectioning unit (such as chapter),
with the frame's content set to the number or the title or both.
These \idxpl{dynamic-frame} are aligned against the edge of the page
and are designed to be shown only in the applicable sectioning unit.

Each \idx{thumbtab} frame has a corresponding index frame which may
be shown in the table of contents. This requires adjusting the
\gls{tableofcontents} command to show the index frames. The relevant
sub-block in the table of contents may be adjusted so that it fills
the height of the corresponding \idx{thumbtab} index frame

\begin{important}
No \idxpl{thumbtab} information will be written to the \ext+{ttb} file 
until they are first enabled with \gls{enablethumbtabs}.
This can later be suspended with \gls{disablethumbtabs}.
While the \idxpl{thumbtab} are disabled, options such as
\opt{unstarred-thumbtabs} and \opt{matter-thumbtabs} will have no effect.
\end{important}

\Idxpl{minitoc} are a sub-set of the table of contents that may be
displayed at the start of the applicable sectioning unit. This may
or may not be the same unit as the \idxpl{thumbtab} (if also
present). The default is to match them if both \idxpl{thumbtab} and
\idxpl{minitoc} are required. The \idx{minitoc} information is
obtained when \sty{flowfram}['s] modified \gls{tableofcontents}
parses the \ext+{toc} file.

This means that if the \opteqvalref{adjust-toc}{off} option is used to 
restore the \gls{tableofcontents} definition that's in
effect when \sty{flowfram} is first loaded, then neither
\idxpl{minitoc} nor \idx{thumbtab} indexes can be supported.

\optiondef{adjust-toc}

Specifies whether \gls{tableofcontents} should be adjusted to allow
for \idx{thumbtab} indexes and \idxpl{minitoc}.
This may take one of the following values:

\optionvaldef{adjust-toc}{header}

Adjust the table of contents, including the header. This may change
the way the page header is displayed, if a page style with headers
is used.

\optionvaldef{adjust-toc}{notheader}

Adjust the table of contents, but not the header.

\optionvaldef{adjust-toc}{off}

Don't adjust the table of contents. There's no support for
\idx{thumbtab} indexes or \idxpl{minitoc} with this setting.

\optiondef{backmatter-sections}

Classes that support \gls{backmatter} tend to suppress the
chapter number but not section numbers. As this can cause
interference, \sty{flowfram} by default adds code to \gls{backmatter}
that sets \ctr{secnumdepth} to \code{-1}. This option may be used to
prevent this.

\optionvaldef{backmatter-sections}{no-change}

If \gls{backmatter} is defined, \sty{flowfram}['s] additional code
won't alter \ctr{secnumdepth}.

\optionvaldef{backmatter-sections}{no-number}

Make \gls{backmatter} (if defined) set \ctr{secnumdepth} to \code{-1}.

\optiondef{toc-thumbtabs}

Indicates whether or not \idx{thumbtab} indexes should be shown in
\gls{tableofcontents} and whether or not to align them. Note that
the alignment setting should only be used if the table of contents
is on a single page. It's not appropriate for longer content.
This setting has no effect with \opteqvalref{adjust-toc}{off}.

\optionvaldef{toc-thumbtabs}{aligned}

Divide the table of contents into blocks that are the
same height as the corresponding \idx{thumbtab}.
This assumes that the start of the table of contents
is aligned with the vertical offset identified when the
\idxpl{thumbtab} were created. If the \idxpl{thumbtab} are shifted
too far up or down the \meta{y-offset} will need to be adjusted
in the first optional argument of \gls{makethumbtabs}.
This setting is only applicable for singled-paged table of contents.

\optionvaldef{toc-thumbtabs}{unaligned}

Don't align the sub-block in the table of contents with the corresponding
\idx{thumbtab} and only show the \idx{thumbtab} indexes on the first
page of the table of contents.

\optionvaldef{toc-thumbtabs}{true}

Show the \idx{thumbtab} indexes on every page of the table of
contents.

\optionvaldef{toc-thumbtabs}{false}

Don't show the \idx{thumbtab} indexes in the table of
contents.

\optiondef{unstarred-thumbtabs}

Indicates whether or not unstarred sectional units should have
\idxpl{thumbtab}. Note that this is not the same as unstarred but
unnumbered sectional units in the \idx{front-matter} or
\idx{back-matter}. (See \opt{matter-thumbtabs} below, for that.)

This option will have no effect if \idxpl{thumbtab} aren't enabled
when the applicable sectional units occur.

\optiondef{matter-thumbtabs}

Indicates if unstarred sectional units outside of the main matter
should have \idxpl{thumbtab}. Unstarred commands such as
\gls{chapter} are not usually numbered outside of the
\idx{main-matter} but behave slightly differently to the starred
version. For example, \gls{chapter} without a star may not be
numbered but may be added to the table of contents.
This setting does not affect the starred version.

This setting will have no effect if \idxpl{thumbtab} aren't enabled
outside of the \idx{main-matter}.

\optionvaldef{matter-thumbtabs}{main-only}

Only support \idxpl{thumbtab} for unstarred (numbered) units in the 
\idx{main-matter}.

\optionvaldef{matter-thumbtabs}{all}

Support \idxpl{thumbtab} for all unstarred units.

\optionvaldef{matter-thumbtabs}{not-front}

Only support \idxpl{thumbtab} for unstarred (numbered) units in the 
\idx{main-matter} and \idx{back-matter} but not in the \idx{front-matter}.

\optionvaldef{matter-thumbtabs}{not-back}

Only support \idxpl{thumbtab} for unstarred (numbered) units in the 
\idx{main-matter} and \idx{front-matter} but not in the \idx{back-matter}.

\optiondef{thumbtab-links}

Indicates which \idxpl{thumbtab} should have \idxpl{hyperlink} (if supported).
You will need to load \sty{hyperref} if you want \idxpl{hyperlink}.

\optionvaldef{thumbtab-links}{toc-only}

Only have \idxpl{hyperlink} in the \idx{thumbtab} indexes that are
shown in the table of contents.

\optionvaldef{thumbtab-links}{all}

Have \idxpl{hyperlink} in all the \idxpl{thumbtab}.

\optionvaldef{thumbtab-links}{none}

Don't have \idxpl{hyperlink} in any of the \idxpl{thumbtab}.

\optiondef{thumbtab-text}

Indicates how the text should be shown on the \idxpl{thumbtab}.

\optionvaldef{thumbtab-text}{rotate}

Turn the text sideways. This will either rotate the text to the
right or to the left, depending on whether or not a two-sided layout
is on and whether or not the current page is odd or even.

\optionvaldef{thumbtab-text}{rotate-right}

Rotate the text to the right.

\optionvaldef{thumbtab-text}{rotate-left}

Rotate the text to the left.

\optionvaldef{thumbtab-text}{stack}

Stacks the letters vertically. This doesn't look very good and is
just provided for backward-compatibility.

\optionvaldef{thumbtab-text}{normal}

No rotation or stacking.


\optiondef{thumbtabs}

Indicates whether or not the number or title should be shown in
the \idxpl{thumbtab} (if enabled).

\optionvaldef{thumbtabs}{title}

Only show the title.

\optionvaldef{thumbtabs}{number}

Only show the number (if applicable).

\optionvaldef{thumbtabs}{both}

Show both the number (if applicable) and the title

\optionvaldef{thumbtabs}{none}

Don't show either the number or title.

\optiondef{sections-extra-option}

The \sty{flowfram} package redefines the standard sectioning
commands so that they have a second optional argument (which is used
for the corresponding \idx{thumbtab} title, if enabled), but it first
saves the original definitions to use as an underlying command.
Normally it will only pass the first optional argument to the
underlying command.

If you are using a class, such as \cls{memoir}, that also has a second optional
argument, then this option identifies whether or not the second
optional argument should also be passed to the underlying command.
If \sty{flowfram} detects that \cls{memoir} has been loaded, it will
automatically implement
\opteqvalref{sections-extra-option}{original-and-thumbtab}
otherwise it will implement
\opteqvalref{sections-extra-option}{thumbtab-only}.

\optionvaldef{sections-extra-option}{thumbtab-only}

Only use the second optional argument as the \idx{thumbtab} title
(if applicable) and don't pass it to the underlying command.

\optionvaldef{sections-extra-option}{original-and-thumbtab}

The underlying command has a second optional argument and any second
optional argument should be both passed to the underlying command
and used as the \idx{thumbtab} title (if enabled).

\optionvaldef{sections-extra-option}{as-original}

The underlying command has a second optional
argument and any second optional argument provided should simply be passed
to the underlying command and not used as the \idx{thumbtab} title.

\subsection{Dynamic Frames}
\label{sec:pkgoptsdynamic}

\optiondef{dynamic-page-style}

Indicates whether or not \gls{makedfheaderfooter} should 
adjust the standard page styles. If this option is required, it should be set
before \gls{makedfheaderfooter} otherwise it will be too late to
have an effect.

\optionvaldef{dynamic-page-style}{adjust}

If \gls{makedfheaderfooter} is used, it will set (\csfmt{let}) the
\pstyle{empty}, \pstyle{plain}, \pstyle{headings} and
\pstyle{myheadings} page styles to \pstyle{ffempty},
\pstyle{ffplain}, \pstyle{ffheadings} and \pstyle{ffmyheadings}.

\optionvaldef{dynamic-page-style}{noadjust}

Don't adjust the page styles.

\optiondef{dynamic-header-case}

Indicates whether or not \gls{chaptermark} (if chapters are
defined) or \gls{sectionmark} (otherwise) with the \pstyle{ffheadings} and
\pstyle{ffmyheadings} styles should change the case of the header
text.

\optionvaldef{dynamic-header-case}{uc}

Convert to uppercase.

\optionvaldef{dynamic-header-case}{no-change}

Don't change the case.

\optiondef{dynamic-subheader-case}

Indicates whether or not \gls{sectionmark} (if chapters are
defined) or \gls{subsectionmark} (otherwise) with the \pstyle{ffheadings} and
\pstyle{ffmyheadings} styles should change the case of the sub-header
text.

\optionvaldef{dynamic-subheader-case}{uc}

Convert to uppercase.

\optionvaldef{dynamic-subheader-case}{no-change}

Don't change the case.

\optiondef{dynamic-page-style-header-font}

Use the given \meta{code} to set the font used by
\gls{chaptermark} (if chapters are available) or \gls{sectionmark}
(otherwise) with \pstyle{ffheadings}. The \meta{code} may be
declarations or the final command in \meta{code} may be a text-block
command.

If \meta{code} is empty (but the equal sign \code{=} will
still be required) no font change will be applied. For example, you
may prefer to use the \idx{dynamic} frame's \frameopt{style} command
instead.

\optiondef{dynamic-page-style-subheader-font}

Use the given \meta{code} to set the font used by
\gls{sectionmark} (if chapters are available) or \gls{subsectionmark}
(otherwise) with \pstyle{ffheadings}. The \meta{code} may be
declarations or the final command in \meta{code} may be a text-block
command. Again the \meta{code} may be empty.

\begin{information}
The sub-header font is initialised to match the header font, so if
you change the header font it will automatically change the
sub-header font as well.
\end{information}

\optiondef{dynamic-empty-page-style}

Controls how the \pstyle{ffempty} page style behaves with
dynamic \headerandfooterframes. Remember that with 
the default \opteqvalref{dynamic-page-style}{adjust}, 
\gls{makedfheaderfooter} will set the \pstyle{empty} page style to
\pstyle{ffempty}.
The initial setting is
\opteqvalref{dynamic-empty-page-style}{empty},
\opteqvalref{dynamic-empty-page-style}{hide}.
This means that 
\opteqvalref{dynamic-empty-page-style}{show}
will revert back to showing empty frames.

If you have decorated the header or footer \idx{dynamic-frame}, such
as setting a border or background colour, then simply setting the header
and footer to empty (the usual behaviour of the \pstyle{empty} page
style), the \headerandfooterframes\ will still be visible. This may
or may not be desired.

\optionvaldef{dynamic-empty-page-style}{empty}

The \pstyle{ffempty} page style will set the header and footer text
to empty but the frames will still be visible.
This option automatically sets
\opteqvalref{dynamic-empty-page-style}{show}.

\optionvaldef{dynamic-empty-page-style}{plain}

The \pstyle{ffempty} page style will behave like the \pstyle{ffplain}
style. The \headerandfooterframes\ will be visible.
This option automatically sets
\opteqvalref{dynamic-empty-page-style}{show}.

\optionvaldef{dynamic-empty-page-style}{headings}

The \pstyle{ffempty} page style will behave like the
\pstyle{ffheadings} style. The \headerandfooterframes\ will be visible.
This option automatically sets
\opteqvalref{dynamic-empty-page-style}{show}.

\optionvaldef{dynamic-empty-page-style}{myheadings}

The \pstyle{ffempty} page style will behave like the
\pstyle{ffmyheadings} style. The \headerandfooterframes\ will be visible.

\optionvaldef{dynamic-empty-page-style}{ignore}

The \pstyle{ffempty} page style will do nothing, so the previous
page style will remain in effect. The \headerandfooterframes\ will be visible.
This option automatically sets
\opteqvalref{dynamic-empty-page-style}{show}.

\optionvaldef{dynamic-empty-page-style}{hide}

The \headerandfooterframes\ will have the \frameopt{hide} attribute
set by the \pstyle{ffempty} page style. No other change will be
made, but since the frames will no longer be shown, the frame
content won't be visible.

Note that if \gls{thispagestyle} is used instead of \gls{pagestyle}
then \frameopt{hidethis} instead of \frameopt{hide} will be set. 

\optionvaldef{dynamic-empty-page-style}{show}

The header and footer frames won't have the \frameopt{hide} (or
\frameopt{hidethis}) attribute set by the \pstyle{ffempty} page
style. Whatever \opt{dynamic-empty-page-style} setting was in effect
before \opteqvalref{dynamic-empty-page-style}{hide} will continue.


\subsection{Column Command Options}
\label{sec:pkgoptscolumns}

These options govern column commands, such as \gls{onecolumn},
\gls{onecolumninarea}, \gls{twocolumn} and \gls{twocolumninarea},
which create one or more \idxpl{flow-frame} arranged as columns (see
\sectionref{sec:Ncolumn}).  This includes column commands that
additionally create a \gls{frame} to go above or below the column
\idxpl{flow-frame} (see \sectionref{sec:colstyleswithframe}).

The order that the \idxpl{flow-frame} are
defined matters, as the \idx{output-routine} selects the next
\idx{flow-frame} in order of definition (that is, in ascending order of
\idx{IDN}) and cycles back to the start when a page is shipped out.
So if the first \idx{flow-frame} to be defined is on the left, the
document text will start on the left, but if the first
\idx{flow-frame} to be defined is on the right, then the document
text will start on the right.

\optiondef{LR}

The column commands, such as \gls{twocolumn}, will
create \idxpl{flow-frame} from left to right. This is the default.

\optiondef{RL}

The column commands, such as \gls{twocolumn}, will
create \idxpl{flow-frame} from right to left. The \opt{RL} option may be set
in the preamble but should be set before the applicable commands are
used (see also \sectionref{sec:RL}).

\optiondef{column-changes}

The \sty{flowfram} package redefines \gls{onecolumn} and
\gls{twocolumn} for use in the preamble to define a single
\idx{flow-frame} (\gls{onecolumn}) or two \idxpl{flow-frame}
(\gls{twocolumn}). However, some commands provided by the kernel or
other classes or packages may try to use \gls{onecolumn} and
\gls{twocolumn} to adjust the page layout. This option indicates
what to do if these commands are encountered in the document
environment.

\optionvaldef{column-changes}{ignore}

Ignore any instance of \gls{onecolumn} or \gls{twocolumn}
found in the \env{document} environment. In the case of
\gls{twocolumn}, if the optional argument is present, it will simply
be added to the page content.

\optionvaldef{column-changes}{clearpage}

Like \opteqvalref{column-changes}{ignore} but does \gls{clearpage}.

\optionvaldef{column-changes}{switch}

Switch to the designated \idxpl{frame}, which will first need to be
identified. If you use \gls{onecolumn} or
\gls{onecolumninarea} in the preamble (see
\sectionref{sec:Ncolumn}), the first instance will automatically
identify the \idx{flow-frame} to use for any \gls{onecolumn} found
in the document.  Alternatively, you can identify the required
\idx{flow-frame} with:
\cmddef{SetOneColumnFrame}
The \meta{ID} should be the \idx{frame}['s] \idx{IDN} for the
unstarred version or the \idx{IDL} for the starred version.

Similarly if you use \gls{twocolumn} or 
\gls{twocolumninarea}, the first instance will automatically
identify the \idxpl{flow-frame} to use for any \gls{twocolumn} found
in the \env{document}. However, this is a little more complicated as
a \idx{frame} for the header and shorter columns are also needed in
the event that \gls{twocolumn} is used with its optional argument.
Commands such as \gls{twocolumnStop} or \gls{twocolumnDtop} 
will identify the \idxpl{frame} to use in this case.
You can also identify the desired \idxpl{frame} with:
\cmddef{SetTwoColumnFrames}
The starred version references the \idxpl{frame} by their \idx{IDL}.
The unstarred version references them by their \idx{IDN}.

The first non-headed \idx{flow-frame} is identified by \meta{col1}
and the second non-headed \idx{flow-frame} is identified by
\meta{col2}.
If the optional arguments are omitted, then this just establishes
the two \idxpl{flow-frame} to use.

To identify a frame for the header and the two \idxpl{flow-frame}
accompanying it, the optional arguments are required:
\meta{header-type} is the frame type for the header (\optfmt{flow},
\optfmt{dynamic} or \optfmt{static}). Note that \idxpl{dynamic-frame}
are best for this, although they can cause dependent counters to go
out-of-sync. The header frame is identified with
\meta{header-id}. The first headed \idx{flow-frame} is identified
with \meta{header-col1} and the second headed \idx{flow-frame} is
identified with \meta{header-col2}.

\begin{information}
If you don't identify the designated \idxpl{frame} to use, you will
get a warning.
\end{information}


\subsection{Other}
\label{sec:pkgoptsother}

\optiondef{pages}

All \idxpl{frame} have an associated \idx{pglist} that determines
which pages they should be shown on. By default, this uses the
\ctr{page} counter, but as that is sometimes reset (for example,
when changing from \idx{front-matter} to \idx{main-matter}) this can
be ambiguous. Version 1.14 introduced the \ctr{absolutepage}
counter which is incremented every time a page is shipped out and
should not be reset, which allows for unambiguous references in the
\idxpl{pglist}.

\optionvaldef{pages}{absolute}

Use the \ctr{absolutepage} counter.

\optionvaldef{pages}{relative}

Use the standard \ctr{page} counter. Note that the \idxpl{pglist}
always uses the numeric value (1, 2, etc) not the formatted value
(i, ii, etc). This is the default setting for backward
compatibility. 

\optiondef{adjust-pre-chapter}
If true and \gls{chapter} is defined, the pre-chapter hook commands
\gls{ffprechapterhook} and \gls{chapterfirstpagestyle} will be
defined (see \sectionref{sec:chapters}).

\optiondef{verbose}
Switches on or off verbose mode. Provided to assist with debugging.

\optiondef{draft}
Switches on draft mode (see \sectionref{sec:draft}).

\optiondef{final}
Switches off draft mode.

\optiondef{prohibit-frame-rotation}

If true, don't rotate \idxpl{frame}, regardless of the
\frameopt{angle} setting.

The remaining options are provided for backward-compatibility.

\optiondef{norotate}

Equivalent to setting both \optval{prohibit-frame-rotation}{true} and
\opteqvalref{thumbtab-text}{stack}.
The original version of \sty{flowfram} was released in 2005 when
there was less support for rotation, so the default was no frame
rotation and no \idx{thumbtab} text rotation. This is no longer
applicable, so this is no longer the default.

\optiondef{rotate}

If true, this option is equivalent to setting both
\optval{prohibit-frame-rotation}{false} and
\opteqvalref{thumbtab-text}{rotate-right}.
If false, this option is equivalent to \opt{norotate}.

\optiondef{ttbtitle}

Include the title in the \idxpl{thumbtab} (if enabled). This doesn't affect
whether or not the number is shown. Use the \opt{thumbtabs} option
instead.

\optiondef{ttbnotitle}

Don't include the title in the \idxpl{thumbtab} (if enabled). This doesn't affect
whether or not the number is shown. Use the \opt{thumbtabs} option
instead.

\optiondef{ttbnum}

Include the number in the \idxpl{thumbtab} (if enabled). This doesn't affect
whether or not the title is shown. Use the \opt{thumbtabs} option
instead.

\optiondef{ttbnonum}

Don't include the number in the \idxpl{thumbtab} (if enabled). This doesn't affect
whether or not the title is shown. Use the \opt{thumbtabs} option
instead.

\optiondef{color}

If true, enable colour support. Note that the \sty{color} package is
now always loaded regardless of this option but setting this value
to false will prevent the \frameopt{textcolor}, \frameopt{backcolor}
and \frameopt{bordercolor} frame options from having an effect.

\optiondef{nocolor}

Equivalent to \optval{color}{false}.


\section{Floats}
\label{sec:floats}

The standard \env{figure} and \env{table} commands will 
behave as usual in the \idxpl*{flow-frame}, but their starred versions,
\env{figure*} and \env{table*} behave no differently
from \env{figure} and \env{table}. This is because
the arbitrary layout of the \idxpl{flow-frame} makes it difficult
to determine where to put them.

If you really need floats to behave normally on a particular page,
you can temporarily restore the normal \idx{output-routine} with
\gls{FlowFramRestoreOR} (see \sectionref{sec:outputroutine}). Note
that all the defined \gls{frame} won't be used until you revert back
to \sty{flowfram}['s] \idx{output-routine} with \gls{FlowFramUnrestoreOR}.

Since floats can't go in the content of \idxpl{static-frame} or
\idxpl{dynamic-frame}, the \sty{flowfram} package provides two
environments that may be used instead. Unlike their \env{figure} and
\env{table} counterparts, they are fixed in place, and
so do not take an optional placement specifier.

\envdef{staticfigure}

Simulate a figure in a \staticordynamicframe.

\envdef{statictable}

Simulate a table in a \staticordynamicframe.

The \gls{caption} and \gls{label} commands can 
be used within \env{staticfigure} and \env{statictable} as
usual, but remember that if the frame is displayed on multiple
pages, you may end up with multiply defined labels. You may want to
consider setting the \frameopt{clear} attribute to automatically
clear the frame contents on every page.

\section{Draft Mode}
\label{sec:draft}

The \sty{flowfram} package's \opt{draft} option will draw the \idxpl{bbox} for
each \gls{frame} that has been defined.  At the bottom right of each
\idx{bbox} (except for the \idx{bbox} denoting the 
\idx{typeblock}), a marker will be shown in the form:
\code{[\meta{T}:\meta{IDN};\meta{IDL}]}, where \meta{T} is a single
letter denoting the \idx*{frame} type, \meta{IDN} is the \idx{IDN}
for the \idx*{frame} and \meta{IDL} is the \idx{IDL} for that
\idx*{frame}. Values of \meta{T} are: \optfmt{F} (\idx{flow-frame}),
\optfmt{S} (\idx{static-frame}) or \optfmt{D} (\idx{dynamic-frame}).
Markers of the form: \code{[M:\meta{IDN}]} indicate that the
\gls*{bbox} is the area taken up by the margin for \idx*{flow-frame} 
with \gls*{IDN} \meta{IDN}. 

\begin{information}
The \gls*{bbox} will not be rotated, even if a \idx*{frame} has rotation set. 
\end{information}

There are conditionals that govern what types of \idxpl{bbox} should
be shown. The \opt{draft} option sets all these conditionals to
true. You can instead selectively switch on or off the applicable
conditions instead of using \opt{draft} or in addition to using
\opt{draft}.

\cmddef{ifshowtypeblock}
Determines whether or not the \idx{bbox} for the \idx{typeblock}
should be shown.

\cmddef{showtypeblocktrue}
Show the \idx{typeblock} \gls*{bbox}.
\cmddef{showtypeblockfalse}
Don't show the \idx{typeblock} \gls*{bbox}.

\cmddef{ifshowmargins}
Determines whether or not the \idx{bbox} for the margins
should be shown.

\cmddef{showmarginstrue}
Show the margin \gls*{bbox}.
\cmddef{showmarginsfalse}
Don't show the margin \gls*{bbox}.

\cmddef{ifshowframebbox}
Determines whether or not the \idx{bbox} for the \idxpl{frame}
should be shown.

\cmddef{showframebboxtrue}
Show the \gls*{bbox} for all \idxpl{frame}.
\cmddef{showframebboxfalse}
Don't show the \gls*{bbox} for all \idxpl{frame}.

You can see the layout for the current page (irrespective of
whether or not the \opt{draft} option has been set) using
the command:
\cmddef{flowframeshowlayout}
This finishes the current page, temporarily sets draft mode, and
prints an empty page. Only the \idxpl{frame} for that page will be
shown.

\begin{information}
\gls{flowframeshowlayout} shows the frames for the page \emph{after}
the current page.
\end{information}

\section{Output Routine}\label{sec:outputroutine}

The \sty{flowfram} package modifies the \inlineidxdef{output-routine} to ensure
that all \idxpl{frame} are placed in the correct location and that
\gls{textwidth} and \gls{textheight} and related dimensions are
correctly set. In particular, it removes the page header and
footer code from their normal place to allow for the header and
footer to be placed in \idxpl{dynamic-frame} with arbitrary
dimensions and locations.

This can cause a conflict with other packages that rely on an unaltered 
\idx{output-routine} or expect \gls{textwidth} and \gls{textheight} to
reflect the one column size. For example, the \sty{geometry}
package's \optfmt{showframes} option will be confused and may draw
the outline of the \idx{typeblock} shorter or narrower that it ought
to be, which will consequently push the footer frame out of place.
Therefore, if you want to view the page layout, use
\sty{flowfram}['s] \opt{draft} option instead.

If you need to use a command or environment that requires the normal
\idx{output-routine}, you can restore it with:
\cmddef{FlowFramRestoreOR}
This will finish the current page (with \gls{finishthispage}) and
setup a normal one column page layout with \gls{textheight} set
to \gls{typeblockheight} and \gls{textwidth} set to
\gls{typeblockwidth}. The \ctr{absolutepage} counter will still be
incremented in the \code{build/page/after} hook but none of the
\idxpl{static-frame}, \idxpl{flow-frame} or \idxpl{dynamic-frame}
will appear on the page. The header and footer will be restored to
their usual location. The \env{figure*} and \env{table*}
environments and \gls{onecolumn} and \gls{twocolumn} commands 
will also be restored to normal.

You can later revert back to \sty{flowfram}['s] \idx{output-routine} with:
\cmddef{FlowFramUnrestoreOR}
This will start a new page (using \gls{clearpage}) and select the
first \idx{flow-frame} that's valid for the new page. The
\env{figure*} and \env{table*} environments will once again behave like
their unstarred counterparts. Likewise \gls{onecolumn} and
\gls{twocolumn} will return to their \env{document} environment
behaviour.

\section{Chapters}\label{sec:chapters}

If the \gls{chapter} command has been defined, the \sty{flowfram}
package will add the following commands to the
\code{cmd\slash chapter\slash before} hook:
\begin{compactcodebox}
\gls{ffprechapterhook}
\gls{thispagestyle}\marg{\gls{chapterfirstpagestyle}}
\end{compactcodebox}
Note that these two \sty{flowfram} commands won't be defined if \gls{chapter} hasn't
been defined or if \optval{adjust-pre-chapter}{false} has been used.

These hooks are largely redundant now that there are more convenient hooks
provided with the new \LaTeX\ hook management system, but they are 
retained for backward-compatibility.

\cmddef{ffprechapterhook}
Does nothing by default.

\cmddef{chapterfirstpagestyle}
Expands to the page style name to use for the first page of each
chapter.

If you want to use a different style, you will need to redefine
\gls{chapterfirstpagestyle} to the name of the relevant page style.
Note that some classes provide their own way of adjusting the style
of the first page of each chapter.

\begin{information}
These hooks are used at the start of \gls{chapter} \emph{before
\gls{clearpage} or \gls{cleardoublepage} is called}.
\end{information}

Chapter titles can be placed in a \idx{dynamic-frame}. See
\sectionref{sec:dfchaphead} for further details.

\chapter{Defining New Frames}\label{sec:newframes}

\chapdesc{This chapter describes how to define new frames, and how to 
identify and set frame contents. See also \sectionref{sec:layouts}.}

There are three types of \gls{frame}: \idxpl{flow-frame},
\idxpl{static-frame} and \idxpl{dynamic-frame}. They each have their
own set of commands to define a new \idx*{frame} and to set the 
\idx*{frame}['s] attributes. Their identifying labels (\idxpl{IDL})
and numbers (\idxpl{IDN}) are unique to each type of \idx*{frame}.
For example, the first \idx{flow-frame} to be defined will have
\idx{IDN}~1, but the first \idx{static-frame} and the first
\idx{dynamic-frame} will also have \idx{IDN}~1.

\section{Flow Frames}\label{sec:flowframes}

The \gls[format=mainfmt]{flow-frame} is the principle type of \gls{frame}.
The text of the \env{document} environment will flow from 
one \idx*{frame} to the next in order of definition. Each 
\idx*{flow-frame} has an associated width, height, 
position on the page and optionally a border.

\begin{important}
A \idx{flow-frame}['s] width and height must be greater than 0pt.
This is checked by commands like \gls{newflowframe}, which will
trigger an error for invalid dimensions but is not checked if the
width or height is later changed with commands like
\gls{setflowframe}. Not only will zero-width \idxpl{flow-frame} cause 
overfull hbox warnings but also if all defined \idxpl{flow-frame}
have zero width then the output routine may end up creating thousands of
pages that can't be filled.
\end{important}

\cmddef{newflowframe}
Defines a new \idx{flow-frame}, where \meta{width} is the width of the 
\idx*{frame}, \meta{height} is the height of the \idx*{frame}, 
(\meta{x}, \meta{y}) is the
position of the bottom left hand corner of the \idx*{frame}
relative to the bottom left hand corner of the 
\idx{typeblock}.

The starred version will add a plain border to the
\gls{frame}, which is simply a shortcut for first defining the frame
and then setting the \frameoptval{border}{plain} attribute.

\begin{information}
See \sectionref{sec:typeblockloc} if you need to calculate positions
from the page edge.
\end{information}

The first optional argument, \meta{page list}, indicates the 
list of pages for which this \idx*{frame} is defined. 
A \idx{pglist} can either be specified by the keywords: 
\optfmt{all}, \optfmt{odd}, \optfmt{even} or \optfmt{none}, or 
by a comma-separated list of either individual page numbers or 
\idxpl{pgrange}. If \meta{page list} is
omitted, \optfmt{all} is assumed.  
A \idx*{pgrange} can be a closed range (such as, \code{2-8}) or 
an open range (such as, \code{<10} or \code{>5}). 
For example: \code{<3,5,7-11,>15}
indicates pages 1, 2, 5, 7, 8, 9, 10, 11 and all pages 
greater than page 15. These page numbers refer to the integer value of
the page counter by default, so if you have a page~i and a page~1, they
will both have the same layout (unless you change the
page list setting somewhere between the two pages).

With the \optval{pages}{absolute} package option, the numbers in the
\idx{pglist} refer to the absolute page number (as given by the
\ctr{absolutepage} counter). In which case page~1
refers to the first page of the document only, regardless of whether
there is another page~1 or page~i later in the document.
 
\begin{information}
You can't use formatted numbers (such as i or I) in the \idx{pglist}
as \sty{flowfram} needs the integer values in conditional expressions.
\end{information}

Each \idx{flow-frame} has its own unique \idx{IDN}, 
corresponding to the order in which it was defined. So the first 
\idx*{flow-frame} to be defined has \gls*{IDN}~1, 
the second has \gls*{IDN}~2, and so on. This number can then
be used to identify the \idx*{flow-frame} when you want to modify its
settings. Alternatively, you can assign a unique \idx{IDL} to the 
\idx*{flow-frame} using the final optional argument \meta{label}.
If omitted, the \idx{IDL} will be the same as its \idx{IDN}.

\cmddef{getflowlabel}
Expands to the \idx{IDL} for the \idx{flow-frame} identified by its
\idx{IDN}. An error will occur if there is no \idx{flow-frame} with
the given \idx{IDN}.

There is no equivalent command that will expand to the \idx{IDN}.
Instead you need to fetch the value with:
\cmddef{getflowid}
This will define the command \meta{cmd} to expand to the \idx{IDN} of the
\idx{flow-frame} identified by its \idx{IDL}. An error will occur if
there is no \idx{flow-frame} with the given \idx{IDL}.

For example, suppose the first \idx{flow-frame} has been defined
with:
\begin{codebox}
\gls{newflowframe}\marg{0.6\gls{textwidth}}\marg{\gls{textheight}}\marg{0pt}\marg{0pt}\oarg{main}
\end{codebox}
Then later in the document:
\begin{coderesult}
The label for the first 
flow frame is 
``\gls{getflowlabel}\marg{1}''.
The flow frame labelled 
``main'' has IDN 
\gls{getflowid}\marg{\cmd{myid}}\marg{main}\cmd{myid}.
\tcblower
The label for the first flow frame is ``\getflowlabel{1}''.
The flow frame labelled ``main'' has IDN 
\getflowid{\myid}{main}\myid.
\end{coderesult}

If the document continues beyond the last
defined \idx*{flow-frame} (for example, the \idxpl*{flow-frame} have only
been defined on pages~1 to~10, but the document contains 11 
pages) then a single \idx*{flow-frame} will be defined, 
emulating one column mode for all subsequent pages.

\begin{information}
\Idx{flow-frame} attributes can be changed with \gls{setflowframe}.
See \sectionref{sec:modattr} for further details.
\end{information}

\subsection{Prematurely Ending a Flow Frame}
\label{sec:framebreak}

You can force text to move immediately to the next defined
\idx{flow-frame} using \gls{newpage} or \gls{pagebreak}. These work
in an analogous way to the way they work in standard two-column
mode.

\cmddef{framebreak}
This command is required when a paragraph spans two
\idxpl*{flow-frame} of different widths, as \TeX's output routine
does not adjust to the new value of \gls{hsize} until the last
paragraph of the previous column (\idx{flow-frame} in this case) has
ended. As a result, the end of the paragraph at the beginning of the
new \idx*{flow-frame} retains the width of the previous
\idx*{flow-frame}. The optional argument is as for \gls{pagebreak}.

The \gls{framebreak} command is similar to \gls{newpage} in that it
forces a break in the flow of the document text but, unlike
\gls{newpage}, if \gls{framebreak} is used mid-paragraph it forces
a break without given the appearance of a break in the paragraph.

\begin{warning}
The use of \gls{framebreak} can lead to unwanted excess space in the
paragraph before the break.
\end{warning}

If a paragraph spans two \idxpl*{flow-frame} of unequal width without
using \gls{framebreak} a warning will be issued. If a subtle
difference in frame widths is caused by rounding errors (for
example, if the frames were created using \idx{FlowframTk}) you can adjust
the tolerance to suppress these warnings. 

\cmddef{fftolerance}
The tolerance used when determining whether or not to warn
when moving between \idxpl{flow-frame} of different widths is given
by the length register \gls{fftolerance}. If you want to change the
tolerance, you need to change the value of this register using an
appropriate length command, such as \gls{setlength}.  For example, to suppress warnings where
the difference in width is less than 3pt, do:
\begin{codebox}
\gls{setlength}\marg{\gls{fftolerance}}\marg{3pt}
\end{codebox}

If you want to start a new page, rather than simply move to the 
next \idx*{flow-frame}, use the command \gls{clearpage}, 
or for two-sided documents, to start on the next odd page
do \gls{cleardoublepage}.

\cmddef{cleartoevenpage}
This command is like \gls{cleardoublepage} but ensures that the next page is even.

\cmddef{finishthispage}
To finish the entire page (rather than just move to the next
column), you can also use \gls{finishthispage}. This ensures that
each remaining valid \idx{flow-frame} on the current page is shipped
out with empty content.

\section{Static Frames}
\label{sec:static}

A \gls[format=mainfmt]{static-frame} is a rectangular area in which text neither
flows into nor flows out of. That is, you have to explicitly set the contents of 
this frame. A \idx{static-frame} may have non-rectangular content (see
\sectionref{sec:parshape}). 

\begin{information}
A \idx{static-frame} may appear to contain text belonging to another
frame if that other frame overlaps it. This doesn't mean that the
\idx{static-frame} contains that text.
\end{information}
  
The contents must be set explicitly, and once set, the contents 
of the \idx*{static-frame} will remain the same on each page until it is 
explicitly changed.  Thus, a \idx*{static-frame} can be used, for 
example, to make a company logo appear in the same place on every 
page. The \frameopt{clear} attribute may be set to automatically
clear the contents whenever a page is shipped out.

\cmddef{newstaticframe}
Defines a new \idx{static-frame}. The arguments are the same as for
\gls{newflowframe}: \meta{width} is the width of 
the \idx*{static-frame}, \meta{height} is the height of the \idx*{frame},
(\meta{x},\meta{y}) is the position of the bottom left hand 
corner of the \idx*{frame} relative to the bottom left hand 
corner of the \idx{typeblock}. The first optional argument,
\meta{page list}, indicates the \idx{pglist} for which this
\idx*{static-frame} should appear, and the final optional argument,
\meta{label} is a unique textual \idx{IDL} which you can use to
identify this \idx*{static-frame}.  If no label is specified, you
can refer to this \idx*{frame} by its unique \idx{IDN}.
The first \idx*{static-frame} to be defined has \gls*{IDN}~1, the second
has \gls*{IDN}~2, and so on. 

The starred version assigns a plain border to the \idx*{frame},
which is simply a shortcut for first defining the frame and then
setting the \frameoptval{border}{plain} attribute.

\cmddef{getstaticlabel}
Expands to the \idx{IDL} for the \idx{static-frame} identified by its
\idx{IDN}. An error will occur if there is no \idx{static-frame} with
the given \idx{IDN}.

There is no equivalent command that will expand to the \idx{IDN}.
Instead you need to fetch the value with:
\cmddef{getstaticid}
This will define the command \meta{cmd} to expand to the \idx{IDN} of the
\idx{static-frame} identified by its \idx{IDL}. An error will occur if
there is no \idx{static-frame} with the given \idx{IDL}.

For example:
\begin{coderesult}[before upper app=\footnotesize]
The label for the first 
static frame is 
``\gls{getstaticlabel}\marg{1}''.
The static frame labelled 
``backleft'' has IDN
\gls{getstaticid}\marg{\cmd{myid}}\marg{backleft}\cmd{myid}.
\tcblower
The label for the first static frame is ``\getstaticlabel{1}''.
The static frame labelled ``backleft'' has IDN
\getstaticid{\myid}{backleft}\myid.
\end{coderesult}

\section{Setting the Contents}\label{sec:staticcontents}

\envdef{staticcontents}
The contents of a particular \idx{static-frame} may be set within
the \env{staticcontents} environment, where the \idx{static-frame}
is identified by its \idx{IDN}.

\envdef{staticcontents*}
The starred version identifies the \idx{static-frame} by its
\idx{IDN} instead. Both environments (as from v2.0) have an optional
argument that may be used to locally set the \idx*{frame}['s]
attributes (see \sectionref{sec:modattr}).

\cmddef{setstaticcontents}
A command alternative to the above environments. The \meta{ID}
argument is the \idx{IDN} for the unstarred version and the
\idx{IDL} for the starred version. If the optional argument is
provided, this becomes a shortcut for first setting the options and
then setting the content. The definition internally uses 
\env{staticcontents} or \env{staticcontents*} as applicable.

\begin{information}
Frame attributes are global variables.
\end{information}

\emph{For advanced users:}
Unlike \idxpl{dynamic-frame}, which store their contents in a global
token list variable, \idxpl{static-frame} set their contents in a
box. A box variable, \inlineglsdef{staticframe}, is used
for temporary storage when the content is set in an \env{lrbox}
environment.

\hookdef{flowfram/staticbox/before}
The hook \hook{flowfram/staticbox/before} is used immediately before
the \gls{staticframe} box is set.

\hookdef{flowfram/staticbox/after}
The hook \hook{flowfram/staticbox/after} is used immediately before
the \gls{staticframe} box is set.

The actual box variable associated with the \idx{static-frame}
contents is then set after the \hook{flowfram/staticbox/after}
hook. Since this always occurs within the \env{staticcontents}
or \env{staticcontents*} environment (either explicitly or
implicitly via \gls{setstaticcontents}), any changes made by the
hooks will be scoped by the usual environment grouping.

\subsection{Continued Text}\label{sec:staticcontinue}

Although text can't flow into or out of a \idx{static-frame}, it's
possible to simulate this effect.

\cmddef{continueonframe}
This command may be used when either setting the contents of a
\idx{static-frame} or a \idx{dynamic-frame}. When the command is
encountered, the content that follows will be placed in the
identified \idx*{frame}. The \idx*{frame} type depends on the
context. If \gls{continueonframe} is used while setting the content
of a \idx{static-frame} then \meta{ID} refers to another
\idx{static-frame}. It will match the encapsulating command or
environment. (For \idxpl{dynamic-frame}, see
\sectionref{sec:dynamiccontinue}.)

\begin{warning}
This command forces a break in the text whilst at the same time
trying to justify it, so overly large space may occur.
\end{warning}

For example, if \gls{continueonframe} is used within the body of
\env{staticcontents} then \meta{ID} refers to the next
\idx*{static-frame}['s] \idx{IDN} (since \env{staticcontents}
references the frame by its \idx{IDN}), but if \gls{continueonframe}
is used within the body of \env{staticcontents*} then \meta{ID}
refers to the next \idx*{static-frame}['s] \idx{IDL} (since
\env{staticcontents*} references the frame by its \idx{IDL}).

This command is actually just a convenient shortcut where the
behaviour is determined by the encapsulating command or environment.
For example:
\begin{codebox}
\cbeg{staticcontents}\marg{1}
Some text\ldots{}
\gls{continueonframe}\oarg{Continued/}\marg{2}
Some more text\ldots{}
\cend{staticcontents}
\end{codebox}
This is simply a shortcut for:
\begin{codebox}
\cbeg{staticcontents}\marg{1}
Some text\ldots{}
\gls{ffcontinuedtextlayout}\marg{Continued/}
\cend{staticcontents}
\cbeg{staticcontents}\marg{2}
\gls{ffstaticpostcontinued}\marg{1}\marg{2}
Some more text\ldots{}
\cend{staticcontents}
\end{codebox}
Whereas:
\begin{codebox}
\cbeg{staticcontents*}\marg{leftframe}
Some text\ldots{}
\gls{continueonframe}\oarg{Continued/}\marg{rightframe}
Some more text\ldots{}
\cend{staticcontents*}
\end{codebox}
This is a shortcut for:
\begin{codebox}
\cbeg{staticcontents*}\marg{leftframe}
Some text\ldots{}
\gls{ffcontinuedtextlayout}\marg{Continued/}
\cend{staticcontents*}
\cbeg{staticcontents*}\marg{rightframe}
\gls{ffstaticpostcontinued}\margm{IDN1}\margm{IDN2}
Some more text\ldots{}
\cend{staticcontents*}
\end{codebox}%
where \meta{IDN1} is the \idx{IDN} of \optfmt{leftframe} and
\meta{IDN2} is the \idx{IDN} of \optfmt{rightframe}.

\begin{important}
Bear in mind that this means that \gls{continueonframe} causes a
change in scope so any local changes made before the command won't
still be in effect after it.
\end{important}

The optional argument \meta{text} specifies some continuation text to place
at the end of the first \idx*{frame}.
If \meta{text} is omitted, then (for \idxpl{static-frame}) the
default is:
\cmddef{ffdefaultstaticcontinuetext}
where \meta{IDN1} is the \idx{IDN} of the first \idx{static-frame}
and \meta{IDN2} is the \idx{IDN} of the continuation frame.
Note that these arguments are always numeric, regardless of the
encapsulating command or environment.

By default, \gls{ffdefaultstaticcontinuetext} ignores its arguments and
simply expands to:
\cmddef{ffdefaultcontinuetext}
This does nothing by default. It's also used by
\gls{ffdefaultdynamiccontinuetext} so if you do, for
example:
\begin{codebox}
\cmd{renewcommand}\marg{\gls{ffdefaultcontinuetext}}\marg{Continued/}
\end{codebox}
then this text will be used as the default for both
\idxpl{static-frame} and \idxpl{dynamic-frame}.

\begin{important}
An empty optional argument in \gls{continueonframe} is not the same
as omitting the optional argument. This has changed in version 2.0.
In earlier versions, the default value was simply empty.
\end{important}

The formatting of the supplied \meta{text} is applied by:
\cmddef{ffcontinuedtextlayout}
The default definition fills the paragraph so that the end is flush
with the right margin and then typesets the \meta{text} flush right
on the next line encapsulated with:
\cmddef{ffcontinuedtextfont}
The default definition expands to 
\code{\cmd{emph}\marg{\cmd{small} \meta{text}}}.

\begin{important}
This assumes that it should appear as though no paragraph
break occurs in the transition between the two \idxpl*{frame}. If you 
want a paragraph break you need to explicitly put one before
and after \gls{continueonframe}.
\end{important}

For example:
\begin{codebox}
\cbeg{staticcontents*}\marg{frame1}
Some text in the first frame. (Let's
assume this frame is somewhere on the
left half of the page.)
\codepar
\gls{continueonframe}\oarg{Continued on the right}\marg{frame2}
\codepar
This is some text in the second frame. (Let's
assume this frame is somewhere on the
right half of the same page.)
\cend{staticcontents*}
\end{codebox}

Alternatively, just redefine \gls{ffcontinuedtextlayout} and
\gls{ffdefaultpostcontinued}. However, there seems little point in using
\gls{continueonframe} in this case. You may just as well use two
\env{staticcontents} environments to set the contents separately.

The content of the continuation \idx{static-frame} will start with:
\cmddef{ffstaticpostcontinued}
The first argument is the \idx{IDN} of the previous frame (the frame
at the point where \gls{continueonframe} occurs).
The second argument is the \idx{IDN} of the continuation frame. 

Both arguments are always numeric irrespective of whether or not the
starred or unstarred version of \env{staticcontents} or
\gls{setstaticcontents} was used (the second argument is an integer
variable whereas the first is the actual number).

The default definition simply ignores its arguments and expands to:
\cmddef{ffdefaultpostcontinued}
This just does:
\begin{compactcodebox}
\cmd{par} \cmd{noindent} \cmd{ignorespaces}
\end{compactcodebox}%
which is what suppresses the normal paragraph indentation at the start of the
continuation frame content.

The arguments of \gls{ffstaticpostcontinued} provides a way of referencing
back to the previous frame.

\mExampleref{ex:staticcont} redefines the default definitions to
use \gls{relativeframelocation} (see \sectionref{sec:relativelocs})
but first some layout commands described in \sectionref{sec:colstyleswithframe} 
are used to create a \idx{flow-frame} with
a \idx{static-frame} above it and another \idx{flow-frame} with a
\idx{static-frame} below it.
\begin{codebox}[before upper app=\small]
\gls{onecolumnStopinarea}\marg{1in}
 \marg{0.5\gls{typeblockwidth}-10pt}\marg{\gls{typeblockheight}}
 \marg{0pt}\marg{0pt}
\gls{setstaticframe}\marg{\cmd{value}\marg{\ctr{maxstatic}}}
 \marg{\frameoptval{label}{upper},\frameoptval{border}{plain}}
\codepar
\gls{onecolumnSbottominarea}\marg{1in}
 \marg{0.5\gls{typeblockwidth}-10pt}\marg{\gls{typeblockheight}}
 \marg{0.5\gls{typeblockwidth}+10pt}\marg{0pt}
\gls{setstaticframe}\marg{\cmd{value}\marg{\ctr{maxstatic}}}
 \marg{\frameoptval{label}{lower},\frameoptval{border}{plain},\frameoptval{parindent}{1em}}
\end{codebox}
I've assigned \idxpl{IDL} to the \idxpl{static-frame}:
\optfmt{upper} for the first one and \optfmt{lower} for the second
one. I've also given both \idxpl{static-frame} a border to make them
stand out. The second (\optfmt{lower}) has also been given its own
paragraph indentation rather than using the default (given by \gls{sdfparindent}).

Now the defaults are changed:
\begin{codebox}[before upper app=\small]
\cmd{renewcommand}\marg{\gls{ffdefaultstaticcontinuetext}}\oarg{2}\marg{\comment{}
 Continued 
 \gls{relativeframelocation}\marg{static}\marg{\#2}\marg{static}\marg{\#1}\comment{} 
}
\cmd{renewcommand}\marg{\gls{ffstaticpostcontinued}}\oarg{2}\marg{\comment{} 
 \gls{ffcontinuedtextlayout}\marg{\comment{}
   Continued from 
  \gls{relativeframelocation}\marg{static}\marg{\#1}\marg{static}\marg{\#2}\comment{} 
 }\comment{}
 \gls{ffdefaultpostcontinued}
}
\end{codebox}%
and then content is added to both \idxpl{static-frame} but
\gls{continueonframe} is used to transition between the two.
The optional argument isn't present so the default will be used:
\begin{codebox}
\cbeg{\env{staticcontents*}}\marg{upper}
Some text\ldots{}
\gls{continueonframe}\marg{lower}
resuming where we left off\ldots{}
\codepar
Next paragraph.
\cend{\env{staticcontents*}}
\end{codebox}

The \styfmt{lipsum} package is used for filler text.
Note that because of the narrow columns, there are some overfull
lines.

\createresultexampleindynamicframe*
 [title={Contination Text in Static Frames},
 label={ex:staticcont},
 description={Example document with lipsum filler text spanning the
two main columns and sample text starting in an upper left frame and
continuing in a lower right frame}
]
{examples}
{%
\cmd{usepackage}\oarg{T1}\marg{fontenc}\nl
\cmd{usepackage}\marg{flowfram}\nl
\cmd{usepackage}\marg{lipsum}
\codepar
\gls{onecolumnStopinarea}\marg{1in}\marg{0.5\gls{typeblockwidth}-10pt}\marg{\gls{typeblockheight}}\marg{0pt}\marg{0pt}\nl
\gls{setstaticframe}\marg{\cmd{value}\marg{maxstatic}}\marg{\frameoptval{label}{upper},\frameoptval{border}{plain}}
\codepar
\gls{onecolumnSbottominarea}\marg{1in}\marg{0.5\gls{typeblockwidth}-10pt}\marg{\gls{typeblockheight}}\marg{0.5\gls{typeblockwidth}+10pt}\marg{0pt}\nl
\gls{setstaticframe}\marg{\cmd{value}\marg{maxstatic}}\marg{\frameoptval{label}{lower},\frameoptval{border}{plain},\frameoptval{parindent}{1em}}\nl
\codepar
\cmd{renewcommand}\marg{\gls{ffdefaultstaticcontinuetext}}\oarg{2}\marg{\commentdbsp{}
 Continued \gls{relativeframelocation}\marg{static}\marg{\#2}\marg{static}\marg{\#1}\commentnl{} 
 }\nl
\cmd{renewcommand}\marg{\gls{ffstaticpostcontinued}}\oarg{2}\marg{\comment{} 
 \gls{ffcontinuedtextlayout}\marg{\commentdbsp{}
   Continued from \gls{relativeframelocation}\marg{static}\marg{\#1}\marg{static}\marg{\#2}\comment{} 
 }\comment{}
 \gls{ffdefaultpostcontinued}\nl
 }
}
{
\cbeg{staticcontents*}\marg{upper}\nl
Some text in a static frame for \nl
illustrative purposes that needs to\nl
break off and continue later on and\nl
\gls{continueonframe}\marg{lower}\nl
resuming where we left off\nl
this is text in another static frame\nl
elsewhere on the page.
\codepar
Next paragraph.\nl
\cend{staticcontents*}
\codepar
\cmd{lipsum}\oarg{1-3}
}

\subsection{Important Notes}\label{sec:staticimportantnotes}

When you set the contents of a \idx{static-frame}, the contents are 
immediately typeset and stored in a \TeX\ \qt{box} until it is time to put
the contents on the page. This means that if you use any information 
that varies throughout the document (such as the page number) the
value that is current when you set the \idx*{static-frame}['s] contents
will be the value used.

However, if \gls{label} is used inside a \idx*{static-frame},
the label information will be written to the auxiliary file each 
time the \idx*{static-frame} is displayed until the contents of that
frame have been changed. This means that you may
end up with multiply defined labels.

\begin{information}
If you want to use cross-referencing commands, it's better to use a
\idx{dynamic-frame} instead of a \idx{static-frame}.
\end{information}

\section{Dynamic Frames}
\label{sec:dynamic}

A \gls[format=mainfmt]{dynamic-frame} is similar to a
\idx{static-frame} except that its contents
are re-typeset on each page. As with \idxpl{static-frame}, a
\idx*{dynamic-frame} may have non-rectangular content
(see \sectionref{sec:parshape}).

\begin{important}
A \idx*{static-frame} stores its contents in a \qt{box}, whereas a
\idx*{dynamic-frame} stores its contents in a token list variable.
This means that \idx{verbatim} content may be used in the body of
the \env{staticcontents} environment but not in the body of the
\env{dynamiccontents} environment (and likewise for the starred
versions).
\end{important}

The contents must be set and will remain the same until changed.
There are some special types of \idxpl{dynamic-frame} that have their content
automatically set. The \frameopt{clear} attribute may be set to automatically
clear the contents whenever a page is shipped out but this
may interfere with the special \idxpl*{dynamic-frame}.

Special frames have \inlineglsdef{idx.speciallabel} that should not be
assigned to non-special \idx*{dynamic} frames:
\speciallabel{header}, \speciallabel{footer}, 
\speciallabel{evenheader}, \speciallabel{evenfooter} (see
\sectionref{sec:dfheadfoot}), 
\speciallabel{thumbtab}, \speciallabel{thumbtabindex},
\speciallabel{eventhumbtab}, and \speciallabel{eventhumbtabindex}
(see \sectionref{sec:thumbtabs}).

\cmddef{newdynamicframe}
Defines a new \idx{dynamic-frame}. The arguments are the same as for
\gls{newflowframe}: \meta{width} is the width of 
the \idx*{dynamic-frame}, \meta{height} is the height of the \idx*{frame},
(\meta{x},\meta{y}) is the position of the bottom left hand 
corner of the \idx*{frame} relative to the bottom left hand 
corner of the \idx{typeblock}. The first optional argument,
\meta{page list}, indicates the \idx{pglist} for which this
\idx*{dynamic-frame} should appear, and the final optional argument,
\meta{label} is a unique textual \idx{IDL} which you can use to
identify this \idx*{dynamic-frame}.  If no label is specified, you
can refer to this \idx*{frame} by its unique \idx{IDN}.
The first \idx*{dynamic-frame} to be defined has \gls*{IDN}~1, the second
has \gls*{IDN}~2, and so on. 

The starred version assigns a plain border to the \idx*{frame},
which is simply a shortcut for first defining the frame and then
setting the \frameoptval{border}{plain} attribute.

\cmddef{getdynamiclabel}
Expands to the \idx{IDL} for the \idx{dynamic-frame} identified by its
\idx{IDN}. An error will occur if there is no \idx{dynamic-frame} with
the given \idx{IDN}.

There is no equivalent command that will expand to the \idx{IDN}.
Instead you need to fetch the value with:
\cmddef{getdynamicid}
This will define the command \meta{cmd} to expand to the \idx{IDN} of the
\idx{dynamic-frame} identified by its \idx{IDL}. An error will occur if
there is no \idx{dynamic-frame} with the given \idx{IDL}.

For example, if the first \idx{dynamic-frame} is defined as:
\begin{codebox}
\gls{newdynamicframe}\marg{0.38\gls{textwidth}}\marg{\gls{textheight}}\marg{0.62\gls{textwidth}}\marg{0pt}\oarg{chaphead}
\end{codebox}
then later in the document:
\begin{coderesult}[before upper app=\footnotesize]
The label for the first 
dynamic frame is 
``\gls{getdynamiclabel}\marg{1}''.
The dynamic frame labelled 
``chaphead'' has IDN
\gls{getdynamicid}\marg{\cmd{myid}}\marg{chaphead}\cmd{myid}.
\tcblower
The label for the first dynamic frame is
``\getdynamiclabel{1}''.
The dynamic frame labelled ``chaphead'' has IDN
\getdynamicid{\myid}{chaphead}\myid.
\end{coderesult}

The contents of a \idx{dynamic-frame} may be set with either a
command or an environment but, in either case, the content can't
include any \idx{verbatim} material.

\cmddef{setdynamiccontents}
Sets the contents of the \idx{dynamic-frame} identified by
\meta{ID}. This should be the \idx*{frame}['s] \idx{IDN} for the
unstarred versions and the \idx{IDL} for the starred version.
If \meta{options} is present, the given attributes will be
applied to the frame first.

\begin{information}
Frame attributes are global variables.
\end{information}

\envdef{dynamiccontents}
Sets the contents of the \idx{dynamic-frame} identified by its
\idx{IDN}. If \meta{options} is present, the given attributes will
be applied to the frame first.

\envdef{dynamiccontents*}
The starred version is the same as \env{dynamiccontents} except that
the \idx*{frame} is identified by its \idx{IDL}.

Unlike \idxpl{static-frame}, you can append content to a
\idx{dynamic-frame}.

\cmddef{appenddynamiccontents}
Appends \meta{content} to the current content of the
\idx{dynamic-frame} identified by its \idx{IDN} (unstarred version)
or by its \idx{IDL} (starred version).

\begin{information}
The \idx{dynamic-frame} content is stored in a global variable.  
It's not used until the output routine positions it on the page 
so there's no point localising any changes.
\end{information}

\subsection{Putting Chapter Titles in a Dynamic Frame}
\label{sec:dfchaphead}

If \gls{chapter} is defined, you can make the chapter heading appear
in a \idx{dynamic-frame} instead of in its usual place in the flow of
document text. There is no facility for placing other sectional types in a
\idx*{dynamic-frame}.

This feature was originally implemented with \gls{dfchaphead}
which hacked the internal commands commonly used in the definition
of \gls{chapter} but this is problematic and doesn't work with some
classes so version 2.0 provides a new approach. The old
\gls{dfchaphead} command is still available but its use is now
deprecated.

\begin{information}
The chapter heading refers to the (typically large, bold) text with the chapter number (if
applicable) and title that's normally placed at the start of a new
page. If you want thumbtabs, see \sectionref{sec:thumbtabs}.
If you want page headers and footers in a \idx{dynamic-frame}, 
see \sectionref{sec:dfheadfoot}.
\end{information}

\cmddef{ChapterInDynamic}
Places the chapter heading in the \idx{dynamic-frame}
identified by \meta{ID}, which is the frame's \idx{IDN} (unstarred)
or \idx{IDL} (starred). This command is only available if
\gls{chapter} is defined. 

\begin{important}
This causes each instance of \gls{chapter} to set
the contents of the identified \idx{dynamic-frame} which will
replace any previous content.
\end{important}

The \sty{flowfram} package redefines all the standard sectioning commands
(\gls{chapter} is only redefined if it's already defined). The
modified \gls{chapter} places the original definition in the content
of the chosen \idx{dynamic-frame}, but there are some problems with
this approach. Normally, the contents of a \idx{dynamic-frame}
aren't expanded until the output routine positions the frame on the
page, and since \idxpl{dynamic-frame} are always positioned after
\idxpl{flow-frame} this can cause counters and labels to be
out-of-sync.

To avoid this problem, \gls{ChapterInDynamic} ensures
that the chapter heading is first expanded by putting it in a box of
the same width as the \idx{dynamic-frame}, but it first needs to
locally disable problematic commands, such as \gls{clearpage}.
This means that the page break usually performed by \gls{chapter} is
now implemented with:
\cmddef{dfchapterclearpage}
This is be defined to use either \gls{clearpage} or
\gls{cleardoublepage}, depending on the standard \optfmt{openright}
setting. 
This command is only available if \gls{chapter} is defined.

There are hooks available in the event that there are other
problematic commands that may need adjusting. These hooks are only
defined if \gls{chapter} is defined.

\hookdef{flowfram/chaphead/before}
The \hook{flowfram/chaphead/before} hook is used before the heading
box is set but after the page has been cleared with
\gls{dfchapterclearpage}.

\hookdef{flowfram/chaphead/after}
The \hook{flowfram/chaphead/after} hook is used after the
\idx{dynamic-frame}['s] content has been set. For example, you can
use this hook to automatically append content to the
\idx{dynamic-frame} with \gls{appenddynamiccontents}.

\hookdef{flowfram/chaphead/box/before}
The \hook{flowfram/chaphead/box/before} hook is used inside the
heading box before the heading but after the known set of
problematic commands have been adjusted. Since this hook occurs
within a \gls{parbox}, it will be scoped.

For example, this hook can be used to change the text colour of just
the heading without affecting the colour of any content that is
subsequently added to the frame:
\begin{codebox}
\cmd{AddToHook}\marg{\hook{flowfram/chaphead/box/before}}\marg{\gls{color}\marg{blue}}
\end{codebox}

\hookdef{flowfram/chaphead/box/after}
The \hook{flowfram/chaphead/box/after} hook is used after the
heading at the end of the box. Since this hook occurs
within a \gls{parbox}, it will be scoped.

For example, \thisdoc\ defines a new \idx{dynamic-frame} called
\optfmt{chaphead} and uses it for chapter headings:
\begin{codebox}
\gls{newdynamicframe}\marg{0.38\gls{textwidth}}\marg{\gls{textheight}}\marg{0.62\gls{textwidth}}\marg{0pt}\oarg{chaphead}
\gls{setdynamicframe}*\marg{chaphead}\marg{\frameoptval{evenx}{0pt},\frameopt{clear}}
\gls{ChapterInDynamic}*\marg{chaphead}
\end{codebox}
Note that this provides a different horizontal position for even
pages (specified with \frameopt{evenx}) and the frame contents are
automatically cleared on each new page (otherwise the chapter
heading would show on every page).

The document class is \cls{scrbook} so the KOMA-Script
command that adds extra vertical space is redefined to do nothing
(since the \idx{dynamic-frame} has its own custom dimensions):
\begin{codebox}
\cmd{renewcommand}\cmd{chapterheadstartvskip}\marg{}
\end{codebox}
and the chapter heading text is changed to blue:
\begin{codebox}
\cmd{addtokomafont}\marg{chapter}\marg{\cmd{color}\marg{blue}}
\end{codebox}

A \idx{minitoc} is also added to the same frame (see
\sectionref{sec:minitocs}):
\begin{codebox}
\gls{appenddfminitoc}*\marg{chaphead}
\end{codebox}

I then defined a custom command to add a summary after the chapter
heading:
\begin{codebox}
\cmd{newcommand}\marg{\cmd{chapdesc}}\oarg{1}\marg{\comment{}
 \gls{appenddynamiccontents}*
 \marg{chaphead}\marg{\cmd{par} \cmd{normalfont} \cmd{emph}\marg{\#1}}\comment{}
}
\end{codebox}
For example, this chapter starts with:
\begin{codebox}
\gls{chapter}\marg{Defining New Frames}\gls{label}\marg{sec:newframes}
\codepar
\cmd{chapdesc}\marg{This chapter describes how to define new frames\ldots}
\end{codebox}

Modern classes, such as \cls{memoir} and the KOMA-Script classes
provide ways of adjusting the style of chapter headings. These can be
adjusted, as in the example above. However, if you are using the
standard \cls{book} or \cls{report} class, \sty{flowfram} will
adjust the definitions to make it easier to change the style.

\begin{important}
The following commands are only provided if \gls{@makechapterhead}
matches the definition provided by \cls{book} or \cls{report}.
\end{important}

\cmddef{ffchapterpreheadskip}
Vertical space before the chapter heading. The default expansion is
\code{\cmd{vspace}*\marg{50pt}} but this command is set to \csfmt{relax} in 
the \hook{flowfram/chaphead/box/before} hook as leading vertical
space is generally redundant at the start of a \idx{dynamic-frame}
that has been specifically dedicated to holding the chapter heading.

\cmddef{ffchapterpostheadskip}
Vertical space after the chapter heading. The default expansion is
\code{\cmd{vspace}*\marg{40pt}}.

\cmddef{ffchapterheadstyle}
The paragraph style for the chapter heading. The default definition
sets \gls{parindent} to zero and sets ragged right formatting.

\cmddef{ffchapterdefaultfont}
The default font declarations for the chapter heading. This can then
be overridden by the following two commands (which both have an argument,
unlike \gls{ffchapterdefaultfont}). The default definition is
\code{\cmd{normalfont} \cmd{bfseries}}.

\cmddef{ffchaptertitlefont}
The font command for the chapter title (for both numbered and
unnumbered chapters).

\cmddef{ffchapternamenumfont}
The font command for the chapter name and number (only applicable
with numbered chapters). Note that the definition should scope any
declarations otherwise they will also be applied to the chapter
title. 

\cmddef{ffchapternamenum}
Typesets the chapter name (\csfmt{chaptername} or
\csfmt{appendixname}) and number. The default definition
expands to \code{\meta{name} \meta{number}}.

\cmddef{ffchapterpostnamenum}
The separator between the chapter number and the title.
The default definition inserts a paragraph break and vertical space.

\subsection{Putting Headers and Footers in a Dynamic Frame}
\label{sec:dfheadfoot}

Page \idxpl{header} and \idxpl{footer} can be turned into \idxpl{dynamic-frame}
using:
\cmddef{makedfheaderfooter}
This command will create two \idxpl{dynamic-frame} with special
labels \speciallabelinlinedef{header} and
\speciallabelinlinedef{footer}. You can then move or resize these
using \gls{setdynamicframe} (see \sectionref{sec:modattr}).
Additionally, the page style will be set to \pstyle{ffheadings}.

\begin{information}
If you use \idx{FlowframTk} (at least v0.8.8), you can additionally
have different \headerandfooterframes\ for even pages.
These should be assigned the special labels \speciallabelinlinedef{evenheader} and
\speciallabelinlinedef{evenfooter} with the \idx{pglist} set to \qt{Even}.
The \idxpl{dynamic-frame} for odd pages should be assigned the
special labels \speciallabel{header} and \speciallabel{footer} with the \idx{pglist} set
to \qt{Odd}. This may be done via the Flow Frame Wizard 
(see the \idx{FlowframTk} documentation for further details.)
\end{information}

Below, \gls[format=main]{header-frame} and
\gls[format=main]{footer-frame} refer to the \idxpl*{dynamic-frame}
with the special labels \speciallabel{header} and
\speciallabel{footer}, but also (if applicable) to the
\speciallabel{evenheader} and \speciallabel{evenfooter} frames
created with \idx{FlowframTk}. 

\begin{important}
You can't simply create \idxpl{dynamic-frame} with \gls{newdynamicframe} with these
\idxpl{speciallabel} for this behaviour to work.
You need to use the applicable command or application function.
The frame content needs to be set to the appropriate code to ensure
that it reflects the current page style. It's important not to use
the \frameoptval{clear}{true} setting or otherwise clear the content of
these frames as this function would then be lost.
\end{important}

The \sty{flowfram} package provides page styles that are customised
for \headerandfooterframes, which are listed below.
Remember that you can set the frame style with the \frameopt{style}
setting, but you may prefer to modify the helper commands instead
(which may counteract the \frameopt{style} setting):
\cmddef{dfOddFooterStyle}
This command is used to format the footer for odd pages, where
applicable.  The default centres \meta{text} within the frame.

\cmddef{dfEvenFooterStyle}
This command is used to format the footer for even pages, where
applicable.  The default centres \meta{text} within the frame.

\cmddef{dfOddHeaderStyle}
This command is used to format the header for odd pages, where
applicable.  The default places \meta{text} flush right to the edge
of the frame.

\cmddef{dfEvenHeaderStyle}
This command is used to format the header for even pages, where
applicable.  The default places \meta{text} flush left to the edge
of the frame.

\cmddef{flowframchapterheader}
This command is only defined if \gls{chapter} is defined and picks
up the \opt{dynamic-page-style-header-font} and \opt{dynamic-header-case} settings.

\cmddef{flowframsectionheader}
The definition of this command depends on whether or not
\gls{chapter} is defined. If it isn't defined,  
the \opt{dynamic-page-style-header-font} and \opt{dynamic-header-case} settings
will apply. If \gls{chapter} is defined, 
the \opt{dynamic-page-style-subheader-font} and \opt{dynamic-subheader-case} settings
will apply.

\cmddef{flowframheadersep}
The separator used between the chapter or section number and the
title (where a number is shown). If \gls{chapter} is defined, this
is initialised to \code{.\visiblespace} (period followed by a space)
otherwise it is initialised to \csfmt{quad}.

\cmddef{flowframheaderchapprefix}
The prefix inserted before the chapter number. If \gls{chapter} is
defined, the initial definition is \code{\cmd{@chapapp\visiblespace}}
(\csfmt{chaptername} or \csfmt{appendixname} followed by a space)
otherwise the initial definition is empty.

\pagestyledef{ffempty}
The default behaviour of the \pstyle{ffempty} page style clears the
standard header and footer commands (\gls{@oddhead}, \gls{@evenhead},
\gls{@oddfoot} and \gls{@evenfoot}), as per the \pstyle{empty} style, but
also hides the special \headerandfooterframes. This action may
be changed with the \opt{dynamic-empty-page-style} setting.

For example, suppose you have created fancy \headerandfooterframes\
with a background and border. It may look strange to have these
frames showing with empty content, so the default setting hides them
as well. However, if you still want the frames to show, then you
would need to change the \opt{dynamic-empty-page-style} option to a
setting that doesn't hide them, such as 
\opteqvalref{dynamic-empty-page-style}{empty}. 

\pagestyledef{ffplain}
The default behaviour of the \pstyle{ffplain} style is to have an
empty header with \thectr{page} centred in the footer. More
precisely, this style sets \gls{@oddfoot} to:
\begin{compactcodebox}
\gls{dfOddFooterStyle}\marg{\thectr{page}} 
\end{compactcodebox}
and sets \gls{@evenfoot} to:
\begin{compactcodebox}
\gls{dfEvenFooterStyle}\marg{\thectr{page}} 
\end{compactcodebox}
Both \gls{@oddhead} and \gls{@evenhead} are set to empty.
Additionally, if \pstyle{ffempty} is set to hide the special
\headerandfooterframes, the \pstyle{ffplain} style will ensure that 
\frameopt{hide} and \frameopt{hidethis} are set to \optfmt{false}
to counteract any previous instance of \pstyle{ffempty}.

\begin{information}
The \pstyle{ffheadings} and \pstyle{ffmyheadings} don't replicate
the style of the standard \pstyle{headings} and \pstyle{myheadings}
styles. Instead, the page number is always placed in the \idx{footer-frame}.
If you want standard page headers and footers, there's no point switching
to dynamic \headerandfooterframes. Any minor stylist changes can be
made using packages or document classes that provide support for
flexible page styles.
\end{information}

\pagestyledef{ffheadings}
The default behaviour of the \pstyle{ffheadings} style depends
on whether or not \gls{chapter} is defined. Note that the page
number is still placed in the \idx{footer-frame}, as per the 
\pstyle{ffplain} style. The right and left marks are placed in the
applicable \idx{header-frame}.

This style sets \gls{@oddfoot} to
\begin{compactcodebox*}
\gls{dfOddFooterStyle}\marg{\thectr{page}} 
\end{compactcodebox*}
\gls{@evenfoot} to:
\begin{compactcodebox*}
\gls{dfEvenFooterStyle}\marg{\thectr{page}} 
\end{compactcodebox*}
\gls{@oddhead} to:
\begin{compactcodebox*}
\gls{dfOddHeaderStyle}\marg{\gls{rightmark}} 
\end{compactcodebox*}
and \gls{@evenhead} to:
\begin{compactcodebox*}
\gls{dfOddHeaderStyle}\marg{\gls{leftmark}} 
\end{compactcodebox*}

If \gls{chapter} is defined, \gls{chaptermark} is redefined to
encapsulate the mark with \gls{flowframchapterheader} and
\gls{sectionmark} is redefined to encapsulate the mark with
\gls{flowframsectionheader}.

If \gls{chapter} is not defined, \gls{sectionmark} is redefined to
encapsulate the mark with \gls{flowframsectionheader} and
\gls{subsectionmark} is redefined to encapsulate the mark with
\gls{flowframsubsectionheader}.

In either case, if \pstyle{ffempty} is set to hide the special
\headerandfooterframes, the \pstyle{ffheadings} style will ensure that 
\frameopt{hide} and \frameopt{hidethis} are set to \optfmt{false}
to counteract any previous instance of \pstyle{ffempty}.

\pagestyledef{ffmyheadings}
The \pstyle{ffmyheadings} style is similar to the
\pstyle{ffheadings} style except that it sets the applicable mark
commands to discard their argument. So, if \gls{chapter} is defined
the \gls{chaptermark} and \gls{sectionmark} will be redefined to do
nothing, otherwise \gls{sectionmark} and \gls{subsectionmark} will
be redefined to do nothing.

\begin{information}
If the \opteqvalref{dynamic-page-style}{adjust} setting is on,
\gls{makedfheaderfooter} will redefine the standard page styles
(\pstyle{empty}, \pstyle{plain}, \pstyle{headings} and
\pstyle{myheadings}) to the analogous \pstyle{ffempty},
\pstyle{ffplain}, \pstyle{ffheadings} or \pstyle{ffmyheadings} style.
\end{information}

\subsection{Continued Text}\label{sec:dynamiccontinue}

As with \idxpl{static-frame}, in the body of \env{dynamiccontents}
or \env{dynamiccontents*} or within the text of \gls{setdynamiccontents}, 
you can move onto another \idx*{dynamic-frame} using:
\begin{compactcodebox*}
\gls[format=main]{continueonframe}\syntax{continueonframe}
\end{compactcodebox*}%
to simulate text flowing from one \idx{dynamic-frame} to another.
This command must not be hidden inside the definition of another
command.

\begin{warning}
The \gls{continueonframe} command forces a break in the text whilst at the same time
trying to justify it, so overly large space may occur.
\end{warning}

In this case, if \gls{continueonframe} occurs within
\env{dynamiccontents*}, \meta{ID} refers to the \gls*{IDL} of the
other \idx{dynamic-frame}, otherwise it refers to the \gls*{IDN} of
the other \idx{dynamic-frame}. It's not possible to continue onto a
different type of frame.

For example, suppose I have defined two \idxpl*{dynamic-frame} labelled 
\optfmt{frame1} (IDN~1) and \optfmt{frame2} (IDN~2), then:
\begin{codebox}
\cbeg{\env{dynamiccontents*}}\marg{frame1}
Some text in the first frame. (Let's
assume this frame is somewhere on the
left half of the page.)
\gls{continueonframe}\oarg{Continued on the right}\marg{frame2}
This is some text in the second frame. (Let's
assume this frame is somewhere on the
right half of the same page.)
\cend{\env{dynamiccontents*}}
\end{codebox}
is essentially the same as:
\begin{compactcodebox}
\cbeg{\env{dynamiccontents*}}\marg{frame1}
Some text in the first frame. (Let's
assume this frame is somewhere on the
left half of the page.)
\gls{ffcontinuedtextlayout}\marg{Continued on the right}
\cend{\env{dynamiccontents*}}
\cbeg{\env{dynamiccontents*}}\marg{frame2}
\gls{ffdynamicpostcontinued}\marg{1}\marg{2}
This is some text in the second frame. (Let's
assume this frame is somewhere on the
right half of the same page.)
\cend{\env{dynamiccontents*}}
\end{compactcodebox}

When \gls{continueonframe} is used with \idxpl{dynamic-frame} it has
analogous commands to those used with \idxpl{static-frame}.
If the optional \meta{text} is omitted, the default is obtained
with:
\cmddef{ffdefaultdynamiccontinuetext}
This is like \gls{ffdefaultstaticcontinuetext} where the first argument is
the \idx{IDN} of the previous \idx{dynamic-frame} and the second
argument is the \idx{IDN} of the continuation \idx{dynamic-frame}.
The default definition ignores its arguments and simply expands to
\gls{ffdefaultcontinuetext}.

\cmddef{ffdynamicpostcontinued}
This is like \gls{ffstaticpostcontinued} where the first argument is
the \idx{IDN} of the previous \idx{dynamic-frame} and the second
argument is the \idx{IDN} of the continuation \idx{dynamic-frame}.
The default definition ignores its arguments and simply expands to
\gls{ffdefaultpostcontinued}.

\subsection{Important Notes}\label{sec:dynamicimportantnotes}

\begin{itemize}
\item \Idx{verbatim} text can't be used in a 
\idx{dynamic-frame}. This includes
the body of the \env{dynamiccontents} and \env{dynamiccontents*} 
environments.

\item \gls{continueonframe} can't be used in the
argument of any of the commands that append to the contents of a 
\idx*{dynamic-frame}, such as \gls{appenddynamiccontents}.

\item \gls{continueonframe} causes a change in scope so any local
changes made before the command won't still be in effect after it.

\item \Glspl*{dynamic-frame} are painted on the page after all the
static and flow \idxpl{frame}. If the location of a \idx*{dynamic-frame} 
overlaps the location of any static or flow frames, the contents
of the \idx*{dynamic-frame} will obscure the contents of the overlapping
frames.
\end{itemize}

\chapter{Modifying Frame Attributes}
\label{sec:modattr}

\chapdesc{This chapter describes how to modify frame attributes,
such as the size and location.}

Once you have defined the \idxpl+{flow-frame}, \idxpl+{static-frame} and
\idxpl+{dynamic-frame}, their attributes can be changed. The three types of
\idx+{frame} mostly have the same set of attributes, but some are
specific to a certain type.

\begin{important}
Attributes are global. Changes usually come into effect during the
\idx{output-routine}. Dimension and text colour are best set in the
preamble, especially for \idxpl{flow-frame} and \idxpl{static-frame}.
\end{important}

\Idxpl{flow-frame} attributes are modified using:
\cmddef{setflowframe}
Alternatively, you can set the same attributes for all
defined \idxpl{flow-frame} with:
\cmddef{setallflowframes}

\Idxpl{static-frame} attributes are modified using:
\cmddef{setstaticframe}
Alternatively, you can set the same attributes for all
defined \idxpl{static-frame} with:
\cmddef{setallstaticframes}

\Idxpl{dynamic-frame} attributes are modified using:
\cmddef{setdynamicframe}
Alternatively, you can set the same attributes for all
defined \idxpl{dynamic-frame} with:
\cmddef{setalldynamicframes}

In each of the above \gls{set...frame} commands, if the starred 
version is used then \meta{ID-list} should be a comma-separated list
of \idxpl{IDL} that identify the frames for which the attributes
need to be applied. Note that you can't use ranges or the keywords
described below with the starred versions.

In the case of the unstarred version the
\meta{ID-list} can either be a list or range of \idxpl{IDN} that
identify the required frames or one of the
keywords \optfmt{all}, \optfmt{odd} or \optfmt{even}.
The \optfmt{all} keyword is essentially equivalent to using the
corresponding \csmetafmt{setall}{type}{frames}. The \optfmt{odd}
keyword indicates that all frames with an odd \idx{IDN} should be
set. The \optfmt{even} keyword indicates that all frames with an
even \idx{IDN} should be set.

\begin{important}
The \optfmt{all}, \optfmt{odd} and \optfmt{even} keywords
used to identify frames should not be confused with the
\optfmt{all}, \optfmt{odd} and \optfmt{even} \idx{pglist} keywords.
\end{important}

The \keyvallist\ argument is a comma-separated list of \keyval\
settings. \strong{Make sure that you group the \meta{value} if it
contains one or more commas or equal signs.} Available options are
listed in \sectionref{sec:setframeopts}.

\section{Set Frame Options}\label{sec:setframeopts}

Some attributes are shared by all types of frame but some are only
available for a particular type of frame.

\subsection{Identification and Scope}\label{sec:label+pagelist}

\frameoptiondef{label}

The frame's \idx{IDL} can be assigned with the \frameopt{label}
option. This may be needed when a \gls{frame} is created by a helper
command, such as \gls{Ncolumn} (see \sectionref{sec:layouts}).
In general, it's best to set the \idx{IDL} when the frame is defined.
(If you do not specify a label when you first define a \idx*{frame} 
it will be given a label identical to its \gls*{IDN}.)

\frameoptiondef{pages}

The frame's \idx{pglist} is set when the frame is defined. The
default is \optfmt{all}. The \frameopt{pages}
option may be used to change the \idx{pglist}.
The value may be either \meta{page-list} or \meta{keyword}.

\begin{warning}
Changing the \idx{pglist} mid-document can cause unpredictable
results. You may lose text if the frame has already had content
added to it on the current page. See \sectionref{sec:switch}
for switching frames on and off mid-document.
\end{warning}

Allowed values for \meta{keyword}:
\begin{deflist}
\itemtitle{\optfmt{none}}
\begin{itemdesc}
The frame should not be displayed on any page.
\end{itemdesc}
\itemtitle{\optfmt{all}}
\begin{itemdesc}
The frame should be displayed on all pages, unless exceptions apply.
\end{itemdesc}
\itemtitle{\optfmt{even}}
\begin{itemdesc}
The frame should only be displayed on even pages if the document is
two-sided, unless exceptions apply.
\end{itemdesc}
\itemtitle{\optfmt{odd}}
\begin{itemdesc}
The frame should only be displayed on odd pages if the document is
two-sided, unless exceptions apply.
\end{itemdesc}
\end{deflist}

Otherwise the value should be \meta{page-list},
a list or range of numbers identifying on which page or pages the
frame should be shown.
Ranges may be closed, such as \optfmt{3-9} (which indicates pages~3
to~9 inclusive), or open-ended, such as \optfmt{<3} (which indicates
any page less than 3) or \optfmt{>9} (which indicates any page
greater than 9). The \meta{page-list} may be a single range or a
comma-separated list of individual pages or ranges, such as
\optfmt{<3,5-12,>20}.

\begin{important}
Each number in the list must be a plain positive integer (1, 2, etc) not a formatted number.
\end{important}

The \idx{pglist} may also be set using:
\cmddef{flowsetpagelist}
This sets the \idx{pglist} for a specific \idx{flow-frame}
identified by its \idx{IDN}.
\cmddef{staticsetpagelist}
This sets the \idx{pglist} for a specific \idx{static-frame}
identified by its \idx{IDN}.
\cmddef{dynamicsetpagelist}
This sets the \idx{pglist} for a specific \idx{dynamic-frame}
identified by its \idx{IDN}.

\begin{important}
There are no starred versions for the 
\csmetafmt{}{type}{setpagelist} commands and \meta{IDN} must be a
number that identifies a specific frame.
\end{important}

The numbers refer to the counter identified by the \opt{pages}
package option. With \opteqvalref{pages}{relative}, the numbers
refer to the value of the \ctr{page} counter (not the formatted text
obtained with \thectr{page}).  This can be ambiguous if the
\ctr{page} counter is reset in the document. With
\opteqvalref{pages}{absolute}, the numbers refer to the value of the
\ctr{absolutepage} counter, which should not be reset in the
document and is incremented by the \idx{output-routine} whenever a page is
shipped out.

\begin{warning}
With \opteqvalref{pages}{relative}, not only can you have multiple
pages with the same numeric value (for example, page~i and page~ii)
but there's also no way of determining whether or not the next page
will have the number reset. When the \sty{flowfram} code in the
\idx{output-routine} looks ahead to determine which \idx{flow-frame} it
needs to switch to, it will assume that the value of the next page
is one more than the value of the current page. For example, if the
current page is \qt{iv} (4) then the next page is assumed to have the
value 5 and \sty{flowfram} will select the next \idx{flow-frame} on that basis.
If it turns out that the \ctr{page} counter is then reset so that
\thectr{page} is now 1, if that's outside the range of the selected
\idx{flow-frame} then you may lose text.
\end{warning}

\frameoptiondef{excludepages}

Certain pages can be excluded from a frame's \idx{pglist}. For
example, if a frame's \idx{pglist} is set to \optfmt{all}
but it has \frameoptvalm{excludepages}{2,9} then the frame will be
shown on all pages except for page~2 and page~9. Note that in this
case the value is just a list of numbers.
See also \sectionref{sec:switch} for switching frames on and off
mid-document.

It's also possible to set the exclusion list the following commands:
\cmddef*{flowsetexclusion}
Sets the exclusion list for a \idx{flow-frame}.
\cmddef*{flowaddexclusion}
Appends to the existing exclusion list for a \idx{flow-frame}.

\cmddef*{staticsetexclusion}
Sets the exclusion list for a \idx{static-frame}.
\cmddef*{staticaddexclusion}
Appends to the existing exclusion list for a \idx{static-frame}.

\cmddef*{dynamicsetexclusion}
Sets the exclusion list for a \idx{dynamic-frame}.
\cmddef*{dynamicaddexclusion}
Appends to the existing exclusion list for a \idx{dynamic-frame}.

\begin{important}
There are no starred versions for these commands and
the \meta{IDN} argument should be a single number.
\end{important}

\frameoptiondef{hide}

A frame can also be omitted if the boolean \frameopt{hide} option is set.
If true, this overrides the \idx{pglist} and omits the frame for all
pages.

\frameoptiondef{hidethis}

A frame can also be omitted if the boolean \frameopt{hidethis} option is set.
If true, this overrides the \idx{pglist} and omits the frame for
this pages. The value will be reset when the current page is shipped
out.

\subsection{Content Attributes}\label{sec:contentattr}

\frameoptiondef{clear}

This boolean option is only available for \idx+{static-frame}
and \idx+{dynamic-frame}. If true, the frame contents will be cleared
on each new page.

\begin{warning}
If you set \frameoptval{clear}{true} for a special
\idx{dynamic-frame}, such as \speciallabel{header} or
\speciallabel{footer}, they will lose their special function.
\end{warning}

In \thisdoc, I have used \gls{ChapterInDynamic} to put the chapter
titles in a \idx{dynamic-frame} called \optfmt{chaphead}. This isn't
a special frame, but the contents are reset every time \gls{chapter}
is used. I've also used \gls{appenddfminitoc} which then appends the
chapter's \idx{minitoc} to that frame. And finally, I have a custom
command that appends a brief summary. For example, this chapter is
started with:
\begin{codebox}
\gls{chapter}\marg{Modifying Frame Attributes}\gls{label}\marg{sec:modattr}
\cmd{chapdesc}\marg{This chapter describes how to modify frame attributes,
such as the size and location.}
\end{codebox}
However, I only want this content visible on the first page of the
chapter, so I've set the \frameopt{clear} option for the
\optfmt{chaphead} frame. This ensures that the content is cleared
whenever a new page starts.

I've also used \gls{makedfheaderfooter} and
\gls{makethumbtabs}. This automatically defines a set of special
\idxpl{dynamic-frame}. In this case, the \frameopt{clear} option
should not be set as clearing the content will remove the code that
ensures the header, footer and thumbtab show the correct
information.

\frameoptiondef{parindent}

This option is only available for \idxpl{static-frame} and \idxpl{dynamic-frame}. The value
should be a dimension (either explicit, such as \code{5pt}, or a
variable, such as \gls{sdfparindent}, or an expression, such as
\code{1em + 0.1\gls{linewidth}}). The default is \gls{sdfparindent}.

The dimension won't be evaluated until the contents of the frame are
typeset. For \idxpl{static-frame} this is when the frame content is
set, and for \idxpl{dynamic-frame} this is every time the frame is
placed on the page by the \idx{output-routine}.

\frameoptiondef{style}

This option is only available for \idxpl+{dynamic-frame}. The value
may be the keyword \optfmt{none} (equivalent to \optfmt{@firstofone}) 
or the name of a declaration or a text-block command (without the leading backslash).

For example:
\begin{codebox}
\gls{setdynamicframe}\marg{1}\marg{\frameoptvalm{style}{emph}}
\end{codebox}
The above will encapsulate the contents of the \idx{dynamic-frame}
identified by \idx{IDN}~1 with \csfmt{emph}.

Bear in mind that text-block commands such as \csfmt{emph} and
\csfmt{textbf} introduce grouping which may result in subtle spacing
issues. If this is a problem, try using the analogous declaration
instead. For example:
\begin{codebox}
\gls{setdynamicframe}\marg{1}\marg{\frameoptvalm{style}{em}}
\end{codebox}
The frame content is already scoped and no extra grouping is
introduced with this method for standard rectangular frames.
(Extra grouping is added for shaped frames.)

\Exampleref{ex:twocolumnsidepanel} provided a custom command:
\begin{codebox}
\cmd{newcommand}\marg{\cmd{Hugebf}}\marg{\cmd{Huge}\cmd{bfseries}}
\end{codebox}
and the \optfmt{sidepanel} \idx{dynamic-frame} had
\frameoptval{style}{Hugebf} set. This command could have been
defined as:
\begin{codebox}
\cmd{newcommand}\marg{\cmd{Hugebf}}\oarg{1}\marg{\cmd{textbf}\marg{\cmd{Huge} \#1}}
\end{codebox}
but if you try this out you would find that the interline spacing
is much smaller. This is because the paragraph doesn't end until after the
styling command so the line skip for \csfmt{Huge} is wrong. The text
is Huge but the line spacing is normal size.

\begin{information}
The \idx{FlowframTk} dialog windows used to specify \gls{frame}
attributes are different: the \qt{Style} field
should be left blank for no styling or may be a command name like
\code{emph} (as for \frameopt{style}) but may also be a list of
declarations (with optionally a final text-block command). 
When \idx{FlowframTk} exports the information, if the \qt{Style}
field contains one or more backslashes it will use
commands provided by \sty{flowframtkutils} to define a custom
command that can then be used in the \frameopt{style} option.
\end{information}

If you are not using \idx{FlowframTk} and you need more than one
command to apply the style then you will need to define your own
custom command and use that instead (as in \exampleref{ex:twocolumnsidepanel}).

\frameoptiondef{shape}

This key is only available for \idxpl+{static-frame} and
\idxpl+{dynamic-frame} and sets the paragraph shape for the frame
contents. See \sectionref{sec:parshape} for further details.

\frameoptiondef{valign}

This key is only available for \idxpl{static-frame} and
\idxpl{dynamic-frame} and sets the vertical alignment of the content
within the frame. The default is \optfmt{c} for \idxpl+{static-frame}
and \optfmt{t} for \idxpl+{dynamic-frame}.

\subsection{Layout Attributes}\label{sec:layoutattr}

\frameoptiondef{margin}

This option is only available for \idxpl{flow-frame} and indicates
on which side of the \idx{flow-frame} the margin should be placed.
The value may be one of the keywords: \optfmt{inner},
\optfmt{outer}, \optfmt{left} or \optfmt{right}.

For two-sided documents, \optfmt{inner} places the margin on the
left for odd pages and on the right for even pages, and
\optfmt{outer} places the margin on the right for odd pages and on
the left for even pages.

For one-sided documents, \optfmt{inner} is the same as \optfmt{left}
(place to the left of the frame) and \optfmt{outer} is the same as
\optfmt{right} (place to the right of the frame).


\frameoptiondef{offset}

Sets the \gls{frame}['s] offset to take the border into account.
The value may be a dimension or the keyword \optfmt{compute}, which
will compute the offset if the frame has a known border (\gls{fbox},
\gls{ovalbox}, \gls{Ovalbox} and \gls{doublebox}). If the border is
unknown then the offset for \gls{fbox} will be used.

If the frame has a border set and it takes up extra space (caused by
the padding between the border and the text and the size of the
frame) then this attribute needs to be set to shift the frame so
that the bottom left corner of the text area within the frame is at
the designated $x$ and $y$-coordinates.

\begin{information}
This setting is not required with \idx{FlowframTk} as it calculates
the offset based on the supplied inner padding.
\end{information}

\frameoptiondef{width}

Set the width of the frame to the given \meta{dimension}. This is
available for all types of frame but be careful not to change this value
after any content has been added to the frame.

The width can be obtained for a \idx{flow-frame} with:
\cmddef*{flowframewidth}
where \meta{IDN} is the \idx{flow-frame}['s] \idx{IDN}.
The width can be obtained for a \idx{static-frame} with:
\cmddef*{staticframewidth}
where \meta{IDN} is the \idx{static-frame}['s] \idx{IDN}.
The width can be obtained for a \idx{dynamic-frame} with:
\cmddef*{dynamicframewidth}
where \meta{IDN} is the \idx{dynamic-frame}['s] \idx{IDN}.
In each case, the command simply expands to the dimension.

\frameoptiondef{height}

Set the height of the \gls{frame} to the given \meta{dimension}. This is
available for all types of \gls{frame} but be careful not to change this value
after any content has been added to the \gls{frame}.

The height can be obtained for a \idx{flow-frame} with:
\cmddef*{flowframeheight}
where \meta{IDN} is the \idx{flow-frame}['s] \idx{IDN}.
The height can be obtained for a \idx{static-frame} with:
\cmddef*{staticframeheight}
where \meta{IDN} is the \idx{static-frame}['s] \idx{IDN}.
The height can be obtained for a \idx{dynamic-frame} with:
\cmddef*{dynamicframeheight}
where \meta{IDN} is the \idx{dynamic-frame}['s] \idx{IDN}.
In each case, the command simply expands to the dimension.

\frameoptiondef{x}

Set the $x$-coordinate of the \gls{frame} for all pages on which it's
defined. This is available for all types of \gls{frame}.
Note that \frameoptval{x}{\meta{position}} is equivalent to setting
both \frameoptval{oddx}{\meta{position}} and
\frameoptval{evenx}{\meta{position}}.

\frameoptiondef{y}

Set the $y$-coordinate of the \gls{frame} for all pages on which it's
defined. This is available for all types of \gls{frame}.
Note that \frameoptval{y}{\meta{position}} is equivalent to setting
both \frameoptval{oddy}{\meta{position}} and
\frameoptval{eveny}{\meta{position}}.

\frameoptiondef{evenx}

Set the \gls{frame}'s $x$-coordinate for all even pages on which it's
defined (only applicable if the document is two-sided).
For example:
\begin{codebox}
\gls{setflowframe}*\marg{main}\marg{\frameoptvalm{evenx}{0.4\gls{typeblockwidth}}}
\gls{setdynamicframe}*\marg{chaphead}\marg{\frameoptval{evenx}{0pt}}
\end{codebox}
This changes the horizontal position of the \idx*{flow-frame} labelled
\optfmt{main} and the \idx*{dynamic-frame} labelled \optfmt{chaphead} 
on even pages (provided the document has the two-sided setting on).

The even-page $x$-coordinate can be obtained for a \idx{flow-frame} with:
\cmddef*{flowframeevenx}
where \meta{IDN} is the \idx{flow-frame}['s] \idx{IDN}.
The even-page $x$-coordinate can be obtained for a \idx{static-frame} with:
\cmddef*{staticframeevenx}
where \meta{IDN} is the \idx{static-frame}['s] \idx{IDN}.
The even-page $x$-coordinate can be obtained for a \idx{dynamic-frame} with:
\cmddef*{dynamicframeevenx}
where \meta{IDN} is the \idx{dynamic-frame}['s] \idx{IDN}.
In each case, the command simply expands to the dimension.

\frameoptiondef{eveny}

Set the \gls{frame}'s $y$-coordinate for all even pages on which it's
defined (only applicable if the document is two-sided).

The even-page $y$ co-ordinate can be obtained for a \idx{flow-frame} with:
\cmddef*{flowframeeveny}
where \meta{IDN} is the \idx{flow-frame}['s] \idx{IDN}.
The even-page $y$ co-ordinate can be obtained for a \idx{static-frame} with:
\cmddef*{staticframeeveny}
where \meta{IDN} is the \idx{static-frame}['s] \idx{IDN}.
The even-page $y$ co-ordinate can be obtained for a \idx{dynamic-frame} with:
\cmddef*{dynamicframeeveny}
where \meta{IDN} is the \idx{dynamic-frame}['s] \idx{IDN}.
In each case, the command simply expands to the dimension.

\frameoptiondef{oddx}

Set the \gls{frame}'s $x$-coordinate for all odd pages (or all pages
for one-sided documents) on which it's defined.

The odd-page $x$-coordinate can be obtained for a \idx{flow-frame} with:
\cmddef*{flowframex}
where \meta{IDN} is the \idx{flow-frame}['s] \idx{IDN}.
The odd-page $x$-coordinate can be obtained for a \idx{static-frame} with:
\cmddef*{staticframex}
where \meta{IDN} is the \idx{static-frame}['s] \idx{IDN}.
The odd-page $x$-coordinate can be obtained for a \idx{dynamic-frame} with:
\cmddef*{dynamicframex}
where \meta{IDN} is the \idx{dynamic-frame}['s] \idx{IDN}.
In each case, the command simply expands to the dimension.

\frameoptiondef{oddy}

Set the \gls{frame}'s $y$-coordinate for all odd pages (or all pages
for one-sided documents) on which it's defined.

The odd-page $y$-coordinate can be obtained for a \idx{flow-frame} with:
\cmddef*{flowframey}
where \meta{IDN} is the \idx{flow-frame}['s] \idx{IDN}.
The odd-page $y$-coordinate can be obtained for a \idx{static-frame} with:
\cmddef*{staticframey}
where \meta{IDN} is the \idx{static-frame}['s] \idx{IDN}.
The odd-page $y$-coordinate can be obtained for a \idx{dynamic-frame} with:
\cmddef*{dynamicframey}
where \meta{IDN} is the \idx{dynamic-frame}['s] \idx{IDN}.
In each case, the command simply expands to the dimension.

There are also commands available to swap the odd and even
co-ordinates:
\cmddef*{ffswapoddeven}
This swaps the odd and even co-ordinates for each \idx{flow-frame} in
\meta{ID-list}. (The \meta{ID-list} is as for \gls{setflowframe}.)

\cmddef*{sfswapoddeven}
This swaps the odd and even co-ordinates for each \idx{static-frame} in
\meta{ID-list}. (The \meta{ID-list} is as for \gls{setstaticframe}.)

\cmddef*{dfswapoddeven}
This swaps the odd and even co-ordinates for each \idx{dynamic-frame} in
\meta{ID-list}. (The \meta{ID-list} is as for \gls{setdynamicframe}.)

\subsection{Appearance}\label{sec:appearanceattr}

\frameoptiondef{angle}

Rotates the frame by \meta{angle} degrees. Note the \idxpl{bbox} are
not rotated in draft mode.

\frameoptiondef{border}

Sets the frame's border. The \meta{value} may be the keyword
\optfmt{plain} (use a plain border, equivalent to
\frameoptval{border}{fbox}), \optfmt{false} (no border) or
may be the control sequence name (without the leading backslash) of
a \idx{fcmd}. If you set a border for a frame, you may also need to 
specify the \frameopt{offset} if the default computation is
incorrect. The rule width for the plain border is governed by
\gls{flowframerule} (see \sectionref{sec:lengths}).

The \sty{fancybox} package provides the commands \gls{shadowbox},
\gls{doublebox}, \gls{ovalbox} and \gls{Ovalbox}, which may all be
used as a border. For example, \frameoptval{border}{ovalbox}.
Remember to load the \sty{fancybox} package if you want to use any
of these commands as a border.

For example, to make the first \idx*{static-frame} have an oval border:
\begin{codebox}
\gls{setstaticframe}\marg{1}\marg{\frameoptval{border}{ovalbox}}
\end{codebox}
Or you can define your own border, for example with \gls{fcolorbox}:
\begin{codebox}
\cmd{newcommand}\marg{\cmd{greenyellowbox}}\oarg{1}\marg{\gls{fcolorbox}\marg{green}\marg{yellow}\marg{\#1}}
\gls{setstaticframe}\marg{1}\marg{\frameoptval{border}{greenyellowbox}}
\end{codebox}
In this case, the border incorporates colour so the
\frameopt{bordercolor} and \frameopt{backcolor} settings should be
\optfmt{none}.

\begin{information}
If you use \idx{FlowframTk} to create the frames, remember to set
the \qt{border as shown} option if you want the shape to be the
border. \idx{FlowframTk} will define the border command and 
deal with the offset, border colour, text colour and background
colour.
\end{information}

\frameoptiondef{bordercolor}
Sets the colour of the border. The value may be the keyword
\optfmt{none} (no colour change) or the colour specifications as
suitable for \gls{color}.

\begin{information}
This option will have no effect with borders created by
\idx{FlowframTk} as the colour specifications will be included in
the custom border command.
\end{information}

\frameoptiondef{border-color}

Synonym for \frameopt{bordercolor}.

\frameoptiondef{bordercolour}

Synonym for \frameopt{bordercolor}.

\frameoptiondef{border-colour}

Synonym for \frameopt{bordercolor}.

\frameoptiondef{backcolor}
Sets the colour of the frame's background. The value may be the keyword
\optfmt{none} (no colour change) or the colour specifications as
suitable for \gls{color}.

\begin{information}
If you are using \idx{FlowframTk}, set the shape's fill colour
instead of using this option or you may end up with blank areas in
the border padding.
\end{information}

\frameoptiondef{back-color}

Synonym for \frameopt{backcolor}.

\frameoptiondef{backcolour}

Synonym for \frameopt{backcolor}.

\frameoptiondef{back-colour}

Synonym for \frameopt{backcolor}.

\frameoptiondef{textcolor}
Sets the colour of the frame's text. The value may be the keyword
\optfmt{none} (no colour change) or the colour specifications as
suitable for \gls{color}.

\begin{important}
It's best to keep to the default document colour for all \idxpl{flow-frame}
otherwise inconsistencies can occur when paragraphs span across
frames and also the footnotes will now be in the document colour.
(This has changed in v2.0 as it requires too much meddling with the
\idx{output-routine} to alter the footnote colour.)
The default document colour can be set by using
\code{\gls{color}\oargm{color-space}\margm{colour-specs}} in the
preamble.
\end{important}

\frameoptiondef{text-color}

Synonym for \frameopt{textcolor}.

\frameoptiondef{textcolour}

Synonym for \frameopt{textcolor}.

\frameoptiondef{text-colour}

Synonym for \frameopt{textcolor}.

\subsection{HTML}\label{sec:html}

The need to know where page breaks occur can make it hard for a \LaTeX\ to HTML
parser that doesn't use a \LaTeX\ engine to generate HTML output.
The arbitrary location of \idxpl{frame} can make it hard to support
the \sty{flowfram} package. As from version 2.0, there is now an
option specifically to help support parsers that don't have access
to the \idx{output-routine}.

\frameoptiondef{html}

When the document is processed by \LaTeX, this option simply writes
information to the \ext+{aux} file. The \ext{aux} command depends on
whether or not the \frameopt{html} option was in the preamble or in
the \env{document} environment.

\cmddef*{flowfram@preamble@htmlopts}

This command will be written to the \ext{aux} file if
the \frameopt{html} option was set in the preamble.

\cmddef*{flowfram@doc@htmlopts}

This command will be written to the \ext{aux} file if
the \frameopt{html} option was set in the \env{document} environment.

Both commands have the same syntax. The first argument \meta{n} is a
number that starts at 1 and is incremented every time that the
\frameopt{html} option is applied. The \keyvallist\ option is the
value of the \frameopt{html} option. The \meta{type} is the \gls{frame}
type, which will either be \idx{static} or \idx{dynamic}. The
\meta{IDN} argument is the frame's \idx{IDN}. The final two
arguments, \meta{page} and \meta{absolute-page}, are the values of
\thectr{page} and \thectr{absolutepage}.

It's up to the \LaTeX\ to HTML parser to choose what options in
\keyvallist\ to implement. The following are options recognised by
the \TeX\ Parser Library, which is used by the system that creates
the HTML helpset files for some of my Java GUI applications, including
\idx{FlowframTk}:

\htmloptiondef{show}

This boolean option indicates that the frame contents should be
shown at this point. If this value is true, then the following
options govern how the content is shown.

\htmloptiondef{div}

If true, the content should be encapsulated in a \code{div}
element.

\htmloptiondef{style}

If \htmloptval{div}{true}, then the \code{style} attribute should be
set to \meta{css}.

\htmloptiondef{class}

If \htmloptval{div}{true}, then the \code{class} attribute should be
set to \meta{css-class}.

\htmloptiondef{image}

If true, the content should be converted to an image. This typically
indicates that the content is too complicated to convert to HTML.

\htmloptiondef{mime-type}

If \htmloptval{image}{true}, the image should have the given MIME
type.

\htmloptiondef{alt}

If \htmloptval{image}{true}, the image's \code{alt} attribute should
be set to \meta{text}.


\section{Non-Rectangular Frames}
\label{sec:parshape}

As from version 1.03, it is now possible to specify non-rectangular
\staticordynamicframes\ (but not \idxpl{flow-frame}).
Note that the \idx{bbox} will still appear as a rectangle despite
the \gls{frame}['s] shape setting. You may use either \TeX's
\gls{parshape} command, or the \gls{shapepar}\slash\gls{Shapepar}
commands defined in Donald~Arseneau's \sty{shapepar} package (if
using \gls{shapepar} or \gls{Shapepar}, remember to include the
\sty{shapepar} package.)

\begin{information}
\idx{FlowframTk} can compute the parameters of \gls{parshape}
or \gls{shapepar}\slash\gls{Shapepar} from a shape (limitations may apply).
You can either export the parameters to a \TeX\ file that
can simply be \gls{input} at the start of a paragraph or, if you are
creating a \staticordynamicframe\ you can set the \qt{Shape}
selector to \qt{Parshape} or \qt{Shapepar} as applicable.
Use the \qt{Configure \TeX\ Settings} dialog to specify whether you
want \gls{shapepar} or \gls{Shapepar} for the \qt{Shapepar} setting.
See the \idx{FlowframTk} manual for further details.
\end{information}

The \gls{shapepar} or \gls{Shapepar} commands provide
greater flexibility in the type of shape that can be used. However,
be aware of the advice given in the \sty{shapepar} documentation.

\begin{deflist}
\itemtitle{\inlineglsdef{parshape}}

\begin{itemdesc}
With \gls{parshape} you can not have cut-outs in the middle, top or
bottom of a frame, however it is possible to have cut-outs in the
left or right side of the \idx*{frame}. When used with the
\frameopt{shape} key for \staticordynamicframes, the effects of
\gls{par} and the sectioning commands (\gls{section} and below) are
modified to allow the paragraph shape to extend beyond a single
paragraph, and to allow sectioning commands (but not \gls{chapter}
or \gls{part}).
\end{itemdesc}

\itemtitle{\inlineglsdef{shapepar}\slash\inlineglsdef{Shapepar}}

\begin{itemdesc}
With \gls{shapepar} or \gls{Shapepar} you may
have cut-outs, but you may not have any sectioning commands, 
paragraph breaks, vertical spacing or mathematics. You can
simulate a paragraph break using \gls{FLFsimpar}, but this
is not recommended. The size of the shape depends on the
amount of text, so the shape will expand or contract as you
add or delete text. In general, \gls{Shapepar} is better suited
for use as a frame shape than \gls{shapepar}. See the 
\sty{shapepar} documentation for more details of these commands.
\end{itemdesc}
\end{deflist}

To restore a \staticordynamicframe\ to its default rectangular
setting, use \frameopt{shape}{\cmd{relax}}.

For those unfamiliar with \TeX's \gls{parshape} command,
the syntax is:
\begin{compactcodebox}
\gls{parshape}\syntax{parshape}
\end{compactcodebox}
where \meta{n} is the number of (\meta{i\textsubscript{j}} \meta{l\textsubscript{j}}) 
pairs and \meta{i\textsubscript{j}} specifies the left 
indentation for the $j$th line and \meta{l\textsubscript{j}} specifies the length of 
the $j$th line.

\setstaticframe*{shapedb,shapedt}{pages=all}%
For example, to create a zigzag shaped static frame (whose
\gls*{IDL} is \code{shapedt}):
\begin{codebox*}[before upper app=\small]
\gls{setstaticframe}*\marg{shapedt}\marg{\frameopt{shape}=\marg{\gls{parshape}=20 
0.6\gls{linewidth} 0.4\gls{linewidth} 
0.5\gls{linewidth} 0.4\gls{linewidth}
0.4\gls{linewidth} 0.4\gls{linewidth} 
0.3\gls{linewidth} 0.4\gls{linewidth}
0.2\gls{linewidth} 0.4\gls{linewidth} 
0.1\gls{linewidth} 0.4\gls{linewidth}
0pt 0.4\gls{linewidth} 0.1\gls{linewidth} 0.4\gls{linewidth}
0.2\gls{linewidth} 0.4\gls{linewidth} 
0.3\gls{linewidth} 0.4\gls{linewidth}
0.4\gls{linewidth} 0.4\gls{linewidth} 
0.5\gls{linewidth} 0.4\gls{linewidth}
0.6\gls{linewidth} 0.4\gls{linewidth} 
0.5\gls{linewidth} 0.4\gls{linewidth}
0.4\gls{linewidth} 0.4\gls{linewidth} 
0.3\gls{linewidth} 0.4\gls{linewidth}
0.2\gls{linewidth} 0.4\gls{linewidth} 
0.1\gls{linewidth} 0.4\gls{linewidth}
0pt 0.4\gls{linewidth} 0.1\gls{linewidth} 0.4\gls{linewidth}
}}
\end{codebox*}
\setstaticframe*{shapedt}{shape={\parshape=20 
0.6\linewidth 0.4\linewidth
0.5\linewidth 0.4\linewidth
0.4\linewidth 0.4\linewidth
0.3\linewidth 0.4\linewidth
0.2\linewidth 0.4\linewidth
0.1\linewidth 0.4\linewidth
0pt 0.4\linewidth
0.1\linewidth 0.4\linewidth
0.2\linewidth 0.4\linewidth
0.3\linewidth 0.4\linewidth
0.4\linewidth 0.4\linewidth
0.5\linewidth 0.4\linewidth
0.6\linewidth 0.4\linewidth
0.5\linewidth 0.4\linewidth
0.4\linewidth 0.4\linewidth
0.3\linewidth 0.4\linewidth
0.2\linewidth 0.4\linewidth
0.1\linewidth 0.4\linewidth
0pt 0.4\linewidth
0.1\linewidth 0.4\linewidth
}}

\begin{staticcontents*}[html={show,image,name=zigzagcontent,alt={example
paragraph with a zigzag shape}}]{shapedt}
\small
This is an example of a static frame with a non-rectangular
shape. This zigzag shape was specified using the
\glsfmttext{opt.frame.shape} 
option in \glsfmttext{setstaticframe}. The \glsfmttext{parshape} 
command was used to set the shape.

Using the \glsfmttext{opt.frame.shape} key rather than explicitly using
\glsfmttext{parshape} means that I can have a paragraph break whilst 
retaining the shape \strong{but there are limitations}.
\end{staticcontents*}

\begin{warning}
Previously it was possible to have paragraph-breaking content such as displayed maths
or the \envfmt{verbatim} environment in a shaped paragraph. 
Due to various underlying changes this is no
longer possible. You will now need to insert the \gls{parshape}
command in the appropriate places in the frame content instead of
in the \frameopt{shape} option.
\end{warning}

The syntax for \gls{shapepar} and \gls{Shapepar} is more complicated, see
the \sty{shapepar} documentation for more details. In general:
\begin{compactcodebox}
\gls{shapepar}\margm{shape specs}
\end{compactcodebox}
The \sty{shapepar} package has some predefined shapes, such as
\csfmt{squareshape}, \csfmt{diamondshape}, 
\csfmt{heartshape} and \csfmt{nutshape}.

For example, to assign a heart shape to the \idx{static-frame} whose 
\gls*{IDL} is \optfmt{shapedb}:
\begin{codebox}
\gls{setstaticframe}*\marg{shapedb}\marg{\frameopt{shape}=\marg{\gls{shapepar}\cmd{heartshape}}}
\end{codebox}
To reset the frame back to its original rectangular shape
do:
\begin{codebox}
\gls{setstaticframe}*\marg{shapedb}\marg{\frameopt{shape}=\cmd{relax}}
\end{codebox}

\setstaticframe*{shapedb}{shape={\Shapepar\heartshape}}
\begin{staticcontents*}
[html={show,image,name=heartshapedpar,alt={heart-shaped paragraph}}]
{shapedb}
This example has a more complicated shape that can not 
be generated using \TeX's \glsfmtname{parshape} command, so
\glsfmtname{shapepar} was used instead. Note that this document
must include the \glsfmtname{pkg.shapepar} package in this instance,
whereas no extra packages are required to use \glsfmtname{parshape}.
No sectioning commands are allowed here.
The shape will expand as more text is added to it.
$\heartsuit$
\end{staticcontents*}

The \sty{flowfram} package currently does not support any other
paragraph shape making commands. Any other commands would
have to be used explicitly within the contents of the frame.

\staticswitchoffnext*{shapedt,shapedb}

\section{Switching Frames On and Off On-The-Fly}
\label{sec:switch}

Modifying the \idx{pglist} (or the page exclusion list) within the
\env{document} environment is a risky business. This list must
be up-to-date before the output routine looks for the next frame.
To make this a little easier, as from version~1.14 there are
commands that help you do this. 

\begin{important}
If you want to use these commands, it's best to use the package
option \opteqvalref{pages}{absolute}.
\end{important}

The commands described in this section update the \idxpl{pglist}
(and possibly the exclusion list) \emph{when the output routine is
next used}. They are designed to switch frames on or off either on
the next page or on the next odd page. You therefore need to take
care where you place these commands. For example, if you have a
two-sided document and you do:
\begin{codebox}
\gls{dynamicswitchonnextodd}\marg{1}
\gls{mainmatter}
\gls{chapter}\marg{Introduction}
\end{codebox}
This will set the dynamic frame whose \idx{IDN} is~1 to be visible for
the first page of chapter~1. However, if you do
\begin{codebox}
\gls{mainmatter}
\gls{dynamicswitchonnextodd}\marg{1}
\gls{chapter}\marg{Introduction}
\end{codebox}
This will have a different effect as \gls{mainmatter} issues a
\gls{cleardoublepage} so the command to switch on the dynamic
frame is on the same page as the start of chapter~1. This means that
the dynamic frame won't appear until the following odd page
(page~3).

These commands all have the same syntax with one argument that may
be a comma-separated list. The starred version uses
the \idxpl{IDL} and the unstarred version uses the \idxpl{IDN}.

\cmddef{flowswitchonnext}
Switch on the listed \idxpl{flow-frame} from the following page onwards.

\cmddef{flowswitchoffnext}
Switch off the listed \idxpl{flow-frame} from the following page onwards.

\cmddef{flowswitchonnextodd}
Switch on the listed \idxpl{flow-frame} from the next odd page onwards.

\cmddef{flowswitchoffnextodd}
Switch off the listed \idxpl{flow-frame} from the next odd page onwards.

\cmddef{flowswitchonnextonly}
Switch on the listed \idxpl{flow-frame} just for the following page.

\cmddef{flowswitchoffnextonly}
Switch off the listed \idxpl{flow-frame} just for the following page.

\cmddef{flowswitchonnextoddonly}
Switch on the listed \idxpl{flow-frame} just for the next odd page.

\cmddef{flowswitchoffnextoddonly}
Switch off the listed \idxpl{flow-frame} just for the next odd page.

\cmddef{dynamicswitchonnext}
Switch on the listed \idxpl{dynamic-frame} from the following page onwards.

\cmddef{dynamicswitchoffnext}
Switch off the listed \idxpl{dynamic-frame} from the following page onwards.

\cmddef{dynamicswitchonnextodd}
Switch on the listed \idxpl{dynamic-frame} from the next odd page onwards.

\cmddef{dynamicswitchoffnextodd}
Switch off the listed \idxpl{dynamic-frame} from the next odd page onwards.

\cmddef{dynamicswitchonnextonly}
Switch on the listed \idxpl{dynamic-frame} just for the following page.

\cmddef{dynamicswitchoffnextonly}
Switch off the listed \idxpl{dynamic-frame} just for the following page.

\cmddef{dynamicswitchonnextoddonly}
Switch on the listed \idxpl{dynamic-frame} just for the next odd page.

\cmddef{dynamicswitchoffnextoddonly}
Switch off the listed \idxpl{dynamic-frame} just for the next odd page.

\cmddef{staticswitchonnext}
Switch on the listed \idxpl{static-frame} from the following page onwards.

\cmddef{staticswitchoffnext}
Switch off the listed \idxpl{static-frame} from the following page onwards.

\cmddef{staticswitchonnextodd}
Switch on the listed \idxpl{static-frame} from the next odd page onwards.

\cmddef{staticswitchoffnextodd}
Switch off the listed \idxpl{static-frame} from the next odd page onwards.

\cmddef{staticswitchonnextonly}
Switch on the listed \idxpl{static-frame} just for the following page.

\cmddef{staticswitchoffnextonly}
Switch off the listed \idxpl{static-frame} just for the following page.

\cmddef{staticswitchonnextoddonly}
Switch on the listed \idxpl{static-frame} just for the next odd page.

\cmddef{staticswitchoffnextoddonly}
Switch off the listed \idxpl{static-frame} just for the next odd page.

The \sty{flowfram} package comes with a sample file
\filefmt{sample-pages.tex} that uses some of these commands.

\chapter{Locations and Dimensions}\label{sec:locationsdims}

\chapdesc{This chapter describes some of the commands provided to
determine the locations and dimensions of frames.}

This chapter describes some of the commands available that can
be used to determine the locations and dimensions of \idxpl{frame}.
See the accompanying document \filefmt{flowfram-code.pdf} for more details of 
these commands or for other commands not listed here.

\section{Determining the Location of the Typeblock}
\label{sec:typeblockloc}

As mentioned earlier, when you create new \idxpl{frame},
you must specify their location relative to the \idx{typeblock}, but
what if you want to position a \idx*{frame} a set distance from the
edge of the paper? The \sty{flowfram} package provides the following
commands that compute the distance from the \gls*{typeblock} to the
paper boundary. Since odd and even pages may have a different offset
if \gls{oddsidemargin} and \gls{evensidemargin} have different
values, there are separate commands for horizontal measurements on odd and even pages.

\cmddef{computeleftedgeodd}
Computes the position of the left edge of the page, relative 
to the left side of the \gls*{typeblock}, for odd pages, and stores the result in 
the dimension variable (length register) \meta{dim var}.

\cmddef{computeleftedgeeven}
Computes the position of the left edge of the page, relative 
to the left side of the \gls*{typeblock}, for even pages, and stores the result in 
the dimension variable (length register) \meta{dim var}.

\cmddef{computetopedge}
Computes the top edge of the page, relative to the bottom of the
\gls*{typeblock}, and stores the result in 
the dimension variable (length register) \meta{dim var}.

\cmddef{computebottomedge}
Computes the bottom edge of the page, relative to the bottom of the
\gls*{typeblock}, and stores the result in
the dimension variable (length register) \meta{dim var}.

\cmddef{computerightedgeodd}
Computes the position of the right edge of the page, 
relative to the left side of the \gls*{typeblock}, for odd pages, and store the result in
the dimension variable (length register) \meta{dim var}.

\cmddef{computerightedgeeven}
Computes the position of the right edge of the page, 
relative to the left side of the \gls*{typeblock}, for even pages, and store the result in
the dimension variable (length register) \meta{dim var}.

For example, if you want to create a frame whose bottom
left corner is one inch from the left edge of the page
and half an inch from the bottom edge of the page (this
assumes odd and even pages have the same margins):
\begin{codebox}[before upper app=\small]
\comment{define two new lengths to store the x and y coords}
\cmd{newlength}\marg{\cmd{myX}}
\cmd{newlength}\marg{\cmd{myY}}
\comment{compute the distance from typeblock to the paper edge}
\gls{computeleftedgeodd}\marg{\cmd{myX}}
\gls{computebottomedge}\marg{\cmd{myY}}
\comment{Add the absolute co-ordinates to get co-ordinates}
\comment{relative to the typeblock}
\cmd{addtolength}\marg{\cmd{myX}}\marg{1in}
\cmd{addtolength}\marg{\cmd{myY}}\marg{0.5in}
\end{codebox}

\section{Determining the Dimensions and Locations of Frames}
\label{sec:frameloc}

It is possible to determine the dimensions and locations
of a \gls{frame} using one of the following commands.
For each command, the starred version identifies the \gls{frame} by
its \idx{IDL} and the unstarred version identifies it by its
\idx{IDN}. The results are stored in the length registers
\gls{ffareax} (the $x$-coordinate), \gls{ffareay} (the
$y$-coordinate), \gls{ffareawidth} (the \gls{frame}['s] width)
and \gls{ffareaheight} (the \gls{frame}['s] height).

\cmddef{getstaticbounds}
Gets the bounds for the \idx{static-frame} identified by \meta{ID}.

\cmddef{getflowbounds}
Gets the bounds for the \idx{flow-frame} identified by \meta{ID}.

\cmddef{getdynamicbounds}
Gets the bounds for the \idx{dynamic-frame} identified by \meta{ID}.

For other related commands, see the section \qt{Determining Dimensions
and Locations} in the accompanying document 
\filefmt{flowfram-code.pdf}.

\section{Relative Locations}
\label{sec:relativelocs}

If you want to a textual description to appear in the document of 
the relative location of one \gls{frame} from another you can use:
\cmddef{relativeframelocation}
This produces a textual description of the relative location of
the \meta{type1} \gls{frame} identified by \meta{ID1} to the
\meta{type2} \gls{frame} identified by \meta{ID2} (the starred
version references the \idxpl{frame} by their \idx{IDL} and the
unstarred version references them by their \idx{IDN}).

\begin{important}
The relative locations are taken for the current page,
regardless of whether either of the two frames are displayed on that
page. If the current page is odd, then the frame settings for odd pages
will be compared, otherwise the frame settings for even pages will
be compared. However remember that the first paragraph of each page
retains the settings in place at the start of the paragraph, so if the
frames have different locations for odd and even pages, then
\gls{relativeframelocation} may use the wrong page settings if it
is used at the start of the page. You may prefer to use
\gls{SaveRelativeFrameLocation} instead.
\end{important}

The text produced will be obtained with one of the following
commands, which may be added to a language hook if required.

\cmddef{FFaboveleft}
Text produced if the first frame is above left of the second frame.

\cmddef{FFaboveright}
Text produced if the first frame is above right of the
second frame.

\cmddef{FFabove}
Text produced if the first frame is above the second frame
(but not to the right or left).

\cmddef{FFbelowleft}
Text produced if the first frame is below left of the
second frame.

\cmddef{FFbelowright}
Text produced if the first frame is below right of the
second frame.

\cmddef{FFbelow}
Text produced if the first frame is below the second frame
(but not to the right or left).

\cmddef{FFleft}
Text produced if the first frame is to the left of the 
second frame (but not above or below).

\cmddef{FFright}
Text produced if the first frame is to the right of the
second frame (but not above or below).

\cmddef{FFoverlap}
Text produced if both frames overlap.

\begin{deflist}
\itemtitle{Above}

\begin{itemdesc}
A frame is considered to be above another frame if the bottom edge
of the first frame is higher than the top edge of the second frame. 
\end{itemdesc}

\itemtitle{Below}

\begin{itemdesc}
A frame is considered to be below another frame if the top edge
of the first frame is lower than the bottom edge of the second frame.
\end{itemdesc}

\itemtitle{Left}

\begin{itemdesc}
A frame is considered to be to the left of another frame if the right 
edge of the first frame is to the left of the left edge of the second
frame.
\end{itemdesc}

\itemtitle{Right}

\begin{itemdesc}
A frame is considered to be to the right of another frame if the left
edge of the first frame is to the right of the right edge of the
second frame.
\end{itemdesc}
\end{deflist}

There are some short cut commands for \idxpl*{frame} of the
same type:
\cmddef{reldynamicloc}
A shortcut for \gls{relativeframelocation} where both frame
types are \idx{dynamic}. The starred version references the
\idxpl{dynamic-frame} by their \gls{IDL} and the unstarred version
references them by their \gls{IDN}.

\cmddef{relstaticloc}
A shortcut for \gls{relativeframelocation} where both frame
types are \idx{static}. The starred version references the
\idxpl{static-frame} by their \gls{IDL} and the unstarred version
references them by their \gls{IDN}.

\cmddef{relflowloc}
A shortcut for \gls{relativeframelocation} where both frame
types are \idx{flow}. The starred version references the
\idxpl{flow-frame} by their \gls{IDL} and the unstarred version
references them by their \gls{IDN}.

These commands may be used in the optional argument of 
\gls{continueonframe} for frames that are on the same page.
For example:
\begin{codebox}[before upper app=\small]
\cbeg{\env{dynamiccontents}}\marg{1}
Some text in the first dynamic frame that goes on for 
quite a bit longer than this example.
\gls{continueonframe}\oarg{continued \gls{reldynamicloc}\marg{2}\marg{1}}\marg{2}
This text is in the second dynamic frame which is 
somewhere on the same page.
\cend{\env{dynamiccontents}}
\end{codebox}
Alternatively, they may be used in the default continued text, as in
\exampleref{ex:staticcont}.

An alternative approach is to save the query in the \ext+{aux} file
to ensure that the \ctr{page} counter is correct:
\cmddef{SaveRelativeFrameLocation}
This saves the information and defers the calculation until the start of the 
next \LaTeX\ run. This means that the \ctr{page} number for
the location in the document where \gls{SaveRelativeFrameLocation}
was used will now be correct. The \meta{label} argument is a label that may be used to
reference the information and has the usual restrictions that apply
to labels. The remaining arguments are as for \gls{relativeframelocation}.

On the next run, the information can be retrieved with:
\cmddef{RefSavedRelativeLocation}
where \meta{label} should match the label argument supplied to 
\gls{SaveRelativeFrameLocation}.
This will produce the usual undefined reference double question mark \code{??} and 
a warning on the first run.

For example, \thisdoc\ defined a 
\idx{flow-frame} labelled \optfmt{main} and a 
\idx{dynamic-frame} labelled \optfmt{chaphead} which is
used to display the chapter headings. The following code:
\begin{codebox}
The dynamic frame is 
\gls{SaveRelativeFrameLocation}*
 \marg{chapheadmain}\comment{label}
 \marg{dynamic}\marg{chaphead}\marg{flow}\marg{main}\comment{frames}
\gls{RefSavedRelativeLocation}\marg{chapheadmain}
of the flow frame.
\end{codebox}
produces:
\begin{resultbox}
The dynamic frame is 
\SaveRelativeFrameLocation*
 {chapheadmain}%
 {dynamic}{chaphead}{flow}{main}%
\RefSavedRelativeLocation{chapheadmain}
of the flow frame.
\end{resultbox}

The result from the calculation is saved as one of the placeholder
commands, \gls{FFabove} etc. You can test for any of these commands
with:
\cmddef{IfSavedRelativeLocationEq}
This will expand to \meta{true} if the given command matches or
false if it doesn't match or if the label doesn't exist. In this
case, no warning occurs for an undefined label. The second argument
must be the actual placeholder command, not an expansion of it.

You will only be able to find out an exact match with
\gls{IfSavedRelativeLocationEq}. For example, \gls{FFabove} will
only match if the first frame is above the second frame but not to
the right or to the left (that is, their horizontal positions
overlap).

If you simply need to know more generally, you can use the following
commands:
\cmddef{IfSavedRelativeLocationAbove}
Expands to \meta{true}, if the first frame is above the second frame
without regard to their horizontal positions.

\cmddef{IfSavedRelativeLocationBelow}
Expands to \meta{true}, if the first frame is below the second frame
without regard to their horizontal positions.

\cmddef{IfSavedRelativeLocationLeft}
Expands to \meta{true}, if the first frame is left of the second frame
without regard to their vertical positions.

\cmddef{IfSavedRelativeLocationRight}
Expands to \meta{true}, if the first frame is right of the second frame
without regard to their vertical positions.

For additional commands that determine the relative location of one
frame from another, see the section \qt{Determining the relative 
location of one frame from another} in the accompanying document 
\filefmt{flowfram-code.pdf}.

\chapter{Predefined Layouts}
\label{sec:layouts}

\chapdesc{This chapter describes commands that create frames 
arranged in a predefined layout.}

The \sty{flowfram} package has a number of commands which 
create \idxpl{frame} in a predefined layout. These commands
may only be used in the preamble. The distance between the
\idxpl{flow-frame} created with these commands is given by
the standard \gls+{columnsep} length register.

\cmddef{adjustcolsep}
If you have more than two columns and you want space for any
marginal notes (created with \gls{marginpar}) that may occur in the
middle columns, you can use \gls{adjustcolsep} to automatically
adjust the value of \gls{columnsep} to ensure that there's
sufficient room. This is simply a shortcut that sets \gls{columnsep}
to twice its existing value plus the value of \gls{marginparwidth}.

\begin{important}
If you want to change the value of \gls{columnsep}, make sure you do
it before using the column commands. Changing it afterwards will
have no effect on any \idxpl{flow-frame} that have already been
created.
\end{important}

\section{Column Styles}
\label{sec:Ncolumn}

The standard \LaTeX\ commands \gls{onecolumn} and
\gls{twocolumn} are redefined to create one or two
\idxpl{flow-frame} that fill the entire \idx{typeblock} separated
from each other (in the case of \gls{twocolumn}) by a
gap of width \gls[format=mainfmt]{columnsep}.

\begin{information}
The final \meta{label} optional argument the commands
described below is retained for backward-compatibility.
In early versions of \sty{flowfram} that option occurred by chance
rather than design as the some of the commands happened to end with
\gls{newflowframe} which picked up a following optional argument.
\end{information}

The syntax for these commands is slightly different:
\cmddef{onecolumn}
Creates a \idx{flow-frame} that spans the \idx{typeblock} with the
given label and \idx{pglist}. If you want to specify a label, you
will need to also supply the \idx{pglist}. The default is
\optfmt{all} for \meta{page-list} and the \idx{frame}['s] \gls{IDN}
for \meta{label}.

\cmddef{twocolumn}
Creates two \idxpl{flow-frame} that fit in the \idx{typeblock}
separated by the distance given by \gls{columnsep}. The first
argument \meta{page-list} is as for \gls{onecolumn}. The second
argument may either be a single label, in which case it applies to
the second column, or (v2.0+) two comma-separated labels where the first one
should apply to the first \idx{flow-frame} and the second should
apply to the second \idx{flow-frame}. For example:
\begin{codebox}
\gls{twocolumn}\oarg{all}\oarg{frame1,frame2}
\end{codebox}
The \opt{RL} package option will define the columns starting from
the right, so the right-hand column will be filled first.
The default \opt{LR} package option will define the columns starting
from the left, so the left-hand column will be filled first.
Likewise for all the other commands described in this section that
create more than one \idx{flow-frame}.

\begin{information}
The height of these \idxpl*{flow-frame} may not be exactly as high as the \idx*{typeblock},
as their height is adjusted to make them an integer multiple of \gls{baselineskip}.
\end{information}

\mExampleref{ex:twocolumndraft} shows a two-column document in draft
mode where the \idxpl{flow-frame} were created with \gls{twocolumn}.
Remember that the page geometry needs to be set first.
The \styfmt{lipsum} package is used to provide dummy text to pad out
the document.
\begin{codebox}
\cmd{documentclass}\oarg{12pt}\marg{article}
\cmd{usepackage}\oarg{a4paper,margin=1in}\marg{geometry}
\cmd{usepackage}\oarg{draft}\marg{flowfram}
\cmd{usepackage}\marg{lipsum}
\gls{twocolumn}\comment{create two \idxpl{flow-frame}}
\gls{setflowframe}\marg{2}\marg{\frameoptval{border}{plain}}\comment{add border to second frame}
\cbeg{document}
\cmd{lipsum}\oarg{1-3}
\cend{document}
\end{codebox}

\createresultexampleindynamicframe*
 [title={Two Columns in Draft Mode},fontsize=12,
 label={ex:twocolumndraft},arara={pdflatex},border,
 description={Example two-column document with lipsum filler text that starts
in the left column and flows into the right column}
]
{examples}
{%
\cmd{usepackage}\oarg{a4paper,margin=1in}\marg{geometry}\nl
\cmd{usepackage}\oarg{draft}\marg{flowfram}\nl
\cmd{usepackage}\marg{lipsum}\nl
\gls{twocolumn}\nl
\gls{setflowframe}\marg{2}\marg{\frameoptval{border}{plain}}
}
{%
\cmd{lipsum}\oarg{1-3}
}


Draft mode draws grey rectangles to show the location of the
\idx{typeblock}, \idxpl{frame} and the margin area (where the text of
\gls{marginpar} is placed). Note that the top border of both
\idxpl{flow-frame} is slightly below the top border of the
\idx{typeblock}. This is due to the automatic vertical adjustment.

The plain border around the second \idx{flow-frame} is wider than
the actual frame area. In this case, the \sty{flowfram} package
knows the appropriate offset for the plain border. Custom
borders may require the use of the \frameopt{offset} option.
If you are creating the \idxpl{frame} with \idx{FlowframTk} then
there's an area in which you can specify the inner padding between
the border and the area for the text.

You can switch off the automatic height adjustment using the command:
\cmddef{ffvadjustfalse}
or switch it back on again with:
\cmddef{ffvadjusttrue}
You can test the current setting with the conditional:
\cmddef{ifffvadjust}
This setting applies to all the column commands described in this
section.

\cmddef{Ncolumn}
Creates \meta{n} column \idxpl{flow-frame}, each separated by a
distance of \gls{columnsep}, adjusting their height according to the
\gls{ifffvadjust} setting. This is similar to \gls{twocolumn} but
the final optional argument is a single label for the last
\idx{flow-frame} to be created.

\cmddef{onecolumninarea}
This creates a single \idx*{flow-frame} to fill the given area,
adjusting its height according to the \gls{ifffvadjust} setting.

\cmddef{twocolumninarea}
Creates two column \idxpl*{flow-frame} separated by a distance
of \gls{columnsep} filling the area specified,
adjusting their height according to the \gls{ifffvadjust} setting.

\cmddef{Ncolumninarea}
This is a more general form of \gls{twocolumninarea} making 
\meta{n} \idxpl*{flow-frame} instead of two.
The final optional argument is a single label for the last
\idx{flow-frame} to be created.

\section{Column Styles with an Additional Frame}
\label{sec:colstyleswithframe}

As well as the column-style \idxpl{flow-frame} defined 
in \sectionref{sec:Ncolumn}, it is also possible to define
\meta{n} columns with an additional \idx{frame} spanning either 
above or below them. There will be a vertical gap of 
approximately \gls{vcolumnsep} between the columns
and the extra frame.

\begin{information}
The height of the vertical gap may not be exactly \gls{vcolumnsep}, 
as the \idxpl*{flow-frame} will be adjusted (if the default
\gls{ffvadjusttrue} setting is in effect) so that their height 
is an integer multiple of \gls{baselineskip}, which may increase the gap.
\end{information}

In each of the following definitions,
the argument \meta{page-list} is the \idx{pglist} for which
the \idxpl*{frame} are defined, \meta{n} is the number of
columns required, \meta{type} is the type of frame to go
above or below the columns (this may be one of: \optfmt{flow},
\optfmt{static} or \optfmt{dynamic}). The area in which the
new frames should fill is defined by \meta{width}, \meta{height} 
(the width and height of the area) and \meta{x}, \meta{y} 
(the position of the bottom left hand corner of the area
relative to the bottom left hand corner of the \idx{typeblock}.)

The height of the additional frame at the top or bottom of
the columns is given by \meta{top-height} and \meta{bottom-height},
respectively.

\cmddef{onecolumntopinarea}
Creates one \idx{flow-frame} with a \meta{type} frame above it, filling
the area specified. If the \meta{label} option is supplied, it will
be set as the label of the \idx{flow-frame}.

\cmddef{twocolumntopinarea}
Creates two column-style \idxpl{flow-frame} with a \meta{type}
frame above them, filling the area specified. If the \meta{label}
option is supplied, it will be set as the label of the last
\idx{flow-frame} to be created.

\cmddef{Ncolumntopinarea}
Creates \meta{n} column-style \idxpl{flow-frame} with a \meta{type}  
frame above them, filling the area specified. If the \meta{label}
option is supplied, it will be set as the label of the last
\idx{flow-frame} to be created.

\cmddef{onecolumnbottominarea}
Creates one \idx{flow-frame} with a \meta{type} frame underneath it, 
filling the area specified. If the \meta{label} option is supplied, it will
be set as the label of the \idx{flow-frame}.

\cmddef{twocolumnbottominarea}
Creates two column-style \idxpl{flow-frame} with a \meta{type} frame 
below them, filling the area specified. If the \meta{label}
option is supplied, it will be set as the label of the last
\idx{flow-frame} to be created.

\cmddef{Ncolumnbottominarea}
Creates \meta{n} column-style \idxpl*{flow-frame} with a \meta{type} 
frame below them, filling the area specified. If the \meta{label}
option is supplied, it will be set as the label of the last
\idx{flow-frame} to be created.

The following commands are special cases of the above:

\cmddef{onecolumnStopinarea}
This is equivalent to:
\begin{compactcodebox}
\gls{onecolumntopinarea}\oargm{page-list}\marg{static}\margm{top-height}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}
\end{compactcodebox}

\cmddef{onecolumnDtopinarea}
This is equivalent to:
\begin{compactcodebox}
\gls{onecolumntopinarea}\oargm{page-list}\marg{dynamic}\margm{top-height}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}
\end{compactcodebox}

\cmddef{onecolumntop}
As \gls{onecolumntopinarea} where the area is given by the
\idx{typeblock}.

\cmddef{onecolumnStop}
This is equivalent to: 
\begin{compactcodebox}
\gls{onecolumntop}\oargm{page-list}\marg{static}\margm{top-height}\oargm{label}
\end{compactcodebox}

\cmddef{onecolumnDtop}
This is equivalent to: 
\begin{compactcodebox}
\gls{onecolumntop}\oargm{page-list}\marg{dynamic}\margm{top-height}\oargm{label}
\end{compactcodebox}

\cmddef{twocolumnStopinarea}
This is equivalent to: 
\begin{compactcodebox}
\gls{twocolumntopinarea}\oargm{page-list}\marg{static}\margm{top-height}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}
\end{compactcodebox}

\cmddef{twocolumnDtopinarea}
This is equivalent to: 
\begin{compactcodebox}
\gls{twocolumntopinarea}\oargm{page-list}\marg{dynamic}\margm{top-height}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}
\end{compactcodebox}

\cmddef{twocolumntop}
As \gls{twocolumntopinarea} where the area is the entire
\idx{typeblock}.

\cmddef{twocolumnStop}
This is equivalent to: 
\begin{compactcodebox}
\gls{twocolumntop}\oargm{page-list}\marg{static}\margm{top-height}\oargm{label}
\end{compactcodebox}

\cmddef{twocolumnDtop}
This is equivalent to: 
\begin{compactcodebox}
\gls{twocolumntop}\oargm{page-list}\marg{dynamic}\margm{top-height}\oargm{label}
\end{compactcodebox}

\cmddef{NcolumnStopinarea}
This is equivalent to: 
\begin{compactcodebox}
\gls{Ncolumntopinarea}\oargm{page-list}\marg{static}\margm{n}\margm{top-height}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}
\end{compactcodebox}

\cmddef{NcolumnDtopinarea}
This is equivalent to: 
\begin{compactcodebox}
\gls{Ncolumntopinarea}\oargm{page-list}\marg{dynamic}\margm{n}\margm{top-height}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}
\end{compactcodebox}

\cmddef{Ncolumntop}
As \gls{Ncolumntopinarea} where the area is the entire \idx{typeblock}.

\cmddef{NcolumnStop}
This is equivalent to: 
\begin{compactcodebox}
\gls{Ncolumntop}\oargm{page-list}\marg{static}\margm{n}\margm{top-height}\oargm{label}
\end{compactcodebox}

\cmddef{NcolumnDtop}
This is equivalent to: 
\begin{compactcodebox}
\gls{Ncolumntop}\oargm{page-list}\marg{dynamic}\margm{n}\margm{top-height}\oargm{label}
\end{compactcodebox}

\cmddef{onecolumnSbottominarea}
This is equivalent to: 
\begin{compactcodebox}
\gls{onecolumnbottominarea}\oargm{page-list}\marg{static}\margm{bottom-height}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}
\end{compactcodebox}

\cmddef{onecolumnDbottominarea}
This is equivalent to: 
\begin{compactcodebox}
\gls{onecolumnbottominarea}\oargm{page-list}\marg{dynamic}\margm{bottom-height}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}
\end{compactcodebox}

\cmddef{onecolumnbottom}
As \gls{onecolumnbottominarea} where the area is the entire \idx{typeblock}.

\cmddef{onecolumnSbottom}
This is equivalent to: 
\begin{compactcodebox}
\gls{onecolumnbottom}\oargm{page-list}\marg{static}\margm{bottom-height}\oargm{label}
\end{compactcodebox}

\cmddef{onecolumnDbottom}
This is equivalent to: 
\begin{compactcodebox}
\gls{onecolumnbottom}\oargm{page-list}\marg{dynamic}\margm{bottom-height}\oargm{label}
\end{compactcodebox}

\cmddef{twocolumnSbottominarea}
This is equivalent to: 
\begin{compactcodebox}
\gls{twocolumnbottominarea}\oargm{page-list}\marg{static}\margm{bottom-height}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}
\end{compactcodebox}

\cmddef{twocolumnDbottominarea}
This is equivalent to: 
\begin{compactcodebox}
\gls{twocolumnbottominarea}\oargm{page-list}\marg{dynamic}\margm{bottom-height}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}
\end{compactcodebox}

\cmddef{twocolumnbottom}
As \gls{twocolumnbottominarea} where the area is the entire \idx{typeblock}.

\cmddef{twocolumnSbottom}
This is equivalent to: 
\begin{compactcodebox}
\gls{twocolumnbottom}\oargm{page-list}\marg{static}\margm{bottom-height}\oargm{label}
\end{compactcodebox}

\cmddef{twocolumnDbottom}
This is equivalent to: 
\begin{compactcodebox}
\gls{twocolumnbottom}\oargm{page-list}\marg{dynamic}\margm{bottom-height}\oargm{label}
\end{compactcodebox}

\cmddef{NcolumnSbottominarea}
This is equivalent to: 
\begin{compactcodebox}
\gls{Ncolumnbottominarea}\oargm{page-list}\marg{static}\margm{n}\margm{top-height}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}
\end{compactcodebox}

\cmddef{NcolumnDbottominarea}
This is equivalent to: 
\begin{compactcodebox}
\gls{Ncolumnbottominarea}\oargm{page-list}\marg{dynamic}\margm{n}\margm{top-height}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}
\end{compactcodebox}

\cmddef{Ncolumnbottom}
As \gls{Ncolumnbottominarea} where the area is the entire \idx{typeblock}.

\cmddef{NcolumnSbottom}
This is equivalent to: 
\begin{compactcodebox}
\gls{Ncolumnbottom}\oargm{page-list}\marg{static}\margm{n}\margm{top-height}\oargm{label}
\end{compactcodebox}

\cmddef{NcolumnDbottom}
This is equivalent to: 
\begin{compactcodebox}
\gls{Ncolumnbottom}\oargm{page-list}\marg{dynamic}\margm{n}\margm{top-height}\oargm{label}
\end{compactcodebox}

The top\slash bottom frame for each of the above commands is defined
with:
\cmddef{newframe}
This is essentially the same as:
\begin{compactcodebox}
\csmetafmt{new}{frame-type}{frame}\oargm{page-list}\margm{width}\margm{height}\margm{x}\margm{y}\oargm{label}
\end{compactcodebox}

\section{Right to Left Columns}
\label{sec:RL}

The default behaviour for the column style commands defined 
in \sectionsref{sec:Ncolumn,sec:colstyleswithframe} above is
to create the \idxpl{flow-frame} from left to right. However if you are
typesetting from right to left, you will probably prefer to 
define the \idxpl{flow-frame} in the reverse order. This can be
done via the package option \opt{RL}. Alternatively you can use the
command:
\cmddef{lefttorightcolumnsfalse}
before using commands such as \gls{twocolumn} or 
\gls{Ncolumn}. To switch back to left-to-right columns use the
\opt{LR} option or:
\cmddef{lefttorightcolumnstrue}
You can test the current setting with the conditional:
\cmddef{iflefttorightcolumns}

\begin{important}
Changing the setting only affects new \idxpl{flow-frame} created
with subsequent column commands and does not affect any
\idxpl{flow-frame} that have already been created or any
\idxpl{flow-frame} created explicitly with \gls{newflowframe}.
\end{important}

Remember that it's the order of definition that determines 
the next \idx{flow-frame} to be selected by the
\idx{output-routine} (that's valid for the current page). 
This setting simply switches round the order
of definition in the column-style shortcut commands.

\section{Backdrop Effects}\label{sec:backdrop}

\Idxpl{static-frame} can be used to produce a backdrop, and there
are a number of commands that define \idxpl{static-frame} and
automatically set the \frameopt{backcolor} attribute to
create a rectangular patch of colour.

In the following definitions, \meta{page-list} is the \idx{pglist}
for which those \idxpl*{static-frame} are defined (\optfmt{all} is
the default).  The arguments \meta{L1}, \ldots, \meta{Ln} are the
labels to assign to the 1st, \ldots, \meta{n}th new frame that will
be created by the applicable command.

The arguments \meta{C1}, \ldots, \meta{Cn} are the colour
specifications for the \meta{L1}, \ldots, \meta{Ln} frame.  The colour
specification must be completely enclosed in the \meta{C1} etc
argument braces. For example \verb"{[rgb]{1,0,1}}" (one argument)
not \verb"[rgb]{1,0,1}" (optional argument followed by mandatory
argument).

For the horizontal stripes: \meta{x-offset} is the amount by which
the frames should be shifted horizontally (0pt by default),
\meta{W1} is the width of frame \meta{L1}, and so on up to
\meta{Wn}, the width of frame \meta{Ln}.

For the vertical stripes: \meta{y-offset} is the amount by which the
frames should be shifted vertically (0pt by default), 
\meta{H1} is the height of frame \meta{L1}, and so on up to
\meta{Hn}, the height of frame \meta{Ln}.

\begin{important}
Unlike the earlier commands, these commands are all relative to the
actual page, not the \idx{typeblock}.  So an \meta{x-offset} of 0pt
indicates the first vertical frame is flush with the left hand edge
of the page, and a \meta{y-offset} of 0pt indicates the first horizontal
frame is flush with the bottom edge of the page. This is because
backdrops tend to span the entire page, not just the
\idx{typeblock}.
\end{important}

\subsection{Vertical stripe effects}\label{sec:vstripes}

\cmddef{vtwotone}
Defines two \idxpl{static-frame} to create a two-tone vertical stripe
effect.  (This command was used to create the coloured background on
the title page of \thisdoc.)

\cmddef{vNtone}
This is similar to \gls{vtwotone} but with \meta{n}
\idxpl{static-frame} instead of two.

\cmddef{vtwotonebottom}
This is similar to \gls{vtwotone} but the \idxpl{static-frame} are only
\meta{H} high, instead of the entire height of the page.
The frames are aligned along the bottom edge of the page.

\cmddef{vtwotonetop}
This is similar to \gls{vtwotone} but the \idxpl{static-frame} are only
\meta{H} high, instead of the entire height of the page.
The frames are aligned along the top edge of the page.
(This command was used to create the border effect along
the top of every page in \thisdoc.  Two \gls{vtwotonetop}
commands were used, one for the even pages, and the other
for the odd pages.)

\cmddef{vNtonebottom}
This is a general version of \gls{vtwotonebottom} for
\meta{n} frames instead of two.

\cmddef{vNtonetop}
This is a general version of \gls{vtwotonetop} for
\meta{n} frames instead of two.

\subsection{Horizontal stripe effect}\label{sec:hstripes}

\cmddef{htwotone}
This defines two \idxpl{static-frame} to create a two-tone
horizontal stripe effect.

\cmddef{hNtone}
This is similar to \gls{htwotone} but with \meta{n}
\idxpl{static-frame} instead of two.

\cmddef{htwotoneleft}
This is similar to \gls{htwotone} but the \idxpl{static} are only
\meta{W} wide, instead of the entire width of the page.
The frames are aligned along the left edge of the page.

\cmddef{htwotoneright}
This is similar to \gls{htwotone} but the \idxpl{static} are only
\meta{W} wide, instead of the entire width of the page.
The frames are aligned along the right edge of the page.

\cmddef{hNtoneleft}
This is a general version of \gls{htwotoneleft} for
\meta{n} frames instead of two.

\cmddef{hNtoneright}
This is a general version of \gls{htwotoneright} for
\meta{n} frames instead of two.

\subsection{Background Frame}\label{sec:backgroundframe}

\cmddef{makebackgroundframe}
Creates a single \idx{static-frame} covering the entire page.
The new frame will be given the \idx{IDL} \meta{label}, if provided.

\begin{important}
If this \idx*{frame} is given a background colour, it
should be created before any other \idxpl{static-frame} otherwise it
will obscure all other \idxpl*{static-frame} created before it.
\end{important}

\subsection{Vertical and Horizontal Rules}
\label{sec:insertrule}

You can create vertical or horizontal rules between two
\idxpl{frame} using the commands described below.  The arguments
\meta{type-1} and \meta{type-2} identify the frame type
(\optfmt{static}, \optfmt{flow} or \optfmt{dynamic}).  For the
unstarred version, the frames should be identified by their
\idx{IDN} and for the starred version they should be identified by
their \idx{IDL}.

\cmddef{insertvrule}
Creates a new \idx{static-frame} which fits between \meta{type-1} 
\idx*{frame} identified by \meta{ID1} and \meta{type-2} \idx*{frame} 
identified by \meta{ID2}.

The new frame's \frameopt{y} position and height are calculated from the
lowest point of the lowest frame (of \meta{ID1} and \meta{ID2}) to the 
highest point of the highest of the reference frames. 
The first optional argument \meta{y-top} (default 0pt)
extends the height of the new frame by that much above the highest point.

The second optional argument \meta{y-bottom} (default 0pt) increases
the height of the new frame by that much but also lowers the
\frameopt{y} position by that amount.  If either of the optional
arguments are negative, the frame will be shortened instead of
extended.

The contents of this new frame are set to a vertical rule that
extends the full height of the frame.
The width of the rule is given by:
\cmddef{ffcolumnseprule}

\begin{warning}
This has changed as from version 1.09: versions
prior to 1.09 used \gls{columnseprule} (provided by the \LaTeX\
kernel).
\end{warning}

The vertical rule drawn by \gls{insertvrule} is created using 
the command:
\cmddef{ffvrule}
This can be redefined if a more ornate rule is required
(see \exampleref{ex:rules}).

The command:
\cmddef{ffruledeclarations}
can be redefined to set declarations that affect how the rule is drawn. 
The most likely use of this command is to set the rule colour. 
Any redefinition of \gls{ffruledeclarations} must come before the
\idx{static-frame} is created. (Remember that the contents of a
\idx{static-frame} are set in a box so the declaration is used at
that point.)

\cmddef{inserthrule}
This creates a new \idx{static-frame} which fits between \meta{type-1} 
\idx*{frame} identified by \meta{ID1} and \meta{type-2} \idx*{frame} 
identified by \meta{ID2}.

The new frame's \frameopt{x} position and width are calculated from the
leftmost point of the furthest left frame (of \meta{ID1} and \meta{ID2}) to the 
rightmost point of the furthest right of the reference frames. 
The first optional argument \meta{x-top} (default 0pt)
extends the width of the new frame by that much above the rightmost point.

The second optional argument \meta{x-bottom} (default 0pt) increases
the width of the new frame by that much but also lowers the
\frameopt{x} position by that amount.  If either of the optional
arguments are negative, the frame will be shortened instead of
extended.

The contents of this new frame are set to a horizontal rule that
extends the full width of the frame.
The height of the rule is given by \gls{ffcolumnseprule}.

The horizontal rule drawn by \gls{inserthrule} is created using 
the command:
\cmddef{ffhrule}
This can be redefined if a more ornate rule is required (see 
\exampleref{ex:rules}).
The horizontal rule is also governed by \gls{ffruledeclarations}.
As with \gls{insertvrule}, any redefinition of these commands must
be made before \gls{inserthrule} to have an effect.

\mExampleref{ex:rules} creates two \idxpl{flow-frame} with a
\idx{static-frame} above (with \gls{twocolumnStop}) and 
the creates a vertical rule between the two \idxpl{flow-frame}
and a horizontal rule between the top \idx{static-frame} and the two
\idxpl{flow-frame}, bit first the rules are redefined to use a
zigzag pattern (achieved with the \sty{tikz} package).
\begin{codebox}
\cmd{usepackage}\marg{flowfram}
\cmd{usepackage}\marg{tikz}
\cmd{usetikzlibrary}\marg{decorations.pathmorphing}
\gls{twocolumnStop}\marg{1in}
\cmd{renewcommand}\marg{\gls{ffvrule}}\oarg{3}\marg{\comment{}
 \cmd{hfill} \cmd{tikz}\marg{\comment{}
 \cmd{draw}\oarg{decorate,decoration=zigzag,
   line width=\#2,yshift=-\#1}
  (0,0) -- (0pt,\#3); }\comment{}
 \cmd{hfill} \cmd{mbox}\marg{}}
\gls{insertvrule}\marg{flow}\marg{1}\marg{flow}\marg{2}
\codepar
\cmd{renewcommand}\marg{\gls{ffhrule}}\oarg{3}\marg{\comment{}
 \cmd{tikz}\marg{\comment{}
  \cmd{draw}\oarg{decorate,decoration=zigzag,
   line width=\#3,xshift=-\#1} (0,0) -- (\#2,0pt);
  }}
\gls{inserthrule}\marg{static}\marg{1}\marg{flow}\marg{1}
\end{codebox}

The \styfmt{lipsum} package is used for filler text. The document
body sets the content for the first \idx{static-frame} (the top one):
\begin{codebox}
\gls{setstaticcontents}\marg{1}\marg{Top Frame}\cmd{lipsum}[1-5]
\end{codebox}

\createresultexampleindynamicframe*
 [title={Rules},arara={pdflatex},border,
 label={ex:rules},
 description={Example document with horizontal and vertical zigzags
between columns}
]
{examples}
{%
\cmd{usepackage}\oarg{a4paper,margin=2cm}\marg{geometry}\nl
\cmd{usepackage}\marg{flowfram}\nl
\cmd{usepackage}\marg{lipsum}\commentnl{dummy text}%
\cmd{usepackage}\marg{tikz}\nl
\cmd{usetikzlibrary}\marg{decorations.pathmorphing}
\codepar
\gls{twocolumnStop}\marg{1in}
\codepar
\cmd{renewcommand}\marg{\gls{ffvrule}}\oarg{3}\marg{\comment{}
 \cmd{hfill}\nlsp
 \cmd{tikz}\marg{\comment{}
 \cmd{draw}\oarg{decorate,decoration=zigzag,line width=\#2,yshift=-\#1}\nlsp
  (0,0) -- (0pt,\#3);\nl
 }\comment{}
 \cmd{hfill} \cmd{mbox}\marg{}\commentnl{}%
}
\codepar
\gls{insertvrule}\marg{flow}\marg{1}\marg{flow}\marg{2}
\codepar
\cmd{renewcommand}\marg{\gls{ffhrule}}\oarg{3}\marg{\comment{}
 \cmd{tikz}\marg{\comment{}
  \cmd{draw}\oarg{decorate,decoration=zigzag,line width=\#3,xshift=-\#1}\nlsp
  (0,0) -- (\#2,0pt);\nl
  }\commentnl{}%
}
\codepar
\gls{inserthrule}\marg{static}\marg{1}\marg{flow}\marg{1}
}
{%
\gls{setstaticcontents}\marg{1}\marg{Top Frame}
\cmd{lipsum}[1-5]
}

Remember that because the \idx{static-frame} contents are set in a
box, any change to \gls{ffvrule} or \gls{ffhrule} must occur before
the corresponding \gls{insertvrule} or \gls{inserthrule} for the
change to have an effect.

\chapter{Thumbtabs and Minitocs}\label{sec:thumbtabsminitocs}

\chapdesc{This chapter describes how to create thumbtabs and minitocs,
such as those used in \thisdoc.}

\section{Thumbtabs}
\label{sec:thumbtabs}

On the right hand side of the odd pages and on the left hand side of
even pages in \thisdoc, there is a blue rectangle
with the chapter number in it. This is a \inlineglsdef{idx.thumbtab}, and it gives
you a rough idea whereabouts in the document you are when you
quickly flick through the pages (of a hard copy). Each \idx{thumbtab} is in fact
a \idx{dynamic-frame}. 

There are two \idxpl{dynamic-frame} per \idx{thumbtab}: the
\idx{thumbtab} index shown in the table of contents and the
main \idx{thumbtab} shown in the applicable part of the document.
These frames are given \idxpl{speciallabel}:
\speciallabelinlinedef{thumbtabindex} for the \meta{n}th
\idx{thumbtab} index and 
\speciallabelinlinedef{thumbtab} for the \meta{n}th \idx{thumbtab}.

\begin{information}
With \idx{FlowframTk} you can also define separate \idxpl{thumbtab} for
even pages in two-sided documents. These have special labels
\speciallabelinlinedef{eventhumbtabindex} for the \meta{n}
\idx{thumbtab} index frame shown on even pages and
\speciallabelinlinedef{eventhumbtab} for the \meta{n} \idx{thumbtab}
frame shown on even pages.
\end{information}

Options that govern the \idx{thumbtab} settings are listed in
\sectionref{sec:pkgoptsthumbtoc}.

\cmddef{makethumbtabs}
If you want \idxpl{thumbtab} in your document, you need to add 
\gls{makethumbtabs} in the preamble. This reads information in from
the \inlineglsdef{ext.ttb} file created during the previous \LaTeX\
run. As with the table of contents, you need a rerun to ensure that
the \idx{thumbtab} information is correct.

Each \idx{dynamic-frame} corresponding to a \idx{thumbtab} and
\idx{thumbtab} index is then defined by \gls{makethumbtabs} with the
contents set according to the information read from the \ext{ttb} file. If
a \idx{dynamic-frame} with the corresponding \idx{speciallabel} has
already been defined, that will be used instead of defining a new
frame. (This will be the case with any package or class files that have
been exported from \idx{FlowframTk} where \idx{thumbtab} frames have
been setup.)

\begin{information}
If you have used \idx{FlowframTk} and you haven't defined enough
\idx{thumbtab} frames, \gls{makethumbtabs} will fall back on the
default \idx{thumbtab} frame style for the missing frames.
\end{information}

When \gls{makethumbtabs} creates a \idx{dynamic-frame}, the
\meta{height} argument is the height of each \idx{thumbtab} frame.
The default $y$ position puts the first \idx{thumbtab} level with
the top of the \idx{typeblock} and each following \idx{thumbtab} is
shifted below the last by \meta{height}. The first optional argument
\meta{y-offset} (a dimension) will shift all the \idxpl{thumbtab}
vertically by \meta{y-offset}. The width of each \idx{thumbtab} is
given by:
\cmddef{thumbtabwidth}
This value may be changed with \csfmt{setlength} but only changes
that are made before \gls{makethumbtabs} will have any effect.  The
\frameopt{evenx} position will automatically be calculated.  If the
frame was already defined, no change will be made to its attributes.

\begin{information}
The dimension settings will be ignored if the 
\idx{thumbtab} frames have already been defined.
\end{information}

The final optional argument \meta{section-type}
indicates what section unit should be used for the \idxpl{thumbtab}.
If omitted, \meta{section-type} obtained by expanding:
\cmddef{defaultthumbtabtype}
This command should expand to the control sequence name (no
backslash) of the applicable section type. The default definition is
\glscsname{chapter} if \gls{chapter} is defined, otherwise it's
\glscsname{section}.

Make sure that you have set all your preferred \idx{thumbtab}
settings before using \gls{makethumbtabs}. For example:
\begin{codebox}
\gls{flowframsetup}\marg{
 \opteqvalref{thumbtabs}{number},
 \opteqvalref{thumbtab-text}{normal}
}
\gls{makethumbtabs}\marg{0.75in}
\end{codebox}

Once the \idx*{thumbtab} \idxpl{dynamic-frame} have been defined and
setup, the \idx{thumbtab} indexing must be enabled.
\cmddef{enablethumbtabs}
This should be placed at the point where you want
the \idx{thumbtab} indexing to start.

\begin{important}
There will be no \idxpl{thumbtab} if you don't have \emph{both}
\gls{makethumbtabs} and \gls{enablethumbtabs} in your document.
\end{important}

You may put \gls{enablethumbtabs} in the preamble (after
\gls{makethumbtabs}) in which case any \idx{front-matter}
sectional units may have associated \idxpl{thumbtab}, depending on
the \opt{matter-thumbtabs} option. Alternatively, place
\gls{enablethumbtabs} just before the first sectional unit that
should appear as a \idx{thumbtab}. For example:
\begin{codebox*}
\gls{tableofcontents}
\gls{mainmatter}
\gls{enablethumbtabs}
\gls{chapter}\marg{Introduction}
\end{codebox*} 

You can stop indexing \idxpl{thumbtab} with:
\cmddef{disablethumbtabs}
This should be placed before the sectional unit that shouldn't have
a \idx{thumbtab}. For example:
\begin{codebox*}
End of last chapter.
\gls{appendix}
\gls{disablethumbtabs}
\gls{chapter}\marg{Supplementary Material}
\end{codebox*}

The \idx{thumbtab} index frames will automatically be shown in the
table of contents unless you have used
\opteqvalref{adjust-toc}{off}, which prevents \sty{flowfram} from
redefining \gls{tableofcontents}. If you have done this and want the
\idx{thumbtab} indexes to appear elsewhere, you can switch them on
with:
\cmddef{thumbtabindex}
The optional argument \meta{page-list} indicates which pages the
\idx{thumbtab} frames should be shown on.

There are commands available to customized the format of the
\idx{thumbtab} content.
\cmddef{thumbtabhyperlinkformat}
This command is used when the content should have a hyperlink to the
start of the associated sectional unit. The \sty{hyperref} package
needs to be loaded to support this. If \sty{hyperref} is loaded
after \sty{flowfram}, \gls{thumbtabhyperlinkformat} will
automatically be redefined to use \gls{hyperlink}.

Regardless of whether or not \sty{hyperref} has been loaded, 
\gls{thumbtabhyperlinkformat} will format the text with:
\cmddef{thumbtabformat}
The behaviour of this command varies according to the
\opt{thumbtab-text} option. You can redefine \gls{thumbtabformat} if
you prefer, but the \opt{thumbtab-text} options will no longer have
an effect after that.

\cmddef{thumbtabindexformat}
This command is used to format the content of the \idx{thumbtab}
index frames. The default definition just uses
\gls{thumbtabhyperlinkformat}. The \gls{thumbtabindexformat}
command will be redefined by the \opt{thumbtab-links} option.

\cmddef{thumbtabregularformat}
This command is used to format the content of the \idx{thumbtab}
(non-index) frames. The default definition just uses
\gls{thumbtabformat}. The \gls{thumbtabregularformat}
command will be redefined by the \opt{thumbtab-links} option.

Since \idx{thumbtab} frames are just \idxpl{dynamic-frame}, it is
possible to change their attributes with \gls{setdynamicframe}.
However, the \idxpl{dynamic-frame} won't be defined until 
\gls{makethumbtabs} finds the relevant information in the \ext{ttb}
file. This means that you will get an error on the first run when
the frames are not defined.

Instead, the \idx{thumbtab} frame attributes can be changed with:
\cmddef{setthumbtab}
This sets the attributes \keyvallist\ for the \idxpl{dynamic-frame}
associated with the \idx{thumbtab} with the given \meta{index} (starting
from 1 for the first \idx{thumbtab}). Only a warning occurs if the
\idxpl{dynamic-frame} haven't been defined.

For example:
\begin{codebox}
\gls{setthumbtab}\marg{1}\marg{\frameopt{backcolor}=[rgb]\marg{0.15,0.15,1}}
\end{codebox}
This is essentially equivalent to:
\begin{compactcodebox}
\gls{setdynamicframe}*
 \marg{\speciallabelmeta{thumbtabindex}{1},\speciallabelmeta{thumbtab}{1}}
 \marg{\frameopt{backcolor}=[rgb]\marg{0.15,0.15,1}}
\end{compactcodebox}

Note that \meta{index} isn't the same as the frame's \idx{IDN}.
The first argument may be the keyword \optfmt{all}, which indicates all \idxpl{thumbtab}
frames.

To just change the settings for the \idx{thumbtab} index, use:
\cmddef{setthumbtabindex}
This is like \gls{setthumbtab} but only changes the \idx{thumbtab}
index frames.
For example:
\begin{codebox}
\gls{setthumbtabindex}\marg{1}\marg{\frameopt{backcolor}=[rgb]\marg{0.15,0.15,1}}
\end{codebox}
This is essentially equivalent to:
\begin{compactcodebox}
\gls{setdynamicframe}*
 \marg{\speciallabelmeta{thumbtabindex}{1}}
 \marg{\frameopt{backcolor}=[rgb]\marg{0.15,0.15,1}}
\end{compactcodebox}

By default, the \idxpl{thumbtab} have a grey background (unless you
have created them with \idx{FlowframTk}). In \thisdoc, I set the
background colours with:
\begin{codebox}
\gls{setthumbtab}\marg{1}\marg{\frameopt{backcolor}=[rgb]\marg{0.15,0.15,1}}
\gls{setthumbtab}\marg{2}\marg{\frameopt{backcolor}=[rgb]\marg{0.2,0.2,1}}
\gls{setthumbtab}\marg{3}\marg{\frameopt{backcolor}=[rgb]\marg{0.25,0.25,1}}
\gls{setthumbtab}\marg{4}\marg{\frameopt{backcolor}=[rgb]\marg{0.3,0.3,1}}
\gls{setthumbtab}\marg{5}\marg{\frameopt{backcolor}=[rgb]\marg{0.35,0.35,1}}
\gls{setthumbtab}\marg{6}\marg{\frameopt{backcolor}=[rgb]\marg{0.4,0.4,1}}
\gls{setthumbtab}\marg{7}\marg{\frameopt{backcolor}=[rgb]\marg{0.45,0.45,1}}
\gls{setthumbtab}\marg{8}\marg{\frameopt{backcolor}=[rgb]\marg{0.5,0.5,1}}
\gls{setthumbtab}\marg{9}\marg{\frameopt{backcolor}=[rgb]\marg{0.55,0.55,1}}
\end{codebox}

I then defined my own custom command for the frame style:
\begin{codebox}
\cmd{newcommand}\marg{\cmd{thumbtabstyle}}\marg{\comment{}
 \cmd{centering}\cmd{bfseries}\cmd{large}\cmd{sffamily}
}
\codepar
\gls{setthumbtab}\marg{all}\marg{\frameoptval{valign}{c},\frameoptval{style}{thumbtabstyle},\frameoptval{textcolor}{white}}
\end{codebox}


\section{Minitocs}\label{sec:minitocs}

In \thisdoc, after each chapter heading, there is a mini table of
contents (\inlineglsdef{idx.minitoc}) for that chapter.  To enable
\idxpl{minitoc}, use the command:
\cmddef{enableminitoc}
This enables a \idx{minitoc} at the start of the given sectional
unit. If present, the optional argument \meta{section-type} should
be the control sequence name (no backslash) of the section command.
If omitted, the default is to use the same as that used by
\idxpl{thumbtab}.

The \idx{minitoc} will normally appear immediately after the
corresponding section heading. If you prefer the \idx{minitoc} to
appear in a \idx{dynamic-frame}, you can use:
\cmddef{appenddfminitoc}
This appends the \idx{minitoc} to the \idx{dynamic-frame} identified
by \meta{ID} (the \idx{IDN} for the unstarred version or the
\idx{IDL} for the starred version). The \idx{minitoc} support needs
to be enabled first with \gls{enableminitoc}.

For example, in \thisdoc, I have:
\begin{codebox}
\gls{appenddfminitoc}*\marg{chaphead}
\end{codebox}

Recall from \sectionref{sec:dfchaphead} that \gls{ChapterInDynamic}
causes the corresponding sectioning command to reset the contents of
the identified \idx{dynamic-frame}. The \gls{appenddfminitoc}
command will cause the corresponding sectioning command to append to
the contents of the associated \idx{dynamic-frame}.

This means that if you have something like: 
\begin{compactcodebox}
\gls{ChapterInDynamic}*\margm{label}
\gls{enableminitoc}
\gls{appenddfminitoc}*\margm{label}
\end{compactcodebox}
for the same \idx{dynamic-frame} \meta{label}, then 
\gls{chapter} will first set the contents with
the section heading and will then append the \idx{minitoc}.
If \gls{ChapterInDynamic} isn't used or has a different frame, then 
the behaviour of \gls{appenddfminitoc} will depend on whether or not
the \frameopt{clear} attribute has been set on the \idx{minitoc}
frame. If the \frameopt{clear} attribute is not set then the
\idx{minitoc} code will only be appended once. (Otherwise the frame
would end up accumulating all the \idxpl{minitoc}.)

The style of the \idx{minitoc} text is governed by:
\cmddef{minitocstyle}
The default behaviour is to simply reset the font and text colour to
normal. The argument is the \idx{minitoc} content. Note that this
style isn't applied to the \idx*{dynamic-frame}['s] \frameopt{style} as
the reason for appending the \idx{minitoc} content is because there
may be other content in the frame, such as the chapter heading.
The \gls{minitocstyle} command is placed inside a group so any
declarations will be scoped.

The \idx{minitoc} has vertical spacing before and after it.
\cmddef{beforeminitocskip}
The gap before the \idx{minitoc}.
\cmddef{afterminitocskip}
The gap after the \idx{minitoc}.
These are both lengths and can be changed with \csfmt{setlength}.

\chapter{Global Settings}\label{sec:globalsettings}

\chapdesc{This section describes style macros, lengths and counters used
by the \glsfmttext{pkg.flowfram} package.}

\section{Macros}\label{sec:macros}

The following macros can be changed using \csfmt{renewcommand}:
\cmddef{setffdraftcolor}
Sets the colour of the \idxpl{bbox} when displayed in draft mode (see \sectionref{sec:draft}).
The default definition is:
\begin{compactcodebox}
\cmd{color}\oarg{gray}\marg{0.8}
\end{compactcodebox}
For example, if you want a darker grey, do:
\begin{codebox}
\cmd{renewcommand}\marg{\gls{setffdraftcolor}}\marg{\cmd{color}[gray]\marg{0.3}}
\end{codebox}

\cmddef{setffdrafttypeblockcolor}
Sets the colour of the \idx{typeblock} outline when displayed in
draft mode. The default definition is:
\begin{compactcodebox}
\cmd{color}[gray]\marg{0.9}
\end{compactcodebox}

\cmddef{fflabelfont}
Sets the font for the annotation labels shown in draft mode.
The default definition is:
\begin{compactcodebox}
\cmd{small}\cmd{sffamily}
\end{compactcodebox}

\section{Lengths}\label{sec:lengths}

The following are lengths, which can be changed using
\csfmt{setlength}:

\cmddef{fflabelsep}
The distance from the right hand side of the
\idx{bbox} at which to place the annotation.

\cmddef{flowframesep}
The gap between the text of the \idx{frame} and
its border, for the standard border types.
This is initialised to \gls{fboxsep} when \sty{flowfram} loads. It
won't be automatically updated if \gls{fboxsep} is later changed.

\cmddef{flowframerule}
The width of the \idx{frame}['s] border, if using
a border given by a \idx{fcmd} that uses \gls{fboxsep}
to set its border width (for example, \gls{fbox}).

\cmddef{sdfparindent}
The default paragraph indentation within \staticordynamicframes.
This may be overridden for individual frames with
the \frameopt{parindent} attribute.

\cmddef{vcolumnsep}
The approximate vertical distance between the top frame 
and the column frames when using \gls{Ncolumntop} etc.
(The height of the \idx{flow-frame} may be adjusted if
the \glslink{ifffvadjust}{ffvadjust} setting is on.)
This length should be changed before the frames are defined for the
change to have effect.

\cmddef{columnsep}
The \gls{columnsep} length is provided by the \LaTeX\ kernel and is
used in \LaTeX's normal two-column mode. With \sty{flowfram} it's
used for the horizontal distance between the column frames
that are created with commands such as \gls{Ncolumn}. This length
should be changed before the frames are defined for the change to
have effect.

\section{Counters}
\label{sec:counters}

The following are counters that can be accessed via 
\code{\cmd{value}\margm{counter\dhyphen name}}
or \code{\csmetafmt{the}{counter\dhyphen name}{}}.

\begin{important}
The values of these counters may be referenced but should not be
modified. They are automatically incremented by the commands.
\end{important}

\ctrdef{maxstatic}
The total number of \idxpl{static-frame} that have been defined so
far. You can use this value to reference the most recently defined
\idx{static-frame}.

\ctrdef{maxflow}
The total number of \idxpl{flow-frame} that have been defined so
far. You can use this value to reference the most recently defined
\idx{flow-frame}.

\ctrdef{maxdynamic}
The total number of \idxpl{dynamic-frame} that have been defined so
far. You can use this value to reference the most recently defined
\idx{dynamic-frame}.

\ctrdef{maxthumbtabs}
The total number of \idxpl{thumbtab}.

\ctrdef{absolutepage}
The absolute page number.

\ctrdef{thisframe}
Stores the \idx{IDN} of the current \idx{flow-frame}. You can label
and reference the \idx{IDN} using:
\cmddef{labelflowidn}
This is analogous to the standard \gls{label} command, but will
always refer to the \idx{IDN} of the current \idx*{flow-frame}. It can
then be referenced using \gls{ref}.

\begin{important}
Avoid using \gls{labelflowidn} or \ctr{thisframe} in the contents of
a \staticordynamicframe.
\end{important}

\ctrdef{displayedframe}
This counter is reset at the start of each page and is incremented
each time a \idx{flow-frame} is selected by the
\idx{output-routine}. If all \idxpl{flow-frame} are displayed on the
current page then this will have the same value as \ctr{thisframe}.
However, if some \idxpl{flow-frame} are invalid for the current
page, the values of \ctr{displayedframe} and \ctr{thisframe} may be
different. You can label the \ctr{displayedframe} counter using:
\cmddef{labelflow}
The label may then be referenced with \gls{ref}. For example, if
your document has a column layout:
\begin{codebox*}
This text is about hippos\gls{labelflow}\marg{hippos}.
\ldots{}
\comment{Somewhere else in the document:}
See column\string~\gls{ref}\marg{hippos} on page\string~\gls{pageref}\marg{hippos}
for information on hippos.
\end{codebox*}

\begin{important}
Avoid using \gls{labelflow} or \ctr{displayedframe} in the contents of
a \staticordynamicframe.
\end{important}

\chapter{FlowframTk}\label{sec:flowframtk}

\idx{FlowframTk} is a Java graphical application that may be used to
create images from shapes that are defined by control points
(vector graphics). Bitmaps and text can also be added.
The latest stable version can be found on \CTANpkg{flowframtk} but
experimental releases are also available 
on \urlfootref{https://github.com/nlct/flowframtk/releases}{GitHub}.
The application can be invoked from the command line with:
\appdef{flowframtk}
Depending on how it has been installed, you may also be able to
start it from your operating system's application menu or from a
desktop shortcut.

\section{Export to Image}\label{sec:exporttoimage}

An image created in \idx{FlowframTk} can be exported as a \LaTeX\
(\ext+{tex}) file that contains a \env{pgfpicture} environment
(provided by the \sty{pgf} package) with the basic layer commands
that replicate (as near as possible) the image created in
\idx{FlowframTk}. By way of example, \figureref{fig:framelayers} was
created using \idx{FlowframTk} (with the isometric grid).

Any document that inputs one of these exported files will need to
include the \sty{pgf} package, but the exported file may also
contain some bespoke commands needed to emulate certain effects,
such as outlined text. These are provided by the
\sty{flowframtkutils} package (see
\sectionref{sec:flowframtkutils}) which automatically loads \sty{pgf}. 

If all you want is to include the exported image in your document,
then you don't need to load the \sty{flowfram} package in your document
(but you will need to ensure that \sty{flowfram} is installed in
order to load the supplementary \sty{flowframtkutils} package, if
required).
The \sty{flowfram} package is too fragile and has the potential to
conflict with too many other classes or packages to load it unnecessarily.

\section{Compute Parameters for \glsfmttext{parshape} or
\glsfmttext{shapepar}}
\label{sec:computeparshape}

The \frameopt{shape} attribute is only available for
\staticordynamicframes. It can be set automatically if you want to
use \idx{FlowframTk}['s] export to document class or package
function (\sectionref{sec:exportstycls}) but if you want a shaped
paragraph in a \idx{flow-frame} or if you don't need to use the
\sty{flowfram} package but would like a shaped paragraph in an
ordinary document, then you can create the desired shape in
\idx{FlowframTk} and use the \qt{Parshape} or \qt{Shapepar} function
(be sure to set the normal font size first in \idx{FlowframTk}['s]
\TeX\ configuration settings). This will calculate the
parameters for the applicable command and create a file that
contains the command and arguments needed to shape a paragraph.

Simply \gls{input} the file (that was created by \idx{FlowframTk}['s] Parshape
or Shapepar function) at the start of the paragraph that
should be shaped. Take care not to insert a paragraph break between
inputting the file and the start of the text.  See the
\idx{FlowframTk} user manual for further details.

\begin{information}
Since \gls{parindent} is a \TeX\ primitive and \sty{shapepar}
provides generic code, this function may be used with other \TeX\
formats, such as plain \TeX.
\end{information}

\section{Export to Document Class or Package}\label{sec:exportstycls}

Whilst creating images is something that can also be done by other vector
graphics applications (some of which may create more readable
\sty{tikz} code), \idx{FlowframTk} can also create a \LaTeX\ package
(\ext+{sty}) or class file (\ext+{cls}) that uses the \sty{flowfram}
package. In this case, instead of reproducing the image, the shapes
may be used to identify \idxpl{flow-frame}, \idxpl{static-frame} or
\idxpl{dynamic-frame}. The definitions (\gls{newflowframe},
\gls{newstaticframe} and \gls{newdynamicframe}) will be written to the
exported \ext{sty} or \ext{cls} file.  You may find that using this
graphical interface is an easier approach to defining \idxpl{frame}
than trying to calculate the locations and dimensions using \LaTeX\
commands. When you use \idx{FlowframTk}['s] export function to
create a document class or package, the created file will contain
the code to automatically load both \sty{flowfram} and
\sty{flowframtkutils} (but make sure that you have at least version
0.8.8 of \idx{FlowframTk}).

When using \idx{FlowframTk} to construct \sty{flowfram} data, you
need to first establish the \idx{typeblock} and then identify the
shapes that should represent \idxpl{frame}. Any shapes that aren't
identified as such won't be exported. (This is useful if, for
example, you have shapes that provide guides for the positioning of 
other shapes.) You can choose whether the shape itself should be used as a
border (or background, if it's filled) for the corresponding \idx{frame} 
or whether to simply use the shape's bounding box as the location 
and size of the \idx{frame}.

\begin{information}
When using the \idx{FlowframTk} export function, don't set the
\frameopt{backcolor} or \frameopt{bordercolor} attributes. Instead, 
use the line paint and fill paint settings in \idx{FlowframTk}.
\end{information}

You may also define \idxpl{dynamic-frame} with \idxpl{speciallabel}
but make sure you have an up-to-date version of both \sty{flowfram}
and \idx{FlowframTk} to ensure they are properly implemented.
With at least \idx{FlowframTk} version 0.8.8, you can use the Flow
Frame Wizard to ensure that the correct labels are used.

\section{The \glsfmttext{pkg.flowframtkutils} Package}
\label{sec:flowframtkutils}

\pkgdef{flowframtkutils}

The \sty{flowframtkutils} package is provided with \sty{flowfram}
v2.0+ to assist with files that have been exported from \idx{FlowframTk}.
It provides the bespoke commands that may be written to those files.
Ensure that you have at least version 0.8.8 of \idx{FlowframTk}  
to support newer commands.

\begin{information}
The \sty{flowframtkutils} package doesn't load the \sty{flowfram}
package as it may be simply required when
an image is exported as \sty{pgf} code. However,
\sty{flowframtkutils} does automatically load the \sty{pgf} package
as it's likely to be needed in either the image export or
the class\slash package export.
\end{information}

\subsection{Options}\label{sec:flowframtkutilsopts}

All options that can be passed to \sty{flowfram} can also be passed
to a package (\ext{sty}) or class (\ext{cls}) created by \idx{FlowframTk}. However,
\sty{flowframtkutils} itself only has the following options, which
can only be set when the package is loaded:

\optiondef{textpath}

If true, when \sty{flowframtkutils} is loaded, it will automatically
load the \sty{decorations.text} PGF library after loading the \sty{pgf}
package. Note that this library doesn't support all of
\idx{FlowframTk}['s] text-path settings. See the \idx{FlowframTk}
documentation for further details.

\optiondef{outline}

If true, when \sty{flowframtkutils} is loaded, it will try to
provide the appropriate support for outline text and will redefine
\gls{jdroutline} as appropriate.

If \pdfLaTeX\ or \LuaLaTeX\ is used, this option will input the
\file{pdf-trans.tex} file, which contains generic pdf\TeX\ code to
render text as an outline. This code includes pdf\TeX\ primitives,
so if \LuaLaTeX\ is used, the \sty{luatex85} package will
automatically be loaded with this option to ensure they are defined.

If a different engine is used, this option will load the
\sty{pst-char} package instead, which will use PSTricks to render
the outline.

\subsection{Provided Commands}\label{sec:flowframtkutilscmds}

Many of the \sty{flowfram}-related commands provided by the
\sty{flowframtkutils} package aren't intended for general use, as
they are provided to simplify the code written by \idx{FlowframTk}
to ensure that the bespoke files are correctly integrated with the
\sty{flowfram} package with the class\slash package export function. 

Most of the user-level commands described here are those used when
exporting an image to a file containing the \env{pgfpicture}
environment. (The \qt{jdr} prefix is a throwback to
\idx{FlowframTk}['s] original name, JpgfDraw.)

If you export to a complete document, \idx{FlowframTk} version 0.8.8
and above will search for the \sty{flowframtkutils} package using
\app{kpsewhich}. If it's found, \idx{FlowframTk} will assume it's
available for use. If not, or if an older version of
\idx{FlowframTk} is used, it will provide the definition of the
\qt{jdr} commands if they are required.

\cmddef{includeteximage}

The \gls{includeteximage} command is provided with
\csfmt{Provide\-Doc\-u\-ment\-Command} 
rather than defined as a new command, as it may be defined in a similar manner by 
other packages.
This command isn't written to any exported file by \idx{FlowframTk}
but is provided by \sty{flowframtkutils} to include an exported
image (\ext{tex}) file in a document.  You can simply input the file
with commands like \gls{input}, but \gls{includeteximage} provides
some extra features.

The filename identified by \meta{filename} is input but
the command first locally sets the input search path to match the graphics
search path used by \gls{includegraphics}. This means that you can
save your exported image \ext{tex} file to the same location as your
other image files.

If the optional argument is present, a transformation can be applied
to the image. For example, if it turns out to be too large for the
page, you could go back to \gls{FlowframTk} and shrink it or you
can use the scaling options in \gls{includeteximage}. The recognised
keys are just a subset of those recognised by \sty{graphicx}:
\optfmt{scale}, \optfmt{angle}, \optfmt{width}, \optfmt{height}
and \optfmt{alt}. Bear in mind that scaling the image will also
scale any text within the image.

\cmddef{jdroutline}

If enabled by the \opt{outline} option, \gls{jdroutline} will attempt
to render \meta{text} as an outline using \meta{pdf-trans code} (if
\file{pdf-trans.tex} was loaded) or \meta{pst-char code} (if
\sty{pst-char} was loaded). If not enabled, this command will
generate a warning and just do \meta{text}.

For example, large bold \qt{ABC} rendered with a green outline
that's filled with red:
\begin{codebox}
\gls{jdroutline}
  \marg{2 Tr 0 1 0 rg 1 0 0 RG}
  \marg{fillstyle=solid,linecolor=green,fillcolor=red}
  \marg{\cmd{bfseries}\cmd{Huge} ABC}
\end{codebox}

\cmddef{jdrimagebox}

Used for encapsulated images, \gls{jdrimagebox} is designed to prevent
problems if numerical rounding errors cause the image to be larger
than the available area. It's used when \idx{FlowframTk} exports to
a complete document that encapsulates the image. (Rather than
exporting to a \ext{tex} file that can be input from an existing document.)
 
The following commands are only written to exported files by
\idx{FlowframTk} v0.8.8+ if it's detected that \sty{flowframtkutils}
is available.

\cmddef{flowframtkimageinfo}

If \idx{FlowframTk} was instructed to include the title and creation
date, this command will be written to the exported (\ext{tex}) document file.
This is only applicable when the export to a complete document is used, rather than
export to a file just containing the image code.
Available options:

\optiondef{image.title}
Set the title with \code{\gls{flowframtkSetTitle}\margm{text}}.
(The title is the image's description.) 

\optiondef{image.creationdate}
Set the creation date with
\code{\gls{flowframtkSetCreationDate}\margm{PDF date}}.

\cmddef{flowframtkSetCreationDate}

If \sty{hyperref} has been loaded, this will use \gls{hypersetup} to
set the PDF creation date, otherwise if \gls{pdfinfo} has been
defined that will be used instead.

\cmddef{flowframtkSetTitle}

If \sty{hyperref} has been loaded, this will use \gls{hypersetup} to
set the document title meta data, otherwise if \gls{pdfinfo} has been
defined that will be used instead. Awkward characters within the
title will be marked up with:
\cmddef{flowframtkimgtitlechar}
This normally just expands to \meta{char} but if \gls{pdfinfo} is
required, then this will expand to the detokenized \meta{PDF
replacement}. For example, if the image's description was set to
\qt{A House (with a pond)} in \idx{FlowframTk}, and the image is
exported as a complete document with meta data, then the document
preamble would contain (for the given timestamp):
\begin{compactcodebox}
\gls{flowframtkimageinfo}\marg{
 \optvalm{image.title}{A House \gls{flowframtkimgtitlechar}\marg{(}\marg{\cmd{(}}with a pond\gls{flowframtkimgtitlechar}\marg{)}\marg{\cmd{)}}},
 \optvalm{image.creationdate}{D:20250815192214+01'00'}
}
\end{compactcodebox}

If you provide a description for an object, it will be included as a
comment. This can help to identify the relevant parts of the code
but you may prefer to have hooks to allow you to add content from
the document (rather than editing the exported image file). 
For example, to add tagging for accessibility or to
uncover elements of the image in \cls{beamer}. With \idx{FlowframTk}
v0.8.8+, you can specify what type of hook you want:
paired, encapsulated or no hook.

\cmddef{flowframtkstartobject}
If this hook is added to the image, it will always be paired with a
matching closing hook:
\cmddef{flowframtkendobject}
By default, the above pair do nothing.

Alternatively, you can choose to encapsulate each object, which will
instead use the following hook:
\cmddef{flowframtkencapobject}
By default, this simply does the final argument \meta{object}, which is the code
to draw the object.

The common arguments in these hooks are:
\begin{deflist}
\itemtitle{\meta{n}}
\begin{itemdesc}
A number that's unique for each object in a given image. This argument in 
\gls{flowframtkendobject} must always be the same as its matching
\gls{flowframtkstartobject}. The numbering starts at 0 for the
entire image and then increments for each object within the image,
descending down groups.
\end{itemdesc}

\itemtitle{\meta{Java class name}}
\begin{itemdesc}
The Java class name of the object. For example, \code{JDRPath} for a
path (which may consist of lines, curves and moves),
\code{JDRText} for text or \code{JDRBitmap} for bitmaps.

This is the class responsible for writing the PGF code to render (as
closely as possible) the object. That is, the final argument for
\gls{flowframtkencapobject} or the content between
\gls{flowframtkstartobject} and \gls{flowframtkendobject}.
This is true, even if the object needs to be temporarily converted
for the export. For example, a text area with gradient paint may be
converted to a filled path if the \qt{To Path} export setting has
been applied. The PGF code will then be path construction code not
\csfmt{pgftext}, but the class name will still be \code{JDRText}.
\end{itemdesc}

\itemtitle{\meta{description}}
\begin{itemdesc}
The description assigned to the object or empty if no description
was set.
\end{itemdesc}

\itemtitle{\meta{tag}}
\begin{itemdesc}
The tag assigned to the object or empty if no tag was set.
\end{itemdesc}

\itemtitle{\meta{pgf point}}
\begin{itemdesc}
The lower left point of the object's bounding box, in the form
\code{\gls{pgfpoint}\margm{x}\margm{y}}.
\end{itemdesc}

\itemtitle{\meta{width}}
\begin{itemdesc}
The width of the object's bounding box.
\end{itemdesc}

\itemtitle{\meta{height}}
\begin{itemdesc}
The height of the object's bounding box.
\end{itemdesc}

\end{deflist}

A simplistic way of adding overlays would be to export using the
paired commands and add \csfmt{pause}:
\begin{codebox}
\cmd{renewcommand}\marg{\gls{flowframtkendobject}}\oarg{7}\marg{\cmd{pause}}
\end{codebox}

The \sty{flowframtkutils} package provides a function that may be
used in the definition of \gls{flowframtkencapobject}. To use this
function, first make sure that you export to an image with the
\qt{Encapsulated} setting on. Then anywhere before the image is
included in the document, use:
\cmddef{FlowFramTkUtilsSetOverlayEncap}
This redefines \gls{flowframtkencapobject} to use the low-level
function:
\cmddef{flowframtkutilsuncoverencap:nnnnnnnn}
(There shouldn't be any need to use this function directly.)

This recognises the settings that may be set in the optional argument
of \gls{FlowFramTkUtilsSetOverlayEncap} to govern the way that
objects are uncovered.

The default is to use \cls{beamer}['s] \gls{uncover} command but two
helper functions are used (which both required \LaTeX3 syntax to be
enabled if you need to redefine them).
\cmddef{flowframtkutilsuncover:nn}
Uncovers for a single slide. The default definition is:
\begin{compactcodebox}
\gls{uncover}<\meta{number}>\margm{content}
\end{compactcodebox}
\cmddef{flowframtkutilsuncoverfrom:nn}
Uncovers from a slide. The default definition is:
\begin{compactcodebox}
\gls{uncover}<\meta{number}->\margm{content}
\end{compactcodebox}

If you later want to change the settings you can use:
\cmddef{FlowFramTkUtilsOverlayEncapSetup}
This should be placed before the image is input into the document
but bear in mind that the settings are local and there may be
interference if they are changed within the same frame that has the
overlays.

The \gls{flowframtkutilsuncoverencap:nnnnnnnn} function is still a little 
experimental, but it basically works as follows:
\begin{itemize}
\item When \meta{n} is 0 (that is, the entire image), the bounding
box is saved and some other initialisation is performed.
\item When \meta{n} is greater than 0, the overlay setting is
searched for:
 \begin{itemize}
  \item With the \overlayencapoptval{auto-overlay}{true} option,
   an integer variable is incremented for all object types except
   groups. This value is used as the overlay. Each object will be
   uncovered according to the order in which it was written to the
   exported file.
  \item With the \overlayencapoptval{auto-overlay}{false} option,
   the \overlayencapopt{tag-overlay} setting is checked. If that has
   an overlay identified for the object's tag then that will be
   used. If not, the \overlayencapopt{object-overlay} setting is checked.
   If that has an overlay identified for the object's type then that will be
   used. If not, the \overlayencapopt{fallback-overlay} setting is
   checked. If that has been set then that will be used. If not, the
   current object will be visible with no overlay specification.
  \end{itemize}
\item When \meta{n} is greater than 0 and the
   \overlayencapopt{annote} setting is not \optfmt{false}, then
   after the object has been draw according to the above overlay
   settings an annotation will be added if applicable.
   The annotation consists of text with optionally a line from the 
   object's bounding box to the text, which is offset according to 
   the \opt{overlayencap.annote-arrow.dx} and
   \opt{overlayencap.annote-arrow.dy} settings. By default the line
   has an arrow head at the start. This may be changed with the
   \overlayencapopt{annote-arrow} setting.
   Whether or not the object has an annotation is determined by
   \overlayencapopt{annote-text}. The annotation overlay is
   determined by the \overlayencapopt{annote} setting.
\end{itemize}

For example, assuming that the file \filefmt{image.tex} was created
by \idx{FlowframTk} with the \qt{Object Markup} option set to \qt{Encapsulated}:
\begin{codebox}
\cmd{documentclass}\marg{beamer}
\cmd{usepackage}\marg{flowframtkutils}
\gls{FlowFramTkUtilsSetOverlayEncap}
 \oarg{
   \overlayencapoptvalm{object-overlay}{path = 1, text = 2},
   \overlayencapopt{annote},
   \overlayencapopteqvalref{annote-text}{description-or-tag}
 }
\cbeg{document}
\cbeg{frame}
\cmd{frametitle}\marg{An Image}
\cmd{centering}
\cmd{input}\marg{image}
\cend{frame}
\cend{document}
\end{codebox}

There are two ways of adding annotations. You can either add the
text and, if applicable, a line with an arrow head to the image in
\idx{FlowframTk} and tag them. Then you can use the
\overlayencapopt{tag-overlay} option to uncover them. Alternatively,
you can use the \overlayencapopt{annote} option to automatically add
annotations based on each object's tag or description.
This second method is less precise as the annotation is placed
relative to the object's bounding box, which may be at a distance
from a non-rectangular shape, but may be sufficient for simple
images.

Available options are listed below.

\overlayencapoptdef{uncover}
Determines whether or not overlays should be used for
image objects and, if so, should the object just be shown on a
single overlay or from a certain number.

\overlayencapoptvaldef{uncover}{single}
Uncover for a single slide.

\overlayencapoptvaldef{uncover}{from}
Uncover from a slide.

\overlayencapoptvaldef{uncover}{false}
Don't have overlays for image objects (but annotations may
still be overlaid).

\overlayencapoptdef{annote}
Determines whether or not annotations should be added and,
if so, what overlays should be used for annotations.
If this setting is on but not annotation text is available for a given
object then the annotation will be skipped. The annotation text, if
available, is offset from the object's bounding box. Optionally a
line may be drawn from the bounding box to the text.
The \qt{annotation} refers to the text and, if present, the line.

\overlayencapoptvaldef{annote}{single}
Uncover annotation, if applicable, for a single slide.
That is, use \code{\cmd{uncover}<\meta{num}>\margm{annotation}}.

\overlayencapoptvaldef{annote}{from}
Uncover annotation, if applicable, from a slide.
That is, use \code{\cmd{uncover}<\meta{num}->\margm{annotation}}.

\overlayencapoptvaldef{annote}{match}
Match the \overlayencapopt{uncover} setting.

\overlayencapoptvaldef{annote}{true}
Enable annotations without changing the overlay setting.

\overlayencapoptvaldef{annote}{false}
Don't show annotations.

\overlayencapoptdef{annote-position}
If annotations should be added, this setting indicates in
which direction the annotation should be.

\overlayencapoptvaldef{annote-position}{auto}
Automatically determine the direction based on the object's
relative position within the image.

\overlayencapoptvaldef{annote-position}{north}
Place the annotation above the object.

\overlayencapoptvaldef{annote-position}{northeast}
Place the annotation above right of the object.

\overlayencapoptvaldef{annote-position}{east}
Place the annotation right of the object.

\overlayencapoptvaldef{annote-position}{southeast}
Place the annotation below right of the object.

\overlayencapoptvaldef{annote-position}{south}
Place the annotation below the object.

\overlayencapoptvaldef{annote-position}{southwest}
Place the annotation below left of the object.

\overlayencapoptvaldef{annote-position}{west}
Place the annotation left of the object.

\overlayencapoptvaldef{annote-position}{northwest}
Place the annotation above left of the object.

\overlayencapoptdef{annote-arrow}
If annotations should be added, this setting governs the
annotation arrow. Available settings are described in 
\sectionref{sec:overlayencapannotearrowopts}.

\overlayencapoptdef{annote-text}
The text used for the annotation. If the text is empty or no mapping
has been provided then there won't be an annotation for the object.

\overlayencapoptvaldef{annote-text}{hide}
No annotation text (which means no arrow either, regardless of the
\overlayencapopt{annote-arrow} setting).

\overlayencapoptvaldef{annote-text}{description}
If the object has a description, use that as the annotation text.

\overlayencapoptvaldef{annote-text}{tag}
If the object has a tag, use that as the annotation text.

\overlayencapoptvaldef{annote-text}{description-or-tag}
If the object has a description, use that as the annotation
text, otherwise if the object has a tag use that.

\overlayencapoptvaldef{annote-text}{tag-map}
If the object has a tag and a mapping has been set with
\overlayencapopt{tag-text}, use the mapping as the annotation
text.

\overlayencapoptdef{tag-text}
Sets up the mappings for use with
\overlayencapopteqvalref{annote-text}{tag-map}, where the key in
\keyvallist\ is the tag and the value is the text to use for that
tag. For example, if the image has some objects that have the tag
\qt{window} and some have the tag \qt{door}:
\begin{codebox}
\overlayencapoptvalm{tag-text}{
  window = \marg{A Window},
  door = \marg{A Door}
}
\end{codebox}

\overlayencapoptdef{auto-overlay}
If true, auto-increment the overlay for each object that's
not a group. (Groups are excluded as their content is nested.)

\overlayencapoptdef{tag-overlay}
If \overlayencapoptval{auto-overlay}{false},
set up the tag overlays, where the key in \keyvallist\ is
the tag and the value is the overlay number.
For example, if the image has some objects that have the tag
\qt{building}, some have the tag \qt{window} and some have the tag \qt{door}:
\begin{codebox}
\overlayencapoptvalm{tag-overlay}{
  building = 1,
  window = 2, 
  door = 3
}
\end{codebox}
Within \keyvallist, the value part should be a number but may also
be empty (the equal sign is still needed). This means that there
shouldn't be an overlay for an object with that tag. This is
different from omitting the tag from the list as it prevents the
\overlayencapopt{object-overlay} and \overlayencapopt{fallback-overlay}
checks.

If the \keyvallist\ is not empty, this option automatically sets 
\overlayencapoptval{auto-overlay}{false}.

\overlayencapoptdef{object-overlay}
If \overlayencapoptval{auto-overlay}{false}, set up the
object overlays, where the key in \keyvallist\ identifies the object
and the value is the overlay number.

\begin{warning}
If you set an overlay for groups but objects within the group also
have an overlay, this will cause nested \csfmt{uncover}.
\end{warning}

The key may be any of:
\optfmt{group}, \optfmt{path}, \optfmt{text}, \optfmt{text-path},
\optfmt{symmetric-path}, \optfmt{scaled-pattern},
\optfmt{spiral-pattern}, \optfmt{rotational-pattern} or
\optfmt{bitmap}. 
For example:
\begin{codebox}
\overlayencapoptvalm{object-overlay}{
  bitmap = 1,
  path = 2, 
  text = 3
}
\end{codebox}
Within \keyvallist, the value part should be a number but may also
be empty (the equal sign is still needed). This means that there
shouldn't be an overlay for an object of that type. This is
different from omitting the object type from the list as it prevents the
\overlayencapopt{fallback-overlay} check.

If the \keyvallist\ is not empty, this option automatically sets 
\overlayencapoptval{auto-overlay}{false}.

\overlayencapoptdef{fallback-overlay}
If \overlayencapoptval{auto-overlay}{false},
and if an object doesn't have an overlay identified by either
\overlayencapopt{tag-overlay} or \overlayencapopt{object-overlay},
then use this fallback. Available keys for \keyvallist\ are
listed in \sectionref{sec:overlayencapfallbackoverlayopts}.

\subsubsection{Fallback Overlay Options}
\label{sec:overlayencapfallbackoverlayopts}

These are available settings for use in the
\overlayencapopt{fallback-overlay} option value.
They can also be set with \csfmt{keys\_set:nn} where the module is
\code{flowframtkutils / overlay / fallback}.

\overlayencapoptdef{fallback-overlay.enable}
If true, enables fallback overlay setting.
This means that if an overlay is identified by either
\overlayencapopt{tag-overlay} or \overlayencapopt{object-overlay}
then the overlay will be set to the default value (for non-group
objects).

\overlayencapoptdef{fallback-overlay.fixed}
If fallback overlay setting enabled, set the default
overlay to \meta{number}.

\overlayencapoptdef{fallback-overlay.increment}
If fallback overlay setting enabled, set the default
overlay to a number that's incremented for each use of the fallback.

\subsubsection{Annotation Arrow Options}
\label{sec:overlayencapannotearrowopts}

These are available settings for use in the 
\overlayencapopt{annote-arrow} option value.
They can also be set with \csfmt{keys\_set:nn} where the module is
\code{flowframtkutils / overlay / arrow}.

\overlayencapoptdef{annote-arrow.show}
If annotations should be added, show an arrow in addition
to the text. For example:
\begin{codebox}
\overlayencapoptvalm{annote-arrow}{\overlayencapoptval{annote-arrow.show}{true}}
\end{codebox}
If this is the only \overlayencapopt{annote-arrow} setting, then it
can be written more compactly:
\begin{codebox}
\overlayencapoptval{annote-arrow}{\overlayencapopt{annote-arrow.show}}
\end{codebox}

\overlayencapoptdef{annote-arrow.hide}
The inverse of \overlayencapopt{annote-arrow.show}.
If annotations should be added, don't show an arrow (only
show the text).

\overlayencapoptdef{annote-arrow.dx}
If annotations should be added, the horizontal
displacement from the start of the arrow. This is also the
horizontal displacement for the annotation text, regardless of
whether or not the arrow is shown.

\overlayencapoptdef{annote-arrow.dy}
If annotations should be added, the vertical
displacement from the start of the arrow. This is also the
vertical displacement for the annotation text, regardless of
whether or not the arrow is shown.

\overlayencapoptdef{annote-arrow.color}
The colour to use for the annotation arrow, if shown. The
value may be empty to indicate the current stroke colour should be
used, otherwise it should be a colour name suitable for use in
\csfmt{pgfsetstrokecolor}.

\overlayencapoptdef{annote-arrow.start}
The start arrow marker to use for the annotation arrow, if shown. The
value may be empty to indicate there should be no start arrow,
otherwise it should be suitable for use in
\csfmt{pgfsetarrowsstart}. The line starts at the object's bounding
box so that's where the start arrow will be placed. A
non-rectangular shape may be some distance away from this point.

Remember to include the \styfmt{arrows.meta} PGF library if you want
to use any of the meta arrows. For example with:
\begin{codebox}
\overlayencapoptvalm{annote-arrow}{
 \overlayencapoptvalm{annote-arrow.start}{Latex\oarg{length=5pt}},
}
\end{codebox}
the preamble requires:
\begin{codebox}
\cmd{usepgflibrary}\marg{arrows.meta}
\end{codebox}

\overlayencapoptdef{annote-arrow.end}
The end arrow marker to use for the annotation arrow, if shown. The
value may be empty to indicate there should be no end arrow,
otherwise it should be suitable for use in
\csfmt{pgfsetarrowsend}. The line ends on the annotation text's
boundary, the location determined according to the \csfmt{pgftext} anchor.

For example:
\begin{codebox}
\overlayencapoptvalm{annote-arrow}{
 \overlayencapopt{annote-arrow.show},
 \overlayencapoptval{annote-arrow.dx}{2cm},
 \overlayencapoptval{annote-arrow.dy}{1cm},
 \overlayencapoptvalm{annote-arrow.start}{},
 \overlayencapoptvalm{annote-arrow.end}{>}
}
\end{codebox}


\chapter{Troubleshooting}

\chapdesc{This chapter should be consulted if you experience any
problems using the \glsfmttext{pkg.flowfram} package.}

For an up-to-date list of frequently asked questions, see
the \faqspkg{flowfram}.

\section{General Queries}\label{sec:generalqueries}

\begin{enumerate}
\item If all my \idxpl{flow-frame} are only defined on, say, 
pages \code{1-10}, what happens if I then add some extra text so that
the document exceeds 10 pages?

The output routine will create a new \idx{flow-frame} the size 
of the \idx{typeblock} and use that.

\item Can I use the formatted page number in \idxpl{pglist}?

No.

\item\label{itm:whynot} Why not?

When the output routine finishes with one \idx{flow-frame} it looks for the
next \idx{flow-frame} defined on that page. If there are none left, it then
searches through the \idx{pglist} of all the defined \idxpl{flow-frame} to
see if the next page lies in that range. If there are none defined on
that page, it ships out that page, and tries the next page.  This gives
rise to two problems:
\begin{enumerate}
\item \LaTeX\ is not clairvoyant. If it is currently
on page 14, and on the next page the page numbering changes
to A, it has no way of knowing this until it has reached
that point, which it hasn't yet. So it is looking for a 
\idx{flow-frame} defined on page~15, not on page~A.

\item How does \LaTeX\ tell if page C lies between 
pages A and D\@? It would require an algorithm that can convert
from a formatted number back to an integer. Given that there
are many different ways of formatting the value of a counter
(besides the standard Roman and alphabetical formats) it
would be impossible to write an algorithm to do this
for some arbitrary format.

\end{enumerate}

\item Can I have an arbitrarily shaped \gls{frame}?
\label{itm:parshape}

You can assign certain irregular shapes to \staticordynamicframes, 
using the \frameopt{shape} key (see \sectionref{sec:parshape}).
Note that the \idx{bbox} will still appear as a rectangle with
the dimensions of the given \idx{frame} which may not correspond
to the assigned shape.
This function is not available for \idxpl{flow-frame}.

\item Why has the text from my \idx{flow-frame} appeared in a
\staticordynamicframe?

Assuming you haven't inadvertently set that text as the contents of
the \staticordynamicframe, the frames are most likely overlapping
(see \sectionref{sec:stacking}).  In an attempt to clarify what's
going on, suppose you have defined a \idx{static-frame}, a
\idx{dynamic-frame} and two \idxpl{flow-frame}. The following is an
approximate analogy (not strictly accurate as \TeX\ may make several
attempts to fill in the \idxpl{flow-frame} due to penalties etc):

\TeX\ has a sheet of paper on the table, and has
pencilled in a rectangle denoting the \idx{typeblock}.
The paper is put to one side for now.  \TeX\ also has four
rectangular sheets of transparent paper. The first (which I shall
call sheet~1) represents the \idx{static-frame}, the next two (which I
shall call sheets~2 and~3) represent the \idxpl{flow-frame}, and the last
one (which I shall call sheet~4) represents the \idx{dynamic-frame}.

\TeX\ starts work on filling sheet~2 with the document text.  Once
it has put as much text on that sheet as it considers possible
(according to its views on aesthetics), it puts sheet~2 into the
\qt{in tray}, and then continues on sheet~3. While it's filling in
sheets~2 and~3, if it encounters a command or environment that tells
it what to put in the \idx{static-frame}, it fills in sheet~1 and then
puts sheet~1 into the \qt{in tray} and resumes where it left off on
sheet~2 or~3. Similarly, if it encounters a command that tells it
what to put in the \idx{dynamic-frame}, it stops what it's doing, fills in
sheet~4, then puts sheet~4 into the \qt{in tray}, and resumes where
it left off. 

Only when it has finished sheet~3 (the last \idx{flow-frame}
defined on that page), will it gather together all the transparent
sheets, and fix them onto the page starting with sheet~1 through to
sheet~4, measuring the bottom left hand corner of each transparent
sheet relative to the bottom left hand corner of the
\idx{typeblock}.  \TeX\ will then put that page aside, and start
work on the next page. If two or more of the transparent sheets
overlap, you will see through the top one into the one below (unless
of course the top one has been painted over, either by setting a
background colour, or by adding an image that has a non-transparent
background).

Note that it's also possible that the overlap is caused by an 
overfull hbox that's causing the text to poke out the side of the 
\idx{flow-frame} into a neighbouring \idx{frame}. Check the log file for
warnings or use the \opt{draft} option to the document class
which will place a filled rectangle on the end of overfull lines.

\item Why do I get lots of overfull hbox messages?

Probably because you have narrow \idxpl{frame}. It's better to use
ragged right formatting when the frames are narrow.

\item Why do I keep getting multiply-defined warnings?

Probably because you have used \gls{label} in a \staticordynamicframe\
that is displayed on more than one page. Try using the \frameopt{clear} 
key to ensure that the frame is always cleared at the end of each
page.

\item What happens if I use a command or environment
that switches to two-column mode (e.g. \envfmt{theindex})?
                                                          
The behaviour depends on the \opt{column-changes} setting (see
\sectionref{sec:pkgoptscolumns}).

\item How do I change the vertical alignment
of material inside a \staticordynamicframe?

Use the \frameopt{valign} attribute.

\item\label{itm:absval} How do I compute the distance from the edge
of the page instead of the \idx{typeblock}?

See \sectionref{sec:typeblockloc}.

\item Is there a GUI I can use to make it easier to create the
\idxpl{frame}?

Yes, \idx{FlowframTk} (see \sectionref{sec:flowframtk}).

\end{enumerate}

\section{Unexpected Output}
\label{sec:unexpectedoutput}

\begin{enumerate}
\item The lines of text at the beginning of my \idxpl{flow-frame} are the
wrong width.

This is a problem that will occur if you have \idxpl{flow-frame} 
with different widths, as the change in \gls{hsize} 
does not come into effect until a paragraph break. So if
you have a paragraph that spans two \idxpl{flow-frame}, the end
of the paragraph at the beginning of the second \idx{flow-frame} 
will retain the width it had at the start of the 
paragraph at the bottom of the previous \idx{flow-frame}. You can
fix the problem by inserting \gls{framebreak} at the
point where the \idx{frame} break occurs 
(see \sectionref{sec:framebreak}).

\item My \idxpl{frame} shift to the right when I add a border.

This may occur if you use a border that is not recognised
by the \sty{flowfram} package. You will need to set the
offset using the \frameopt{offset} key (see 
\sectionref{sec:modattr}).

\item I have a vertical white strip along the right hand side
of every page.

This can happen if you have, say, an A4 document, and 
\appfmt{ghostscript} has letter as the default paper size. You can 
change the default paper size by editing the file \verb|gs_init.ps|. 
Change:
\begin{compactcodebox}[before upper app=\scriptsize]
\comment{Optionally choose a default paper size other than U.S. letter.}
\comment{(a4)}
\end{compactcodebox}
to:
\begin{compactcodebox}[before upper app=\scriptsize]
\comment{Optionally choose a default paper size other than U.S. letter.}
(a4)
\end{compactcodebox}

\item I don't have any output.

All your \idxpl{flow-frame} are empty. \TeX\ doesn't put the
frames onto the page until it has finished putting text
into the \idxpl*{flow-frame}. So if there is no text to go in the
\idxpl*{flow-frame} it won't output the page. If you only want the
\staticordynamicframes\ filled in, and nothing 
outside of them, just do \code{\cmd{mbox}\marg{}\gls{clearpage}}. 
This will put an invisible something with zero area into your
\idx*{flow-frame}, but it's enough to convince \TeX\ that the
document contains some text.

\item The last page hasn't appeared.

See the previous answer.


\item There is no paragraph indentation inside my 
\staticordynamicframes.

The paragraph indentation in \staticordynamicframes\ is governed
by the length \gls{sdfparindent} which is set to 0pt by
default. To make the indentation the same as that used by 
\idxpl{flow-frame} place the following in the preamble:
\begin{codebox}
\cmd{setlength}\marg{\gls{sdfparindent}}\marg{\gls{parindent}}
\end{codebox}
Alternatively, you can use the \frameopt{parindent} attribute if
different indentation is required for different frames.

\item My section numbering is in the wrong order.

Remember that the contents of the \idxpl{dynamic-frame} are not set
until the page is shipped out, and the contents will be set
in the order of \idx{IDN}, so if you have any sectioning commands
occurring within \idxpl*{dynamic-frame}, they may not be set in the same
order as they are in your input file.

\item The contents of my \staticordynamicframe\ have shifted
to the left when I used \gls{parshape}.

This will happen if your \gls{parshape} specification
exceeds the line width. For example:
\begin{codebox}
\gls{parshape}=1 0.4\gls{linewidth} 0.7\gls{linewidth}
\end{codebox}
This specifies a line with overall length 
\code{1.1\gls{linewidth}} which is too long.

\end{enumerate}

\section{Error Messages}\label{sec:errormessages}

\begin{enumerate}

\item Illegal unit of measure (pt inserted)

All lengths must have units. Remember to include the
units when defining new \idxpl{frame}. The following
\idx*{frame} options require lengths: \frameopt{width}, \frameopt{height},
\frameopt{x}, \frameopt{y}, 
\frameopt{oddx}, \frameopt{oddy}, 
\frameopt{evenx}, \frameopt{eveny},
\frameopt{parindent} and \frameopt{offset} (although
\frameopt{offset} can also have the value \optfmt{compute}).

\item Missing number, treated as zero

\LaTeX\ is expecting a number. There are a number of 
possible causes:
\begin{enumerate}
\item You have used an \idx{IDL} instead of an \idx{IDN}. If you
want to refer to a frame by its label, you need to remember
to use the starred versions of the 
\gls{set...frame} commands, or when setting
the contents of \staticordynamicframes.

\item When specifying \idxpl{pglist}, you have mixed keywords
with page ranges. For example: \code{1,even} is invalid.

\end{enumerate}

\item Flow frame IDL \textquotesingle\meta{label}\textquotesingle\ already defined

All \idxpl{IDL} within each \idx{frame} type must be
unique. There are similar error messages for duplicate 
\idxpl*{IDL} for \idxpl{static-frame} and \idxpl{dynamic-frame}.

\item Can't find flow frame id

You have specified a non-existent \idx*{flow-frame} \idx{IDL}. There are
similar error messages for \idxpl{static-frame} and \idxpl{dynamic-frame}.
Check to make sure you have spelt the label correctly, and
check you are using the correct \idx{frame} type command.
(For example, if a \idx*{static-frame} has the \idx{IDL} \qtt{mylabel},
and you attempt to do 
\code{\gls{setflowframe}*\marg{mylabel}\margm{options}}, 
then you will get this error, because \qtt{mylabel} refers
to a \idxpl*{static-frame} not a \idx{flow-frame}.)

\item Key \textquotesingle clear\textquotesingle\ is boolean

The \frameopt{clear} key can only have the values \optfmt{true} 
or \optfmt{false}.

\item Key \textquotesingle clear\textquotesingle\ not available

The \frameopt{clear} key is only available for \staticordynamicframes.

\item Key \textquotesingle style\textquotesingle\ not available

The \frameopt{style} key is only available for \idxpl{dynamic-frame}.

\item Key \textquotesingle margin\textquotesingle\ not available

The \frameopt{margin} key is only available for \idxpl{flow-frame}.

\item Key \textquotesingle shape\textquotesingle\ not available

The \frameopt{shape} key is only available for \staticordynamicframes.

\item Dynamic frame style \textquotesingle\meta{style}\textquotesingle\ not defined

The specified style \meta{style} must be the name of a command
without the preceding backslash.  It is possible that you have
mis-spelt the name, or you have forgotten to define the command.

\item Argument of \gls{fbox} has an extra \code{\}}

This error will occur if you do, say,
\frameoptval{border}{\gls{fbox}} instead of
\frameoptval{border}{fbox}. Remember not to include the initial
backslash.

\item Not in outer par mode

You can not have floats (such as figures, tables or marginal
notes) in \staticordynamicframes. If you want
a figure or table within a \staticordynamicframe\ 
use \env{staticfigure} or \env{statictable}.

\item Something's wrong---maybe missing \gls{item}

Assuming that all your list type of environments start
with \gls{item}, this may be caused by something going
wrong with the \ext+{toc} (table of contents), \ext+{ttb} (thumbtab)
or \ext+{aux} (auxiliary) files in the previous run. Try deleting
them, and try again.

\item \gls{verb} illegal in command argument

As a general rule, you can't use \idx{verbatim} in a command
argument.  This rule applies to all the commands defined by the
\sty{flowfram} package.  See also below.

\item I get \qt{\gls{verb} illegal in command argument} when using
a \index{verbatim} command inside the \env{dynamiccontents} environment.

You can not use \index{verbatim} commands or environments inside either the 
\env{dynamiccontents} or \env{dynamiccontents*} environment.

\end{enumerate}

\appendix
\setupglossaries{numberedsection,section}%
\disablethumbtabs

\chapter{Glossary}

\printmain[title=Terms]

\newpage

\printicons

\chapter{Alphabetical Summaries}\label{sec:summaries}

\printcmdenvsummary

\setupglossaries{section=chapter}
\printclsstysummary

\flowswitchoffnext*{main}
\flowswitchonnext*{left,right}
\renewcommand{\glsxtrbookindexcols}{1}

\backmatter
\setupglossaries{section=chapter}
\printuserguideindex

% have a backcover:
\setstaticframe*{lastbackleft,lastbackright}{pages=even}
\cleartoevenpage\mbox{}\pagestyle{empty}
\end{document}
