Re: Enclose page in a box without top and bottom lines

Jeff Kingston <[email protected]>
Newsgroups gmane.comp.type-setting.lout
Message-ID <[email protected]>
Tristan,

> Is there an easy way to ask lout to print each page with a vertical
> rule on the left hand side and another on the right hand side?
> I can use @PageEnclose{@Box @Body} but that gives me rules at the top
> and the bottom which I don't want. My attempts with @PageEnclose{@Node
> ... @Body} have failed.

I tried test document

  @SysInclude { diag }
  @Include { mydoc }
  @Doc @Text @Begin
  @CD @Heading { Test of Page Enclosure }
  This little document tests page enclosure.
  @End @Text

where mydoc was a copy of the doc setup file with the @PageEnclose
line changed to

    @PageEnclose { @Diag { @Node outline { box } @Body } }

intending to add "outlinestyle { solid noline solid noline }" and
"vmargin { 0i }" options to @Node.  That should have worked, but
I got a lot of nonsense about negative size constraints that look
like a bug to me, although I'll have to look harder before I can
be sure.  I'll do that at some stage.

So I abandoned @Diag, which is arguably overkill for this job
anyway, and added the definition

  def @SideLine
  {
    @Box margin { 0.01c } paint { black } @VExpand {}
  }

to mydoc, just before the "@Use { @DocumentSetup" line, and I
changed the @PageEnclose line to

    @PageEnclose { @SideLine ||0.3c @Body ||0.3c @SideLine }

This worked.  You can fiddle with the @Box options to change the
width of the rule, and you can change 0.3c to change the gap
between the rule and the body.

It's a pity that there is no symbol that does vertically what
@LocalWidthRule does horizontally.  If there had been, I could
have used that instead of @SideLine.

Jeff
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.