Re: [NTG-context] Layers – when do they repeat?

2021-07-21 Thread Henning Hraban Ramm
Hi, this is still unresolved.
I worked around the unwanted repeating layer by resetting them explicitely 
after the first page, but that should not be necessary.
Hraban

> Am 01.07.2021 um 17:38 schrieb Henning Hraban Ramm :
> 
> Hi,
> I’m struggling with layers again.
> 
> According to https://wiki.contextgarden.net/Layers and my previous 
> experience, what you typeset on layers appears only once, while you don’t set 
> repeat=yes.
> 
> But in my example (derived from a magazine layout where I use this margin 
> layer for subtitles) the margin text is repeated on every page. Same behavior 
> in current LMTX and MkIV.
> 
> What did I wrong? Or is it a bug? (The same setup didn’t cause repeats in 
> 2019.)
> 
> Hraban
> 
> 
> 
> \usemodule[visual]
> 
> \setuplayout[
>backspace=82mm,
>width=118mm,
>leftmargindistance=4mm,
>leftmargin=57mm,
> ]
> 
> \definelayer[leftmargin][
>x=0mm,y=3mm,
>width=\leftmarginwidth,
>height=\textheight
> ]
> 
> \setupbackgrounds[text][leftmargin][background=leftmargin,state=start]
> 
> \starttext
> 
> \setlayerframed[leftmargin][
>  frame=off,
>  offset=overlay,
>  width=\leftmarginwidth,
>  align={flushleft,verytolerant},
> ]{Why is this repeated on every page? It should not.}%
> 
> \dorecurse{20}{
> \fakewords{20}{100}\par
> }
> 
> \stoptext
> 

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Layers – when do they repeat?

2021-07-01 Thread Henning Hraban Ramm
Hi,
I’m struggling with layers again.

According to https://wiki.contextgarden.net/Layers and my previous experience, 
what you typeset on layers appears only once, while you don’t set repeat=yes.

But in my example (derived from a magazine layout where I use this margin layer 
for subtitles) the margin text is repeated on every page. Same behavior in 
current LMTX and MkIV.

What did I wrong? Or is it a bug? (The same setup didn’t cause repeats in 2019.)

Hraban



\usemodule[visual]

\setuplayout[
backspace=82mm,
width=118mm,
leftmargindistance=4mm,
leftmargin=57mm,
]

\definelayer[leftmargin][
x=0mm,y=3mm,
width=\leftmarginwidth,
height=\textheight
]

\setupbackgrounds[text][leftmargin][background=leftmargin,state=start]

\starttext

\setlayerframed[leftmargin][
  frame=off,
  offset=overlay,
  width=\leftmarginwidth,
  align={flushleft,verytolerant},
]{Why is this repeated on every page? It should not.}%

\dorecurse{20}{
\fakewords{20}{100}\par
}

\stoptext

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] layers x 2

2021-04-27 Thread jbf

Thanks, it was particularly the braces that I had overlooked.

Julian

On 28/4/21 2:58 pm, Wolfgang Schuster wrote:
Move both \definelayer and \setupbackgrounds to the start of the 
document and put braces ({...}) around the list entry.


Wolfgang

jbf mailto:roma83...@gmail.com>> schrieb am Mi., 
28. Apr. 2021, 06:53:


It is not clear to me. I have two \setupbackgrounds as you can
see. If I put setupbackgrounds[page][background=blessings,tree]
for the first one I get the tree but not the blessing graphic. If
I also have the same for the second one
(\setupbackgrounds[page][background=blessings,tree]) I get the
blessings graphic but not the tree! I want both obviously. Sorry
for being obtuse.

Julian

On 28/4/21 2:44 pm, Wolfgang Schuster wrote:


jbf mailto:roma83...@gmail.com>> schrieb am
Mi., 28. Apr. 2021, 06:25:

Hi list,

Is it possible to place two layers on the same page? I have
several
pages where that would be necessary. On the first of those
pages, it did
actually work, but on the remaining other pages, the second
layer, even
though located at the bottom of the page, eliminates the
first layer. I
have simply set them up one after the other. As you can see,
the 1st is
towards the top left of the page, while the second is bottom
right.

\definelayer[blessings]  % name of the layer
 [x=0mm, y=0mm,  % from upper left corner of paper
  width=\paperwidth, height=.5\paperheight] % let the
layer cover
the full paper
\setlayer[blessings]    % name of the layer
 [hoffset=.09\textwidth, voffset=1.7cm]  % placement
(from upper
left corner of the layer)
 {\externalfigure[bless.eps][width=3cm]}  % the actual
contents of
the layer
\setupbackgrounds[page][background=blessings]

\definelayer[tree]  % name of the layer
 [x=0mm, y=0mm,  % from upper left corner of paper
  width=\paperwidth, height=\paperheight] % let the layer
cover the
full paper
\setlayer[tree]    % name of the layer
 [hoffset=.75\textwidth, voffset=15.1cm]  % placement
(from upper
left corner of the layer)
{\externalfigure[Pohutukawa.jpg][width=.5\textwidth]} % the
actual
contents of the layer
\setupbackgrounds[page][background=tree]

What am I doing wrong?



\setupbackgrounds [page] [background={blessings,trees}]

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://context.aanhet.net  
archive  :https://bitbucket.org/phg/context-mirror/commits/  

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] layers x 2

2021-04-27 Thread Wolfgang Schuster
Move both \definelayer and \setupbackgrounds to the start of the document
and put braces ({...}) around the list entry.

Wolfgang

jbf  schrieb am Mi., 28. Apr. 2021, 06:53:

> It is not clear to me. I have two \setupbackgrounds as you can see. If I
> put setupbackgrounds[page][background=blessings,tree] for the first one I
> get the tree but not the blessing graphic. If I also have the same for the
> second one (\setupbackgrounds[page][background=blessings,tree]) I get the
> blessings graphic but not the tree! I want both obviously. Sorry for being
> obtuse.
>
> Julian
> On 28/4/21 2:44 pm, Wolfgang Schuster wrote:
>
>
> jbf  schrieb am Mi., 28. Apr. 2021, 06:25:
>
>> Hi list,
>>
>> Is it possible to place two layers on the same page? I have several
>> pages where that would be necessary. On the first of those pages, it did
>> actually work, but on the remaining other pages, the second layer, even
>> though located at the bottom of the page, eliminates the first layer. I
>> have simply set them up one after the other. As you can see, the 1st is
>> towards the top left of the page, while the second is bottom right.
>>
>> \definelayer[blessings]  % name of the layer
>>  [x=0mm, y=0mm,  % from upper left corner of paper
>>   width=\paperwidth, height=.5\paperheight] % let the layer cover
>> the full paper
>> \setlayer[blessings]% name of the layer
>>  [hoffset=.09\textwidth, voffset=1.7cm]  % placement (from upper
>> left corner of the layer)
>>  {\externalfigure[bless.eps][width=3cm]}  % the actual contents of
>> the layer
>> \setupbackgrounds[page][background=blessings]
>>
>> \definelayer[tree]  % name of the layer
>>  [x=0mm, y=0mm,  % from upper left corner of paper
>>   width=\paperwidth, height=\paperheight] % let the layer cover the
>> full paper
>> \setlayer[tree]% name of the layer
>>  [hoffset=.75\textwidth, voffset=15.1cm]  % placement (from upper
>> left corner of the layer)
>>  {\externalfigure[Pohutukawa.jpg][width=.5\textwidth]}  % the actual
>> contents of the layer
>> \setupbackgrounds[page][background=tree]
>>
>> What am I doing wrong?
>>
>
>
> \setupbackgrounds [page] [background={blessings,trees}]
>
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] layers x 2

2021-04-27 Thread jbf
It is not clear to me. I have two \setupbackgrounds as you can see. If I 
put setupbackgrounds[page][background=blessings,tree] for the first one 
I get the tree but not the blessing graphic. If I also have the same for 
the second one (\setupbackgrounds[page][background=blessings,tree]) I 
get the blessings graphic but not the tree! I want both obviously. Sorry 
for being obtuse.


Julian

On 28/4/21 2:44 pm, Wolfgang Schuster wrote:


jbf mailto:roma83...@gmail.com>> schrieb am Mi., 
28. Apr. 2021, 06:25:


Hi list,

Is it possible to place two layers on the same page? I have several
pages where that would be necessary. On the first of those pages,
it did
actually work, but on the remaining other pages, the second layer,
even
though located at the bottom of the page, eliminates the first
layer. I
have simply set them up one after the other. As you can see, the
1st is
towards the top left of the page, while the second is bottom right.

\definelayer[blessings]  % name of the layer
 [x=0mm, y=0mm,  % from upper left corner of paper
  width=\paperwidth, height=.5\paperheight] % let the layer cover
the full paper
\setlayer[blessings]    % name of the layer
 [hoffset=.09\textwidth, voffset=1.7cm]  % placement (from upper
left corner of the layer)
 {\externalfigure[bless.eps][width=3cm]}  % the actual
contents of
the layer
\setupbackgrounds[page][background=blessings]

\definelayer[tree]  % name of the layer
 [x=0mm, y=0mm,  % from upper left corner of paper
  width=\paperwidth, height=\paperheight] % let the layer
cover the
full paper
\setlayer[tree]    % name of the layer
 [hoffset=.75\textwidth, voffset=15.1cm]  % placement (from upper
left corner of the layer)
{\externalfigure[Pohutukawa.jpg][width=.5\textwidth]}  % the actual
contents of the layer
\setupbackgrounds[page][background=tree]

What am I doing wrong?



\setupbackgrounds [page] [background={blessings,trees}]

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] layers x 2

2021-04-27 Thread Wolfgang Schuster
jbf  schrieb am Mi., 28. Apr. 2021, 06:25:

