ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* address/text boxes
@ 2002-07-19  9:31 Cortjan Koppen
  2002-07-19 20:20 ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Cortjan Koppen @ 2002-07-19  9:31 UTC (permalink / raw)


Hello,

being a newbie I have a fairly simple question about the location of a
textblock (I think I use the right words here). I checked the manual but
cannot find what I need.

I have envelopes with (plastic) address windows on the right hand side.
This means I need to print the name and address of a letter on the right
hand side of the paper. This paper will be folded after printing and put
in the envelop, showing the address through the plastic address window
of the envelop.

Of course I can create a textblock with name and address of the
recipient. But if this is the right way to start solving the problem,
how can I locate this textblock somewhere on the righthandside of the
paper?
As you may understand, the alignment of the text is lefthanded. A simple
\rightaligned{....} will not do for that reason.

-- 
Vriendelijke groet,

Cortjan Koppen		


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: address/text boxes
  2002-07-19  9:31 address/text boxes Cortjan Koppen
@ 2002-07-19 20:20 ` Hans Hagen
       [not found]   ` <200207222209.54930.wybo@servalys.nl>
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2002-07-19 20:20 UTC (permalink / raw)
  Cc: ntg-context

At 11:31 AM 7/19/2002 +0200, Cortjan Koppen wrote:
>Hello,
>
>being a newbie I have a fairly simple question about the location of a
>textblock (I think I use the right words here). I checked the manual but
>cannot find what I need.
>
>I have envelopes with (plastic) address windows on the right hand side.
>This means I need to print the name and address of a letter on the right
>hand side of the paper. This paper will be folded after printing and put
>in the envelop, showing the address through the plastic address window
>of the envelop.
>
>Of course I can create a textblock with name and address of the
>recipient. But if this is the right way to start solving the problem,
>how can I locate this textblock somewhere on the righthandside of the
>paper?
>As you may understand, the alignment of the text is lefthanded. A simple
>\rightaligned{....} will not do for that reason.

If you have a recent version:

\definelayer
   [window]
   [width=\textwidth,height=\textheight]

\setlayerframed
   [window]
   [x=2cm,y=3cm]
   [width=10cm,height=4cm]
   {Name\\Adress\\City}

\flushlayer[window]

is one way to go,

another is:

\defineframedtext[window]
\setupframedtexts[window][width=fit,align=right,location=right] % frame=off

\startwindow
Name \\ Adress \\ City
\stopwindow

or just

\hfill \framed[align=right,frame=off]{xxx\\xxx\\xxx}

etc

-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: address/text boxes
       [not found]   ` <200207222209.54930.wybo@servalys.nl>
@ 2002-07-23 11:21     ` Hans Hagen
  2002-07-23 13:56       ` Wybo Dekker
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2002-07-23 11:21 UTC (permalink / raw)
  Cc: ntg-context

At 10:09 PM 7/22/2002 +0200, wybo dekker wrote:
>On Fri July 19 2002 22:20, Hans Hagen wrote:
>
>(about address fields for window envelopes)
>
> > If you have a recent version:
> >
> > \definelayer
> >    [window]
> >    [width=\textwidth,height=\textheight]
> >
> > \setlayerframed
> >    [window]
> >    [x=2cm,y=3cm]
> >    [width=10cm,height=4cm]
> >    {Name\\Adress\\City}
> >
> > \flushlayer[window]
>
>  I tried this without success in the following:
>
>\setupoutput[pdftex]
>\setuppapersize[A4][A4]
>\setuppagenumbering[state=stop]
>
>\def\address#1{
>   \definelayer
>      [window]
>      [width=\textwidth,height=\textheight]
>   \setlayerframed
>      [window]
>      [x=12cm,y=3cm]
>      [align=right,frame=off,width=10cm,height=4cm]
>      {#1}
>   \flushlayer[window]
>}
>
>\starttext
>\address{name\\street\\city}
>\stoptext
>
>As a result, the distance to the left adge of the paper is not 12cm,
>but 28mm more, and the distance from the top edge is not 3cm, but 65mm
>more.
>
>Is there a way to do *absolute* positioning of material on the page?

sure, put it in the page background:

instead of

   \flushlayer[window]

say

   \setupbackgrounds[page][background=window]

Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: address/text boxes
  2002-07-23 11:21     ` Hans Hagen
@ 2002-07-23 13:56       ` Wybo Dekker
  2002-07-23 14:24         ` Wybo Dekker
  0 siblings, 1 reply; 7+ messages in thread
From: Wybo Dekker @ 2002-07-23 13:56 UTC (permalink / raw)


On Tue, 23 Jul 2002, Hans Hagen wrote:

> instead of
>
>    \flushlayer[window]
>
> say
>
>    \setupbackgrounds[page][background=window]

That didn't work either. I tried:

\setupoutput[pdftex]
\setuppapersize[A4][A4]
\setuppagenumbering[state=stop]
\def\address#1{
  \definelayer
     [window]
     [width=\textwidth,height=\textheight]
  \setlayerframed
     [window]
     [x=0cm,y=0cm]
     [align=right,frame=off,width=10cm,height=4cm]
     {#1}
  \setupbackgrounds[page][background=window]
}

