On 5/19/2014 5:43 PM, Keith McKay wrote:
Colleagues

I have been designing a simple document which comprises of 4 areas (3
for text, 1 for images) on an A4 page.  I thought that the best way to
do this would be using Layers and so far I come up with the code below
after scanning the wiki.  As you can see it is not very sophisticated,
but I'm not a regular user of Context.  The question I have is what
would be the best way to add text to the various layers?  Some would
have quite a lot of text and I was wondering if would be better to
define the text for the different layers in some way rather than enter
into the braces of \setlayerframed.  The code would look messy this
way.  Finally, can layers be positioned within layers or would it be
better to use overlays?  I'm thinking about adding three columns to the
Footer layer.

Thanks for your help

Best Wishes

Keith McKay

\setuplayout

[backspace=0cm,

cutspace=0cm,

width=fit,

topspace=0cm,

bottomspace=0cm,

header=0cm,

footer=0cm,

height=fit]

\setupexternalfigures[location={local,global}]


\definelayer[Logo]

\definelayer[Picture]

\definelayer[Text]

\definelayer[Footer]


\starttext

\strut


\setlayerframed[Logo][x=1cm,y=1cm]

[width=19cm,height=3cm,background=color,backgroundcolor=lightgrey]

{Some text in here}

\setlayerframed[Picture][x=1cm,y=5cm]
[width=6cm,height=19.7cm,background=color,backgroundcolor=lightgrey]{\externalfigure[picture.jpg][background={foreground,figure},maxwidth=6cm]}

\setlayerframed[Text][x=8cm,y=5cm]
[width=12cm,height=19.7cm,background=color,backgroundcolor=lightgrey]{Text
goes here}

\setlayerframed[Footer][x=1cm,y=25.7cm]

[width=19cm,height=3cm,background=color,backgroundcolor=lightgrey]

{Footer goes here}

\setupbackgrounds[text][background={Logo,Picture,Text,Footer}]


\stoptext

use buffers:

\startbuffer[some text]
   bla bla bla bla bla bla bla bla bla bla
   bla bla bla bla bla bla bla bla bla bla
   bla bla bla bla bla bla bla bla bla bla
   bla bla bla bla bla bla bla bla bla bla
   bla bla bla bla bla bla bla bla bla bla
\stopbuffer


\setlayerframed
  [somelayer]
  [preset=lefttop,
   x=1cm,
   y=4cm]
  [width=10cm,
   align=normal]
  {\getbuffer}

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to