> Hi list,
>
> Is it possible to place two layers on the same page? I have several
> pages where that would be necessary. On the first of those pages, it did
> actually work, but on the remaining other pages, the second layer, even
> though located at the bottom of the page, eliminates the first layer. I
> have simply set them up one after the other. As you can see, the 1st is
> towards the top left of the page, while the second is bottom right.
>
> \definelayer[blessings]  % name of the layer
>  [x=0mm, y=0mm,  % from upper left corner of paper
>   width=\paperwidth, height=.5\paperheight] % let the layer cover
> the full paper
> \setlayer[blessings]% name of the layer
>  [hoffset=.09\textwidth, voffset=1.7cm]  % placement (from upper
> left corner of the layer)
>  {\externalfigure[bless.eps][width=3cm]}  % the actual contents of
> the layer
> \setupbackgrounds[page][background=blessings]
>
> \definelayer[tree]  % name of the layer
>  [x=0mm, y=0mm,  % from upper left corner of paper
>   width=\paperwidth, height=\paperheight] % let the layer cover the
> full paper
> \setlayer[tree]% name of the layer
>  [hoffset=.75\textwidth, voffset=15.1cm]  % placement (from upper
> left corner of the layer)
>  {\externalfigure[Pohutukawa.jpg][width=.5\textwidth]}  % the actual
> contents of the layer
> \setupbackgrounds[page][background=tree]
>
> What am I doing wrong?
>


\setupbackgrounds [page] [background={blessings,trees}]

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] layers x 2

2021-04-27 Thread jbf

Hi list,

Is it possible to place two layers on the same page? I have several 
pages where that would be necessary. On the first of those pages, it did 
actually work, but on the remaining other pages, the second layer, even 
though located at the bottom of the page, eliminates the first layer. I 
have simply set them up one after the other. As you can see, the 1st is 
towards the top left of the page, while the second is bottom right.


\definelayer[blessings]  % name of the layer
    [x=0mm, y=0mm,  % from upper left corner of paper
 width=\paperwidth, height=.5\paperheight] % let the layer cover 
the full paper

\setlayer[blessings]    % name of the layer
    [hoffset=.09\textwidth, voffset=1.7cm]  % placement (from upper 
left corner of the layer)
    {\externalfigure[bless.eps][width=3cm]}  % the actual contents of 
the layer

\setupbackgrounds[page][background=blessings]

\definelayer[tree]  % name of the layer
    [x=0mm, y=0mm,  % from upper left corner of paper
 width=\paperwidth, height=\paperheight] % let the layer cover the 
full paper

\setlayer[tree]    % name of the layer
    [hoffset=.75\textwidth, voffset=15.1cm]  % placement (from upper 
left corner of the layer)
    {\externalfigure[Pohutukawa.jpg][width=.5\textwidth]}  % the actual 
contents of the layer

\setupbackgrounds[page][background=tree]

What am I doing wrong?

Julian

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] layers and \llap

2019-11-19 Thread Otared Kavian
Hi Pablo,

I can reproduce the issue on MacOS on Acrobat Reader, and also on Adobe Acrobat 
Pro.
In fact turning off any last viewerlayer makes the text disappear.

Best regards: OK

> On 19 Nov 2019, at 22:10, Pablo Rodriguez  wrote:
> 
> On 11/19/19 9:48 PM, Henri Menke wrote:
>> On 11/20/19 3:16 AM, Pablo Rodriguez wrote:
>>> [...]
>>> Everything works fine if the layer with \llap is placed first.
>>> 
>>> I guess this might be a bug.
>> 
>> Works for me on both Evince and Foxit Reader.  I can't test Adobe because I'm
>> on Linux.
>> 
>> Try also \dontleavehmode\llap{\ConTeXt} because \llap by itself does not 
>> start
>> a paragraph.
> 
> Hi Henri,
> 
> many thanks for your reply.
> 
> This is really weird, since I cannot make it work, either with Acrobat
> in Windows nor in Evince or Acrobat in Linux.
> 
> I’m using latest beta from 2019.11.14 17:07 (either MkIV or MkXL). Which
> beta are you using?
> 
> Many thanks for your help,
> 
> Pablo
> --
> http://www.ousia.tk
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] layers and \llap

2019-11-19 Thread Pablo Rodriguez
On 11/19/19 9:48 PM, Henri Menke wrote:
> On 11/20/19 3:16 AM, Pablo Rodriguez wrote:
>> [...]
>> Everything works fine if the layer with \llap is placed first.
>>
>> I guess this might be a bug.
>
> Works for me on both Evince and Foxit Reader.  I can't test Adobe because I'm
> on Linux.
>
> Try also \dontleavehmode\llap{\ConTeXt} because \llap by itself does not start
> a paragraph.

Hi Henri,

many thanks for your reply.

This is really weird, since I cannot make it work, either with Acrobat
in Windows nor in Evince or Acrobat in Linux.

I’m using latest beta from 2019.11.14 17:07 (either MkIV or MkXL). Which
beta are you using?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] layers and \llap

2019-11-19 Thread Henri Menke
On 11/20/19 3:16 AM, Pablo Rodriguez wrote:
> Hi Hans,
> 
> this comes from a previous message about an issue with \llap and layers.
> 
> Here is the sample:
> 
> \defineviewerlayer[print][state=stop,printable=yes]
> \defineviewerlayer[view][state=start,printable=no]
> 
> \starttext
> \startviewerlayer[view]\color[red]{\TeX}\stopviewerlayer%
> \startviewerlayer[print]\llap{\ConTeXt}\stopviewerlayer%
> 
> \input zapf
> \stoptext
> 
> If the layer with \llap is placed last, disabling the view layer
> disables all the text.
> 
> Everything works fine if the layer with \llap is placed first.
> 
> I guess this might be a bug.

Works for me on both Evince and Foxit Reader.  I can't test Adobe because I'm
on Linux.

Try also \dontleavehmode\llap{\ConTeXt} because \llap by itself does not start
a paragraph.

Cheers,
Henri

> 
> Many thanks for your help,
> 
> Pablo
> --
> http://www.ousia.tk
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] layers and \llap

2019-11-19 Thread Pablo Rodriguez
Hi Hans,

this comes from a previous message about an issue with \llap and layers.

Here is the sample:

\defineviewerlayer[print][state=stop,printable=yes]
\defineviewerlayer[view][state=start,printable=no]

\starttext
\startviewerlayer[view]\color[red]{\TeX}\stopviewerlayer%
\startviewerlayer[print]\llap{\ConTeXt}\stopviewerlayer%

\input zapf
\stoptext

If the layer with \llap is placed last, disabling the view layer
disables all the text.

Everything works fine if the layer with \llap is placed first.

I guess this might be a bug.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] layers for odd and even pages

2015-01-22 Thread Pablo Rodriguez
On 01/20/2015 11:39 PM, Wolfgang Schuster wrote:
>> Am 20.01.2015 um 20:14 schrieb Pablo Rodriguez:
>> [...]
>> I need different layers in even and odd pages and that they are hidden
>> on empty pages.
>>
>> Which is the way to do it?
> 
> Not sure if this is the best way but it works.

Many thanks for your reply, Wolfgang.

This is what I was looking for.

Many thanks for your help,


Pablo



> \setuppapersize[A5]
> 
> \setuppagenumbering[alternative=doublesided,location=]
> 
> \definelayer[test][state=repeat,doublesided=yes]
> 
> \setlayer[test][right]{Odd page}
> \setlayer[test][left] {Even page}
> 
> \setupbackgrounds[page][background=test]
> 
> \starttext
> 
> \dorecurse{5}
>   {\dorecurse{\recurselevel}{\input zapf\par}
>\page
>\pushbackground[page]
>\setupbackgrounds[page][background=]
>\page[right]
>\popbackground}
> 
> \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
> ___
> 


-- 
http://www.ousia.tk
___
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] layers for odd and even pages

2015-01-20 Thread Wolfgang Schuster

> Am 20.01.2015 um 20:14 schrieb Pablo Rodriguez :
> 
> Dear list,
> 
> I have the following sample:
> 
> \setuppapersize[A5]
> \setuppagenumbering[alternative=doublesided,location=]
> \definelayer[testodd][state=start]
> \setlayer[testodd]{Odd page}
> \definelayer[testeven][state=continue]
> \setlayer[testeven]{Even page}
> \setupbackgrounds[page][background={testodd, testeven}]
> \starttext
> \dorecurse{5}{\dorecurse{\recurselevel}{\input zapf\par}\page[right]}
> \stoptext
> 
> I need different layers in even and odd pages and that they are hidden
> on empty pages.
> 
> Which is the way to do it?


Not sure if this is the best way but it works.

\setuppapersize[A5]

\setuppagenumbering[alternative=doublesided,location=]

\definelayer[test][state=repeat,doublesided=yes]

\setlayer[test][right]{Odd page}
\setlayer[test][left] {Even page}

\setupbackgrounds[page][background=test]

\starttext

\dorecurse{5}
  {\dorecurse{\recurselevel}{\input zapf\par}
   \page
   \pushbackground[page]
   \setupbackgrounds[page][background=]
   \page[right]
   \popbackground}

\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] layers for odd and even pages

2015-01-20 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\setuppapersize[A5]
\setuppagenumbering[alternative=doublesided,location=]
\definelayer[testodd][state=start]
\setlayer[testodd]{Odd page}
\definelayer[testeven][state=continue]
\setlayer[testeven]{Even page}
\setupbackgrounds[page][background={testodd, testeven}]
\starttext
\dorecurse{5}{\dorecurse{\recurselevel}{\input zapf\par}\page[right]}
\stoptext

I need different layers in even and odd pages and that they are hidden
on empty pages.

Which is the way to do it?

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___
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] layers in empty pages

2013-10-08 Thread Pablo Rodríguez
Dear list,

I have the following sample:

\setuppagenumbering[alternative=doublesided]
\definelayer[MyLayer][state=continue]
\setlayer[MyLayer]{This is my layer.}
\setupbackgrounds[page][background={MyLayer}]
\starttext
\input knuth
\stoptext

I need the text to be double-sided, but is there no way that the layer
doesn’t show up when the text area is empty?

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___
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] Layers: corner, location

2013-06-10 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

thanks Peter for the explanation.

On Fri, 07 Jun 2013 14:41:45 +0200, Peter Rolf  wrote:


The layer is divided into a 2x2 matrix of squares, where 'x' is the
center. This gets you a total of 3x3=9 different corners.

o---o---o
|   |   |
o---x---o
|   |   |
o---o---o

Now you choose one 'corner' (the reference point) for the placement. The
placement is done in relation to this point. The chosen 'corner' c is
our new 'center point' (only for placement) now.

With 'location' you define, where (in relation to 'corner') the content
is placed. Again you have nine different corners to choose from.

An example to make this clear.

'corner={top,right}, location={bottom,right}' will place content in the
area L (outside the original layer). Think about the 'corner' c as a
magnetic grid point, where the content snaps to. The 'location' l
defines, from which direction we approach the point c.

x = layer center point
c = corner 'top,right', d = location 'bottom right', L = location (area)

