* [Q] (newbie) typesetting to grid in layer with widgets
@ 2004-03-11 8:10 Rolf Marvin B e Lindgren
2004-03-11 23:04 ` Hans Hagen
0 siblings, 1 reply; 3+ messages in thread
From: Rolf Marvin B e Lindgren @ 2004-03-11 8:10 UTC (permalink / raw)
[firt message still waits for moderator approval, here's a new and
improved version]
I'm giving ConTeXt a first go in typesetting a diploma.
I've figured out that I'd like to try to typeset to a five-column grid.
Most of the stuff should be centered against the third column, while
some stuff should be centered to the second and fourth column.
This makes for a very boring diploma, but that's beside the point at
this stage.
I want 1-inch borders throughout, so before \starttext, I have
\setuplayout[paperheight=29.97cm,paperwidth=21cm,leftmargin=1cm,rightmargin=1cm,header=1cm,footer=1cm,textwidth=19cm,textheight=27.97cm]
(I pretend that marginpars don't exist. I'm sure they'll come back and
haunt me).
Furthermore, before \starttext, I set up the layers I think I need with
\setuplayout[grid=yes,columndistance=12pt,columns=5]\showgrid
\definelayer [text]
\setupbackgrounds [text] [background=text]
(The showgrid is there because I like to see what I'm doing). Then I
have, say,
\setlayer[text][column=3,line=7,x=0.5\layoutcolumnwidth,location=c]{%
Diploma awarded to}
now, _is_ this the smartest way to do this?
furthermore, I'd like to allow for input into fields from Acrobat. I
have this:
\definefield[CertID][text][CertIDSetup][]
\setupfield[CertIDSetup][%
readonly=no,printable=yes,width=4em,%
frame=on,height=8mm,offset=5ex]
\myCenter{3}{11}{Sertifikat Nr. DNV-2004-OSL-PERS-\field[CertID]}
trouble is, the _field_ is aligned to the baseline, whereas I'd like
the text _of_ the field to be thus aligned. any suggestiosn?
(as a matter of fact, the problem with this approach is that text
cannot ever be centered becaue TeX need to know the dimensions at
typesetting time - which isn't known until the user has interacted. is
there, say, JavaScript magic that could be done in order to have text
centered after it has been input?
and on a sitenote,
I'd like to have a frame around the entire page. Preferably, I'd like
to be able to place it using numerical coordinates (absolute or
relative, set to a layer or not). Is this, or something close to it,
possible?
thank you,
--
Rolf Lindgren http://www.roffe.com/
roffe@tag.uio.no
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: typesetting to grid in layer with widgets
2004-03-11 8:10 [Q] (newbie) typesetting to grid in layer with widgets Rolf Marvin B e Lindgren
@ 2004-03-11 23:04 ` Hans Hagen
2004-03-12 9:58 ` Rolf Marvin B e Lindgren
0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2004-03-11 23:04 UTC (permalink / raw)
At 09:10 11/03/2004, you wrote:
>\setlayer[text][column=3,line=7,x=0.5\layoutcolumnwidth,location=c]{%
> Diploma awarded to}
>
>
>now, _is_ this the smartest way to do this?
\setlayerframed
[text]
[...]
[framed settings]
{}
may give you some more control and insight (you can always turn of the
frame later)
>furthermore, I'd like to allow for input into fields from Acrobat. I
>have this:
>
>\definefield[CertID][text][CertIDSetup][]
>\setupfield[CertIDSetup][%
> readonly=no,printable=yes,width=4em,%
> frame=on,height=8mm,offset=5ex]
>
>\myCenter{3}{11}{Sertifikat Nr. DNV-2004-OSL-PERS-\field[CertID]}
>
>trouble is, the _field_ is aligned to the baseline, whereas I'd like
>the text _of_ the field to be thus aligned. any suggestiosn?
fields (and text in there) don't have a concept of a baseline
(unfortunately), so depending on the situation, you may want to lower the text
\hbox{\lower2pt\hbox{\field[...]}}
and so (i need to look into pdf 1.5 to see if there are better ways now)
>(as a matter of fact, the problem with this approach is that text
>cannot ever be centered becaue TeX need to know the dimensions at
>typesetting time - which isn't known until the user has interacted. is
>there, say, JavaScript magic that could be done in order to have text
>centered after it has been input?
doesn't align=middle work?
>and on a sitenote,
>
>I'd like to have a frame around the entire page. Preferably, I'd like
>to be able to place it using numerical coordinates (absolute or
>relative, set to a layer or not). Is this, or something close to it,
>possible?
i often use metapost for that (see metafun manual)
\defineoverlay[xxx][\useMPgraphic{xxx}]
\startuseMPgraphic{xxx}
StartPage ;
draw Page enlarged -3cm withpen pencircle scaled 1cm ;
StopPage ;
\stopuseMPgraphic
\setupbackgrounds[page][background=xxx]
etc etc
hans
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: typesetting to grid in layer with widgets
2004-03-11 23:04 ` Hans Hagen
@ 2004-03-12 9:58 ` Rolf Marvin B e Lindgren
0 siblings, 0 replies; 3+ messages in thread
From: Rolf Marvin B e Lindgren @ 2004-03-12 9:58 UTC (permalink / raw)
Hans Hagen <pragma@wxs.nl> writes:
> \setlayerframed
> [text]
> [...]
> [framed settings]
> {}
I'll have to consult the documentation of \setlayerframed then - which
again i fear is somewhat terse ... what goes in the [...] box there?
> fields (and text in there) don't have a concept of a baseline
> (unfortunately), so depending on the situation, you may want to lower
> the text
>
> \hbox{\lower2pt\hbox{\field[...]}}
heh. the field box remains fixed to the baseline while the predecing
text is raised :) OK, a bit more twiddling can compensate for that
again. perhaps a wee bit to klugey for my tase.
> >(as a matter of fact, the problem with this approach is that text
> >cannot ever be centered becaue TeX need to know the dimensions at
> >typesetting time - which isn't known until the user has interacted. is
> >there, say, JavaScript magic that could be done in order to have text
> >centered after it has been input?
>
> doesn't align=middle work?
I'll give it a shot but too optimistic I am not. should the \field
have align=middle as part of its setup parameters?
> >I'd like to have a frame around the entire page. Preferably, I'd like
> >to be able to place it using numerical coordinates (absolute or
> >relative, set to a layer or not). Is this, or something close to it,
> >possible?
>
> i often use metapost for that (see metafun manual)
OK.
thanks!
--
Rolf Lindgren http://www.roffe.com/
roffe@tag.uio.no
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-03-12 9:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-11 8:10 [Q] (newbie) typesetting to grid in layer with widgets Rolf Marvin B e Lindgren
2004-03-11 23:04 ` Hans Hagen
2004-03-12 9:58 ` Rolf Marvin B e Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).