From: "Peter Münster" <pmlists@free.fr>
To: ConTeXt list <ntg-context@ntg.nl>
Subject: overlay at given position: help needed
Date: Thu, 4 Feb 2010 23:11:33 +0100 [thread overview]
Message-ID: <20100204221133.GA30490@gaston.couberia.bzh> (raw)
Hello,
Below is a test file, to show a bit what I'm looking for: a
background-image behind a text-area at a given position relative to the
center of this area. I'm not yet satisfied with the result.
Here my questions:
1.) Is \startframedtext a good choice for placing the background, or is
there something better?
2.) Is \framed[loffset=..., toffset=...]{} a good choice for specifying the
position, or is there something better?
3.) When "left=1", why is the image completely outside the frame and not
only 50%?
4.) How do I make a step between text and background according to
http://wiki.contextgarden.net/Presentation_effects ?
I would like to show first the text, and after a mouse-click the
background image.
Thanks in advance for any help!
Cheers, Peter
The test-file:
% Begins a text-area with a background-image:
\def\startBGimg[#1]{%
\getparameters[BGimg][top=0, left=0, width=2cm, #1]%
\start
\newdimen\TopOffset \newdimen\LeftOffset
\setupframedtexts[before=, after=]
\defineoverlay[myBG][{%
\TopOffset=\overlayheight \LeftOffset=\overlaywidth
\TopOffset=\BGimgtop\TopOffset \LeftOffset=\BGimgleft\LeftOffset
\framed[frame=on, width=\overlaywidth, height=\overlayheight,
offset=overlay, toffset=\TopOffset, loffset=\LeftOffset]{%
\externalfigure[\BGimgimg][width=\BGimgwidth]}}]
\startframedtext[background=myBG, frame=off, offset=overlay,
width=\textwidth]}
% Stops the text-area with a background-image:
\def\stopBGimg{\stopframedtext\stop}
\starttext
\startBGimg[img=hacker.jpg, top=-1, left=-1]
\input tufte
\stopBGimg
\startBGimg[img=hacker.jpg, top=-1, left=1]
\input tufte
\stopBGimg
\startBGimg[img=hacker.jpg, top=1, left=-1]
\input tufte
\stopBGimg
\startBGimg[img=hacker.jpg, top=1, left=1]
\input tufte
\stopBGimg
\stoptext
--
Contact information: http://pmrb.free.fr/contact/
___________________________________________________________________________________
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
___________________________________________________________________________________
next reply other threads:[~2010-02-04 22:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-04 22:11 Peter Münster [this message]
2010-02-05 9:31 ` Wolfgang Schuster
2010-02-05 10:27 ` Peter Münster
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=20100204221133.GA30490@gaston.couberia.bzh \
--to=pmlists@free.fr \
--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).