o---o---o
|   |   |
o---c---o
|   |   | L |
x---o---d
|   |   |
-



I hope I haven't mixed things up. Feel free to correct this and to
wikify the final version.



I added some info to wiki: 
http://wiki.contextgarden.net/Layers#Understanding_.22location.22_and_.22corner.22

Best regards,

Lukas


Peter


--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

___
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] Layers: corner, location

2013-06-07 Thread Peter Rolf
Am 07.06.2013 10:06, schrieb Procházka Lukáš Ing. - Pontex s. r. o.:
> Hello,
> 
> On Fri, 07 Jun 2013 09:27:14 +0200, Hans Hagen  wrote:
> 
>> On 6/7/2013 9:07 AM, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
>>> The working code is:
>>>
>>> 
>>> \definelayer
>>>[Logo]
>>>[location={left,bottom},
>>> x=\paperwidth,
>>> y=0mm,
>>> hoffset=-5mm,
>>> voffset=5mm,
>>>]
>>>
>>> \setlayer
>>>[Logo]
>>>{\framed[width=4cm,height=1cm]{LOGO}}
>>>
>>> \setupbackgrounds[page][background=Logo]
>>>
>>> \starttext
>>>\input knuth
>>> \stoptext
>>> 
>>
>> see end of pack-box.mkiv for relationship between corner and location;
>> it has to do with matching reference points of content and position on
>> layer
> 
> Thanks for the trial to hint me - I'm no smarter from that .mkiv source.
>

The layer is divided into a 2x2 matrix of squares, where 'x' is the
center. This gets you a total of 3x3=9 different corners.

o---o---o
|   |   |
o---x---o
|   |   |
o---o---o

Now you choose one 'corner' (the reference point) for the placement. The
placement is done in relation to this point. The chosen 'corner' c is
our new 'center point' (only for placement) now.

With 'location' you define, where (in relation to 'corner') the content
is placed. Again you have nine different corners to choose from.

An example to make this clear.

'corner={top,right}, location={bottom,right}' will place content in the
area L (outside the original layer). Think about the 'corner' c as a
magnetic grid point, where the content snaps to. The 'location' l
defines, from which direction we approach the point c.

x = layer center point
c = corner 'top,right', d = location 'bottom right', L = location (area)

o---o---o
|   |   |
o---c---o
|   |   | L |
x---o---d
|   |   |
-



I hope I haven't mixed things up. Feel free to correct this and to
wikify the final version.


Peter

> You just inspired me so the code bellow works, too, and "corner=" and
> "location=" are more meaningful in this version:
> 
> 
> \definelayer
>   [Logo]
>   [width=\paperwidth,
>corner={right,top},
>location={left,bottom},
>hoffset=5mm,
>voffset=5mm,
>state=repeat,
>   ]
> 
> 
> Best regards,
> 
> Lukas
> 
> 

___
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] Layers: corner, location

2013-06-07 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

On Fri, 07 Jun 2013 09:27:14 +0200, Hans Hagen  wrote:


On 6/7/2013 9:07 AM, Procházka Lukáš Ing. - Pontex s. r. o. wrote:

The working code is:


\definelayer
   [Logo]
   [location={left,bottom},
x=\paperwidth,
y=0mm,
hoffset=-5mm,
voffset=5mm,
   ]

\setlayer
   [Logo]
   {\framed[width=4cm,height=1cm]{LOGO}}

\setupbackgrounds[page][background=Logo]

\starttext
   \input knuth
\stoptext



see end of pack-box.mkiv for relationship between corner and location;
it has to do with matching reference points of content and position on
layer


Thanks for the trial to hint me - I'm no smarter from that .mkiv source.

You just inspired me so the code bellow works, too, and "corner=" and 
"location=" are more meaningful in this version:


\definelayer
  [Logo]
  [width=\paperwidth,
   corner={right,top},
   location={left,bottom},
   hoffset=5mm,
   voffset=5mm,
   state=repeat,
  ]


Best regards,

Lukas


--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

___
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] Layers: corner, location

2013-06-07 Thread Hans Hagen

On 6/7/2013 9:07 AM, Procházka Lukáš Ing. - Pontex s. r. o. wrote:

Hello,

I'm trying to understand meaning of "location" and "corner" keywords of
layer definition (http://wiki.contextgarden.net/Layers#My_first_Layer).

The goal is to place a logo (here: a \framed) to the top right corner of
the page, with vertical and horizontal shift 5 mm into the centre of the
page.

The working code is:


\definelayer
   [Logo]
   [location={left,bottom},
x=\paperwidth,
y=0mm,
hoffset=-5mm,
voffset=5mm,
   ]

\setlayer
   [Logo]
   {\framed[width=4cm,height=1cm]{LOGO}}

\setupbackgrounds[page][background=Logo]

\starttext
   \input knuth
\stoptext


Although it works, it's a result of many attempts.
I don't understand why "location={left,bottom}" is the correct choice
although the referential point of the logo is *right-top* corner and I'm
placing the logo into the *right-top* corner of the layer (page).

I played with "corner=" and "location=" combinations but - it seems the
only one which gives the good result is the one above.

Could anyone explain this?


see end of pack-box.mkiv for relationship between corner and location; 
it has to do with matching reference points of content and position on 
layer


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


[NTG-context] Layers: corner, location

2013-06-07 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

I'm trying to understand meaning of "location" and "corner" keywords of layer 
definition (http://wiki.contextgarden.net/Layers#My_first_Layer).

The goal is to place a logo (here: a \framed) to the top right corner of the 
page, with vertical and horizontal shift 5 mm into the centre of the page.

The working code is:


\definelayer
  [Logo]
  [location={left,bottom},
   x=\paperwidth,
   y=0mm,
   hoffset=-5mm,
   voffset=5mm,
  ]

\setlayer
  [Logo]
  {\framed[width=4cm,height=1cm]{LOGO}}

\setupbackgrounds[page][background=Logo]

\starttext
  \input knuth
\stoptext


Although it works, it's a result of many attempts.
I don't understand why "location={left,bottom}" is the correct choice although 
the referential point of the logo is *right-top* corner and I'm placing the logo into the 
*right-top* corner of the layer (page).

I played with "corner=" and "location=" combinations but - it seems the only 
one which gives the good result is the one above.

Could anyone explain this?

Thanks in advance.

Best regards,

Lukas


--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

t.mkiv
Description: Binary data


t.pdf
Description: Adobe PDF document
___
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] Layers, overlays

2013-01-24 Thread Sietse Brouwer
Hello Lukáš,

I don't understand layers and overlays. This is what I could learn
about \tightlayer from the source; I hope that reviving your question
will help somebody else actually answer it.

\tightlayer is defined in pack-lyr.mkiv.

\unexpanded\def\tightlayer[#1]%
  {\hbox
 {\def\currentlayer{#1}% todo: left/right
  \setbox\nextbox\emptybox   % hoogte/breedte are
\wd\nextbox/\ht\nextbox
  \hsize\layerparameter\c!width  % \overlaywidth   = \hsize
  \vsize\layerparameter\c!height % \overlaywheight = \vsize
  \composedlayer{#1}}}

The last command flushes the layer we are about to place:
\composedlayer{x} is syntactic sugar for \flushlayer[x]. (Braces vs.
brackets.)

So it seems that what \tightlayer does is create a layer object
exactly as large as its contents? What this is good for, and how it
relates to overlays, I do not know.

Good luck!

--Sietse
___
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] Layers, overlays

2013-01-18 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

I'd like to ask two questions which appeared on topic "Layer vs. overlay".

Q1: What does \tightlayer[...] exactly do? (No item on wiki.)

Q2: Why some layer properties are specified on \definelayer (beforetext: 
width=\overlaywidth,height=\overlayheight) and some during overlay setups 
(beforetext: preset=righttop)? - Related code given before:


\starttext
  \definelayer  [beforetext][width=\overlaywidth,height=\overlayheight]
  \defineoverlay[beforetext][{\setups[beforetext]\tightlayer[beforetext]}]

  \startsetups[beforetext]
\setlayer[beforetext][preset=righttop]
  {\framed[width=2in]{foo}}
  \stopsetups

  bar
\stoptext


TIA.

Best regards,

Lukas


--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

___
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] Layers

2012-08-06 Thread Bill Meahan

On 08/06/2012 02:47 PM, luigi scarso wrote:



http://archive.contextgarden.net/message/20090628.103925.be696f95.en.html



I'll add that to the wiki under Layers where it will be a little easier 
to find. :)


Many, many thanks!

--
Bill Meahan, Westland, Michigan USA

“Writing is a combination of intangible
  creative fantasy and appallingly
  hard work.”

  —Anthony Powell


This message is digitally signed with an X.509 certificate
to prove it is from me and has not been altered since it was sent.



smime.p7s
Description: S/MIME Cryptographic Signature
___
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] Layers

2012-08-06 Thread luigi scarso
On Mon, Aug 6, 2012 at 8:06 PM, Bill Meahan  wrote:

> Is there any issue with "stacking" layers on top of each other?
>
> What I want to do is create a newsletter nameplate consisting of a base
> layer containing a JPEG graphic of a logo, a partially-transparent layer
> above that to screen the graphic and a top layer containing the newsletter
> name in a large and fancy font ala' *The New York Times" & al.
>
> I've already created a nameplate in Inkscape and can simply place the
> resultant graphic but I'd like to do the whole thing in ConTeXt if I can as
> I could easily use the technique in other situations.
>
> I'll wikify any answers.
>
>
http://archive.contextgarden.net/message/20090628.103925.be696f95.en.html


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

[NTG-context] Layers

2012-08-06 Thread Bill Meahan

Is there any issue with "stacking" layers on top of each other?

What I want to do is create a newsletter nameplate consisting of a base 
layer containing a JPEG graphic of a logo, a partially-transparent layer 
above that to screen the graphic and a top layer containing the 
newsletter name in a large and fancy font ala' *The New York Times" & al.


I've already created a nameplate in Inkscape and can simply place the 
resultant graphic but I'd like to do the whole thing in ConTeXt if I can 
as I could easily use the technique in other situations.


I'll wikify any answers.

Thanks.
--
Bill Meahan, Westland, Michigan USA

“Writing is a combination of intangible
  creative fantasy and appallingly
  hard work.”

  —Anthony Powell


This message is digitally signed with an X.509 certificate
to prove it is from me and has not been altered since it was sent.



smime.p7s
Description: S/MIME Cryptographic Signature
___
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] Layers for alternating page elements?

2012-05-23 Thread Hans Hagen

On 23-5-2012 16:55, Tim Sheasby wrote:

Have just started working with TeX/ConTeXt after years with Adobe InDesign.
Want to make an alternating page layout with one column only but a large outer
margin. This I have managed to achieve but in addition I want running footers
in the outer margin flush with the bottom of the text and also want a vertical
..5pt rule between the text area and the outside margin area. Can a layer be
placed in the footer or header to achieve this?
Layout would have to alternate from left to right page. I think this means a
different layer for each side?

The right page must also have a logo at the top of the outside margin.

Page setup is as follows:

\setuppapersize [A4][A4]
\setuplayout[ width=10cm,backspace=2.5cm,rightmargin=5.8cm,
rightmarginspace=1cm,topspace=1.5cm,header=0cm,lines=42]


all areas can have background, just search for setupbackgrounds on the 
wiki and setupfooter / setupheader



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


[NTG-context] Layers for alternating page elements?

2012-05-23 Thread Tim Sheasby
Have just started working with TeX/ConTeXt after years with Adobe InDesign.
Want to make an alternating page layout with one column only but a large outer
margin. This I have managed to achieve but in addition I want running footers
in the outer margin flush with the bottom of the text and also want a vertical
.5pt rule between the text area and the outside margin area. Can a layer be
placed in the footer or header to achieve this?
Layout would have to alternate from left to right page. I think this means a
different layer for each side? 

The right page must also have a logo at the top of the outside margin.

Page setup is as follows:

\setuppapersize [A4][A4]
\setuplayout[ width=10cm,backspace=2.5cm,rightmargin=5.8cm,
rightmarginspace=1cm,topspace=1.5cm,header=0cm,lines=42]

Many thanks

___
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] Layers + simplefonts: Using different font in layers?

