ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Reza Housseini <reza.housseini@gmail.com>
To: ntg-context@ntg.nl
Subject: Problems with repeating layers
Date: Mon, 8 Dec 2014 08:42:39 +0100	[thread overview]
Message-ID: <CAGZc64HuAt7KJeZMqrs-tzGxyLCsEgh9ya8wbeARzW4sQpa7Mg@mail.gmail.com> (raw)


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

             reply	other threads:[~2014-12-08  7:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-08  7:42 Reza Housseini [this message]
2014-12-08  9:19 ` Pablo Rodriguez
2014-12-09 15:08   ` Reza Housseini
2014-12-10 19:27     ` Pablo Rodriguez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGZc64HuAt7KJeZMqrs-tzGxyLCsEgh9ya8wbeARzW4sQpa7Mg@mail.gmail.com \
    --to=reza.housseini@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).