diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/flowfram/flowfram.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/flowfram/flowfram.dtx | 111 |
1 files changed, 76 insertions, 35 deletions
diff --git a/Master/texmf-dist/source/latex/flowfram/flowfram.dtx b/Master/texmf-dist/source/latex/flowfram/flowfram.dtx index a0f6615d547..2cc5a42fe35 100644 --- a/Master/texmf-dist/source/latex/flowfram/flowfram.dtx +++ b/Master/texmf-dist/source/latex/flowfram/flowfram.dtx @@ -1,12 +1,12 @@ %\iffalse % flowfram.dtx generated using makedtx version 0.9b (c) Nicola Talbot % Command line args: -% -src "flowfram.sty=>flowfram.sty" +% -src "flowfram.sty\Z=>flowfram.sty" % -doc "docstub.tex" % -author "Nicola Talbot" % -dir "source" % flowfram -% Created on 2005/7/27 17:00 +% Created on 2005/11/24 14:42 %\fi %\iffalse %<*package> @@ -35,7 +35,7 @@ %<*driver> \documentclass{ltxdoc} -\CheckSum{7568} +\CheckSum{7647} \PageIndex \usepackage{url} @@ -59,8 +59,7 @@ that they were defined. There must be at least one flow frame on every page.}} \storeglosentry{static}{name=static frame,description={Frames -in which text is fixed in place. Static frames are usually -cleared after each page. The contents are fixed until +in which text is fixed in place. The contents are fixed until explicitly changed.}} \storeglosentry{dynamic}{name=dynamic frame,description={Frames @@ -111,10 +110,10 @@ refer to the frame by label instead of by its IDN.}} \end{document} %</driver> %\fi -%\def\filedate{26th July 2005} -%\def\fileversion{1.0} +%\def\filedate{24th November 2005} +%\def\fileversion{1.02} %\def\filename{flowfram.dtx} -%\def\docdate{26th July 2005} +%\def\docdate{24th November 2005} % %\title{Documented Source Code for flowfram.sty v\fileversion} %\author{Nicola L. C. Talbot} @@ -122,7 +121,7 @@ refer to the frame by label instead of by its IDN.}} %\maketitle % %This is the documented source code for the flowfram package. -%For a user manual, see \url{flowframuserguide.pdf}. +%For a user manual, see \url{ffuserguide.pdf}. % %\tableofcontents % @@ -139,7 +138,7 @@ refer to the frame by label instead of by its IDN.}} % Declare package, and identify it as a \LaTeXe\ package. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{flowfram}[2005/07/23 v1.0] +\ProvidesPackage{flowfram}[2005/11/24 v1.02] % \end{macrocode} % Load packages needed by this package % \begin{macrocode} @@ -222,12 +221,22 @@ refer to the frame by label instead of by its IDN.}} % \end{macrocode} % Allow provision to prevent rotation in the thumbtabs. % If no rotation, thumbtab text will be stacked vertically. +% This will also affect whether or not to rotate \gls{frame}s. % \begin{macrocode} \newif\if@ttb@rotate \@ttb@rotatetrue \DeclareOption{rotate}{\@ttb@rotatetrue} \DeclareOption{norotate}{\@ttb@rotatefalse} % \end{macrocode} +% Define command that will only rotate box if rotate option +% set. +% \begin{macrocode} +\newcommand{\rotateframe}[2]{\if@ttb@rotate +\rotatebox{#1}{#2}% +\else +#2\relax +\fi} +% \end{macrocode} % Should the thumbtabs include number, title, both or % neither? % \begin{macrocode} @@ -533,6 +542,7 @@ refer to the frame by label instead of by its IDN.}} \expandafter\gdef\csname @ff@backcol@\romannumeral\c@maxflow\endcsname{{none}} \expandafter\gdef\csname @ff@pages@\romannumeral\c@maxflow\endcsname{#1} \expandafter\gdef\csname @ff@offset@\romannumeral\c@maxflow\endcsname{compute} +\expandafter\gdef\csname @ff@angle@\romannumeral\c@maxflow\endcsname{0}% \expandafter\gdef\csname @ff@margin@\romannumeral\c@maxflow\endcsname{right} \ifnum\c@thisframe=0\relax \ifthenelse{\equal{#1}{all}\TE@or\equal{#1}{odd}}{% @@ -712,6 +722,11 @@ Invalid value for key 'offset'}{% 'offset' can either be 'compute' (to compute it according to certain pre-defined rules) or a length}}{}} % \end{macrocode} +% Angle to rotate \gls{flow}: +% \begin{macrocode} +\define@key{flowframe}{angle}{\def\ff@angle{#1}% +} +% \end{macrocode} % This key is only for \gls{flow}s: % \begin{macrocode} \define@key{flowframe}{margin}{% @@ -797,7 +812,7 @@ boolean}{You can only specify the values 'true' or 'false'}}} \def\ff@x{}\def\ff@y{}\def\ff@frametype{}\def\ff@col{}\def\ff@style{}% \def\ff@txtcol{}\def\ff@clear{}\def\ff@offset{}\def\ff@pages{}% \def\ff@label{}\def\ff@backcol{}\def\ff@evenx{}\def\ff@eveny{}% -\def\ff@oddx{}\def\ff@oddy{}% +\def\ff@oddx{}\def\ff@oddy{}\def\ff@angle{}% \setkeys{flowframe}{#2}% \ifthenelse{\equal{\ff@frame}{}}{}{% \setboolean{columnframe\romannumeral#1}{\ff@frame}}% @@ -849,6 +864,9 @@ boolean}{You can only specify the values 'true' or 'false'}}} \ifthenelse{\equal{\ff@offset}{}}{}{% \expandafter\xdef\csname @ff@offset@\romannumeral#1\endcsname {\ff@offset}}% +\ifthenelse{\equal{\ff@angle}{}}{}{% +\expandafter\xdef\csname @ff@angle@\romannumeral#1\endcsname +{\ff@angle}}% \ifthenelse{\equal{\ff@clear}{}}{}{% \PackageError{flowfram}% {Key 'clear' not available for flow frames}{}}% @@ -1038,6 +1056,8 @@ boolean}{You can only specify the values 'true' or 'false'}}} \gdef\csname @sf@offset@\romannumeral\c@maxstatic\endcsname{% compute}% \expandafter +\gdef\csname @sf@angle@\romannumeral\c@maxstatic\endcsname{0}% +\expandafter \def\csname @sf@frametype@\romannumeral\c@maxstatic\endcsname{% fbox}% \newboolean{@sf@clear@\romannumeral\c@maxstatic}% @@ -1162,7 +1182,7 @@ id '#1'}{}\fi} \newcommand{\@@setstaticframe}[2]{% \expandafter\expandafter\expandafter \@ff@getstaticpos\csname @sf@dim@\romannumeral#1\endcsname -\def\ff@frame{}\edef\ff@width{\the\@ff@tmp@x}% +\def\ff@frame{}\edef\ff@width{\the\@ff@tmp@x}\def\ff@angle{}% \edef\ff@height{\the\@ff@tmp@y}\def\ff@style{}\def\ff@frametype{}% \def\ff@x{}\def\ff@y{}\def\ff@col{}\def\ff@txtcol{}\def\ff@backcol{}% \def\ff@clear{}\def\ff@margin{}\def\ff@offset{}\def\ff@pages{}% @@ -1218,6 +1238,9 @@ id '#1'}{}\fi} \ifthenelse{\equal{\ff@offset}{}}{}{% \expandafter \xdef\csname @sf@offset@\romannumeral#1\endcsname{\ff@offset}}% +\ifthenelse{\equal{\ff@angle}{}}{}{% +\expandafter +\xdef\csname @sf@angle@\romannumeral#1\endcsname{\ff@angle}}% \ifthenelse{\equal{\ff@pages}{}}{}{% \expandafter \xdef\csname @sf@pages@\romannumeral#1\endcsname{\ff@pages}}% @@ -1406,6 +1429,8 @@ fbox}% \gdef\csname @df@style@\romannumeral\c@maxdynamic\endcsname{relax}% \expandafter \gdef\csname @df@offset@\romannumeral\c@maxdynamic\endcsname{compute}% +\expandafter +\gdef\csname @df@angle@\romannumeral\c@maxdynamic\endcsname{0}% \newboolean{@df@clear@\romannumeral\c@maxdynamic}% \setboolean{@df@clear@\romannumeral\c@maxdynamic}{false}% \@ifnextchar[{\@s@tdynamicframeid{\c@maxdynamic}}% @@ -1528,7 +1553,8 @@ id '#1'}{}\fi} \edef\ff@height{\the\@ff@tmp@y}\def\ff@style{}\def\ff@frametype{}% \def\ff@x{}\def\ff@y{}\def\ff@col{}\def\ff@txtcol{}\def\ff@backcol{}% \def\ff@clear{}\def\ff@margin{}\def\ff@offset{}\def\ff@pages{}% -\def\ff@label{}\def\ff@evenx{}\def\ff@eveny{}\def\ff@oddx{}\def\ff@oddy{}% +\def\ff@label{}\def\ff@evenx{}\def\ff@eveny{}% +\def\ff@oddx{}\def\ff@oddy{}\def\ff@angle{}% \setkeys{flowframe}{#2}% \ifthenelse{\equal{\ff@frame}{}}{}{% \setboolean{dynamicframe\romannumeral#1}{\ff@frame}}% @@ -1571,6 +1597,9 @@ id '#1'}{}\fi} \ifthenelse{\equal{\ff@offset}{}}{}{% \expandafter \xdef\csname @df@offset@\romannumeral#1\endcsname{\ff@offset}}% +\ifthenelse{\equal{\ff@angle}{}}{}{% +\expandafter +\xdef\csname @df@angle@\romannumeral#1\endcsname{\ff@angle}}% \ifthenelse{\equal{\ff@pages}{}}{}{% \expandafter\xdef\csname @df@pages@\romannumeral#1\endcsname{% \ff@pages}}% @@ -1722,7 +1751,8 @@ but there are only % \begin{macrocode} \newif\if@setfr@mes \@setfr@mesfalse -\newcommand{\setframes}{\ifnum\c@thisframe=0\relax +\newcommand{\setframes}{% +\ifnum\c@thisframe=0\relax \PackageWarning{flowfram}{Can't find a flow frame on page 1. \MessageBreak Attempting to find the first page with a flow frame}% @@ -1740,12 +1770,12 @@ Attempting to find the first page with a flow frame}% \@setfr@mestrue \edef\ff@txtcol{% \csname @ff@txtcol@\romannumeral\c@thisframe\endcsname}% -\@s@tfftextcol} +\@s@tfftextcol +} % \end{macrocode} -% Some commands and environments may use "\twocolumn" -% or "\onecolumn" (e.g. theindex environment). At the -% beginning of the document, redefine these commands -% to emulate the original effect. +% Emulate original "\twocolumn" declaration. +% This is provided for backward compatibilty, and +% may be removed in later versions. % \begin{macrocode} \newcommand{\emulatetwocolumn}[1][]{% \finishthispage @@ -1768,6 +1798,8 @@ Attempting to find the first page with a flow frame}% } % \end{macrocode} % Emulate original "\onecolumn" declaration. +% This is provided for backward compatibilty, and +% may be removed in later versions. % \begin{macrocode} \newcommand{\emulateonecolumn}[1][]{% \finishthispage @@ -1798,8 +1830,12 @@ Attempting to find the first page with a flow frame}% \@onecolumn \fi \setframes -\let\onecolumn\emulateonecolumn -\let\twocolumn\emulatetwocolumn +\renewcommand{\onecolumn}[1][]{\PackageWarning{flowfram}{% +Ignoring \string\onecolumn\space found in document environment. +Frames must be defined in the preamble}#1}% +\renewcommand{\twocolumn}[1][]{\PackageWarning{flowfram}{% +Ignoring \string\twocolumn\space found in document environment. +Frames must be defined in the preamble}#1}% } % \end{macrocode} % If the document finishes before the last frame on the last @@ -2096,13 +2132,13 @@ or text might not appear correctly}% % \end{macrocode} % Now to find out what kind of range it is. If it is a single % number, e.g.\ "24", then it will do, e.g.\ -% "\@ff@@getrange24-\@nil". +% "\@ff@@getrange24-\relax". % If it is a closed range, e.g. "30-40", it will do , e.g.\ -% "\@ff@@getrange30-40-\@nil". If it is an open range, e.g.\ -% ">25", it will do, e.g.\ "\@ff@@getrange>25-\@nil". +% "\@ff@@getrange30-40-\relax". If it is an open range, e.g.\ +% ">25", it will do, e.g.\ "\@ff@@getrange>25-\relax". % \begin{macrocode} \newcommand{\@ff@getrange}[1]{% -\expandafter\@ff@@getrange#1-\@nil\end} +\expandafter\@ff@@getrange#1-\relax\end} % \end{macrocode} % The ranges can now be picked out. If the first character % is a "<" or ">" it is an open ended range, otherwise it @@ -2123,7 +2159,7 @@ or text might not appear correctly}% % Get the values for an open ended range with an % upper bound. A minimum value of "0" is assumed. % \begin{macrocode} -\def\@ff@getrangeless<#1-\@nil\end{% +\def\@ff@getrangeless<#1-\relax\end{% \c@ffrangenum=#1\relax \advance\c@ffrangenum by -1\relax \def\@ff@numstart{0}% @@ -2132,27 +2168,28 @@ or text might not appear correctly}% % Get the values for an open ended range with a lower % bound. A maximum value of "10000" is assumed. % \begin{macrocode} -\def\@ff@getrangegreater>#1-\@nil\end{% +\def\@ff@getrangegreater>#1-\relax\end{% \c@ffrangenum=#1\relax \advance\c@ffrangenum by 1\relax \edef\@ff@numstart{\number\c@ffrangenum}% \def\@ff@numend{10000}} % \end{macrocode} % Determine whether we have a single number or -% a closed range. If "#2" is "\@nil", it is a single +% a closed range. If "#2" is "\relax", it is a single % value, otherwise it is a range. % \begin{macrocode} \def\@@ff@getrange#1-#2\end{% -\ifx#2\@nil +\ifx\relax#2 \def\@ff@numstart{#1}\def\@ff@numend{#1}% \else -\def\@ff@numstart{#1}\@@@ff@getrange#2\end +\def\@ff@numstart{#1}% +\@@@ff@getrange#2\end \fi } % \end{macrocode} % Extract the end value from the closed range. % \begin{macrocode} -\def\@@@ff@getrange#1-\@nil\end{% +\def\@@@ff@getrange#1-\relax\end{% \def\@ff@numend{#1}} % \end{macrocode} % Find the next \gls{flow}. If there are no more flow @@ -2253,6 +2290,7 @@ adding new one}% \edef\ff@txtcol{\csname @ff@txtcol@\romannumeral#1\endcsname}% \edef\ff@backcol{\csname @ff@backcol@\romannumeral#1\endcsname}% \@ff@setoffset{#1}% +\rotateframe{\csname @ff@angle@\romannumeral#1\endcsname}{ \ifthenelse{\boolean{columnframe\romannumeral#1}}{% \@ff@fbox{\csname colwidth\romannumeral#1\endcsname}% {\csname colheight\romannumeral#1\endcsname}{% @@ -2262,7 +2300,7 @@ adding new one}% \@ff@box{\csname colwidth\romannumeral#1\endcsname}% {\csname colheight\romannumeral#1\endcsname}{% \expandafter\box\csname column\romannumeral#1\endcsname}% -}} +}}} % \end{macrocode} % Do the \gls{bbox} for \gls{flow}. % \begin{macrocode} @@ -2510,7 +2548,8 @@ adding new one}% }{}% }% \raise\@ff@tmp@y -\hb@xt@\z@{\expandafter\kern\@ff@tmp@x +\hb@xt@\z@{% +\expandafter\kern\@ff@tmp@x \@fr@meifdraft{\@ff@box{\marginparwidth}% {\csname colheight\romannumeral#1\endcsname}{}}% {M:\number#1}\hss}\fi @@ -2543,6 +2582,7 @@ adding new one}% \@sf@setoffset{#1}% \expandafter\expandafter\expandafter \@ff@getstaticpos\csname @sf@dim@\romannumeral#1\endcsname +\rotateframe{\csname @sf@angle@\romannumeral#1\endcsname}{% \ifthenelse{\boolean{staticframe\romannumeral#1}}{% \@ff@fbox{\@ff@tmp@x}{\@ff@tmp@y}{% \expandafter\usebox\csname @staticframe@\romannumeral#1\endcsname} @@ -2550,7 +2590,7 @@ adding new one}% }{% \@ff@box{\@ff@tmp@x}{\@ff@tmp@y}% {\expandafter\usebox\csname @staticframe@\romannumeral#1\endcsname}% -}} +}}} % \end{macrocode} % Now for the \gls{bbox}: % \begin{macrocode} @@ -2650,6 +2690,7 @@ adding new one}% \@df@setoffset{#1}% \expandafter\expandafter\expandafter \@ff@getstaticpos\csname @df@dim@\romannumeral#1\endcsname +\rotateframe{\csname @df@angle@\romannumeral#1\endcsname}{% \ifthenelse{\boolean{dynamicframe\romannumeral#1}}{% \@ff@fbox{\@ff@tmp@x}{\@ff@tmp@y}% {\expandafter\expandafter\expandafter @@ -2661,7 +2702,7 @@ adding new one}% \expandafter\expandafter\expandafter \parbox\csname @df@dim@\romannumeral#1\endcsname {\csname \ff@style\endcsname{\ff@contents}}}% -}} +}}} % \end{macrocode} % Now for the \gls{bbox}: % \begin{macrocode} |