2011-12-09 Thread Wolfgang Schuster

Am 09.12.2011 um 15:43 schrieb Willi Egger:

> Hi Mari,
> 
> if you look into the test-file I sent you before, then you will see, that 
> indeed the layer has to be moved. I was also a bit amazed to see, that the 
> layer is anchored to the textarea. 

\placelayer use the area of the current block (in this case the text are), one 
way out of this is to use the “pagemakeup” environment where all margins are 
set to 0pt.

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
___


Re: [NTG-context] Layers + simplefonts: Using different font in layers?

2011-12-09 Thread Willi Egger
Hi Mari,

if you look into the test-file I sent you before, then you will see, that 
indeed the layer has to be moved. I was also a bit amazed to see, that the 
layer is anchored to the textarea. 

Willi


On 9 Dec 2011, at 14:54, Mari Voipio wrote:

> On Fri, Dec 9, 2011 at 13:04, Willi Egger  wrote:
>> When i use the attached test-file, the TOC is in palatino. May be you have 
>> to check, where the \setups is called. Before calling the setups there must 
>> be a page break.
> 
> It works for me, too, once I managed to fix a stupid typo... Mostly
> your version works pretty well, correct fonts at correct places (I'd
> actually prefer Candara at cover, too, but it is not for me to
> decide...) and at correct size, too.
> 
> 
> On the other hand, of some reason my cover page now thinks that
> "righttop" is located at the right top of the text area, but the wiki
> says it should always refer to paper edge. Is this because of the
> command \placelayer or have I just piled things up in the wrong order?
> 
> 
> ...almost there...
> 
> 
> Mari
> (and now out to the darkness and horizontal sleet, could we get some
> real snow, please?)
> ___
> 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
___


Re: [NTG-context] Layers + simplefonts: Using different font in layers?

2011-12-09 Thread Mari Voipio
On Fri, Dec 9, 2011 at 13:04, Willi Egger  wrote:
> When i use the attached test-file, the TOC is in palatino. May be you have to 
> check, where the \setups is called. Before calling the setups there must be a 
> page break.

It works for me, too, once I managed to fix a stupid typo... Mostly
your version works pretty well, correct fonts at correct places (I'd
actually prefer Candara at cover, too, but it is not for me to
decide...) and at correct size, too.


On the other hand, of some reason my cover page now thinks that
"righttop" is located at the right top of the text area, but the wiki
says it should always refer to paper edge. Is this because of the
command \placelayer or have I just piled things up in the wrong order?


...almost there...


Mari
(and now out to the darkness and horizontal sleet, could we get some
real snow, please?)


maoutput_cover_mari.tex
Description: TeX document


maoutput_cover_test_willi.tex
Description: TeX document
___
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] Layers + simplefonts: Using different font in layers?

2011-12-09 Thread Hans Hagen

On 9-12-2011 11:00, Mari Voipio wrote:

On Fri, Dec 9, 2011 at 11:10, Willi Egger  wrote:

Here is what I interpreted from your mail. May be it answers the first 
question. Using setups does normally help in these cases.


It does sort out the font problem - turns out I was almost there,
except that my TOC insisted on being in Arial (and *really* ugly as it
is set up for Candara). Your alternative sorts out that problem, I
tested with


always keep in mind that tex works asynchronous ... so, add a \page 
before you change settings that also might affect th epagebuilding


Hans

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


Re: [NTG-context] Layers + simplefonts: Using different font in layers?

2011-12-09 Thread Willi Egger
Hi Mari,


On 9 Dec 2011, at 11:00, Mari Voipio wrote:

> On Fri, Dec 9, 2011 at 11:10, Willi Egger  wrote:
>> Here is what I interpreted from your mail. May be it answers the first 
>> question. Using setups does normally help in these cases.
> 
> It does sort out the font problem - turns out I was almost there,
> except that my TOC insisted on being in Arial (and *really* ugly as it
> is set up for Candara). Your alternative sorts out that problem, I
> tested with
> 
> \placecontent
> 
> \chapter{This is chapter 1}
> 
> \dorecurse{3}
>   {\input tufte \page}
> 
> \chapter{This is chapter 2}
> 
> \dorecurse{3}
>   {\input tufte \page}

When i use the attached test-file, the TOC is in palatino. May be you have to 
check, where the \setups is called. Before calling the setups there must be a 
page break.
> 
> 
> Even on yours the back cover ends up on the next-to-last page (the
> last page being empty), so problem 2 persists. In a real pinch I can
> probably fiddle with it in Acrobat (or pdfarrange or something).

Yes it is. I tried to use \startstandardmakeup[page=left, doublesided=no] from 
which I would expect to give the desired result, but it does not. So I am stuck 
also.



test-simplefonts.tex
Description: Binary data


Willi


> 
> 
> Thank you,
> 
> Mari
> ___
> 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
___

Re: [NTG-context] Layers + simplefonts: Using different font in layers?

2011-12-09 Thread Mari Voipio
On Fri, Dec 9, 2011 at 11:10, Willi Egger  wrote:
> Here is what I interpreted from your mail. May be it answers the first 
> question. Using setups does normally help in these cases.

It does sort out the font problem - turns out I was almost there,
except that my TOC insisted on being in Arial (and *really* ugly as it
is set up for Candara). Your alternative sorts out that problem, I
tested with

\placecontent

\chapter{This is chapter 1}

\dorecurse{3}
   {\input tufte \page}

\chapter{This is chapter 2}

\dorecurse{3}
   {\input tufte \page}


Even on yours the back cover ends up on the next-to-last page (the
last page being empty), so problem 2 persists. In a real pinch I can
probably fiddle with it in Acrobat (or pdfarrange or something).


Thank you,

Mari
___
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] Layers + simplefonts: Using different font in layers?

2011-12-09 Thread Willi Egger
Hi Mari,

hm, although the master has given his answer already ...
Here is what I interpreted from your mail. May be it answers the first 
question. Using setups does normally help in these cases.


Making the number of pages divisible by four. quadruple works with arranging. 
So probably you must insert the number of pages needed manually?

I hope this helps you going!

Willi



test-simplefonts.tex
Description: Binary data


On 9 Dec 2011, at 09:24, Mari Voipio wrote:

> Hi!
> 
> After a wee bit of struggle I've managed to get as far as to
> (re)creating front and back covers of a booklet as layers. They worked
> fine in separate files, but now I have to incorporate the layers into
> my main file and that turned out to be too complicated for my little
> brain. Thus I'd appreciate a bit of help...
> 
> I'm using Windows 7 and SciTe and I just updated my ConTeXt to newest
> beta (and it works).
> 
> 
> Problem one: The text on the covers needs to be in Arial, but the
> contents should be in Candara. I can get this done in totally separate
> files with
> 
> 
> \usemodule[simplefonts]
> \setmainfont[arial]
> 
> \usemodule[simplefonts]
> \setmainfont[candara]
> 
> 
> However, when I put the front cover before the main contents, I don't
> seem to be able to reset the font. The same goes for
> \setupinterlinespace, it is 1.8em on the cover and default in the
> contents.
> I'm not very familiar with the layers nor the font switching and this
> together makes it very difficult for me to figure out in what order my
> commands should be (and what they should be; doing a search on the
> wiki pages on "setmainfont" gives *no* results).
> 
> 
> So, can somebody provide me with a minimal example of a file that has
> a layer with text in one font (preferably using simplefonts) and a few
> pages of text in another font and then another layer as backcover in
> cover font?
> 
> 
> 
> Problem two: Whatever I do, I can't get the final number of pages to
> be divisible by for (and in a way that the back cover ends up on the
> last page). I used to use the hack given at
> ,
> but it doesn't work any more (hangs on \fi} / line 18); I think it
> still worked in June 2011, but not any more in August.
> 
> 
> So, how do I get my back cover to pop up on the last page of my booklet?
> 
> 
> (Problem three: Having stuff under back matter causes a few extra
> empty pages that I don't seem to be able to suppress with any
> combination of \page commands (last one I tried seems to be
> \page[right,quadruple]). However, this problem may go away if 1 & 2
> get solved.)
> 
> 
> 
> Thankful for any help,
> 
> Mari
> ___
> 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
___

Re: [NTG-context] Layers + simplefonts: Using different font in layers?

2011-12-09 Thread Hans Hagen

On 9-12-2011 09:24, Mari Voipio wrote:


Problem one: The text on the covers needs to be in Arial, but the
contents should be in Candara. I can get this done in totally separate
files with


\usemodule[simplefonts]
\setmainfont[arial]

\usemodule[simplefonts]
\setmainfont[candara]


