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
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 -----------------------------------------------------------------
Thanks Hans, This is just what I'm looking for. One last quick question if I may. I've noticed that \setlayerframed is not in the command reference on the wiki. I guess that by looking at the source code for Context would be the best way of finding it's attributes but I don't have a clue which file it is likely to be in. Could you give me a few hints on how to do this please? Thanks again for your help. Best Wishes Keith On 19/05/2014 22:45, Hans Hagen wrote:
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 ___________________________________________________________________________________
On 5/20/2014 10:07 AM, Keith McKay wrote:
Thanks Hans,
This is just what I'm looking for.
One last quick question if I may. I've noticed that \setlayerframed is not in the command reference on the wiki. I guess that by looking at the source code for Context would be the best way of finding it's attributes but I don't have a clue which file it is likely to be in. Could you give me a few hints on how to do this please?
first [] like \setlayer, second [] like \framed
Thanks again for your help.
Best Wishes Keith
On 19/05/2014 22:45, Hans Hagen wrote:
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 ___________________________________________________________________________________
___________________________________________________________________________________
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 ___________________________________________________________________________________
-- ----------------------------------------------------------------- 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 -----------------------------------------------------------------
Am 19.05.2014 um 17:43 schrieb Keith McKay
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.
A short description about layers and overlays: http://www.ntg.nl/pipermail/ntg-context/2013/070935.html Wolfgang
Thanks Wolfgang This is really useful and something I will give further study to. Thanks again for your help. Best Wishes Keith On 19/05/2014 22:54, Wolfgang Schuster wrote:
Am 19.05.2014 um 17:43 schrieb Keith McKay
mailto:mckaymeister@gmail.com>: 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.
A short description about layers and overlays: http://www.ntg.nl/pipermail/ntg-context/2013/070935.html
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 ___________________________________________________________________________________
participants (3)
-
Hans Hagen
-
Keith McKay
-
Wolfgang Schuster