|
From: | Kyle |
Subject: | Re: How to put attachments at end of an ordinary document |
Date: | Tue, 20 Feb 2001 15:31:42 -0700 |
Thanks! That was just what I needed. Here's what I did (in case you're interested).
Off the top of my head - will @Place help?
#Full scale figures
extend @BasicSetup @DocumentSetup @OrdinarySetup
def @FullFigure
named @Width {8.5i}
address@hidden not initialized yet?
named @Height {11i}
named @Tag {}
right fig
{
@Place x {right - 0.5 in - xsize} y {0.375 in}
{Figure @NumberOf @Tag}
@Place x {0} y {0} {
@Width @Wide @Height
@High {
//0.5r ||0.5r @IncludeGraphic { fig }
#center it
}
}
}
Now I can just put: @NP @FullFigure @Tag (mytag) @IncludeGraphic {"mydocument.eps")
where I want and it works quite well. The page number just continue
from the normal sequence. That turns out to be fine in this case.
One small problem is the page numbers can get clobbered if the figure has ink in the same space. Also, I couldn't figure out how to use the @PageWidth and @PageHeight defaults (the function definition comes before they are defined in my defs file), so I coded some named parameters in with hardcoded defaults that work for me. Yes, its probably cheating, but its working...
Nothing really prevents you from writing@Document
//
@Text { ... }
//
@Document
//
@Text { ... }
You know, that's the direction I originally took but I could never
figure out how to get it to work so I assumed lout would only accept a
single object (@Document) and I had to smash it all in there.
This was the test I used (which is probably flawed in some other way):
@SysInclude { fontdefs }
@SysInclude { langdefs }
{ Times Base 12p } @Font
{lines} @Break
English @Language
{0 0 0 setrgbcolor} @SetColor
Hello
{ Times Base 12p } @Font
{lines} @Break
English @Language
{0 0 0 setrgbcolor} @SetColor
There
I was trying to produce a document without any definitions (just to see what the simplest case is). I kept getting the error:
4,24: fatal error: missing @Break symbol or option
and so I gave up when you steered me to the Place command.
Should it be possible to format unstructured code as shown above or do you need to wrap things in object definitions?
Kyle
kyle.vcf
Description: Card for Kyle
[Prev in Thread] | Current Thread | [Next in Thread] |