That is for Wolfgang to answer but you can try this:

% at the top of the file

\setupbodyfont[mscore,ss]

% then

\usemodule[simplefonts]
\setmainfont[candara]

% in the front page:

\start \switchtobodyfont[mscore,ss]

the front page

\stop \page

main text

\page \start \switchtobodyfont[mscore,ss]

the back page

\stop


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


[NTG-context] Layers + simplefonts: Using different font in layers?

2011-12-09 Thread Mari Voipio
Hi!

After a wee bit of struggle I've managed to get as far as to
(re)creating front and back covers of a booklet as layers. They worked
fine in separate files, but now I have to incorporate the layers into
my main file and that turned out to be too complicated for my little
brain. Thus I'd appreciate a bit of help...

I'm using Windows 7 and SciTe and I just updated my ConTeXt to newest
beta (and it works).


Problem one: The text on the covers needs to be in Arial, but the
contents should be in Candara. I can get this done in totally separate
files with


\usemodule[simplefonts]
\setmainfont[arial]

\usemodule[simplefonts]
\setmainfont[candara]


However, when I put the front cover before the main contents, I don't
seem to be able to reset the font. The same goes for
\setupinterlinespace, it is 1.8em on the cover and default in the
contents.
I'm not very familiar with the layers nor the font switching and this
together makes it very difficult for me to figure out in what order my
commands should be (and what they should be; doing a search on the
wiki pages on "setmainfont" gives *no* results).


So, can somebody provide me with a minimal example of a file that has
a layer with text in one font (preferably using simplefonts) and a few
pages of text in another font and then another layer as backcover in
cover font?



Problem two: Whatever I do, I can't get the final number of pages to
be divisible by for (and in a way that the back cover ends up on the
last page). I used to use the hack given at
,
but it doesn't work any more (hangs on \fi} / line 18); I think it
still worked in June 2011, but not any more in August.


So, how do I get my back cover to pop up on the last page of my booklet?


(Problem three: Having stuff under back matter causes a few extra
empty pages that I don't seem to be able to suppress with any
combination of \page commands (last one I tried seems to be
\page[right,quadruple]). However, this problem may go away if 1 & 2
get solved.)



Thankful for any help,

Mari
___
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] [layers] unsolicited “0” after setting background

2011-06-10 Thread Philipp Gesang
On 2011-06-10 <12:12:15>, Wolfgang Schuster wrote:
> 
> Am 10.06.2011 um 12:07 schrieb Philipp Gesang:
> 
> > Hi again,
> > 
> > when setting a background layer combined with an early font setup
> > there appears a “0” (ascii 0x30) right after “\starttext”:
> > 
> > ·
> > 
> > \setupbodyfont[sans] %%% <-- comment this out and the “0” vanishes
> > \definelayer[bg][x=0,y=0,width=\paperwidth,height=\paperheight] %%% <-- or 
> > this
> 
> “x” and “y” expect a dimension but you assign a number, remove the setting
> (because both are set to 0pt by default) or change the values to 0pt.

Thanks, I found this out by experimenting …

Best regards
Philipp

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


pgpHEspqmxWTd.pgp
Description: PGP signature
___
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] [layers] unsolicited “0” after setting background

2011-06-10 Thread Wolfgang Schuster

Am 10.06.2011 um 12:07 schrieb Philipp Gesang:

> Hi again,
> 
> when setting a background layer combined with an early font setup
> there appears a “0” (ascii 0x30) right after “\starttext”:
> 
> ·
> 
> \setupbodyfont[sans] %%% <-- comment this out and the “0” vanishes
> \definelayer[bg][x=0,y=0,width=\paperwidth,height=\paperheight] %%% <-- or 
> this

“x” and “y” expect a dimension but you assign a number, remove the setting
(because both are set to 0pt by default) or change the values to 0pt.

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] [layers] unsolicited “0” after setting background

2011-06-10 Thread Philipp Gesang
Hi again,

when setting a background layer combined with an early font setup
there appears a “0” (ascii 0x30) right after “\starttext”:

·

\setupbodyfont[sans] %%% <-- comment this out and the “0” vanishes
\definelayer[bg][x=0,y=0,width=\paperwidth,height=\paperheight] %%% <-- or this

\setlayer[bg]{%
  \startMPcode
draw fullcircle scaled (.5*PaperWidth) withpen pencircle xscaled 7 
withcolor \MPcolor{gray:7};
  \stopMPcode
}
\setupbackgrounds[paper][background=bg]

\starttext
\input dawkins
\stoptext

·

Removing either the “\definelayer” or “\setupbodyfont” statement
makes it go away.

What have I come across this time?

Philipp


pgp0qo5NQO3ng.pgp
Description: PGP signature
___
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] Layers again

2011-04-26 Thread Hans Hagen

On 26-4-2011 7:41, Ian Lawrence wrote:


The \setupbackgrounds[page][state=repeat,background={XXX}] is the
command that puts the logical layer on each page.


indeed, and that repeat is independent of layers

Also, you can have multiple layers, so

\setupbackgrounds[page][state=repeat,background={XXX,YYY}]

as well as put stuff in front

\setupbackgrounds[page][state=repeat,background={XXX,foreground,YYY}]

in this case YYY goes in front.

And then there are viewerlayers (acrobat) that you can turn on and off
with \goto{On}[VideLayer{mylayer}] but that's a different topic.


Hans

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


Re: [NTG-context] Layers again

2011-04-26 Thread Ian Lawrence
OK, now maybe I get it. This might help someone...


It's the **contents** of the layer that get repeated if you set
repeat=yes in \definelayer - as in
http://wiki.contextgarden.net/Layers

If you do a \setlayer then this simply adds to the existing stack of
contents displayed on the layer.  You get more and more stuff until
you do a \resetlayer, assuming you set  repeat=yes in the
\definelayer. Thus(?) \definelayer is all about the contents of the
layer (? Apart from setting the dimensions and so on... I think that's
what deflected me into thinking that this command was about the
canvas, and the \setlayer about the contents.)

The \setupbackgrounds[page][state=repeat,background={XXX}] is the
command that puts the logical layer on each page.

If this seems about right then I'll have a go at adding a sentence or
two to the wiki...maybe on-one else thinks of it in terms of the
existence and then the population of a layer...?


On 26 April 2011 17:44, Hans Hagen  wrote:
> On 26-4-2011 6:26, Ian Lawrence wrote:
>
>
>> But when I get to a new page I'd like to be able to change that plug,
>> or even have the layer blank
>
> that happens automatically unless the state of the layer is set to 'repeat'
>
> so normally, once a layer is placed its content is forgotten
>
>> \page[yes]
>>
>> \setlayer       [SPTinteractivemedium]  % name of the layer
>>                [hoffset=0px, voffset=0px,]  % placement (from upper left
>> corner of the layer)
>>                { \externalfigure [dummy][width=100px]}  % the actual
>> contents of the layer
>>
>> And;
>>
>> \page[yes]
>> \setlayer       [SPTinteractivemedium]  % name of the layer
>>                [hoffset=0px, voffset=0px,]  % placement (from upper left
>> corner of the layer)
>>                { \externalfigure ??? }  % HOW TO SET THE
>> \externalfigure to
>> NOTHING, or hide the layer?
>
> \resetlayer [SPTinteractivemedium]
>
>> I might try changing the backgrounds on a page by page basis, but this
>> seems inelegant, as the \setups ought to be before the \starttext..?
>
>
> -
>                                          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
___


Re: [NTG-context] Layers again

2011-04-26 Thread Hans Hagen

On 26-4-2011 6:26, Ian Lawrence wrote:



But when I get to a new page I'd like to be able to change that plug,
or even have the layer blank


that happens automatically unless the state of the layer is set to 'repeat'

so normally, once a layer is placed its content is forgotten


\page[yes]

\setlayer   [SPTinteractivemedium]  % name of the layer
[hoffset=0px, voffset=0px,]  % placement (from upper left 
corner of the layer)
{ \externalfigure [dummy][width=100px]}  % the actual contents 
of the layer

And;

\page[yes]
\setlayer   [SPTinteractivemedium]  % name of the layer
[hoffset=0px, voffset=0px,]  % placement (from upper left 
corner of the layer)
{ \externalfigure ??? }  % HOW TO SET THE \externalfigure to
NOTHING, or hide the layer?


\resetlayer [SPTinteractivemedium]


I might try changing the backgrounds on a page by page basis, but this
seems inelegant, as the \setups ought to be before the \starttext..?



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


Re: [NTG-context] Layers again

2011-04-26 Thread Ian Lawrence
Thanks, as every. More information - I hope without overload.

I was trying to make a test suite... And failed depressingly...


I have a series of swf files that I'd like to position in exactly the
same location on a page.

Not all pages will have an swf on them.

The swf will be specific to that page.

Now I think need a layer to be able to position exactly - that is so
many pixels in and down from the top  ('Paper' size is 1024 by 768) -
I don't know how to do this with overlays, and it seems to me that the
documentation suggests that layers are made for this job:

So I write:

\definepapersize[Screen][width=1024px,height=768px]
\setuppapersize[Screen][Screen]

\definelayer[SPTinteractivemedium]  % name of the layer
[x=359px, y=140px,  % from upper left corner of paper
width=642px, height=492px, repeat=yes] % let the layer be large
enough for the med swf

And then

\setupbackgrounds[page][state=page,background={SPTinteractivemedium}]

Then i the text I write

\starttext
Hello world, etc

\setlayer   [SPTinteractivemedium]  % name of the layer
[hoffset=0px, voffset=0px,]  % placement (from upper left 
corner of the layer)
{\externalfigure [plug][width=200px]}  % the actual contents of 
the layer


But when I get to a new page I'd like to be able to change that plug,
or even have the layer blank

So

\page[yes]

\setlayer   [SPTinteractivemedium]  % name of the layer
[hoffset=0px, voffset=0px,]  % placement (from upper left 
corner of the layer)
{ \externalfigure [dummy][width=100px]}  % the actual contents 
of the layer

And;

\page[yes]
\setlayer   [SPTinteractivemedium]  % name of the layer
[hoffset=0px, voffset=0px,]  % placement (from upper left 
corner of the layer)
{ \externalfigure ??? }  % HOW TO SET THE \externalfigure to
NOTHING, or hide the layer?

It seems this ought to be easy, but I tried guessing a 'state=page'
parameter in \setlayer... And trawling wiki, manuals. No joy.