\starttext
\address{name\\street\\city}
\stoptext

so since x=y=0 I would expect the address label in the upper left corner
of the paper. Instead, it appears at (25mm,47mm)
-- 
Wybo


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: address/text boxes
  2002-07-23 13:56       ` Wybo Dekker
@ 2002-07-23 14:24         ` Wybo Dekker
  2002-07-23 17:04           ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Wybo Dekker @ 2002-07-23 14:24 UTC (permalink / raw)


On Tue, 23 Jul 2002, Wybo Dekker wrote:

> On Tue, 23 Jul 2002, Hans Hagen wrote:
>
> > instead of
> >
> >    \flushlayer[window]
> >
> > say
> >
> >    \setupbackgrounds[page][background=window]
>
> That didn't work either. I tried:
>
> \setupoutput[pdftex]
> \setuppapersize[A4][A4]
> \setuppagenumbering[state=stop]
> \def\address#1{
>   \definelayer
>      [window]
>      [width=\textwidth,height=\textheight]
>   \setlayerframed
>      [window]
>      [x=0cm,y=0cm]
>      [align=right,frame=off,width=10cm,height=4cm]
>      {#1}
>   \setupbackgrounds[page][background=window]
> }
>
> \starttext
> \address{name\\street\\city}
> \stoptext
>
> so since x=y=0 I would expect the address label in the upper left corner
> of the paper. Instead, it appears at (25mm,47mm)

sorry, it's even worse: there is no pdf-output at all!
(texexec did not warn me for that, so I was looking at an old pdf-file;
 cont-en explicitly says: No pages of output.)

-- 
Wybo


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: address/text boxes
  2002-07-23 14:24         ` Wybo Dekker
@ 2002-07-23 17:04           ` Hans Hagen
  0 siblings, 0 replies; 7+ messages in thread
From: Hans Hagen @ 2002-07-23 17:04 UTC (permalink / raw)
  Cc: ntg-context

At 04:24 PM 7/23/2002 +0200, Wybo Dekker wrote:
>On Tue, 23 Jul 2002, Wybo Dekker wrote:
>
> > On Tue, 23 Jul 2002, Hans Hagen wrote:
> >
> > > instead of
> > >
> > >    \flushlayer[window]
> > >
> > > say
> > >
> > >    \setupbackgrounds[page][background=window]
> >
> > That didn't work either. I tried:
> >
> > \setupoutput[pdftex]
> > \setuppapersize[A4][A4]
> > \setuppagenumbering[state=stop]
> > \def\address#1{
> >   \definelayer
> >      [window]
> >      [width=\textwidth,height=\textheight]
> >   \setlayerframed
> >      [window]
> >      [x=0cm,y=0cm]
> >      [align=right,frame=off,width=10cm,height=4cm]
> >      {#1}
> >   \setupbackgrounds[page][background=window]
> > }
> >
> > \starttext
> > \address{name\\street\\city}
> > \stoptext
> >
> > so since x=y=0 I would expect the address label in the upper left corner
> > of the paper. Instead, it appears at (25mm,47mm)
>
>sorry, it's even worse: there is no pdf-output at all!
>(texexec did not warn me for that, so I was looking at an old pdf-file;
>  cont-en explicitly says: No pages of output.)

ok, that is because backgrounds are processed in the otr, an dif there is 
no content, the otr is never called, so add:

\null

or

\startstandardmakeup
   % no text
\stopstandardmakeup

to force a page

Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: address/text boxes
@ 2002-07-23 11:16 Wybo Dekker
  0 siblings, 0 replies; 7+ messages in thread
From: Wybo Dekker @ 2002-07-23 11:16 UTC (permalink / raw)


On Fri July 19 2002 22:20, Hans Hagen wrote:

(about address fields for window envelopes)

> If you have a recent version:
>
> \definelayer
>    [window]
>    [width=\textwidth,height=\textheight]
>
> \setlayerframed
>    [window]
>    [x=2cm,y=3cm]
>    [width=10cm,height=3cm]
>    {Name\\Adress\\City}
>
> \flushlayer[window]

I tried this without success in the following:

\setupoutput[pdftex]
\setuppapersize[A4][A4]
\setuppagenumbering[state=stop]

\def\address#1{
  \definelayer
     [window]
     [width=\textwidth,height=\textheight]
  \setlayerframed
     [window]
     [x=12cm,y=3cm]
     [align=right,frame=off,width=10cm,height=4cm]
     {#1}
  \flushlayer[window]
}

\starttext
\address{name\\street\\city}
\stoptext

As a result, the distance to the left adge of the paper is not 12cm,
but 28mm more, and the distance from the top edge is not 3cm, but 65mm
more.

Is there a way to do *absolute* positioning of material on the page?

-- 
Wybo


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-07-23 17:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-19  9:31 address/text boxes Cortjan Koppen
2002-07-19 20:20 ` Hans Hagen
     [not found]   ` <200207222209.54930.wybo@servalys.nl>
2002-07-23 11:21     ` Hans Hagen
2002-07-23 13:56       ` Wybo Dekker
2002-07-23 14:24         ` Wybo Dekker
2002-07-23 17:04           ` Hans Hagen
2002-07-23 11:16 Wybo Dekker

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).