Re: [NTG-context] Center (horizontal + vertical) an image in \setframed

2012-01-01 Thread Wolfgang Schuster

Am 31.12.2011 um 15:33 schrieb Jan Heinen:

 Hello
 
 I want to center (horizontal and vertical) an image in a frame.
 
 2. This is a complete example. I used a second \setframed to show the area in 
 which the cow should be centered and middled:
 
 \definelayer[Kontaktdaten]
[x=0mm, y=0mm,
width=\paperwidth, height=\paperheight]
 \setupbackgrounds [paper]

Do you know the difference between “paper” and “page”?

  [
background=Kontaktdaten,
state=start
  ]%
 \starttext
\setlayerframed [Kontaktdaten]
  [
width=120mm,
height=120mm,
hoffset=50mm,
voffset=50mm
  ]
  [strut=no,offset=overlay,frame=on]
  {\framed [width=120mm, height=120mm]{~}}%
 
\setlayerframed [Kontaktdaten]
  [
width=120mm,
height=120mm,
hoffset=50mm,
voffset=50mm
  ]
  [strut=no,offset=overlay,frame=on]
  {\externalfigure[cow][width=100mm,height=100mm]}%
 
 test
 \page
 \stoptext

\definelayer[Kontaktdaten][width=\paperwidth, height=\paperheight]

\setupbackgrounds[page][background=Kontaktdaten]

\starttext

\setlayerframed
  [Kontaktdaten]
  [hoffset=50mm,
   voffset=50mm]
  [width=120mm,
   height=120mm,
   strut=no,
   frame=on]
  {\externalfigure[cow][width=100mm,height=100mm,frame=on]}%

\dontleavehmode\page

\stoptext

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Center (horizontal + vertical) an image in \setframed

2011-12-31 Thread Jan Heinen

Hello

I want to center (horizontal and vertical) an image in a frame.
1. What Do I have to add?

\setlayerframed [Kontaktdaten]
  [
width=120mm,
height=120mm,
hoffset=50mm,
voffset=50mm
  ]
  [strut=no,offset=overlay,frame=on]
  {\externalfigure[cow][width=100mm,height=100mm]}%



2. This is a complete example. I used a second \setframed to 
show the area in which the cow should be centered and middled:




\definelayer[Kontaktdaten]
[x=0mm, y=0mm,
width=\paperwidth, height=\paperheight]
\setupbackgrounds [paper]
  [
background=Kontaktdaten,
state=start
  ]%
\starttext
\setlayerframed [Kontaktdaten]
  [
width=120mm,
height=120mm,
hoffset=50mm,
voffset=50mm
  ]
  [strut=no,offset=overlay,frame=on]
  {\framed [width=120mm, height=120mm]{~}}%

\setlayerframed [Kontaktdaten]
  [
width=120mm,
height=120mm,
hoffset=50mm,
voffset=50mm
  ]
  [strut=no,offset=overlay,frame=on]
  {\externalfigure[cow][width=100mm,height=100mm]}%

test
\page
\stoptext



I wish You a Happy New Year
Jannis

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Center (horizontal + vertical) an image in \setframed

2011-12-31 Thread luigi scarso
On Sat, Dec 31, 2011 at 3:33 PM, Jan Heinen jahei...@gmx.de wrote:
 Hello

 I want to center (horizontal and vertical) an image in a frame.
 1. What Do I have to add?

    \setlayerframed [Kontaktdaten]
      [
    width=120mm,
    height=120mm,
    hoffset=50mm,
    voffset=50mm
      ]
      [strut=no,offset=overlay,frame=on]
      {\externalfigure[cow][width=100mm,height=100mm]}%



 2. This is a complete example. I used a second \setframed to show the area
 in which the cow should be centered and middled:



 \definelayer    [Kontaktdaten]
        [x=0mm, y=0mm,
        width=\paperwidth, height=\paperheight]
 \setupbackgrounds [paper]
  [
    background=Kontaktdaten,
    state=start
  ]%
 \starttext
    \setlayerframed [Kontaktdaten]
      [
    width=120mm,
    height=120mm,
    hoffset=50mm,
    voffset=50mm
      ]
      [strut=no,offset=overlay,frame=on]
      {\framed [width=120mm, height=120mm]{}%

    \setlayerframed [Kontaktdaten]
      [
    width=120mm,
    height=120mm,
    hoffset=50mm,
    voffset=50mm
      ]
      [strut=no,offset=overlay,frame=on]
      {\externalfigure[cow][width=100mm,height=100mm]}%

 test
 \page
 \stoptext



 I wish You a Happy New Year
 Jannis

 ___
 If your question is of interest to others as well, please add an entry to
 the Wiki!

 maillist : ntg-context@ntg.nl /
 http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki     : http://contextgarden.net
 ___


You have missed a '}'...
Anyway, this is a TeX solution



\definelayer    [Kontaktdaten]       [x=0mm, y=0mm,
width=\paperwidth, height=\paperheight]\setupbackgrounds [paper] [
background=Kontaktdaten,   state=start ]%\starttext   \setlayerframed
[Kontaktdaten]     [   width=120mm,   height=120mm,   hoffset=50mm,
voffset=50mm     ]     [strut=no,offset=overlay,frame=on]     {\framed
[width=120mm, height=120mm]{}}%-- brace missed here
   \setlayerframed [Kontaktdaten]     [   width=120mm,   height=120mm,
  hoffset=50mm,   voffset=50mm     ]
[strut=no,offset=overlay,frame=on]     {\vbox to 120mm{\vss\hbox to
120mm{\hss\externalfigure[cow][frame=on,width=100mm,height=100mm]\hss}\vss}}%
test\page\stoptext
-- 
luigi
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Center (horizontal + vertical) an image in \setframed

2011-12-31 Thread Jan Heinen

Dear luigi,

 You have missed a '}'...

I didn't forget the brace. In the eMail I sent to the 
mailinglist there was a

leftbrace tilde rightbrace rightbrace

tilde rightbrace were eaten by the internet :-(


Thanxs for the solution with hss and vss
Jannis

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___