Quote:
Originally Posted by dwanthny
Side margins are simple but top and bottom margins, while possible, are quite a bit harder when you are dealing with a format that has unpredictable page lengths.
|
Top and bottom margins should be easy to program.
Instead of writing to the screen starting at y coordinate 0 (relative to the containing window), start writing to the screen at y coordinate margin-top (and stop at bottom of window minus margin-bottom). You wouldn't have to make any changes to the flow of the underlying text.
Left and right margins are more complicated, as the text does have to be re-flowed as they change.