ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Layers in ConTeXt
@ 2007-07-13  9:31 Giuseppe Bilotta
  2007-07-13  9:43 ` luigi scarso
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Giuseppe Bilotta @ 2007-07-13  9:31 UTC (permalink / raw)
  To: ntg-context

Hello all,

I have a couple of questions concerning the use of layers in
ConTeXt. I'm working with Luigi Scarso on a layout which is
characterized by some fixed-position elements surrounding
the actual main body of text.

For the fixed-position elements, I'm using layers. However,
my ConTeXt is a little rusty[*], so there are a couple of
things which I need hints for.

The first one is very simple: is there a way to 'fix' the
layer's content "until they change"? I've currently set them
as page backgrounds, but their content gets reset on each
new page.

The second question is slightly more complex: is there a way
to add contents to a layer, rather than replacing the
current layer content? Something like a macro

\addtolayer[layername][hoffset=whatever(optional)]{additional content}

Thanks in advance,

-- 
Giuseppe "Oblomov" Bilotta

P.S. To prove that it's really me, I'll signal two minor
typos in the context source:

core-tab.tex:88:%D   {inintable, ifsplittables}

(first should be ifintable), and

page-lyr.tex:81:      \c!x=\zeropoint,\c!y=\zeropoint,\c!position=\v!no,
page-lyr.tex:87:      \c!location=rb,\c!position=\v!no,\c!page=,

position=no is set twice in the same setup.

[*] I've been out of the loop for a couple of years, the
University has sucked up most of my time. I was never too
happy with it, and I'm planning on a comeback :D

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Layers in ConTeXt
  2007-07-13  9:31 Layers in ConTeXt Giuseppe Bilotta
@ 2007-07-13  9:43 ` luigi scarso
  2007-07-13 12:08 ` Peter Rolf
  2007-07-14 14:51 ` Aditya Mahajan
  2 siblings, 0 replies; 9+ messages in thread
From: luigi scarso @ 2007-07-13  9:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users

"It's allright ( oblamov's Coming Back)"

-- 
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  : https://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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Layers in ConTeXt
  2007-07-13  9:31 Layers in ConTeXt Giuseppe Bilotta
  2007-07-13  9:43 ` luigi scarso
@ 2007-07-13 12:08 ` Peter Rolf
  2007-07-13 15:49   ` Giuseppe Bilotta
  2007-07-14 14:51 ` Aditya Mahajan
  2 siblings, 1 reply; 9+ messages in thread
From: Peter Rolf @ 2007-07-13 12:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Guiseppe,

welcome back ;)

Giuseppe Bilotta schrieb:
> Hello all,
> 
> I have a couple of questions concerning the use of layers in
> ConTeXt. I'm working with Luigi Scarso on a layout which is
> characterized by some fixed-position elements surrounding
> the actual main body of text.
> 
> For the fixed-position elements, I'm using layers. However,
> my ConTeXt is a little rusty[*], so there are a couple of
> things which I need hints for.
>
> The first one is very simple: is there a way to 'fix' the
> layer's content "until they change"? I've currently set them
> as page backgrounds, but their content gets reset on each
> new page.
> 
> The second question is slightly more complex: is there a way
> to add contents to a layer, rather than replacing the
> current layer content? Something like a macro
> 
> \addtolayer[layername][hoffset=whatever(optional)]{additional content}
>

use a collector (Details, p.75) instead; I have no experience with them,
but setup should be the same as for layer.

% - - - - -
\definecollector[foo][state=repeat]

\starttext
\switchtobodyfont[32pt]

\setcollector[foo]{\strut eat more...}
\flushcollector[foo]

\page[yes]

\setcollector[foo][hoffset=6cm]{\strut poppler}
\flushcollector[foo]

\stoptext
% - - - - -

Greetings, Peter
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Layers in ConTeXt
  2007-07-13 12:08 ` Peter Rolf
@ 2007-07-13 15:49   ` Giuseppe Bilotta
  2007-07-13 16:22     ` Peter Rolf
  0 siblings, 1 reply; 9+ messages in thread
From: Giuseppe Bilotta @ 2007-07-13 15:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Friday, July 13, 2007 Peter Rolf wrote:

> Hi Guiseppe,

> welcome back ;)

Thanks :) (btw, it's gIUseppe :D)

> Giuseppe Bilotta schrieb:
>> The first one is very simple: is there a way to 'fix' the
>> layer's content "until they change"? I've currently set them
>> as page backgrounds, but their content gets reset on each
>> new page.
> use a collector (Details, p.75) instead; I have no experience with them,
> but setup should be the same as for layer.

> % - - - - -
> \definecollector[foo][state=repeat]

> \starttext
> \switchtobodyfont[32pt]

> \setcollector[foo]{\strut eat more...}
> \flushcollector[foo]

> \page[yes]

> \setcollector[foo][hoffset=6cm]{\strut poppler}
> \flushcollector[foo]

> \stoptext
> % - - - - -

Excellent, thanks.

BTW, just to show how out of the loop I am, where can I get
the Details manual? :D

-- 
Giuseppe "Oblomov" Bilotta

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Layers in ConTeXt
  2007-07-13 15:49   ` Giuseppe Bilotta
