Subject: Re: Rules in Headers and Footers with Jade From: Oisin McGuinness <oisin@xxxxxxxx> Date: Fri, 27 Feb 98 10:20:56 -0500 |
W. Eliot Kimber said: > If I use a rule that is displayed in the footer, it works, except that the > resulting footer is flush with the bottom of the page, which I suspect is a > side effect of the fact that a displayed rule is actually not a valid flow > object within a footer (which only allows inline flow objects). (This is long; summary is: Modifying Jade's header footer treatment in RTF backend may help you...) For a current SGML to RTF conversion project, we had many documents (letters) which had rules specified as belonging in the footer. (No problem in the SGML application, which is ArborText's "The Publisher"; it uses the infinitely flexible TeX language as a backend.) I was agreeably surprised to find that the DSSSL code: (element FMT-BASERULE (make rule length: (display-size) display-alignment: 'center line-thickness: 0.5pt orientation: 'horizontal)) followed by a normal (1 line paragraph) displayed fine in the footers, giving a rule extending across the page, with a footer. Most time this printed fine, but we had some problems where it mysteriously moved part way off the page. >From the point of view of Word's dialogs (Word 7.0a for Win 95, running on NT), and from the point of view of some Word Basic macros which were acting on the converted documents to replace footer contents with EPS based logos, the headers and footers generated by Jade looked strange: a) in the File -> Page Setup -> Margins dialog, the From Edge settings for Header and Footer show up as 0.0", no matter what settings I gave to the header-margin and footer-margin characteristics in the style sheet. b) in the File -> Page Setup -> Layout dialog, the Headers and Footers checkbox for "Different Odd and Even" always showed checked, with Different First Page sometimes checked and not. This did not always match the page model for our SGML documents, which (in Publisher language) were sometimes Left/Right (Publisher book based), and sometimes First/Succ. This confused the Word Basic code: when asked to replace footers on 2nd pages with a logo in a document, the 3rd page footers would not get replaced. (Our letter style is 1st page has top logo, 2nd and subsequent pages have bottom logos.) c) The logo inserted in the footers would appear "cut off" when viewed in Word, since it was taller than the 1 line footer it was replacing. (By the way, it appears that Word Basic does not let you get at all the features of a Word document which one can get at in the RTF!) I've dealt with these problems by modifying RtfFOTBuilder.cxx so that: a) The RTF \headery and \footery variables which were being set to 0 in RtfFOTBuilder::startSimplePageSequence are now set to the headerMargin and footerMargin values. In the RtfFOTBuilder::outputHeaderFooter I now omit setting space before (\sb in RTF), and space after (\sa in RTF). Thus the philosophy changes from generating a paragraph with space before and after, to generating a header/footer line exactly positioned. b) In RtfFOTBuilder::endAllSimplePageSequenceHeaderFooter I've added code to check whether the document has Left/Right mode, and based on that, maybe don't set \facinpg in ~RtfFOTBuilder when it outputs the document settings. The kind of headers and footers put out has been changed also, and my Word developers are happy now. (If you like reading confusing specifications, see the discussion on page 29 of the RTF 1.5 spec for header/footer treatment.) The settings visible in the File -> Page Setup -> Layout now match exactly what we expect the page model to be. c) Here Jade was setting \sl (line spacing) explicitly in headers and footers. I've turned that off, which according to the RTF spec will make Word calculate sizes from what is actually present. And it does so, solving my last problem. (That is, replacing footers from macros with objects of different sizes results in the right thing.) Getting back to the rule in footer issue, I believe that your rules may work even better if you change Jade.... Cautions: 1) Our documents just generate 1 simple page sequence. I haven't tested the consequences of these changes when there are several page sequences generated, giving rise to several "sections" in RTF. 2) No tests have been done with other RTF readers besides Word 7.0a. 3) The Jade version used was jade 1.0.1; there is a small difference in the jadetest release where extra spaces are inserted in the RTF for headers and footers between the pieces. 3) The code was finished and tested just yesterday; I haven't gotten James Clark's feedback yet; presumably there were some good reasons for the way the Jade header footer code is the way it is. Diffs to RtfFOTBuilder.cxx are available on request. Oisin McGuinness Sumitomo Bank Capital Markets 277 Park Avenue New York NY 10172 USA (212)-224-4913, email: oisin@xxxxxxxx DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
How was the DSSSL Spec produced?, Kendall G. Clark | Thread | Re: How was the DSSSL Spec produced, Sharon Adler |
Re: How was the DSSSL Spec produced, Sharon Adler | Date | customization of blockquote and fig, Christian Leutloff |
Month |