I might try changing the backgrounds on a page by page basis, but this
seems inelegant, as the \setups ought to be before the \starttext..?


On 26 April 2011 13:35, Wolfgang Schuster
 wrote:
>
> Am 26.04.2011 um 12:33 schrieb Ian Lawrence:
>
>> I have a layer that I'd like to appear on some pages but not others,
>> and for which I'd like to switch the content by page. (I need the
>> layer to precisely and reliably locate some graphics.
>>
>> However, as I see it, you can only set the visibility of a layer in
>> \definelayer, \setupbackgrounds - and these ought to preceed
>> \starttext
>>
>> Any pointers / elegant suggestions / neat solutions?
>
>
> A better solution requires more information from you!
>
> \definelayer[test]
>
> \startsetups[test]
> \doifinset{\pagenumber}{1,3,7,10}{\setlayer[test][x=3cm,y=7cm]{\ssd Test: 
> \test}}
> \stopsetups
>
> \setupbackgrounds[page][background=test,setups=test]
>
> \starttext
> \dorecurse{12}
>  {\def\test{\convertnumber{A}{\recurselevel}}%
>   \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
> ___
>
___
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] Layers again

2011-04-26 Thread Wolfgang Schuster

Am 26.04.2011 um 12:33 schrieb Ian Lawrence:

> I have a layer that I'd like to appear on some pages but not others,
> and for which I'd like to switch the content by page. (I need the
> layer to precisely and reliably locate some graphics.
> 
> However, as I see it, you can only set the visibility of a layer in
> \definelayer, \setupbackgrounds - and these ought to preceed
> \starttext
> 
> Any pointers / elegant suggestions / neat solutions?


A better solution requires more information from you!

\definelayer[test]

\startsetups[test]
\doifinset{\pagenumber}{1,3,7,10}{\setlayer[test][x=3cm,y=7cm]{\ssd Test: 
\test}}
\stopsetups

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

\starttext
\dorecurse{12}
  {\def\test{\convertnumber{A}{\recurselevel}}%
   \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] Layers again

2011-04-26 Thread Ian Lawrence
I have a layer that I'd like to appear on some pages but not others,
and for which I'd like to switch the content by page. (I need the
layer to precisely and reliably locate some graphics.

However, as I see it, you can only set the visibility of a layer in
\definelayer, \setupbackgrounds - and these ought to preceed
\starttext

Any pointers / elegant suggestions / neat solutions?

Thanks

Ian
___
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] Layers for absolute positioning

2011-03-07 Thread Curiouslearn
Thanks, Wolfgang!  That works great.

Another related question...can I add a different background color to
the layer (a color different than rest of the page).

Thanks.

On Mon, Mar 7, 2011 at 3:34 PM, Wolfgang Schuster
 wrote:
>
> Am 07.03.2011 um 20:51 schrieb Curiouslearn:
>
>> Hi,
>>
>> I have been trying to learn the best way to position text on a page.
>> From the messages it appears that a good way to do so, is to use
>> layers. But it seems that to activate them I need to set them as
>> background of the page. However, that removes the background color.
>> How can I get both layers and a background color?
>
> \setupbackgrounds[page][background={color,windows}]
>
> 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
> ___
>
___
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] Layers for absolute positioning

2011-03-07 Thread Wolfgang Schuster

Am 07.03.2011 um 20:51 schrieb Curiouslearn:

> Hi,
> 
> I have been trying to learn the best way to position text on a page.
> From the messages it appears that a good way to do so, is to use
> layers. But it seems that to activate them I need to set them as
> background of the page. However, that removes the background color.
> How can I get both layers and a background color?

\setupbackgrounds[page][background={color,windows}]

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] Layers for absolute positioning

2011-03-07 Thread Curiouslearn
Hi,

I have been trying to learn the best way to position text on a page.
>From the messages it appears that a good way to do so, is to use
layers. But it seems that to activate them I need to set them as
background of the page. However, that removes the background color.
How can I get both layers and a background color?

I have given a minimal example below.

Thanks,
Bharat


This is the minimal example I am working with:

\setupcolors[state=start]
\setupcolor[xwi]

\setupbackgrounds[page][background=color, backgroundcolor=linen]
\starttext

\definelayer [windows] [x=3in, y=3in, width=3in, height=4in]

\setlayer [windows] [hoffset=1cm, voffset=1cm] {Windows 7}

\setupbackgrounds[page][background=windows]

\page[empty]

\stoptext
___
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] Layers on simpleslides

2011-03-05 Thread Thomas Schmitz

On Sat, 5 Mar 2011 19:58:47 +0100
 Vedran Mileti?  wrote:

Hi,

I'm trying to insert a simple logo on a simpleslides 
slide, but for some

reason it doesn't appear:

\usemodule[simpleslides]

\definelayer[mybg]
   [x=0mm, y=0mm, width=\paperwidth, 
height=\paperheight]

\setlayer[mybg]
   [hoffset=1cm, voffset=1cm]
   {\framed[frame=on, width=3cm, height=2cm]{LAYER}}
\setupbackgrounds[page][background=mybg]


\starttext

\SlideTitle{Bla}

Bla

\stoptext

Any ideas?

backgrounds[page] is already in use by the module. Try 
backgrounds[paper][background={foreground,mybg}].


Thomas
___
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] Layers on simpleslides

2011-03-05 Thread Vedran Miletić
Hi,

I'm trying to insert a simple logo on a simpleslides slide, but for some
reason it doesn't appear:

\usemodule[simpleslides]

\definelayer[mybg]
[x=0mm, y=0mm, width=\paperwidth, height=\paperheight]
\setlayer[mybg]
[hoffset=1cm, voffset=1cm]
{\framed[frame=on, width=3cm, height=2cm]{LAYER}}
\setupbackgrounds[page][background=mybg]


\starttext

\SlideTitle{Bla}

Bla

\stoptext

Any ideas?

Regards,

Vedran Miletić
___
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] Layers by native code vs. by Lua

2011-01-25 Thread Hans Hagen

On 25-1-2011 4:43, Procházka Lukáš Ing. - Pontex s. r. o. wrote:

On Tue, 25 Jan 2011 16:31:24 +0100, Hans Hagen  wrote:


i have a patch now that handles

\setupbackgrounds[page][setups=S1,background={T}]
\setupbackgrounds[page][setups=lua(S2),background={T}]
\setupbackgrounds[page][setups=S3,background={T}]
\setupbackgrounds[page][setups={S1,lua(S2),S3},background={T}]

a bit analogue to references

Hans



This looks nice; I suppose it will be available in the next beta.


yes,

% setups=S1
% setups=lua(S2)
% setups=S3
% setups={S1,lua(S2),xml(test{123}),S3}

so the xml setup takes an argument

Hans

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


Re: [NTG-context] Layers by native code vs. by Lua

2011-01-25 Thread Procházka Lukáš Ing . - Pontex s . r . o .

On Tue, 25 Jan 2011 16:31:24 +0100, Hans Hagen  wrote:


i have a patch now that handles

   \setupbackgrounds[page][setups=S1,background={T}]
   \setupbackgrounds[page][setups=lua(S2),background={T}]
   \setupbackgrounds[page][setups=S3,background={T}]
   \setupbackgrounds[page][setups={S1,lua(S2),S3},background={T}]

a bit analogue to references

Hans



This looks nice; I suppose it will be available in the next beta.

Thanks again.

Cheers,

Lukas


--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

___
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] Layers by native code vs. by Lua

2011-01-25 Thread Hans Hagen

On 25-1-2011 2:40, luigi scarso wrote:

2011/1/25 Hans Hagen:

On 25-1-2011 1:53, Procházka Lukáš Ing. - Pontex s. r. o. wrote:


Hello,

a weird thing happens when setting up layers - I'm getting different
results depending on whether setup is performed by native Ctx code or by
Lua:

---
\setuppapersize[A4,landscape][A4,landscape]
\setuplayout[page]

\definelayer[T][x=10mm,y=0mm]

\startuseMPgraphic{VerticalRule}
draw (0,0)--(0,PaperHeight) withcolor red;
\stopuseMPgraphic

\startsetups S1
\setlayer[T]{\useMPgraphic{VerticalRule}}
\stopsetups

\startluasetups S2
\startluacode
context.setlayer({"T"}, "\\useMPgraphic{VerticalRule}")
\stopluacode
\stopluasetups

\starttext
\setupbackgrounds[page][setups=S1,background={T}]
\page[empty]
\setupbackgrounds[page][setups=S2,background={T}]
\page[empty]
\stoptext
---

Both setups (S1 and S2) should do the same - to draw a vertical line to
the full height.

The first case (S1) is OK - the line starts 10 mm from the top left
corner of the page.

The second case (S2) is somehow shifted - the line starts cca 13 mm from
the top left corner of the page.

What is the reason? And how to make Lua way give the same result?


lua setups are already lua so S2 should look different

\startsetups S1
  \setlayer[T]{\useMPgraphic{VerticalRule}}
\stopsetups

\startluasetups S2
context.setlayer({"T"}, "\\useMPgraphic{VerticalRule}")
\stopluasetups

the problem is that setups=* does not know about this ... so you should use:

\startsetups S3
\luasetup{S2}
\stopsetups

\starttext
  \setupbackgrounds[page][setups=S1,background={T}]
  \page[empty]
  \setupbackgrounds[page][setups=S3,background={T}]
  \page[empty]
\stoptext

I have to think about a solution for this.

lua:setups =S2
ctx:setups =S1
setups = ctx:setups


that is is somewhat fuzzy as we can have xml:blabla where xml is a 
namespace so one would need xml:xml:blabla then


i have a patch now that handles

  \setupbackgrounds[page][setups=S1,background={T}]
  \setupbackgrounds[page][setups=lua(S2),background={T}]
  \setupbackgrounds[page][setups=S3,background={T}]
  \setupbackgrounds[page][setups={S1,lua(S2),S3},background={T}]

a bit analogue to references

Hans

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


Re: [NTG-context] Layers by native code vs. by Lua

