* Problems with repeating layers
@ 2014-12-08 7:42 Reza Housseini
2014-12-08 9:19 ` Pablo Rodriguez
0 siblings, 1 reply; 4+ messages in thread
From: Reza Housseini @ 2014-12-08 7:42 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 1112 bytes --]
Hello
I try to use layers to position a figure on top of the leftmargin area. I
use code like the following:
\definelayer[MyLayer][option=test]
\setupbackgrounds[text][leftmargin][background=MyLayer]
\setlayer[MyLayer][x=0cm,y=0cm]
{\externalfigure[cow][width=2cm]}
This image get's repeated every page but I only want it on the first page.
The parameter state=start does not change anything. Is there a way to
disable the layer on the next page. Also there seems to be a bug with
\showframe. When I use this command my figure is only displayed on the
first page (as desired).
When I use
\setupbackgrounds[page][background=MyLayer]
this problem does not occur. But I have to shift the figure to place it in
the leftmargin.
I tried to use another concept like
\definelayer[test]
\startuseMPgraphic{oeps}
register ("somepos-1",0cm,0cm,center currentpicture) ;
\stopuseMPgraphic
\setMPlayer [test] [somepos-1]
{\externalfigure[cow][width=2cm]}
\getMPlayer [test] {\useMPgraphic{oeps}}
but that does not seem to work at all.
Thanks for any help
Cheers,
Reza
[-- Attachment #1.2: Type: text/html, Size: 1542 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problems with repeating layers
2014-12-08 7:42 Problems with repeating layers Reza Housseini
@ 2014-12-08 9:19 ` Pablo Rodriguez
2014-12-09 15:08 ` Reza Housseini
0 siblings, 1 reply; 4+ messages in thread
From: Pablo Rodriguez @ 2014-12-08 9:19 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 12/08/2014 08:42 AM, Reza Housseini wrote:
> Hello
>
> I try to use layers to position a figure on top of the leftmargin area.
> I use code like the following:
>
> \definelayer[MyLayer][option=test]
> \setupbackgrounds[text][leftmargin][background=MyLayer]
> \setlayer[MyLayer][x=0cm,y=0cm]
> {\externalfigure[cow][width=2cm]}
>
> This image get's repeated every page but I only want it on the first
> page. The parameter state=start does not change anything. Is there a way
> to disable the layer on the next page?
Hi Reza,
I don’t know whether this is a bug or a feature.
But this document might achieve what (I guess) you want (as you wrote
yourself):
\definelayer[MyLayer]
\setlayer[MyLayer][x=0cm,y=4.5cm]
{\externalfigure[cow][width=2cm]}
\setupbackgrounds[page][background=MyLayer]
\starttext
\dorecurse{5}{\input knuth}
\stoptext
> Also there seems to be a bug with \showframe. When I use this command
> my figure is only displayed on the first page (as desired).
I wasn’t able to reproduce this.
Placing \showframe before of after \setupbackgrounds in the previous
document, states (http://wiki.contextgarden.net/Layers#State) work fine.
I hope it helps,
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problems with repeating layers
2014-12-08 9:19 ` Pablo Rodriguez
@ 2014-12-09 15:08 ` Reza Housseini
2014-12-10 19:27 ` Pablo Rodriguez
0 siblings, 1 reply; 4+ messages in thread
From: Reza Housseini @ 2014-12-09 15:08 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 2222 bytes --]
On Mon, Dec 8, 2014 at 10:19 AM, Pablo Rodriguez <oinos@gmx.es> wrote:
> On 12/08/2014 08:42 AM, Reza Housseini wrote:
> > Hello
> >
> > I try to use layers to position a figure on top of the leftmargin area.
> > I use code like the following:
> >
> > \definelayer[MyLayer][option=test]
> > \setupbackgrounds[text][leftmargin][background=MyLayer]
> > \setlayer[MyLayer][x=0cm,y=0cm]
> > {\externalfigure[cow][width=2cm]}
> >
> > This image get's repeated every page but I only want it on the first
> > page. The parameter state=start does not change anything. Is there a way
> > to disable the layer on the next page?
>
> Hi Reza,
>
> I don’t know whether this is a bug or a feature.
>
> But this document might achieve what (I guess) you want (as you wrote
> yourself):
>
> \definelayer[MyLayer]
> \setlayer[MyLayer][x=0cm,y=4.5cm]
> {\externalfigure[cow][width=2cm]}
> \setupbackgrounds[page][background=MyLayer]
> \starttext
> \dorecurse{5}{\input knuth}
> \stoptext
>
> > Also there seems to be a bug with \showframe. When I use this command
> > my figure is only displayed on the first page (as desired).
>
> I wasn’t able to reproduce this.
>
> Placing \showframe before of after \setupbackgrounds in the previous
> document, states (http://wiki.contextgarden.net/Layers#State) work fine.
>
> I hope it helps,
>
>
> 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
>
> ___________________________________________________________________________________
Thanks Pablo
I already used this solution. For me it looks like a bug that the "state"
argument does not change anything because the manual clearly states the
expected behaviour of "state".
But anyhow I'll use the other solution.
Cheers,
Reza
[-- Attachment #1.2: Type: text/html, Size: 3524 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problems with repeating layers
2014-12-09 15:08 ` Reza Housseini
@ 2014-12-10 19:27 ` Pablo Rodriguez
0 siblings, 0 replies; 4+ messages in thread
From: Pablo Rodriguez @ 2014-12-10 19:27 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 12/09/2014 04:08 PM, Reza Housseini wrote:
>
> Thanks Pablo
>
> I already used this solution. For me it looks like a bug that the
> "state" argument does not change anything because the manual clearly
> states the expected behaviour of "state".
> But anyhow I'll use the other solution.
Hi Reza,
I don’t really know whether this is a bug or a feature, because I don’t
know the internals.
But the only way to find out is to report it and see what happens.
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-12-10 19:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-08 7:42 Problems with repeating layers Reza Housseini
2014-12-08 9:19 ` Pablo Rodriguez
2014-12-09 15:08 ` Reza Housseini
2014-12-10 19:27 ` Pablo Rodriguez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).