[texhax] flowfram questions

Peter Davis pfd at pfdstudio.com
Mon Oct 24 01:41:25 CEST 2011


Ok, this seems to be basically working:

\newcommand{\activateff}[1]{
\makeatletter
\nextpage=\thepage
\advance\nextpage by 1
\edef\ffpages{\csname @ff at pages@\romannumeral#1\endcsname}
\setflowframe{#1}{pages={\ffpages,\the\nextpage}}
\makeatother
}

What this does is to add the next page (following the current one given by
\thepage) to the specified flowframe's pages list.  Theoretically, that
means those frames will get populated when we get to that page.  However,
this still seems to leave blank pages in some cases.

I'm wondering if flowframe is looking ahead one page before it actually
ships out the current page.  This is obliquely hinted at in the flowfram
FAQ, but no details are given.

Anyone?

-pd


On Sat, Oct 22, 2011 at 10:13 PM, Peter Davis <pfd at pfdstudio.com> wrote:

> Ok, I'm getting frantic, after many hours of not being able to get this
> working.  I know that flowfram allows many frames to be defined, and each
> has a page list.  So those are stored in
>
> \csname @ff at pages@\romannumeral#1\endcsname, where #1 is the number of the
> frame being referenced.
>
> I'm trying to write a macro that will let me add a page to a frame's page
> list.  As far as I can make out, this has to happen before the page actually
> starts, so I have a count register, \nextpage, that's supposed to give the
> next page number.  The two macros I'm using are:
>
> \newcommand{\ffpages}[1]{\makeatletter\csname @ff at pages
> @\romannumeral#1\endcsname\makeatother}
> \newcommand{\activateff}[1]{\nextpage=\thepage\advance\nextpage by
> 1\setflowframe{#1}{pages={\ffpages{#1},\nextpage}}}
>
>  Can anyone spot a problem with either of these?  When I get to the end of
> the doc, I try displaying the lists with:
>
> Frame 1 pages: \ffpages{1}
>
> and all I get, for all the frames, is page 1.
>
> Anything?
>
> Thanks,
> -pd
>
>
> On Sat, Oct 22, 2011 at 9:05 AM, Peter Davis <pfd at pfdstudio.com> wrote:
>
>> Can anyone explain to me how flowfram decides what frames to use on a
>> page?  I want to be able to 'activate' or 'deactivate' frames on the fly as
>> the document is being composed, but I can't figure out when I have to update
>> the frames' list of pages.  I'm a longtime LaTeX user, but a complete novice
>> at TeX programming.
>>
>> I have a short sample document containing a 1-page, 2-page and 3-page
>> letter.  I wrote a macro called \newletter which begins a new letter.  If I
>> code this macro one way, the second letter (2-pages) has a blank first page,
>> but everything else is ok.  If I code the macro another way, that second
>> letter has a blank 2nd page, but everything else is ok.
>>
>> It's very confusing.  Can anyone shed any light on this?
>>
>> Thanks!
>>
>> -pd
>>
>>
>> --
>> ----
>> The Tech Curmudgeon
>> http://www.techcurmudgeon.com
>>
>>
>>
>
>
> --
> ----
> The Tech Curmudgeon
> http://www.techcurmudgeon.com
>
>
>


-- 
----
The Tech Curmudgeon
http://www.techcurmudgeon.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20111023/f09e6ba5/attachment.html>


More information about the texhax mailing list