2011-01-25 Thread luigi scarso
2011/1/25 Hans Hagen :
> On 25-1-2011 1:53, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
>>
>> Hello,
>>
>> a weird thing happens when setting up layers - I'm getting different
>> results depending on whether setup is performed by native Ctx code or by
>> Lua:
>>
>> ---
>> \setuppapersize[A4,landscape][A4,landscape]
>> \setuplayout[page]
>>
>> \definelayer[T][x=10mm,y=0mm]
>>
>> \startuseMPgraphic{VerticalRule}
>> draw (0,0)--(0,PaperHeight) withcolor red;
>> \stopuseMPgraphic
>>
>> \startsetups S1
>> \setlayer[T]{\useMPgraphic{VerticalRule}}
>> \stopsetups
>>
>> \startluasetups S2
>> \startluacode
>> context.setlayer({"T"}, "\\useMPgraphic{VerticalRule}")
>> \stopluacode
>> \stopluasetups
>>
>> \starttext
>> \setupbackgrounds[page][setups=S1,background={T}]
>> \page[empty]
>> \setupbackgrounds[page][setups=S2,background={T}]
>> \page[empty]
>> \stoptext
>> ---
>>
>> Both setups (S1 and S2) should do the same - to draw a vertical line to
>> the full height.
>>
>> The first case (S1) is OK - the line starts 10 mm from the top left
>> corner of the page.
>>
>> The second case (S2) is somehow shifted - the line starts cca 13 mm from
>> the top left corner of the page.
>>
>> What is the reason? And how to make Lua way give the same result?
>
> lua setups are already lua so S2 should look different
>
> \startsetups S1
>  \setlayer[T]{\useMPgraphic{VerticalRule}}
> \stopsetups
>
> \startluasetups S2
>    context.setlayer({"T"}, "\\useMPgraphic{VerticalRule}")
> \stopluasetups
>
> the problem is that setups=* does not know about this ... so you should use:
>
> \startsetups S3
>    \luasetup{S2}
> \stopsetups
>
> \starttext
>  \setupbackgrounds[page][setups=S1,background={T}]
>  \page[empty]
>  \setupbackgrounds[page][setups=S3,background={T}]
>  \page[empty]
> \stoptext
>
> I have to think about a solution for this.
lua:setups =S2
ctx:setups =S1
setups = ctx:setups
 ?
-- 
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] Layers by native code vs. by Lua

2011-01-25 Thread Hans Hagen

On 25-1-2011 1:53, Procházka Lukáš Ing. - Pontex s. r. o. wrote:

Hello,

a weird thing happens when setting up layers - I'm getting different
results depending on whether setup is performed by native Ctx code or by
Lua:

---
\setuppapersize[A4,landscape][A4,landscape]
\setuplayout[page]

\definelayer[T][x=10mm,y=0mm]

\startuseMPgraphic{VerticalRule}
draw (0,0)--(0,PaperHeight) withcolor red;
\stopuseMPgraphic

\startsetups S1
\setlayer[T]{\useMPgraphic{VerticalRule}}
\stopsetups

\startluasetups S2
\startluacode
context.setlayer({"T"}, "\\useMPgraphic{VerticalRule}")
\stopluacode
\stopluasetups

\starttext
\setupbackgrounds[page][setups=S1,background={T}]
\page[empty]
\setupbackgrounds[page][setups=S2,background={T}]
\page[empty]
\stoptext
---

Both setups (S1 and S2) should do the same - to draw a vertical line to
the full height.

The first case (S1) is OK - the line starts 10 mm from the top left
corner of the page.

The second case (S2) is somehow shifted - the line starts cca 13 mm from
the top left corner of the page.

What is the reason? And how to make Lua way give the same result?


lua setups are already lua so S2 should look different

\startsetups S1
  \setlayer[T]{\useMPgraphic{VerticalRule}}
\stopsetups

\startluasetups S2
context.setlayer({"T"}, "\\useMPgraphic{VerticalRule}")
\stopluasetups

the problem is that setups=* does not know about this ... so you should 
use:


\startsetups S3
\luasetup{S2}
\stopsetups

\starttext
  \setupbackgrounds[page][setups=S1,background={T}]
  \page[empty]
  \setupbackgrounds[page][setups=S3,background={T}]
  \page[empty]
\stoptext

I have to think about a solution for this.

Hans


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


[NTG-context] Layers by native code vs. by Lua

2011-01-25 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

a weird thing happens when setting up layers - I'm getting different results 
depending on whether setup is performed by native Ctx code or by Lua:

---
\setuppapersize[A4,landscape][A4,landscape]
\setuplayout[page]

\definelayer[T][x=10mm,y=0mm]

\startuseMPgraphic{VerticalRule}
  draw (0,0)--(0,PaperHeight) withcolor red;
\stopuseMPgraphic

\startsetups S1
  \setlayer[T]{\useMPgraphic{VerticalRule}}
\stopsetups

\startluasetups S2
  \startluacode
context.setlayer({"T"}, "\\useMPgraphic{VerticalRule}")
  \stopluacode
\stopluasetups

\starttext
  \setupbackgrounds[page][setups=S1,background={T}]
  \page[empty]
  \setupbackgrounds[page][setups=S2,background={T}]
  \page[empty]
\stoptext
---

Both setups (S1 and S2) should do the same - to draw a vertical line to the 
full height.

The first case (S1) is OK - the line starts 10 mm from the top left corner of 
the page.

The second case (S2) is somehow shifted - the line starts cca 13 mm from the 
top left corner of the page.

What is the reason? And how to make Lua way give the same result?

Best regards,

Lukas


--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

t-Bkg2.mkiv
Description: Binary data


t-Bkg2.pdf
Description: Adobe PDF document
___
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] Layers don't repeat in Mk IV

2009-08-06 Thread Hans Hagen

Wolfgang Schuster wrote:


A typo in pack-lyr.mkiv for the \dodoflushlayer macro.


ok, fixed in next release


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Layers don't repeat in Mk IV

2009-08-05 Thread Derek CORDEIRO
On Wed, Aug 5, 2009 at 2:45 PM, Wolfgang Schuster <
schuster.wolfg...@googlemail.com> wrote:

