ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
	Fabrice Couvreur via ntg-context <ntg-context@ntg.nl>
Cc: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
Subject: Re: Place a logo at the bottom of the page with a layer
Date: Tue, 24 Aug 2021 20:21:56 +0200	[thread overview]
Message-ID: <a638ac47-715a-f8bf-b1f7-95e7b9490b2b@gmail.com> (raw)
In-Reply-To: <CACyK-eqN3Fp9FthMZ3C74DiNVQD5e09kA4X5Hpuk8sgh4Sdqjw@mail.gmail.com>

Fabrice Couvreur via ntg-context schrieb am 24.08.2021 um 19:32:
> Hi,
> I want to insert a logo at the bottom of the page on the right on the 
> first page, on the left on the second, on the right on the third ...
> With the key repeat=yes, the logo is always at the bottom right

\useMPlibrary[dum]

\definelayer
   [MyLogo]
   [doublesided=yes,
    width=\paperwidth,
    height=\paperheight,
    repeat=yes]

\setupbackgrounds [page] [background=MyLogo]

\setuppagenumbering [alternative=doublesided]

\setlayer
   [MyLogo]
   [left]
   [preset=leftbottom,
    x=\dimexpr\cutspace-\rightmargindistance-\rightmarginwidth\relax,
    y=\bottomspace]
   {\externalfigure[dum][width=\rightmarginwidth,height=\footerheight]}

\setlayer
   [MyLogo]
   [right]
   [preset=rightbottom,
    x=\dimexpr\cutspace-\rightmargindistance-\rightmarginwidth\relax,
    y=\bottomspace]
   {\externalfigure[dum][width=\rightmarginwidth,height=\footerheight]}

\showframe

\starttext
\dorecurse{20}{\samplefile{lorem}}
\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

      reply	other threads:[~2021-08-24 18:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-24 17:32 Fabrice Couvreur via ntg-context
2021-08-24 18:21 ` Wolfgang Schuster via ntg-context [this message]

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=a638ac47-715a-f8bf-b1f7-95e7b9490b2b@gmail.com \
    --to=ntg-context@ntg.nl \
    --cc=wolfgang.schuster.lists@gmail.com \
    /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).