At 18:25 19/06/2003 -0700, you wrote:
Hello ConTeXters,

First, I'd like to thank Hans, belatedly, for the columns.pdf manual
which I have been happily using. Column sets are one of the main
reasons that I have enjoyed working with ConTeXt so much, and having
a manual makes them much, much easier to figure out.

Second, I would like to ask if "text flows", which are introduced in
the manual, are implemented at all. When I attempt to use the
examples, ConTeXt complains about the macros not being
defined. Searching through the sources also fails to find anything.  I
am using the latest beta. Are they only defined in the dutch
interface? Any pointers at all would be helpful.

no, they are not yet in the distribution (same for a few footnote/numbering modules that idris has to test first and a couple of spread things)


you can put the attached file in the base directory and do an \input page-flw in cont-new.tex

Hans
%D \module
%D   [       file=page-flw,
%D        version=2003.04.19, % from test-002 (1997) profile experiment 
%D          title=\CONTEXT\ OTR Macros,
%D       subtitle=Text Flows,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright=PRAGMA ADE]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

\writestatus{loading}{Context OTR Macros / Text Flows}

\unprotect 

\def\definetextflow
  {\dodoubleempty\dodefinetextflow}

\def\dodefinetextflow[#1][#2]% flow settings
  {\iffirstargument       
     \doiftextflowcollectorelse{#1}
       {\setbox\textflowcollector{#1}\emptybox}
       [EMAIL PROTECTED]:c:#1\endcsname}%
     \getparameters[\??tx:p:#1]
       [\c!breedte=\hsize,\c!letter=,#2]%
   \fi}

\def\textflowparameter#1#2{\csname\??tx:p:#1#2\endcsname}
\def\textflowcollector  #1{\csname\??tx:c:#1\endcsname}

\def\doiftextflowcollectorelse#1{\doifdefinedelse{\??tx:c:#1}}

\def\doiftextflowelse#1%
  {\doiftextflowcollectorelse{#1}
     {\ifvoid\textflowcollector{#1}%
        \expandafter\secondoftwoarguments
      \else
        \expandafter\firstoftwoarguments
      \fi}
     {\secondoftwoarguments}}

\def\doiftextflow#1%
  {\doiftextflowelse{#1}\firstofoneargument\gobbleoneargument}

\def\starttextflow[#1]%
  {\doiftextflowcollectorelse{#1}
     {\global\setbox\textflowcollector{#1}\vbox
        \bgroup
        \unvbox\textflowcollector{#1}%
        \hsize\textflowparameter{#1}\c!breedte
        \doifsomething{\textflowparameter{#1}\c!letter}%
          {\doconvertfont{\textflowparameter{#1}\c!letter}}%
        \def\stoptextflow{\endgraf\egroup}}
     {\let\stoptextflow\relax}}

\def\flushtextflow#1%
  {\doiftextflow{#1}
     {\ifdim\ht\textflowcollector{#1}>\vsize
        \setbox\scratchbox\vsplit\textflowcollector{#1} to \vsize
        \unvbox\scratchbox
      \else
        \unvbox\textflowcollector{#1}%
      \fi}}

\protect \endinput 

% Example (dutch) 
% 
% \stelpapierformaatin [S6]
% \steltolerantiein    [soepel,rek]
% \stelkleurenin       [status=start]
% \stelvoetin          [strut=nee]
% \stelwitruimtein     [groot]
% 
% \stellayoutin
%   [rechterrand=5cm,breedte=passend,marge=0pt,randafstand=1cm,
%    voet=4cm,voetafstand=1cm,hoofd=0cm]
% 
% \stelteksttekstenin[rand][][\flushtextflow{first}]
% \stelvoettekstenin [rand][][\flushtextflow{second}]
% \stelvoettekstenin         [\flushtextflow{third}][]
% 
% \definetextflow [first]  [alfa]  [breedte=\rechterrandbreedte]
% \definetextflow [second] [beta]  [breedte=\rechterrandbreedte]
% \definetextflow [third]  [gamma] [breedte=\voethoogte]
% 
% \starttekst
% 
% \dorecurse{50}
%   {\getrandomnumber{\funny}{0}{8}
%    \ifcase\funny \starttextflow[alfa]  \input tufte.tex   \stoptextflow
%    \or           \starttextflow[beta]  \input knuth.tex   \stoptextflow
%    \or           \starttextflow[gamma] \input materie.tex \stoptextflow
%    \or          {\bf   TUFTE}\quad \input tufte   \par
%    \or          {\bf   TUFTE}\quad \input tufte   \par
%    \or          {\bf   KNUTH}\quad \input knuth   \par
%    \or          {\bf   KNUTH}\quad \input knuth   \par
%    \or          {\bf MATERIE}\quad \input materie \par
%    \else        {\bf MATERIE}\quad \input materie \par
%    \fi}
% 
% \stoptekst
-------------------------------------------------------------------------
                                  Hans Hagen | PRAGMA ADE | [EMAIL PROTECTED]
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                       information: http://www.pragma-ade.com/roadmap.pdf
                    documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

Reply via email to