>
> Am 05.08.2009 um 10:47 schrieb Derek CORDEIRO:
>
>  \definelayer[mybg][width=\paperwidth,height=\paperheight,state=repeat]
>> \setlayer[mybg]
>>[hoffset=1cm, voffset=1cm]
>>{\framed[frame=on, width=3cm,
>> height=2cm]{\externalfigure[cow][width=1cm]
>> }}
>> \setupbackgrounds[page][background=mybg]
>>
>> \starttext
>> \dorecurse{6}{\input tufte\par}
>> \stoptext
>>
>> It still does not work(still layer only on first page in Mk IV). What am I
>> doing wrong?
>>
>
> A typo in pack-lyr.mkiv for the \dodoflushlayer macro.
>
> In MkII a line of the macro is
>
>   \doifnotvalue{\??ll#2\c!position}\v!yes
> {\doifvalue{\??ll#2\c!repeat}\v!yes\!!donecfalse
>  \doifvalue{\??ll#2\c!state}\v!repeat\!!donecfalse}%
>
> while in MkIV it's
>
> \ifx\@@currentlayerposition\v!yes
>
> \edef\@@currentlayerrepeat{\csname\??ll\currentlayer\c!repeat\endcsname}%
> % \edef\@@currentlayerstate
> {\csname\??ll\currentlayer\c!state\endcsname}% actually this is already set
>   \ifx\@@currentlayerrepeat\v!yes
> \!!donecfalse
>   \else\ifx\@@currentlayerstate\v!repeat
> \!!donecfalse
>   \fi\fi
> \fi
>
> MkII expects position ≠ yes while MkIV continues only when position = yes
> what's wrong, you can add \unless before the \ifx and the layer mechanism
> works.
>
> \unless\ifx\@@currentlayerposition\v!yes
>
> \edef\@@currentlayerrepeat{\csname\??ll\currentlayer\c!repeat\endcsname}%
> % \edef\@@currentlayerstate
> {\csname\??ll\currentlayer\c!state\endcsname}% actually this is already set
>   \ifx\@@currentlayerrepeat\v!yes
> \!!donecfalse
>   \else\ifx\@@currentlayerstate\v!repeat
> \!!donecfalse
>   \fi\fi
> \fi
>   \fi
>
>

Thanks a lot, works great.

Regards,
Derek
___
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
___


Re: [NTG-context] Layers don't repeat in Mk IV

2009-08-05 Thread Wolfgang Schuster


Am 05.08.2009 um 10:47 schrieb Derek CORDEIRO:


\definelayer[mybg][width=\paperwidth,height=\paperheight,state=repeat]
\setlayer[mybg]
[hoffset=1cm, voffset=1cm]
{\framed[frame=on, width=3cm, height=2cm] 
{\externalfigure[cow][width=1cm]

}}
\setupbackgrounds[page][background=mybg]

\starttext
\dorecurse{6}{\input tufte\par}
\stoptext

It still does not work(still layer only on first page in Mk IV).  
What am I doing wrong?


A typo in pack-lyr.mkiv for the \dodoflushlayer macro.

In MkII a line of the macro is

   \doifnotvalue{\??ll#2\c!position}\v!yes
 {\doifvalue{\??ll#2\c!repeat}\v!yes\!!donecfalse
  \doifvalue{\??ll#2\c!state}\v!repeat\!!donecfalse}%

while in MkIV it's

 \ifx\@@currentlayerposition\v!yes
   \edef\@@currentlayerrepeat{\csname\??ll\currentlayer\c!repeat 
\endcsname}%
 % \edef\@@currentlayerstate {\csname\??ll\currentlayer\c!state 
\endcsname}% actually this is already set

   \ifx\@@currentlayerrepeat\v!yes
 \!!donecfalse
   \else\ifx\@@currentlayerstate\v!repeat
 \!!donecfalse
   \fi\fi
 \fi

MkII expects position ≠ yes while MkIV continues only when position =  
yes
what's wrong, you can add \unless before the \ifx and the layer  
mechanism works.


 \unless\ifx\@@currentlayerposition\v!yes
   \edef\@@currentlayerrepeat{\csname\??ll\currentlayer\c!repeat 
\endcsname}%
 % \edef\@@currentlayerstate {\csname\??ll\currentlayer\c!state 
\endcsname}% actually this is already set

   \ifx\@@currentlayerrepeat\v!yes
 \!!donecfalse
   \else\ifx\@@currentlayerstate\v!repeat
 \!!donecfalse
   \fi\fi
 \fi
   \fi

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


Re: [NTG-context] Layers don't repeat in Mk IV

2009-08-05 Thread Derek CORDEIRO
On Wed, Aug 5, 2009 at 2:43 AM, Wolfgang Schuster <
schuster.wolfg...@googlemail.com> wrote:

> \definelayer[mybg][width=\paperwidth,height=\paperheight,state=repeat]
>

My file now contains:
--
\definelayer[mybg][width=\paperwidth,height=\paperheight,state=repeat]
\setlayer[mybg]
[hoffset=1cm, voffset=1cm]
{\framed[frame=on, width=3cm,
height=2cm]{\externalfigure[cow][width=1cm]
}}
\setupbackgrounds[page][background=mybg]

\starttext
\dorecurse{6}{\input tufte\par}
\stoptext

It still does not work(still layer only on first page in Mk IV). What am I
doing wrong?

ConTeXt log at http://pastebin.com/m3d676b5a

With Thanks,
Derek
___
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
___


Re: [NTG-context] Layers don't repeat in Mk IV

2009-08-04 Thread Wolfgang Schuster


Am 04.08.2009 um 18:52 schrieb Derek CORDEIRO:

I've been trying to use layers for a simple logo that repeats on all  
pages. Something along the lines of the code below:


\definelayer[mybg][x=0mm, y=0mm,width=\paperwidth, height= 
\paperheight,repeat=yes]


\definelayer[mybg][width=\paperwidth,height=\paperheight,state=repeat]

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


[NTG-context] Layers don't repeat in Mk IV

2009-08-04 Thread Derek CORDEIRO
I've been trying to use layers for a simple logo that repeats on all pages.
Something along the lines of the code below:

\definelayer[mybg][x=0mm, y=0mm,width=\paperwidth,
height=\paperheight,repeat=yes]
\setlayer   [mybg]
[hoffset=1cm, voffset=1cm]
{\framed[frame=on, width=3cm,
height=2cm]{\externalfigure[cow][width=1cm]
}}
\setupbackgrounds[page][background=mybg]

\starttext
\dorecurse{6}{\input tufte\par}
\stoptext

It works as expected using Mk II but does not work under Mk IV: The layer
appears only on the first page.

Please Help,
Derek
___
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
___


Re: [NTG-context] Layers in ConTeXt

2007-07-15 Thread Giuseppe Bilotta
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
___


Re: [NTG-context] Layers in ConTeXt

2007-07-14 Thread Aditya Mahajan
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
___


Re: [NTG-context] Layers in ConTeXt

2007-07-13 Thread Giuseppe Bilotta
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
___


Re: [NTG-context] Layers in ConTeXt

2007-07-13 Thread Peter Rolf
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
___


Re: [NTG-context] Layers in ConTeXt

2007-07-13 Thread Giuseppe Bilotta
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
___


Re: [NTG-context] Layers in ConTeXt

2007-07-13 Thread Peter Rolf
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
___


Re: [NTG-context] Layers in ConTeXt

2007-07-13 Thread luigi scarso
"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
___


[NTG-context] Layers in ConTeXt

2007-07-13 Thread Giuseppe Bilotta
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
___


Re: [NTG-context] layers and papersize

2005-01-10 Thread Hans Hagen
Tom Fossen wrote:
This is probably a beginners question. While trying to understand the 
layer-mechanism I made a drawing which is meant as a background for a 
schedule in a magazine. I add the information within this drawing using the 
'register' option I found on page 263 of the Metafun manual.

Here is the example in a minimal form:
 
\starttext
\definelayer[rooster]
\startuseMPgraphic{list}
	path p, s ;
	p := unitsquare  scaled 3cm superellipsed 0.84 ;
	s := flex ((2.5cm,3.0cm), (10.0cm,3.0cm), (6.5cm,-0.5cm)) ;
	draw p withpen pencircle scaled 5pt withcolor .625white ;
	draw s withpen pencircle scaled 3pt withcolor .625white ;
	register ("da",2.4cm,2.4cm,(.3cm,2.8cm)) ;
	register ("name",5.6cm,0.6cm,(5.4cm,3.5cm)) ;
	register ("who",6cm,3cm,(3.4cm,2.8cm)) ;
	register("color",1.5cm,0.5cm,(7.6cm,-0.6cm)) ;
\stopuseMPgraphic

\setMPlayer[rooster][da]{\framed	
[width=\MPlayerwidth,height=\MPlayerheight,align=right] {pos 1}}
\setPlayer[rooster][name]{\framed 
[ [width=\MPlayerwidth,height=\MPlayerheight] {pos 2}}
\setMPlayer[rooster][who]{\framed 
[width=\MPlayerwidth,height=\MPlayerheight,align=right] {pos 3}}
\setMPlayer[rooster][color]{\framed 
[width=\MPlayerwidth,height=\MPlayerheight] {pos 4}}

\getMPlayer[rooster] {\useMPgraphic{list}}
\stoptext
This works for the standard papersize. But I want this to work in a magazine 
on A5. So I add:

\setuppapersize [A5][A4]
\setuparranging [2UP,rotated,doublesided]
\setuppagenumbering[alternative=doublesided]
\setuplayout[margin=0pt,width=middle]
this is the problem: the last run the pages are reshuffled and the 
graphics/twopassdata no longer matches

  texexec --arrange --pdf thatfile.tex
may work, else do the page imposition in a separate run (can be doen with 
texexec)
Hans
-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] layers and papersize

2005-01-10 Thread Tom Fossen

This is probably a beginners question. While trying to understand the 
layer-mechanism I made a drawing which is meant as a background for a 
schedule in a magazine. I add the information within this drawing using the 
'register' option I found on page 263 of the Metafun manual.

Here is the example in a minimal form:
 
\starttext
\definelayer[rooster]
\startuseMPgraphic{list}
path p, s ;
p := unitsquare  scaled 3cm superellipsed 0.84 ;
s := flex ((2.5cm,3.0cm), (10.0cm,3.0cm), (6.5cm,-0.5cm)) ;
draw p withpen pencircle scaled 5pt withcolor .625white ;
draw s withpen pencircle scaled 3pt withcolor .625white ;
register ("da",2.4cm,2.4cm,(.3cm,2.8cm)) ;
register ("name",5.6cm,0.6cm,(5.4cm,3.5cm)) ;
register ("who",6cm,3cm,(3.4cm,2.8cm)) ;
register("color",1.5cm,0.5cm,(7.6cm,-0.6cm)) ;
\stopuseMPgraphic

\setMPlayer[rooster][da]{\framed
[width=\MPlayerwidth,height=\MPlayerheight,align=right] {pos 1}}
\setPlayer[rooster][name]{\framed 
[ [width=\MPlayerwidth,height=\MPlayerheight] {pos 2}}
\setMPlayer[rooster][who]{\framed 
[width=\MPlayerwidth,height=\MPlayerheight,align=right] {pos 3}}
\setMPlayer[rooster][color]{\framed 
[width=\MPlayerwidth,height=\MPlayerheight] {pos 4}}

\getMPlayer[rooster] {\useMPgraphic{list}}
\stoptext

This works for the standard papersize. But I want this to work in a magazine 
on A5. So I add:

\setuppapersize [A5][A4]
\setuparranging [2UP,rotated,doublesided]
\setuppagenumbering[alternative=doublesided]
\setuplayout[margin=0pt,width=middle]

followed by the fragment above.

But now all of the texts ("pos x") end up somewhere in the left corner of the 
page. Only the drawing is on its right place. I tried to experiment with 
adding 'position= on' or 'off' to the 'definelayer' command. No difference.

Where are the misunderstandings on my side?


tom fossen

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] layers (was bug in alignbox)

2004-05-15 Thread pawcoo
Vit Zyka wrote:
Hallo Hans,
I have played with positioning text in layers. I noticed that parameter "location=t" 
  \setlayer[MyLayer][...,location=t,...]{...}
behaves the same way as "location=c". It seems to me it is the bug in optimized definition of 
\alignedbox. If I use commented version of \alignedbox from source file core-box.tex
it is OK. Can you look at it, please?
BTW, how to use context layers to produce PDF layers I can switch on and
off using arobat 6? I've compiled the sample and the result doesn't
contains PDF layers.
Regards, Pawe/l

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] layers and XML

2003-06-29 Thread Simon Pepping
On Thu, Jun 26, 2003 at 01:54:25PM +0200, Piotr Kopszak wrote:
> 
> > Hello, 
> > 
> > I am having trouble with popping XML 
> > [...]
> > ntg-context mailing list
> > [EMAIL PROTECTED]
> > http://www.ntg.nl/mailman/listinfo/ntg-context
> 
> \defineXMLenvironment[info-w-ramce]{\defineXMLpush[pelny-adres]
> \defineXMLpush[datowanie] 
> \defineXMLpush[architekci]
> \defineXMLpush[datowanie-projektu] 
> \setlayer[ramka][x=5cm,y=1cm]

Syntax error in setlayer: \setlayer[ramka]{x=5cm,y=1cm}

> \bgroup}

This bgroup has no matching egroup.

> { \framed{\XMLpop{datowanie} 
> \XMLpop{datowanie-projektu}
> \XMLpop{pelny-adres} 
> \XMLpop{architekci}
>   }
> }

Regards, Simon

-- 
Simon Pepping
email: [EMAIL PROTECTED]

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] layers and XML

2003-06-26 Thread Piotr Kopszak

> Hello, 
> 
> I am having trouble with popping XML 
> [...]
> ntg-context mailing list
> [EMAIL PROTECTED]
> http://www.ntg.nl/mailman/listinfo/ntg-context


P.S. 

I forgot to attach the piece code with which I attempted to deal with that. 
Here it is. 


\defineXMLenvironment[info-w-ramce]{\defineXMLpush[pelny-adres]
\defineXMLpush[datowanie] 
\defineXMLpush[architekci]
\defineXMLpush[datowanie-projektu] 
\setlayer[ramka][x=5cm,y=1cm]
\bgroup}
{ \framed{\XMLpop{datowanie} 
\XMLpop{datowanie-projektu}
\XMLpop{pelny-adres} 
\XMLpop{architekci}
}
}
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] layers and XML

2003-06-26 Thread Piotr Kopszak
Hello, 

I am having trouble with popping XML elements onto a new layer. 
Preferably  I  would   like  to  use  elements
"datowanie","datowanie-projektu" and "architekci" inside \framed which
would be inside \setlayer. 


   1927--38
   1926
   Aleje Jerozolimskie 3, Warszawa
   Architects: 
Tadeusz Tolwinski, 
E. Oczkowski, 
Antoni Dygat


Has anyone tried anything similar? 

Thanks in advance for any help

Piotr
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context