%
\setbox0\hbox{\small\bf{\ss 99}}%
\global\cowidth=1.2\wd0%
\egroup}
% Background black circle
\startuniqueMPgraphic{CoCircle}
fill fullcircle scaled \overlaywidth withcolor black ;
\stopuniqueMPgraphic
\defineoverlay[cocircle][\uniqueMPgraphic{CoCircle}]
% Display the black
99}}%
\global\cowidth=1.2\wd0%
\egroup}
% Background black circle
\startuniqueMPgraphic{CoCircle}
fill fullcircle scaled \overlaywidth withcolor black ;
\stopuniqueMPgraphic
\defineoverlay[cocircle][\uniqueMPgraphic{CoCircle}]
% Display the black circled number
\def\conum#1
]
\definecolor[tilered][r=.425, g=0, b=0]
\definecolor[smudge][r=.1, g=.1, b=.1]
\defineoverlay[page][\useMPgraphic{page}]
\setupbackgrounds[page][background=page]
\startuseMPgraphic{page}
fill unitsquare scaled 2cm withcolor \MPcolor{tilered} ;
fill unitsquare
scaled 2cm
shifted (2cm,0cm
=darkcyan]
\showframe
This does not show coloring of the indicated area. It colors only
when the first option is [page] or [paper] and then it colors the
whole page. So I never get coloring in the indicated parts.
The other example is from cont-new.tex:
%\defineoverlay[Draft][{\scale[factor=max
]
\defineoverlay
[theimage]
[{\externalfigure[themovie][width=\overlaywidth,height=
\overlayheight,type=jpg]}]
starttext
\hfill\framed[offset=0pt,strut=no,background={foreground,theimage}]
{\placerenderingwindow[movie][themovie]}\hfill\null
As you can seen I placed the movie
1.5/6 features i.e. separation
between resource and rendering view (buggy in acrobat 6, but may be
better by now) ; there is some example code in x-res-50 etc
Finally typesetting the movie with:
\useexternalrendering[purple][video/quicktime][purpleshort.mov]
\defineoverlay
[theimage
{#1}{\currentvalue}}]}
\setupcolors[state=start]
\defineoverlay[layer1][{\color[red]{this is layer 1}}]
\defineoverlay[layer2][{\rotate[rotation=30]{\color[blue]{this is layer 2}}}]
\defineoverlay[layer3][{\rotate[rotation=60]{\color[green]{this is layer 3}}}]
\starttext
\addBGafter{layer1}
\input
][background={\Remove{#1}{\currentvalue}}]}
\setupcolors[state=start]
\defineoverlay[layer1][{\color[red]{this is layer 1}}]
\defineoverlay[layer2][{\rotate[rotation=30]{\color[blue]{this is layer 2}}}]
\defineoverlay[layer3][{\rotate[rotation=60]{\color[green]{this is layer 3}}}]
\starttext
\addBGafter
)}}
\defineoverlay[mine-1][ONE]
\defineoverlay[mine-2][TWO]
\defineoverlay[mine-3][THREE]
\startsetups [test] \framed[background={\FlushMyList}]{it works okay}
\stopsetups
\ResetMyList
\AddToMyList{1}{mine-1} \setups[test]
\AddToMyList{2}{mine-2} \setups[test]
\AddToMyList{1}{mine-3} \setups[test
:
compare:
\startuseMPgraphic{test}
draw OverlayBox withcolor red ;
\stopuseMPgraphic{test}
\setupcolor[state=start]
\defineoverlay[test][\useMPgraphic{test}]
\starttext
\framed[background=test]{Hans}
\framed[background=test]{Hans van}
\framed[background=test]{Hans van der}
\framed
currentpicture to OverlayBox ;
\stopuniqueMPgraphic
\defineoverlay[shadow][\uniqueMPgraphic{shadow}]
\startuniqueMPgraphic{shadow2}
fill OverlayBox shifted (20pt,-20pt) withcolor .8white ;
fill OverlayBox withcolor white ;
draw OverlayBox withcolor red ;
% setbounds currentpicture to OverlayBox
shifted (3pt,-3pt) withcolor .8white ;
fill OverlayBox withcolor white ;
draw OverlayBox withcolor red ;
setbounds currentpicture to OverlayBox ;
\stopuniqueMPgraphic
\defineoverlay[shadow][\uniqueMPgraphic{shadow}]
\framed
[align=middle,background=shadow,frame=off]
{\input tufte \relax
\setupcolors[state=start]
\startuniqueMPgraphic{shadow}
fill OverlayBox shifted (3pt,-3pt) withcolor .8white ;
fill OverlayBox withcolor white ;
draw OverlayBox withcolor red ;
setbounds currentpicture to OverlayBox ;
\stopuniqueMPgraphic
\defineoverlay[shadow][\uniqueMPgraphic
{shadow}
fill OverlayBox shifted (3pt,-3pt) withcolor .8white ;
fill OverlayBox withcolor white ;
draw OverlayBox withcolor red ;
setbounds currentpicture to OverlayBox ;
\stopuniqueMPgraphic
\defineoverlay[shadow][\uniqueMPgraphic{shadow}]
\framed
[align=middle,background=shadow,frame
\setupcolors[state=start]
\startuniqueMPgraphic{shadow}
fill OverlayBox shifted (3pt,-3pt) withcolor .8white ;
fill OverlayBox withcolor white ;
draw OverlayBox withcolor red ;
setbounds currentpicture to OverlayBox ;
\stopuniqueMPgraphic
\defineoverlay[shadow][\uniqueMPgraphic
\cleaders\hbox{#8}\vfill
\egroup
\setbox6=\vbox to \scratchdimen \bgroup
\cleaders\hbox{#4}\vfill
\egroup
\box0
\hbox to \overlaywidth{\box4\hfill\box6}%
\box2
\egroup}
\def\FakeChar#1{\framed[width=.5cm,height=.5cm,offset=overlay]{#1}}
\defineoverlay
[border
=\Myheader]
\setupheadtext
[chapter=Chapitre]
\defineoverlay[HeaderDeco][\uniqueMPgraphic{HeaderDeco}]
\def\Myheader#1#2{%
\framedtext
[width= \overlaywidth,
height=6\bodyfontsize,
background={foreground,HeaderDeco},
offset=0pt
= y12 = \overlayheight;
P:= log(z11,z12); linear_shade(P,8,(1,1,1),(0,0,0)); draw P;
\stopuseMPgraphic
\defineoverlay[F][\uniqueMPgraphic{F}]
\defineframed[F][offset=2mm,strut=yes,background=F,frame=off]
\starttext
\noindent\dorecurse{1000}{\F{\recurselevel} }
\stoptext
.
\defineoverlay
[ProgressBar A]
[\useMPgraphic{ProgressBarA}]
\setupbackgrounds
[text]
[background={ProgressBar A}]
\startuseMPgraphic{ProgressBarA}
barW = 5cm;
barH = .7cm;
StartPage;
fill unitsquare xyscaled(barW*(PageNumber/NOfPages),barH)
withcolor .625red;
draw unitsquare
in the current
document.
Here's an example how to make an extremely simple and ugly progression
bar at the bottom of the page. Take a look into the .mp file produced.
You'll find many other variables thay you may use to position your
progression bar properly.
\defineoverlay
[ProgressBar
%
\defineoverlay[jessi][\useMPgraphic{kasten}]
%/
% Rahmen mit Hintergrund Jessi wird erschaffen
kasten wird angelegti
%
\defineoverlay[jessi][\useMPgraphic{kasten}]
%/
% Rahmen mit Hintergrund Jessi wird
works properly here on macosx with texshop
-a-
On 6 Oct 2005, at 23:49, Jilani Khaldi wrote:
\startuseMPgraphic{draft}
draw DRAFT infont phvb scaled 9 rotated 57 withcolor .85white ;
currentpicture := currentpicture ysized (\overlayheight-3cm) ;
\stopuseMPgraphic
\defineoverlay[draft
= Original Message From Peter Münster [EMAIL PROTECTED] =
Perhaps a bit simpler:
\setupcolors[state=start]
\defineoverlay[Draft][{\lightgray
\scale[factor=max]{\rotate[rotation=60]{~DRAFT~}}}]
\setupbackgrounds[page][background=Draft]
\starttext
\input tufte
\stoptext
Indeed
Perhaps a bit simpler:
\setupcolors[state=start]
\defineoverlay[Draft][{\lightgray
\scale[factor=max]{\rotate[rotation=60]{~DRAFT~}}}]
\setupbackgrounds[page][background=Draft]
\starttext
\input tufte
\stoptext
It works! Thank You :-)
--
// Jilani KHALDI
http://jkhaldi.oltrelinux.com
Try this code:
\startuseMPgraphic{draft}
draw DRAFT infont phvb scaled 9 rotated 57 withcolor .85white ;
currentpicture := currentpicture ysized (\overlayheight-3cm) ;
\stopuseMPgraphic
\defineoverlay[draft][\uniqueMPgraphic{draft}]
\setupbackgrounds[page][background=draft]
HTH
Thomas
On Oct
\startuseMPgraphic{draft}
draw DRAFT infont phvb scaled 9 rotated 57 withcolor .85white ;
currentpicture := currentpicture ysized (\overlayheight-3cm) ;
\stopuseMPgraphic
\defineoverlay[draft][\uniqueMPgraphic{draft}]
\setupbackgrounds[page][background=draft]
I can't get it working, could you
On Thu, 06 Oct 2005 23:49:22 +0200, Jilani Khaldi
[EMAIL PROTECTED] wrote:
\startuseMPgraphic{draft}
draw DRAFT infont phvb scaled 9 rotated 57 withcolor .85white ;
currentpicture := currentpicture ysized (\overlayheight-3cm) ;
\stopuseMPgraphic
\defineoverlay[draft][\uniqueMPgraphic{draft
Thanks for your suggestion, but I didn't get it to work. In the end,
I had recourse to some low-level stuff (caution, ugly code ahead!):
\defineoverlay[info][{\getbuffer[info]}]
\setupbackgrounds[page][background={info}]
\startbuffer[info]
\vbox to \paperheight \bgroup
\vskip -1 cm
no output
\stoptext
%%% Local Variables:
%%% mode: context
%%% TeX-master:
%%% End:
See details.pdf for layer usage :)
Peter
\defineoverlay[info][{\getbuffer[info]}]
\setupbackgrounds[page][background={info}]
\startbuffer[info]
\vbox to \paperheight \bgroup
\vskip -1 cm
\framed
-- cycle, 2,
0.2[green,red], 0.8[green, red]);
BoundPageAreas;
\stopuseMPgraphic
\defineoverlay[bgnd][\useMPgraphic{bgnd}]
\setupbackgrounds[page][background=bgnd]
\startuseMPgraphic{brighten}
StartPage;
fill Field[Text][Text] enlarged 2pt
withcolor transparent(1, 0.5
. I've managed to cook up the simple test case below which
demonstrates the problem.
===
\setuplayout[ horoffset=.5cm ]
\setuppagenumbering[alternative=doublesided]
\setupcolors[state=start]
\defineoverlay [backgraphics] [\positionoverlay{backgraphics}]
\setupbackgrounds[page][background
-- urcorner Page -- cycle, 2,
0.2[green,red], 0.8[green, red]);
BoundPageAreas;
\stopuseMPgraphic
\defineoverlay[bgnd][\useMPgraphic{bgnd}]
\setupbackgrounds[page][background=bgnd]
\startuseMPgraphic{brighten}
StartPage;
fill Field[Text][Text] enlarged 2pt
the simple test case below which
demonstrates the problem.
===
\setuplayout[ horoffset=.5cm ]
\setuppagenumbering[alternative=doublesided]
\setupcolors[state=start]
\defineoverlay [backgraphics] [\positionoverlay{backgraphics}]
\setupbackgrounds[page][background=backgraphics
to unitsquare xscaled \overlaywidth yscaled
\overlayheight;
\stopuniqueMPgraphic
\defineoverlay
[myframe1]
[\uniqueMPgraphic{MyGraphic1}]
\defineoverlay
[myframe2]
[\uniqueMPgraphic{MyGraphic2}]
\framed[background=myframe1,frame=off]{abc}
% what does a linebreak after \framed[...]{...} do
Hello,
could anybody explain, why the DRAFT is bigger on the last two pages
please?
\defineoverlay[Draft][{\scale[factor=max]{\rotate[rotation=60]{~DRAFT~}}}]
\setupbackgrounds[page][background=Draft]
\starttext
\starttables[|l|]
\dorecurse{200}{\NC hallo \NC\AR}
\stoptables
\stoptext
Cheers
Peter Münster wrote:
could anybody explain, why the DRAFT is bigger on the last two pages
please?
I played with
\defineoverlay[Draft][{\scale[factor=max]
{\rotate[rotation=60]{\framed[strut=no,offset=0pt]{\strut~DRAFT~\strut]
\setupbackgrounds[page][background=Draft]
\showstruts
;
draw fullcircle scaled (2*r) shifted center withcolor red;
setbounds currentpicture to boundingbox bboxpicture;
\stopuseMPgraphic
\defineoverlay[CircleBlueTulip][\uniqueMPgraphic{CircleSomething}{dimension={(400,460)},center={(222,460-330)},r=25}]
\defineoverlay[CircleRedTulip
;
\stopuseMPgraphic
\defineoverlay[CircleBlueTulip][\uniqueMPgraphic{CircleSomething}{dimension={(400,460)},center={(222,460-330)},r=25}]
\defineoverlay[CircleRedTulip][\useMPgraphic{CircleSomething}{dimension={(400,460)},center={(148,460-330)},r=25}]
\framed[background={foreground,CircleBlueTulip},offset=0pt,strut
Hello,
I have
\defineoverlay[Wave][\useMPgraphic{Wave}]
\startuseMPgraphic{Wave}
...
\stopuseMPgraphic
\setupbackgrounds[footer][text][background={Wave}]
The problem is that the graphics is not re-computed on every page,
although I pretty convinced it should.
On the opposite, when I
David Antos wrote:
Hello,
I have
\defineoverlay[Wave][\useMPgraphic{Wave}]
\startuseMPgraphic{Wave}
...
\stopuseMPgraphic
\setupbackgrounds[footer][text][background={Wave}]
The problem is that the graphics is not re-computed on every page,
although I pretty convinced it should
]
\defineoverlay
[comments]
[{\setlayer[text][preset=middle]{\placecomments}}]
\defineoverlay[page][\uniqueMPgraphic{page-\ifcase\realpageno\or one\else
plus\fi}]
\startuniqueMPgraphic{page-one}
StartPage ;
fill Page
enlarged 4pt
withcolor \MPcolor{pagecolor} ;
fill Field[Text][Text
Vit, many thanks for your answer.
Vit Zyka wrote:
1. For a moment I set
shell_escape =f
in `kpsewhich texmf.cnf'
ok, done
2. Input file f.tex:
\startuseMPgraphic{A}
draw unitcircle scaled\overlaywidth;
\stopuseMPgraphic
\defineoverlay
[B]
[\uniqueMPgraphic{A}]
\starttext
luigi.scarso wrote:
Vit, many thanks for your answer.
Vit Zyka wrote:
1. For a moment I set
shell_escape =f
in `kpsewhich texmf.cnf'
ok, done
2. Input file f.tex:
\startuseMPgraphic{A}
draw unitcircle scaled\overlaywidth;
\stopuseMPgraphic
\defineoverlay
[B]
[\uniqueMPgraphic
give me a simple example ?
Of course.
1. For a moment I set
shell_escape =f
in `kpsewhich texmf.cnf'
2. Input file f.tex:
\startuseMPgraphic{A}
draw unitcircle scaled\overlaywidth;
\stopuseMPgraphic
\defineoverlay
[B]
[\uniqueMPgraphic{A}]
\starttext
\framed[background
Randall Skelton wrote:
Hi all,
I've created a small (15x15 mm) tile image (actually a vector PDF)
that I'd like repeat on a cover page but I'm at a bit of a loss as to
how to step repeat* the image. Here is what I have:
\useexternalfigure[cover][background]
\defineoverlay[cover][{\externalfigure
Hi all,
I've created a small (15x15 mm) tile image (actually a vector PDF)
that I'd like repeat on a cover page but I'm at a bit of a loss as to
how to step repeat* the image. Here is what I have:
\useexternalfigure[cover][background]
\defineoverlay[cover][{\externalfigure[cover][repeat=yes
should work.
\startuniqueMPgraphic{DottedFrame}
draw (0,0) --(\overlaywidth,0) dashed withdots;
\stopuniqueMPgraphic
\defineoverlay[DottedFrame]{\uniqueMPgraphic{DottedFrame}}
\starttext
\framed[frame=off,offset=overlay,background=DottedFrame]{How nice!}
\stoptext
--
Eckhart
xscaled \overlaywidth yscaled \overlayheight ;
% fill p withcolor .8white ;
draw bottomboundary p dashed withdots withcolor .625red ;
draw rightboundary p dashed withdots withcolor .625red ;
\stopuniqueMPgraphic
\defineoverlay[DotFrame][\uniqueMPgraphic{DottedFrame
\defineoverlay[border][\uniqueMPgraphic{border}]
\starttext
\bTABLE[frame=off]
\bTR \bTD[background=border] some test \eTD \bTD oeps \eTD \eTR
\bTR \bTD just a test \eTD \bTD[background=border] oeps again \eTD \eTR
\eTABLE
\stoptext
The code hangs:
MP test-mpgraph.4000] [MP test
Nikolai Weibull wrote:
* Willi Egger (Mar 20, 2005 18:00):
May be you should try a buffer to put the typing in. In the overlay
you can call the buffer with \typebuffer[...]
\startbuffer[title]
...
\stopbuffer
\defineoverlay
[TitleGraphic]
[{\startcolor[titlegraphic]\typebuffer[title
I would like to put a rather large and complicated regular expression
into the title-page of a document I'm writing. So far, I haven't had
much luck defining an overlay that uses \starttyping ... \stoptyping.
Basically, what I figured I should do was to write
\defineoverlay
[TitleGraphic
much luck defining an overlay that uses \starttyping ... \stoptyping.
Basically, what I figured I should do was to write
\defineoverlay
[TitleGraphic]
[{
\starttyping
...
\stoptyping
}]
and then
\setupbackgrounds[page][background=TitleGraphic]
But that doesn't work:
! Argument
* Patrick Gundlach (Mar 20, 2005 19:20):
Hello Nicolai,
k, please.
put your \typebuffer stuff in \framed[align=lohi]
That was a very good suggestion, thank you. It worked out fine. This
is what I do now:
\defineoverlay
[TitleGraphic]
[{\framed
[align=middle,width
Hi all,
I used a one-page pdf like background image. The size of paper is A4
(210x297mm). The size of my pdf image is a little bigger (220x311mm).
For the cover, when I used:
\useexternalfigure[cover][cover-1005-4][width=220mm]
\defineoverlay[cover][{\externalfigure[cover]}]
\starttext
:= unitcircle randomized .1 xsized(PaperWidth-1cm) ;
fill p shifted -center p shifted center Page withcolor red ;
StopPage ;
\stopuseMPgraphic
\defineoverlay[cover][\useMPgraphic{cover}]
\starttext
\setupbackgrounds[page][background=cover]
\startstandardmakeup
\raggedcenter
\vfill \definedfont
;
setbounds currentpicture to unitsquare xyscaled
(OverlayWidth,OverlayHeight); \stopuniqueMPgraphic
\defineoverlay[underline][\uniqueMPgraphic{underline}]
\def\aidul{\dosingleempty\doaidul}
\def\doaidul[#1]{\inframed[background=underline,frame=off,#1]}
\setupcolors[state=start]
\startitemize
\item test
David Arnold wrote:
But I am wondering how to use it to set up a big Copyright in the
background?
\setupbackgrounds[page][background=embargo]
\setupcolors[state=start]
\defineoverlay[embargo][{\lightgray\scale[factor=max]{\rotate[rotation=45]{EMBARGO}}}]
\starttext \input tufte \stoptext
Hans
in the
background?
Not really an answer to your question, but I know about this possibility:
\startuniqueMPgraphic{copyright}
draw btex \bf COPYRIGHT etex rotated 60 withcolor .8white;
currentpicture := currentpicture ysized (\overlaywidth-0.5cm);
\stopuniqueMPgraphic
\defineoverlay
background. Suggestions?
The file junk2.tex:
\setupoutput[pdf]
\setupwhitespace[medium]
\startuniqueMPgraphic{concept}
draw btex \bf CONCEPT etex rotated 60 withcolor .8white;
currentpicture:=currentpicture ysized (\overlayheight-0.5cm);
\stopuniqueMPgraphic
\defineoverlay[concept
[pdf]
\setupwhitespace[medium]
\startuniqueMPgraphic{concept}
draw btex \bf CONCEPT etex rotated 60 withcolor .8white;
currentpicture:=currentpicture ysized (\overlayheight-0.5cm);
\stopuniqueMPgraphic
\defineoverlay[concept][\uniqueMPgraphic{concept}]
\setupbackgrounds[page][background
;
fill Field[Top][Text]enlarged (.5cm,4cm) withcolor
white ;
StopPage ;
\stopuseMPgraphic
\defineoverlay[page][\useMPgraphic{page}]
\setupbackgrounds[page][background=page]
What do I have to do for this background appears only in the first
;
fill Field[Top][Text]enlarged (.5cm,4cm) withcolor
white ;
StopPage ;
\stopuseMPgraphic
\defineoverlay[page][\useMPgraphic{page}]
\setupbackgrounds[page][background=page]
\startreuseMPgraphic
\reuseMPgraphic
) ;
fill p withcolor yellow ;
draw origin--(ow,0) yshifted oh withcolor blue ;
clip currentpicture to boundingbox p ;
\stopuniqueMPgraphic
\defineoverlay[rowbg] [\uniqueMPgraphic{row}]
\starttext
% what I want (but in a TABLE)
\framed[background={rowbg}, align={middle,lohi}, strut=no, offset=0pt
withcolor .90white ; draw b ; %- color of title
draw p withcolor blue ;
setbounds currentpicture to a ;
\stopuseMPgraphic
\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
\defineframedtext[FunnyText][frame=off,background=FunnyFrame]
\def\StartFrame{\startFunnyText}
\def\StopFrame
}
circular_shade(OverlayBox,0,red,blue) ;
\stopreusableMPgraphic
\defineoverlay[gradient][\reuseMPgraphic{gradient}]
\definelayer[blocks][width=\paperwidth,height=\paperheight]
\setupbackgrounds[page][background={gradient,blocks}]
\setuplayout[width=middle,height=middle,backspace=7cm]
\starttext
-ypart center p); draw p;
drawoptions (withpen pencircle scaled 1pt withcolor .625blue);
draw (2o,h)--(0,h)--(0,0)--(w,0)--(w,h)--(xpart urcorner p, h) ;
draw boundingbox p;
setbounds currentpicture to unitsquare xyscaled (w,h);
\stopuseMPgraphic
\defineoverlay[FunnyFrame][\useMPgraphic
withcolor blue;
p := unitsquare xyscaled 50pt shifted (0,-25pt);
fill p withcolor blue;
setbounds currentpicture to boundingbox currentpicture leftenlarged 50pt ;
% draw bbox currentpicture withcolor red ;
\stopreusableMPgraphic
\defineoverlay[Pagenumberbackground
or
relative, set to a layer or not). Is this, or something close to it,
possible?
i often use metapost for that (see metafun manual)
\defineoverlay[xxx][\useMPgraphic{xxx}]
\startuseMPgraphic{xxx}
StartPage ;
draw Page enlarged -3cm withpen pencircle scaled 1cm ;
StopPage ;
\stopuseMPgraphic
On Wed, 14 Jan 2004 12:00:11 +0100
Ole Schoening [EMAIL PROTECTED] wrote:
Dear Contexers,
I would like to repeat my question (see below) because I neither got
an answer nor found a solution on my own. I believe that
\defineoverlay cannot produce a solution for my problem because
Dear Contexers,
I would like to repeat my question (see below) because I neither got
an answer nor found a solution on my own. I believe that
\defineoverlay cannot produce a solution for my problem because this
command puts pictures in a different layer and so the main text is
not affected (i.e
Hi Hans!
I'm in trouble with this method. (I supose the error is mine).
I can draw the MP graphic using \useMPgraphic, but when i use
\defineoverlay[bihotzak][\useMPgraphic{bihotz}]
\setupbackgrounds[paper][background=bihotzak]
I get the following error
systems: randomizer starts
Hi,
I'm doing a christmars card in ConTeXt!. I've the following setup
\setuppapersize[CD][A4]
\setuplayout[marking=on,location=middle]
\starttext
\startuseMPgraphic{dummy}
...
...
\stopuseMPgraphic
\defineoverlay[backfigure][\useMPgraphic{dummy}]
\setupbackground[paper
Hi,
I'm doing a christmars card in ConTeXt!. I've the following setup
\setuppapersize[CD][A4]
\setuplayout[marking=on,location=middle]
\starttext
\startuseMPgraphic{dummy}
...
...
\stopuseMPgraphic
\defineoverlay[backfigure][\useMPgraphic{dummy}]
\setupbackground[paper][background=backfigure
At 09:24 15/12/2003, you wrote:
Hi,
I'm doing a christmars card in ConTeXt!. I've the following setup
\setuppapersize[CD][A4]
\setuplayout[marking=on,location=middle]
\starttext
\startuseMPgraphic{dummy}
...
...
\stopuseMPgraphic
\defineoverlay[backfigure][\useMPgraphic{dummy}]
\setupbackground
\defineoverlay[backfigure][\useMPgraphic{dummy}]
\setupbackground[paper][background=backfigure]
\hbox{}
\stoptext
\starttext
\startuseMPgraphic{dummy}
...
...
\stopuseMPgraphic
\defineoverlay[backfigure][\useMPgraphic{dummy}]
\setupbackground[paper][background=backfigure]
\hbox{}
\stoptext
results in fading of ALL of the colors...
\stopuseMPgraphic
\defineoverlay[textBG][\useMPgraphic{tBG}]
\setupbackgrounds[page][background=color,backgroundcolor=blue]
\setupbackgrounds[text][background=textBG]
\input tufte
\stoptext
I would expect that the optical appearance of blue shoud not change
}
\fi
\else
\ifodd\DirtyTrickCounter
\hbox to \overlaywidth{{\hskip10mm}\foregroundbox}
\else
\hbox to \overlaywidth{{\hskip-0.3cm}\foregroundbox}
\fi
\fi
\stopsetups
\defineoverlay
[verydirtytrick]
[\setups{verydirtytrick}]
\starttext
\combinepages
[main.pdf
is really RGB(0,0,1)
% fill p withcolor transparent(normal,.5,\MPcolor{white}); %
This however results in fading of ALL of the colors...
\stopuseMPgraphic
\defineoverlay[textBG][\useMPgraphic{tBG}]
\setupbackgrounds[page][background=color,backgroundcolor=blue]
\setupbackgrounds[text][background
\defineoverlay[textBG][\useMPgraphic{tBG}]
\setupbackgrounds[page][background=color,backgroundcolor=blue]
\setupbackgrounds[text][background=textBG]
\input tufte
\stoptext
Looks like an acrobat bug to me; if you use gsview, it works ok; there are
more problems with acrobat and transparencies, like
Let me provide an answer myself: the btex ... etex doesn't seem to
work. This code:
\startuseMPgraphic{draft}
draw DRAFT infont phvb scaled 9 rotated 57 withcolor .85white ;
currentpicture := currentpicture ysized (\overlayheight-3cm) ;
\stopuseMPgraphic
\defineoverlay[draft][\uniqueMPgraphic
\startuniqueMPgraphic{copyright}
picture p ; p := btex COPYRIGHT etex rotated 90 ;
setbounds p to boundingbox p enlarged 1pt ;
draw p withcolor .8white ;
currentpicture := currentpicture
xysized (\overlaywidth,\overlayheight) ;
\stopuniqueMPgraphic
\defineoverlay[copyright][\uniqueMPgraphic
(vertically) the brouillon to \overlayheight -3
cm. This is very large
\stopuseMPgraphic
\defineoverlay[brouillon][\uniqueMPgraphic{brouillon}]
\setupbackgrounds[page][background=brouillon]
and this one centers your graphic (the large brouillon) on the page.
I should say that I am not enough
;
currentpicture := currentpicture
xysized (\overlaywidth,\overlayheight) ;
\stopuniqueMPgraphic
\defineoverlay[copyright][\uniqueMPgraphic{copyright}]
\setupbackgrounds[text][rightmargin][background=copyright]
But I don't see anything. The log shows that metapost calculated a
background, but I don't see
]
\enableregime[utf]
\setupbodyfont[7pt]
% This works, but is not nice.
\startuniqueMPgraphic{splittop}
draw (0,0)--(OverlayWidth,OverlayHeight) withcolor white;%should not be
necessary
draw (0,0.725*OverlayHeight)--(OverlayWidth,0.725*OverlayHeight);
\stopuniqueMPgraphic
\defineoverlay[splittop
[7pt]
% This works, but is not nice.
\startuniqueMPgraphic{splittop}
draw (0,0)--(OverlayWidth,OverlayHeight) withcolor white;%should not be
necessary
draw (0,0.725*OverlayHeight)--(OverlayWidth,0.725*OverlayHeight);
\stopuniqueMPgraphic
\defineoverlay[splittop][\uniqueMPgraphic{splittop
boundingbox p;
setbounds currentpicture to unitsquare xyscaled (w,h);
\stopuseMPgraphic
\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
\defineframedtext[FunnyText][frame=off,background=FunnyFrame]
\def\StartFrame{\startFunnyText}
\def\StopFrame{\stopFunnyText}
\def\FrameTitle#1%
{\setMPtext
(OverlayWidth,OverlayHeight)
smoothed .25ExHeight ;
fi ;
draw p withcolor \MPvar{circlecolor} ;
\stopuniqueMPgraphic
\defineoverlay[circled-x][\uniqueMPgraphic{circled-x}]
\defineframed
[circleframed]
[frame=off,
background=circled-x,
circled-x:alternative=3,
circled-x:circlecolor
701 - 788 of 788 matches
Mail list logo