ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Entering text into layers
@ 2014-05-19 15:43 Keith McKay
  2014-05-19 21:45 ` Hans Hagen
  2014-05-19 21:54 ` Wolfgang Schuster
  0 siblings, 2 replies; 6+ messages in thread
From: Keith McKay @ 2014-05-19 15:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1778 bytes --]

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



[-- Attachment #1.2: Type: text/html, Size: 7219 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

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

* Re: Entering text into layers
  2014-05-19 15:43 Entering text into layers Keith McKay
@ 2014-05-19 21:45 ` Hans Hagen
  2014-05-20  8:07   ` Keith McKay
  2014-05-19 21:54 ` Wolfgang Schuster
  1 sibling, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2014-05-19 21:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


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

* Re: Entering text into layers
  2014-05-19 15:43 Entering text into layers Keith McKay
  2014-05-19 21:45 ` Hans Hagen
@ 2014-05-19 21:54 ` Wolfgang Schuster
  2014-05-20  8:10   ` Keith McKay
  1 sibling, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2014-05-19 21:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 993 bytes --]


Am 19.05.2014 um 17:43 schrieb Keith McKay <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

[-- Attachment #1.2: Type: text/html, Size: 1846 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

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

* Re: Entering text into layers
  2014-05-19 21:45 ` Hans Hagen
@ 2014-05-20  8:07   ` Keith McKay
  2014-05-20  8:12     ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Keith McKay @ 2014-05-20  8:07 UTC (permalink / raw)
  To: ntg-context

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
> ___________________________________________________________________________________ 
>

___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: Entering text into layers
  2014-05-19 21:54 ` Wolfgang Schuster
@ 2014-05-20  8:10   ` Keith McKay
  0 siblings, 0 replies; 6+ messages in thread
From: Keith McKay @ 2014-05-20  8:10 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 1761 bytes --]

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 <mckaymeister@gmail.com 
> <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
> ___________________________________________________________________________________


[-- Attachment #1.2: Type: text/html, Size: 3821 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

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

* Re: Entering text into layers
  2014-05-20  8:07   ` Keith McKay
@ 2014-05-20  8:12     ` Hans Hagen
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2014-05-20  8:12 UTC (permalink / raw)
  To: ntg-context

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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


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

end of thread, other threads:[~2014-05-20  8:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-19 15:43 Entering text into layers Keith McKay
2014-05-19 21:45 ` Hans Hagen
2014-05-20  8:07   ` Keith McKay
2014-05-20  8:12     ` Hans Hagen
2014-05-19 21:54 ` Wolfgang Schuster
2014-05-20  8:10   ` Keith McKay

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