[texhax] Questions about flowfram

Peter Davis pfd at pfdstudio.com
Sat Oct 15 15:21:53 CEST 2011


I'm working on a converter that will take XML representations of InDesign
documents and convert them to LaTeX suitable for XeLaTeX.  This  will happen
automatically, so any variations in text length, image sizes, etc. will have
to be handled programmatically, either in generating the LaTeX or in the
LaTeX itself.

This is actually a variable data operation ... The XML gives me a template,
which will be used to create multiple pages based on data from a database.
 So, for example, if the template is a 2-sided postcard, and I run it with
50 database records, I'll end up with a 100 page LaTeX document (I hope).

To get the behavior of text flowing from frame to frame, as is possible with
InDesign, I'm planning to use the flowfram package.  However, I have a few
questions about it.  I'd really appreciate any further information or
pointers on these.  Thanks!

1) In some cases, I want a particular flow of text to start in a given
frame.  flowfram has a mechanism to report the ID number of the current
frame.  Is there a way to do something like "while (current_frame <
target_frame) { \pagebreak } " ?  (Obviously I'm not a TeX programmer,
though I'm eager to learn.)  I'm not sure how I'll handle the case where
current_frame > target_frame.

2) It appears I have to define all my flowframes in the prolog, but I can
change the page list for a frame at any time.  So as I'm processing records,
I can add a new page to the page list for each frame that appears on that
page.  However, if some content overflows onto a another page (e.g., one of
my 2-sided postcards becomes 3-sided!), then my page counts for all
subsequent pages will be off, since I'll have no way of knowing about this
extra page that LaTeX created.  Any ideas about how to deal with that?
 Maybe I could define a macro that will take a frame ID as an argument, and
add the current page, whatever it's number, to that frame's page list. Does
that seem feasible?

Thanks very much!!

-pd



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


More information about the texhax mailing list