@ 2007-07-13 16:22     ` Peter Rolf
  2007-07-13 21:28       ` Giuseppe Bilotta
  0 siblings, 1 reply; 9+ messages in thread
From: Peter Rolf @ 2007-07-13 16:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Giuseppe Bilotta schrieb:
> Friday, July 13, 2007 Peter Rolf wrote:
> 
>> Hi Guiseppe,
> 
>> welcome back ;)
> 
> Thanks :) (btw, it's gIUseppe :D)
>
Sorry for that. Too much GUI (graphical user interface) stuff in my
work... :)

>> Giuseppe Bilotta schrieb:
>>> The first one is very simple: is there a way to 'fix' the
>>> layer's content "until they change"? I've currently set them
>>> as page backgrounds, but their content gets reset on each
>>> new page.
>> use a collector (Details, p.75) instead; I have no experience with them,
>> but setup should be the same as for layer.
> 
>> % - - - - -
>> \definecollector[foo][state=repeat]
> 
>> \starttext
>> \switchtobodyfont[32pt]
> 
>> \setcollector[foo]{\strut eat more...}
>> \flushcollector[foo]
> 
>> \page[yes]
> 
>> \setcollector[foo][hoffset=6cm]{\strut poppler}
>> \flushcollector[foo]
> 
>> \stoptext
>> % - - - - -
> 
> Excellent, thanks.
> 
> BTW, just to show how out of the loop I am, where can I get
> the Details manual? :D
> 
http://www.pragma-ade.com/general/manuals/details.pdf
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Layers in ConTeXt
  2007-07-13 16:22     ` Peter Rolf
@ 2007-07-13 21:28       ` Giuseppe Bilotta
  0 siblings, 0 replies; 9+ messages in thread
From: Giuseppe Bilotta @ 2007-07-13 21:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Friday, July 13, 2007 Peter Rolf wrote:

>>> Giuseppe Bilotta schrieb:
>>>> The first one is very simple: is there a way to 'fix' the
>>>> layer's content "until they change"? I've currently set them
>>>> as page backgrounds, but their content gets reset on each
>>>> new page.
>>> use a collector (Details, p.75) instead; I have no experience with them,
>>> but setup should be the same as for layer.
>> 
>>> % - - - - -
>>> \definecollector[foo][state=repeat]
>>
>> Excellent, thanks.
>> 
>> BTW, just to show how out of the loop I am, where can I get
>> the Details manual? :D
>> 
> http://www.pragma-ade.com/general/manuals/details.pdf

Oh yeah thanks. I'll be able to get a few more tricks from
that.

I've found that [state=repeat] works for layers too. I
wonder if there are any technical differences between them
...

-- 
Giuseppe "Oblomov" Bilotta

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Layers in ConTeXt
  2007-07-13  9:31 Layers in ConTeXt Giuseppe Bilotta
  2007-07-13  9:43 ` luigi scarso
  2007-07-13 12:08 ` Peter Rolf
