lout-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can Lout Do This?


From: Ted Harding
Subject: Re: Can Lout Do This?
Date: Fri, 25 Apr 1997 15:00:00 +0100 (GMT+0100)

( Re Message From: Thomas M. Browder )
> 
> 2. Be able to have created automatically special
> page headers based on certain criteria on a final
> page. Specifically, classified documents typically
> have each object on a page (paragraphs, tables,
> and figures) marked with the lowest classification.
> The page itself is marked at top and bottom with
> the highest classification found on the page
> (including consideration of a continued object,
> such as a paragraph, from the previous page).

I don't know whether Lout can do it; but I can think of ways to approach
this with troff (which may suggest approaches for Lout).

a. (Imperfect) Put the page classification in footers only. This is
   relatively straightforward, since it only involves accumulating
   the highest classification (including any carry-over from the previous
   page) until the end-of-page macro. The footer text is modified as each
   new paragraph etc is started (which ensures automatic carry-over).

b. Similar, but the footer text includes a motion to the page header
   position (which can be calculated) followed by a return to the page
   footer position.

c. (But much more of a caper) hack the macro package being used to modify
   the start-page and end-page macros so that the start-page puts the page
   output (including headers and footers) into a diversion; then the
   computed classification can be substituted into header and footer
   before final output using the end-page macro which closes the diversion.

d. (Involves two passes) The first pass sends output to /dev/null but
   writes each page's classification to a data-file; and creates a "flag
   file" on completion. The second pass does the same but because the
   "flag file" now exists nothing is written to the data-file which, instead,
   is read and its contents are substituted into registers referenced in
   the page headers and footers.

   There is a way of creating registers in troff with "indexed names" so
   that your data file once created could read

   .ds Pclass001 "Unclassified
   .ds Pclass002 "Top Secret
   ...

   and could be read in before anything else. Then your header and footer
   could simply reference \*[PclassNNN] where PclassNNN substitutes for
   NNN the current page number register in "001" format.

I don't think there is any really easy solution for this; but (d) is
probably the most straightforward, though I don't know how to transfer
such a page-number trick to Lout.

Hope this helps.
Ted.                                    (address@hidden)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]