@ 2007-07-14 14:51 ` Aditya Mahajan
  2007-07-14 16:14   ` endnotes Horacio Suarez
  2007-07-15 22:42   ` Layers in ConTeXt Giuseppe Bilotta
  2 siblings, 2 replies; 9+ messages in thread
From: Aditya Mahajan @ 2007-07-14 14:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, 13 Jul 2007, Giuseppe Bilotta wrote:

> Hello all,

Welcome back Giuseppe. I had benifitted a lot from your efforts of 
improving the math support in ConTeXt. Had it not been for the amsl 
module, I might have never switched to ConTeXt and would have missed a 
lot of fun.

> I have a couple of questions concerning the use of layers in
> ConTeXt. I'm working with Luigi Scarso on a layout which is
> characterized by some fixed-position elements surrounding
> the actual main body of text.
>
> For the fixed-position elements, I'm using layers. However,
> my ConTeXt is a little rusty[*], so there are a couple of
> things which I need hints for.
>
> The first one is very simple: is there a way to 'fix' the
> layer's content "until they change"? I've currently set them
> as page backgrounds, but their content gets reset on each
> new page.
>
> The second question is slightly more complex: is there a way
> to add contents to a layer, rather than replacing the
> current layer content? Something like a macro
>
> \addtolayer[layername][hoffset=whatever(optional)]{additional content}

This is how I would do it. Not sure if this is the best way. Use 
tokens to keep track of the current information that should go to the 
layer, and repeat the layer on each page.

\newtoks\testtoks

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

\startsetups make:test
\setlayer[test][x=5cm,y=3cm]{\framed[align=normal,width=5cm]{\the\testtoks}}
\stopsetups

\setupbackgrounds[page][setups=make:test,background=test]

\starttext

\testtoks{This is a test}

Let's see

\page

Now add something to the layer

\input knuth

\appendtoks \endgraf \input tufte \to \testtoks

\page

Let's start all over again

\testtoks {Testing again}

\stoptext


HTH,
Aditya
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* endnotes
  2007-07-14 14:51 ` Aditya Mahajan
@ 2007-07-14 16:14   ` Horacio Suarez
  2007-07-15 22:42   ` Layers in ConTeXt Giuseppe Bilotta
  1 sibling, 0 replies; 9+ messages in thread
From: Horacio Suarez @ 2007-07-14 16:14 UTC (permalink / raw)
  To: ntg-context

[-- Attachment #1: Type: text/plain, Size: 704 bytes --]

hello:

i´m using endnotes at the end of each chapter and I have 2 problems:

1. I want some space between a note and the next one. How can I do that?

2. When the last page of a chapter is half filled o more -or somethig like 
that- the endnotes jumps to a new page, but if the last page of a chapter is 
less than a half filled, then the endnotes keeps in the same page, as I 
want.

Thankyou in advance.






--------------------
Horacio Suarez
Editotrial Antropofagia
www.eantropofagia.com.ar

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


[-- Attachment #2: Type: text/plain, Size: 487 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Layers in ConTeXt
  2007-07-14 14:51 ` Aditya Mahajan
  2007-07-14 16:14   ` endnotes Horacio Suarez
@ 2007-07-15 22:42   ` Giuseppe Bilotta
  1 sibling, 0 replies; 9+ messages in thread
From: Giuseppe Bilotta @ 2007-07-15 22:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Saturday, July 14, 2007 Aditya Mahajan wrote:

> On Fri, 13 Jul 2007, Giuseppe Bilotta wrote:

>> Hello all,

> Welcome back Giuseppe. I had benifitted a lot from your efforts of
> improving the math support in ConTeXt. Had it not been for the amsl
> module, I might have never switched to ConTeXt and would have missed a
> lot of fun.

Thanks :) I really hope I'll be able to get back at ConTeXt
development and/or other contributions to the TeX world.

> This is how I would do it. Not sure if this is the best way. Use
> tokens to keep track of the current information that should go to the
> layer, and repeat the layer on each page.

> \newtoks\testtoks

> \definelayer[test]
>              [ width=\paperwidth,
>               height=\paperheight,
>              ]

> \startsetups make:test
> \setlayer[test][x=5cm,y=3cm]{\framed[align=normal,width=5cm]{\the\testtoks}}
> \stopsetups

> \setupbackgrounds[page][setups=make:test,background=test]

An interesting approach. I really need to learn to use
setups.

In the end, as the layout specifications got defined more
accurately, it turns out the number and position of the
layer elements is much less flexible than I originally
thought, so I don't need this approach anymore, but I'll
keep it in mind for future needs.

One thing that I've noticed with repeating layers is that
they appear also on 'empty' pages (as in those left by
forcing an even or odd page). Is it possible to suppress
then in those cases? Do the blank pages left by these
commands have a particular setup that can be tweaked?

-- 
Giuseppe "Oblomov" Bilotta

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2007-07-15 22:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-13  9:31 Layers in ConTeXt Giuseppe Bilotta
2007-07-13  9:43 ` luigi scarso
2007-07-13 12:08 ` Peter Rolf
2007-07-13 15:49   ` Giuseppe Bilotta
2007-07-13 16:22     ` Peter Rolf
2007-07-13 21:28       ` Giuseppe Bilotta
2007-07-14 14:51 ` Aditya Mahajan
2007-07-14 16:14   ` endnotes Horacio Suarez
2007-07-15 22:42   ` Layers in ConTeXt Giuseppe Bilotta

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